title: tomcat 7 + jersey + hibernate 4.5.1 - NameNotFoundException - tried everything
body: <p>Thanks in advance for any help.  I'm at my wit's end with this one.  I've got everything setup (I think properly) but nothing works.  So posting here in the hopes that someone can help.</p>
  
  <p>POM.xml:</p>
  
  <pre><code>    &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
    &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
    &lt;groupId&gt;iam&lt;/groupId&gt;
    &lt;artifactId&gt;iam&lt;/artifactId&gt;
    &lt;packaging&gt;war&lt;/packaging&gt;
    &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
    &lt;name&gt;IAMS Web Service&lt;/name&gt;
    &lt;url&gt;http://maven.apache.org&lt;/url&gt;
    &lt;properties&gt;
          &lt;jersey.version&gt;2.5.1&lt;/jersey.version&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;maven.build.timestamp.format&gt;yyyyMMdd'T'HHmmss&lt;/maven.build.timestamp.format&gt;
          &lt;hibernate-core-version&gt;4.3.1.Final&lt;/hibernate-core-version&gt;
          &lt;codi.version&gt;1.0.5&lt;/codi.version&gt;
      &lt;/properties&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;codelds&lt;/id&gt;
              &lt;url&gt;https://code.lds.org/nexus/content/groups/main-repo&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
        &lt;dependencies&gt;
          &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish.jersey&lt;/groupId&gt;
          &lt;artifactId&gt;jersey-bom&lt;/artifactId&gt;
          &lt;version&gt;${jersey.version}&lt;/version&gt;
          &lt;type&gt;pom&lt;/type&gt;
          &lt;scope&gt;import&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
                  &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
                  &lt;artifactId&gt;hibernate-core&lt;/artifactId&gt;
                  &lt;version&gt;${hibernate-core-version}&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.hibernate&lt;/groupId&gt;
                  &lt;artifactId&gt;hibernate-entitymanager&lt;/artifactId&gt;
                  &lt;version&gt;${hibernate-core-version}&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.glassfish.jersey.containers&lt;/groupId&gt;
                  &lt;artifactId&gt;jersey-container-servlet-core&lt;/artifactId&gt;
                  &lt;version&gt;${jersey.version}&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;!--  jackson dependencies for pojo/json support --&gt;
              &lt;dependency&gt;
              &lt;groupId&gt;org.glassfish.jersey.media&lt;/groupId&gt;
              &lt;artifactId&gt;jersey-media-json-jackson&lt;/artifactId&gt;
              &lt;version&gt;${jersey.version}&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;!-- end jackson deps --&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.glassfish.jersey.media&lt;/groupId&gt;
                  &lt;artifactId&gt;jersey-media-json-processing&lt;/artifactId&gt;
                  &lt;version&gt;${jersey.version}&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
                  &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
              &lt;version&gt;3.0&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;!-- junit test and jersey client features --&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;junit&lt;/groupId&gt;
                  &lt;artifactId&gt;junit&lt;/artifactId&gt;
                  &lt;version&gt;4.9&lt;/version&gt;
                  &lt;scope&gt;test&lt;/scope&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;com.sun.jersey&lt;/groupId&gt;
                  &lt;artifactId&gt;jersey-client&lt;/artifactId&gt;
                  &lt;version&gt;1.8&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;com.oracle&lt;/groupId&gt;
                  &lt;artifactId&gt;ojdbc6&lt;/artifactId&gt;
                  &lt;version&gt;11.2.0.3&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;javax.mail&lt;/groupId&gt;
                  &lt;artifactId&gt;mail&lt;/artifactId&gt;
                  &lt;version&gt;1.4&lt;/version&gt;
                  &lt;scope&gt;provided&lt;/scope&gt;
              &lt;/dependency&gt;
              &lt;!--  Weld/CDI Begin --&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;javax.enterprise&lt;/groupId&gt;
                  &lt;artifactId&gt;cdi-api&lt;/artifactId&gt;
                  &lt;version&gt;1.1&lt;/version&gt;
                  &lt;scope&gt;provided&lt;/scope&gt;
              &lt;/dependency&gt;
               &lt;dependency&gt;
                  &lt;groupId&gt;javax.annotation&lt;/groupId&gt;
                  &lt;artifactId&gt;jsr250-api&lt;/artifactId&gt;
                  &lt;version&gt;1.0&lt;/version&gt;
                  &lt;scope&gt;provided&lt;/scope&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
                  &lt;artifactId&gt;javax.servlet-api&lt;/artifactId&gt;
                  &lt;version&gt;3.0.1&lt;/version&gt;
                  &lt;scope&gt;provided&lt;/scope&gt;
              &lt;/dependency&gt;
        &lt;/dependencies&gt;
        &lt;build&gt;
          &lt;finalName&gt;iam&lt;/finalName&gt;
              &lt;plugins&gt;
                  &lt;plugin&gt;
                      &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                      &lt;version&gt;3.1&lt;/version&gt;
                      &lt;inherited&gt;true&lt;/inherited&gt;
                      &lt;configuration&gt;
                          &lt;source&gt;1.7&lt;/source&gt;
                          &lt;target&gt;1.7&lt;/target&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
                  &lt;plugin&gt;
                      &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                      &lt;version&gt;2.4&lt;/version&gt;
                      &lt;configuration&gt;
                          &lt;packagingExcludes&gt;src/test/*&lt;/packagingExcludes&gt;
                      &lt;/configuration&gt;
                  &lt;/plugin&gt;
              &lt;plugin&gt;
              &lt;groupId&gt;org.eclipse.m2e&lt;/groupId&gt;
              &lt;artifactId&gt;lifecycle-mapping&lt;/artifactId&gt;
              &lt;version&gt;1.0.0&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;lifecycleMappingMetadata&gt;
                      &lt;pluginExecutions&gt;
                          &lt;!-- copy-dependency plugin --&gt;
                          &lt;pluginExecution&gt;
                              &lt;pluginExecutionFilter&gt;
                                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                                  &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
                                  &lt;versionRange&gt;[1.0.0,)&lt;/versionRange&gt;
                                  &lt;goals&gt;
                                      &lt;goal&gt;copy-dependencies&lt;/goal&gt;
                                  &lt;/goals&gt;
                              &lt;/pluginExecutionFilter&gt;
                              &lt;action&gt;
                                  &lt;ignore /&gt;
                              &lt;/action&gt;
                          &lt;/pluginExecution&gt;
                      &lt;/pluginExecutions&gt;
                  &lt;/lifecycleMappingMetadata&gt;
              &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;/plugins&gt;
        &lt;/build&gt;
      &lt;/project&gt;
  </code></pre>
  
  <p>persistence.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;persistence version="2.0" 
              xmlns="http://java.sun.com/xml/ns/persistence"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
              xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"&gt;
    &lt;persistence-unit name="iamwsDev" transaction-type="RESOURCE_LOCAL"&gt;
    &lt;provider&gt;org.hibernate.jpa.HibernatePersistenceProvider&lt;/provider&gt;
    &lt;non-jta-data-source&gt;java:comp/env/jdbc/id1dev&lt;/non-jta-data-source&gt;
    &lt;properties&gt;
      &lt;property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" /&gt;
      &lt;property name="hibernate.hbm2ddl.auto" value="none" /&gt;
      &lt;property name="hibernate.show_sql" value="false" /&gt;
      &lt;property name="hibernate.format_sql" value="false" /&gt;
      &lt;property name="hibernate.default_schema" value="****"/&gt;
    &lt;/properties&gt;
    &lt;/persistence-unit&gt;
  &lt;/persistence&gt;
  </code></pre>
  
  <p>Web.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!-- This web.xml file is not required when using Servlet 3.0 container,
       see implementation details http://jersey.java.net/nonav/documentation/latest/jax-rs.html --&gt;
  &lt;web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;IAM Web Service Application&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.glassfish.jersey.servlet.ServletContainer&lt;/servlet-class&gt;
          &lt;!-- Don't allow scanning of resources, set each resource individually (below with provider.classnames) --&gt;
          &lt;!-- 
              &lt;init-param&gt;
                  &lt;param-name&gt;jersey.config.server.provider.packages&lt;/param-name&gt;
                  &lt;param-value&gt;******&lt;/param-value&gt;
              &lt;/init-param&gt;
           --&gt;
          &lt;!--  comma separate the list of resource providers --&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;jersey.config.server.provider.classnames&lt;/param-name&gt;
                  &lt;param-value&gt;
                      ******.resources.*****
                  &lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;init-param&gt;
            &lt;param-name&gt;com.sun.jersey.api.json.POJOMappingFeature&lt;/param-name&gt;
            &lt;param-value&gt;true&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;javax.ws.rs.Application&lt;/param-name&gt;
              &lt;param-value&gt;****.MyApplication&lt;/param-value&gt;
          &lt;/init-param&gt;
          &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
      &lt;/servlet&gt;
      &lt;listener&gt;
      &lt;listener-class&gt;*****.ServiceContextListener&lt;/listener-class&gt;
      &lt;/listener&gt;
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;**** Application&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
      &lt;resource-ref&gt;
        &lt;description&gt;DB Connection&lt;/description&gt;
        &lt;res-ref-name&gt;jdbc/id1dev&lt;/res-ref-name&gt;
        &lt;res-type&gt;javax.sql.DataSource&lt;/res-type&gt;
        &lt;res-auth&gt;Container&lt;/res-auth&gt;
      &lt;/resource-ref&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>Server.xml:  </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You under the Apache License, Version 2.0
    (the "License"); you may not use this file except in compliance with
    the License.  You may obtain a copy of the License at
  
        http://www.apache.org/licenses/LICENSE-2.0
  
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
  --&gt;&lt;!-- Note:  A "Server" is not itself a "Container", so you may not
       define subcomponents such as "Valves" at this level.
       Documentation at /docs/config/server.html
   --&gt;&lt;Server port="8005" shutdown="SHUTDOWN"&gt;
    &lt;!-- Security listener. Documentation at /docs/config/listeners.html
    &lt;Listener className="org.apache.catalina.security.SecurityListener" /&gt;
    --&gt;
    &lt;!--APR library loader. Documentation at /docs/apr.html --&gt;
    &lt;Listener SSLEngine="on" className="org.apache.catalina.core.AprLifecycleListener"/&gt;
    &lt;!--Initialize Jasper prior to webapps are loaded. Documentation at /docs/jasper-howto.html --&gt;
    &lt;Listener className="org.apache.catalina.core.JasperListener"/&gt;
    &lt;!-- Prevent memory leaks due to use of particular java/javax APIs--&gt;
    &lt;Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/&gt;
    &lt;Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/&gt;
    &lt;Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/&gt;
  
    &lt;!-- Global JNDI resources
         Documentation at /docs/jndi-resources-howto.html
    --&gt;
    &lt;GlobalNamingResources&gt;
      &lt;!-- Editable user database that can also be used by
           UserDatabaseRealm to authenticate users
      --&gt;
      &lt;Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/&gt;
      &lt;Resource auth="Container" driverClassName="oracle.jdbc.OracleDriver" maxActive="20" maxIdle="10" maxWait="-1" name="jdbc/id1dev" password="****" type="javax.sql.DataSource" url="jdbc:oracle:thin:@&lt;url&gt;:&lt;port&gt;:&lt;sid&gt;" username="*****"/&gt;
    &lt;/GlobalNamingResources&gt;
  </code></pre>
  
  <p>And FINALLY, running simple code like the following is throwing an exception (stack trace later):</p>
  
  <pre><code>public EntityManager getEntityManager() {
      EntityManagerFactory factory = Persistence.createEntityManagerFactory("jpa");
      if (factory != null) {
          return factory.createEntityManager();
      }
      return null;
  }
  </code></pre>
  
  <p>STACK TRACE:</p>
  
  <pre><code>   Got Connection jdbc:oracle:thin:@iddb1.dev.id.ubc.ca:1521:id1dev, UserName=*****, Oracle JDBC driver, 
      Success obtaining connection
      2014-01-31 15:31:53 DEBUG logging:53 - Logging Provider: org.jboss.logging.Log4jLoggerProvider
      2014-01-31 15:31:53 WARN  HibernatePersistence:58 - HHH015016: Encountered a deprecated javax.persistence.spi.PersistenceProvider [org.hibernate.ejb.HibernatePersistence]; use [org.hibernate.jpa.HibernatePersistenceProvider] instead.
      2014-01-31 15:31:53 WARN  HibernatePersistence:58 - HHH015016: Encountered a deprecated javax.persistence.spi.PersistenceProvider [org.hibernate.ejb.HibernatePersistence]; use [org.hibernate.jpa.HibernatePersistenceProvider] instead.
      2014-01-31 15:31:53 WARN  HibernatePersistence:58 - HHH015016: Encountered a deprecated javax.persistence.spi.PersistenceProvider [org.hibernate.ejb.HibernatePersistence]; use [org.hibernate.jpa.HibernatePersistenceProvider] instead.
      2014-01-31 15:31:53 DEBUG ClassLoaderServiceImpl:139 - Incoming config yielded no classloaders; adding standard SE ones
      2014-01-31 15:31:54 DEBUG HibernatePersistenceProvider:102 - Located and parsed 1 persistence units; checking each
      2014-01-31 15:31:54 DEBUG HibernatePersistenceProvider:110 - Checking persistence-unit [name=iamwsDev, explicit-provider=org.hibernate.jpa.HibernatePersistenceProvider] against incoming persistence unit name [iamwsDev]
      2014-01-31 15:31:54 DEBUG ProviderChecker:106 - Persistence-unit [iamwsDev] requested PersistenceProvider [org.hibernate.jpa.HibernatePersistenceProvider]
      2014-01-31 15:31:54 DEBUG LogHelper:117 - PersistenceUnitInfo [
          name: iamwsDev
          persistence provider classname: org.hibernate.jpa.HibernatePersistenceProvider
          classloader: null
          excludeUnlistedClasses: false
          JTA datasource: null
          Non JTA datasource: java:comp/env/jdbc/id1dev
          Transaction type: RESOURCE_LOCAL
          PU root URL: file:/Users/nchecknita/UBC/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/iamws/WEB-INF/classes/
          Shared Cache Mode: null
          Validation Mode: null
          Jar files URLs []
          Managed classes names []
          Mapping files names []
          Properties [
              hibernate.default_schema: CWLOGIN
              hibernate.dialect: org.hibernate.dialect.Oracle10gDialect
              hibernate.show_sql: false
              hibernate.hbm2ddl.auto: none
              hibernate.format_sql: false]
      2014-01-31 15:31:54 DEBUG IntegratorServiceImpl:63 - Adding Integrator [org.hibernate.cfg.beanvalidation.BeanValidationIntegrator].
      2014-01-31 15:31:54 DEBUG IntegratorServiceImpl:63 - Adding Integrator [org.hibernate.secure.spi.JaccIntegrator].
      2014-01-31 15:31:54 DEBUG IntegratorServiceImpl:63 - Adding Integrator [org.hibernate.cache.internal.CollectionCacheInvalidator].
      2014-01-31 15:31:54 DEBUG IntegratorServiceImpl:63 - Adding Integrator [org.hibernate.jpa.event.spi.JpaIntegrator].
      2014-01-31 15:31:54 DEBUG StrategySelectorImpl:79 - Registering named strategy selector [org.hibernate.dialect.Dialect] : [MySQL5] -&gt; [org.hibernate.dialect.MySQL5Dialect] (replacing [org.hibernate.dialect.MySQL5Dialect])
      2014-01-31 15:31:54 DEBUG StrategySelectorImpl:79 - Registering named strategy selector [org.hibernate.dialect.Dialect] : [MySQL5InnoDB] -&gt; [org.hibernate.dialect.MySQL5InnoDBDialect] (replacing [org.hibernate.dialect.MySQL5InnoDBDialect])
      2014-01-31 15:31:54 INFO  Version:54 - HHH000412: Hibernate Core {4.3.1.Final}
      2014-01-31 15:31:54 INFO  Environment:239 - HHH000206: hibernate.properties not found
      2014-01-31 15:31:54 INFO  Environment:346 - HHH000021: Bytecode provider name : javassist
      2014-01-31 15:31:55 DEBUG ServiceBinding:85 - Overriding existing service binding 
  [STUFF SNIPPED]
      2014-01-31 15:31:56 INFO  Version:66 - HCANN000001: Hibernate Commons Annotations {4.0.4.Final}
  [MORE STUFF SNIPPED]
  strategy [enhanced-table] -&gt; [org.hibernate.id.enhanced.TableGenerator]
      2014-01-31 15:31:56 DEBUG Configuration:1841 - Preparing to build session factory with filters : {}
      2014-01-31 15:31:56 DEBUG HibernatePersistenceProvider:80 - Unable to build entity manager factory
      org.hibernate.engine.jndi.JndiException: Unable to lookup JNDI name [java:comp/env/jdbc/id1dev]
          at org.hibernate.engine.jndi.internal.JndiServiceImpl.locate(JndiServiceImpl.java:117)
          at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.configure(DatasourceConnectionProviderImpl.java:115)
          at org.hibernate.boot.registry.internal.StandardServiceRegistryImpl.configureService(StandardServiceRegistryImpl.java:89)
          at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:206)
          at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:178)
          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:89)
          at org.hibernate.service.internal.AbstractServiceRegistryImpl.initializeService(AbstractServiceRegistryImpl.java:206)
          at org.hibernate.service.internal.AbstractServiceRegistryImpl.getService(AbstractServiceRegistryImpl.java:178)
          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:399)
          at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842)
          at org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:73)
          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 ca.ubc.iamws.model.DbConnect.getEntityManager(DbConnect.java:24)
          at ca.ubc.iamws.resources.EmployeeAutoCreate.getIt(EmployeeAutoCreate.java:66)
          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.glassfish.jersey.server.model.internal.ResourceMethodInvocationHandlerFactory$1.invoke(ResourceMethodInvocationHandlerFactory.java:81)
          at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher$1.run(AbstractJavaResourceMethodDispatcher.java:151)
          at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.invoke(AbstractJavaResourceMethodDispatcher.java:171)
          at org.glassfish.jersey.server.model.internal.JavaResourceMethodDispatcherProvider$TypeOutInvoker.doDispatch(JavaResourceMethodDispatcherProvider.java:195)
          at org.glassfish.jersey.server.model.internal.AbstractJavaResourceMethodDispatcher.dispatch(AbstractJavaResourceMethodDispatcher.java:104)
          at org.glassfish.jersey.server.model.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:402)
          at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:349)
          at org.glassfish.jersey.server.model.ResourceMethodInvoker.apply(ResourceMethodInvoker.java:106)
          at org.glassfish.jersey.server.ServerRuntime$1.run(ServerRuntime.java:259)
          at org.glassfish.jersey.internal.Errors$1.call(Errors.java:271)
          at org.glassfish.jersey.internal.Errors$1.call(Errors.java:267)
          at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
          at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
          at org.glassfish.jersey.internal.Errors.process(Errors.java:267)
          at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:318)
          at org.glassfish.jersey.server.ServerRuntime.process(ServerRuntime.java:236)
          at org.glassfish.jersey.server.ApplicationHandler.handle(ApplicationHandler.java:1010)
          at org.glassfish.jersey.servlet.WebComponent.service(WebComponent.java:373)
          at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:382)
          at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:345)
          at org.glassfish.jersey.servlet.ServletContainer.service(ServletContainer.java:220)
          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:52)
          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:409)
          at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1044)
          at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
          at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
          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)
      Caused by: javax.naming.NameNotFoundException: Name [java:comp/env/jdbc/id1dev] is not bound in this Context. Unable to find [java:comp].
          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)
  </code></pre>