[ 
https://issues.apache.org/jira/browse/ARIES-691?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Balazs Zsoldos updated ARIES-691:
---------------------------------

    Attachment: eclipselinkAdapter.patch

Hi,

I made it work in my environment finally. I upload a patch that contains every 
change that I did (based on current svn).

Please note that I found two problems: ARIES-703 and ARIES-704. The first does 
not come up if we have ASM in the bundle list. I provided a patch for the 
second that you may like. So the patch ARIES-704 is also necessary to make this 
patch work.

There is one final problem:
- I changed the EntityManagerFactoryManager to create the entitymanager 
factories only when the bundle is in STARTING state (not RESOLVED). This fixes 
the nullpointer problem at my side. However two unit tests fail in this case as 
createEntityManagerFactories is not called during processing them. I have not 
looked more into but it might be much easier to change the unit test for those 
who wrote it...

BTW: The stacktrace of the nullpointer is the following:


[#|2011-07-05T16:05:41.442+0200|SEVERE|glassfish3.1|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=43;_ThreadName=Thread-1;|javax.persistence.PersistenceException:
 Exception [EclipseLink-28018] (Eclipse Persistence Services - 
2.2.0.v20110202-r8913): 
org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit 
[biz.everit.audit.persistence.entity] failed.
Internal Exception: java.lang.NullPointerException
        at 
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1127)
        at 
org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory(PersistenceProvider.java:187)
        at 
org.apache.aries.jpa.eclipselink.adapter.Activator$EclipseLinkProviderService$1.createContainerEntityManagerFactory(Activator.java:200)
        at 
org.apache.aries.jpa.container.impl.EntityManagerFactoryManager.createEntityManagerFactories(EntityManagerFactoryManager.java:261)
        at 
org.apache.aries.jpa.container.impl.EntityManagerFactoryManager.bundleStateChange(EntityManagerFactoryManager.java:156)
        at 
org.apache.aries.jpa.container.impl.PersistenceBundleManager.modifiedBundle(PersistenceBundleManager.java:285)
        at 
org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:453)
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:237)
        at 
org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:413)
        at 
org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:807)
        at 
org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:729)
        at 
org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:610)
        at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:3758)
        at org.apache.felix.framework.Felix.access$600(Felix.java:80)
        at 
org.apache.felix.framework.Felix$FelixResolver.fireResolvedEvents(Felix.java:4296)
        at 
org.apache.felix.framework.Felix$FelixResolver.resolve(Felix.java:4062)
        at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3436)
        at org.apache.felix.framework.Felix.startBundle(Felix.java:1727)
        at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922)
        at 
org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:1175)
        at 
org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:1153)
        at 
org.apache.felix.fileinstall.internal.DirectoryWatcher.processAllBundles(DirectoryWatcher.java:1146)
        at 
org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:456)
        at 
org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:263)
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 
2.2.0.v20110202-r8913): 
org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit 
[biz.everit.audit.persistence.entity] failed.
Internal Exception: java.lang.NullPointerException
        at 
org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:210)
        ... 24 more
Caused by: java.lang.NullPointerException
        at 
org.apache.aries.util.internal.DefaultWorker.setupListener(DefaultWorker.java:98)
        at 
org.apache.aries.util.internal.DefaultWorker.getClassLoader(DefaultWorker.java:86)
        at 
org.apache.aries.util.AriesFrameworkUtil.getClassLoaderForced(AriesFrameworkUtil.java:93)
        at 
org.apache.aries.jpa.container.unit.impl.PersistenceUnitInfoImpl.getClassLoader(PersistenceUnitInfoImpl.java:89)
        at 
org.apache.aries.jpa.eclipselink.adapter.Activator$PersistenceUnitProxyWithTargetServer.getClassLoader(Activator.java:100)
        at 
org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:984)
        ... 23 more
|#]


> Add tests for EclipseLink - possibly include fragment for EclipseLink support
> -----------------------------------------------------------------------------
>
>                 Key: ARIES-691
>                 URL: https://issues.apache.org/jira/browse/ARIES-691
>             Project: Aries
>          Issue Type: Improvement
>          Components: JPA
>    Affects Versions: 0.4
>            Reporter: Timothy Ward
>            Assignee: Valentin Mahrwald
>             Fix For: 0.4
>
>         Attachments: eclipselinkAdapter.patch, eclipselinkadapter.patch
>
>
> We should test the Aries JPA container with EclipseLink as well as OpenJPA to 
> give us better coverage. This may involve writing code to expose the 
> EclipseLink PersistenceProvider implementation

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to