Uploaded image for project: 'ShrinkWrap'
  1. ShrinkWrap
  2. SHRINKWRAP-308

NPE with EclipseLink while loading asset

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.0.0-beta-5
    • None
    • api
    • None

      With EclipseLink 3.2.0 as JPA provider and Arquillian, I get the following exception at ShrinkWrapClassLoader:138 which is
      final Asset asset = archive.get(path).getAsset();
      Path value is: BasicPath [context=/META-INF/orm.xml]

      java.lang.RuntimeException: Could not inject members
      at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.injectClass(CDIInjectionEnricher.java:135)
      at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.enrich(CDIInjectionEnricher.java:78)
      at org.jboss.arquillian.test.impl.TestInstanceEnricher.enrich(TestInstanceEnricher.java:52)
      at org.jboss.arquillian.container.test.impl.ClientTestInstanceEnricher.enrich(ClientTestInstanceEnricher.java:51)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
      at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createContext(ContainerEventController.java:130)
      at org.jboss.arquillian.container.test.impl.client.ContainerEventController.createBeforeContext(ContainerEventController.java:112)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
      at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:82)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
      at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:68)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
      at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:54)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
      at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:134)
      at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:114)
      at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.before(EventTestRunnerAdaptor.java:95)
      at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:198)
      at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:290)
      at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:45)
      at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:216)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:161)
      at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:290)
      at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:45)
      at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:175)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:123)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
      Caused by: Exception [EclipseLink-30005] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.PersistenceUnitLoadingException
      Exception Description: An exception was thrown while searching for persistence archives with ClassLoader: org.jboss.shrinkwrap.api.classloader.ShrinkWrapClassLoader@464d41e2
      Internal Exception: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.EntityManagerSetupException
      Exception Description: Predeployment of PersistenceUnit [testPu] failed.
      Internal Exception: java.lang.NullPointerException
      at org.eclipse.persistence.exceptions.PersistenceUnitLoadingException.exceptionSearchingForPersistenceResources(PersistenceUnitLoadingException.java:126)
      at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:115)
      at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:78)
      at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
      at org.jboss.arquillian.container.weld.ee.embedded_1_1.mock.MockJpaInjectionServices.initialiseEntityManager(MockJpaInjectionServices.java:54)
      at org.jboss.arquillian.container.weld.ee.embedded_1_1.mock.MockJpaInjectionServices.resolvePersistenceContext(MockJpaInjectionServices.java:38)
      at org.jboss.weld.util.Beans.injectEEFields(Beans.java:781)
      at org.jboss.weld.manager.SimpleInjectionTarget$1.proceed(SimpleInjectionTarget.java:119)
      at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:54)
      at org.jboss.weld.manager.SimpleInjectionTarget.inject(SimpleInjectionTarget.java:114)
      at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.injectNonContextualInstance(CDIInjectionEnricher.java:145)
      at org.jboss.arquillian.testenricher.cdi.CDIInjectionEnricher.injectClass(CDIInjectionEnricher.java:125)
      ... 65 more
      Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.EntityManagerSetupException
      Exception Description: Predeployment of PersistenceUnit [testPu] failed.
      Internal Exception: java.lang.NullPointerException
      at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1385)
      at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:98)
      at org.eclipse.persistence.jpa.PersistenceProvider.createEntityManagerFactory(PersistenceProvider.java:105)
      ... 75 more
      Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.0.v20110604-r9504): org.eclipse.persistence.exceptions.EntityManagerSetupException
      Exception Description: Predeployment of PersistenceUnit [testPu] failed.
      Internal Exception: java.lang.NullPointerException
      at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:221)
      ... 78 more
      Caused by: java.lang.NullPointerException
      at org.jboss.shrinkwrap.api.classloader.ShrinkWrapClassLoader$1$1.getInputStream(ShrinkWrapClassLoader.java:138)
      at java.net.URL.openStream(URL.java:1010)
      at org.eclipse.persistence.internal.jpa.deployment.URLArchive.getEntryAsURL(URLArchive.java:61)
      at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.loadStandardMappingFiles(MetadataProcessor.java:405)
      at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.loadMappingFiles(MetadataProcessor.java:330)
      at org.eclipse.persistence.internal.jpa.deployment.PersistenceUnitProcessor.processORMetadata(PersistenceUnitProcessor.java:516)
      at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1320)
      ... 77 more

            arubinge@redhat.com Andrew Rubinger (Inactive)
            m1ckey Michal Huniewicz (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: