Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

  1. ,
    via Stack Overflow by dereck

    Add localDataSource="true" to the realm when using local database.

  2. ,
    via Stack Overflow by john

    Make sure you use the same name for your database everywhere in context.xml.

Solutions on the web

via Hibernate JIRA by Anthony Ogier, 2 years ago
via atlassian.net by Unknown author, 2 years ago
via Hibernate JIRA by Anthony Ogier, 1 year ago
via xluat.com by Unknown author, 2 years ago
via Stack Overflow by nicost
, 1 year ago
via hibernate.org by Unknown author, 2 years ago
javax.naming.NameNotFoundException: Name java:/comp/env/jdbc/myproject is not bound in this Context	at org.apache.naming.NamingContext.lookup(NamingContext.java:820)	at org.apache.naming.NamingContext.lookup(NamingContext.java:154)	at javax.naming.InitialContext.lookup(InitialContext.java:415)	at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:114)	at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.configure(DatasourceConnectionProviderImpl.java:115)	at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)	at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)	at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)	at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.buildJdbcConnectionAccess(JdbcServicesImpl.java:260)	at org.hibernate.engine.jdbc.internal.JdbcServicesImpl.configure(JdbcServicesImpl.java:94)	at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:111)	at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:234)	at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:206)	at org.hibernate.cfg.Configuration.buildTypeRegistrations(Configuration.java:1885)	at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1843)	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850)	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843)	at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:397)	at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842)	at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:75)	at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:54)	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)	at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:39)	at com.mycompany.myproject.data.EntityManagerFactoryProducer.createEntityManagerFactory(EntityManagerFactoryProducer.java:16)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:606)	at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:90)	at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:83)	at org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:96)	at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:151)	at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:183)	at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)	at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:98)	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:99)	at org.jboss.weld.proxies.EntityManagerFactory$1746355237$Proxy$_$$_WeldClientProxy.createEntityManager(Unknown Source)	at com.mycompany.myproject.data.EntityManagerFactoryProducer.createEntityManager(EntityManagerFactoryProducer.java:27)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:606)	at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstanceWithSpecialValue(MethodInjectionPoint.java:90)	at org.jboss.weld.injection.MethodInjectionPoint.invokeOnInstance(MethodInjectionPoint.java:83)	at org.jboss.weld.injection.producer.ProducerMethodProducer.produce(ProducerMethodProducer.java:96)	at org.jboss.weld.injection.producer.AbstractMemberProducer.produce(AbstractMemberProducer.java:151)	at org.jboss.weld.bean.AbstractProducerBean.create(AbstractProducerBean.java:183)	at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:96)	at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:98)	at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:99)	at org.jboss.weld.proxies.EntityManager$1746355238$Proxy$_$$_WeldClientProxy.getTransaction(Unknown Source)	at com.mycompany.myframework.transaction.TransactionalInterceptor.interceptTransactional(TransactionalInterceptor.java:47)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:606)	at org.jboss.weld.interceptor.reader.SimpleInterceptorInvocation$SimpleMethodInvocation.invoke(SimpleInterceptorInvocation.java:74)	at org.jboss.weld.interceptor.chain.AbstractInterceptionChain.invokeNext(AbstractInterceptionChain.java:116)	at org.jboss.weld.interceptor.chain.AbstractInterceptionChain.invokeNextInterceptor(AbstractInterceptionChain.java:94)	at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:43)	at org.jboss.weld.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:36)	at org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:51)	at com.mycompany.myproject.service.ProfileService$Proxy$_$$_WeldSubclass.findAll(Unknown Source)	at com.mycompany.myproject.service.ProfileService$Proxy$_$$_WeldClientProxy.findAll(Unknown Source)	at com.mycompany.myproject.ws.administration.UserSearchWS.init(UserSearchWS.java:56)	at com.mycompany.myproject.ws.administration.UserSearchWS$Proxy$_$$_WeldClientProxy.init(Unknown Source)	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)	at java.lang.reflect.Method.invoke(Method.java:606)	at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)	at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:288)	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:242)	at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:229)	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)	at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)	at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)	at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)	at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)	at java.lang.Thread.run(Thread.java:744)