Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 369877 - Eclipse ClassNotFoundException: org/eclipse/persistence/platform/server/sunas/SunAS9ServerPlatform
Summary: Eclipse ClassNotFoundException: org/eclipse/persistence/platform/server/sunas...
Status: CLOSED WORKSFORME
Alias: None
Product: Gemini.JPA
Classification: RT
Component: Core (show other bugs)
Version: 1.0.0   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: Unassigned   Edit
Assignee: Michael Keith CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-26 18:23 EST by Aaron Whiteside CLA
Modified: 2013-04-11 06:56 EDT (History)
1 user (show)

See Also:


Attachments
Bundle to reproduce the issue. (9.49 KB, application/x-java-archive)
2012-01-26 18:23 EST, Aaron Whiteside CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron Whiteside CLA 2012-01-26 18:23:11 EST
Created attachment 210160 [details]
Bundle to reproduce the issue.

Using Glassfish 3.1.2-b19 (http://dlc.sun.com.edgesuite.net/glassfish/3.1.2/promoted/glassfish-3.1.2-b19-unix.sh) and version 1.0 (Stable) of Gemini JPA.

To reproduce the issue you will need to setup a DataSource called jdbc/osgi-example (you can see it in the persistence.xml).

Then deploy the attached bundle.

[#|2012-01-26T11:17:22.913-0500|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=55;_ThreadName=Thread-2;|ERROR: Bundle org.eclipse.gemini.jpa [276] EventDispatcher: Error during dispatch. (javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [osgi-example] failed.
Internal Exception: Exception [EclipseLink-28006] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: ClassNotFound: [org.eclipse.persistence.platform.server.sunas.SunAS9ServerPlatform] specified in [eclipselink.target-server] property.
Internal Exception: java.lang.ClassNotFoundException: org/eclipse/persistence/platform/server/sunas/SunAS9ServerPlatform)|#]

[#|2012-01-26T11:17:22.920-0500|SEVERE|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=55;_ThreadName=Thread-2;|javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [osgi-example] failed.
Internal Exception: Exception [EclipseLink-28006] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: ClassNotFound: [org.eclipse.persistence.platform.server.sunas.SunAS9ServerPlatform] specified in [eclipselink.target-server] property.
Internal Exception: java.lang.ClassNotFoundException: org/eclipse/persistence/platform/server/sunas/SunAS9ServerPlatform
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1402)
at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.callPredeploy(JPAInitializer.java:98)
at org.eclipse.persistence.internal.jpa.deployment.JPAInitializer.initPersistenceUnits(JPAInitializer.java:306)
at org.eclipse.gemini.jpa.provider.GeminiOSGiInitializer.initializeFromBundle(GeminiOSGiInitializer.java:119)
at org.eclipse.gemini.jpa.provider.EclipseLinkOSGiProvider.assignPersistenceUnitsInBundle(EclipseLinkOSGiProvider.java:191)
at org.eclipse.gemini.jpa.PersistenceBundleExtender.tryAssigningPersistenceUnitsInBundle(PersistenceBundleExtender.java:172)
at org.eclipse.gemini.jpa.PersistenceBundleExtender.bundleChanged(PersistenceBundleExtender.java:310)
at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:868)
at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:789)
at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:514)
at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4244)
at org.apache.felix.framework.Felix.updateBundle(Felix.java:2186)
at org.apache.felix.framework.BundleImpl.update(BundleImpl.java:962)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.update(DirectoryWatcher.java:1070)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.update(DirectoryWatcher.java:849)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:445)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:263)
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [osgi-example] failed.
Internal Exception: Exception [EclipseLink-28006] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: ClassNotFound: [org.eclipse.persistence.platform.server.sunas.SunAS9ServerPlatform] specified in [eclipselink.target-server] property.
Internal Exception: java.lang.ClassNotFoundException: org/eclipse/persistence/platform/server/sunas/SunAS9ServerPlatform
at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:221)
... 17 more
Caused by: Exception [EclipseLink-28006] (Eclipse Persistence Services - 2.3.2.v20111125-r10461): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: ClassNotFound: [org.eclipse.persistence.platform.server.sunas.SunAS9ServerPlatform] specified in [eclipselink.target-server] property.
Internal Exception: java.lang.ClassNotFoundException: org/eclipse/persistence/platform/server/sunas/SunAS9ServerPlatform
at org.eclipse.persistence.exceptions.EntityManagerSetupException.classNotFoundForProperty(EntityManagerSetupException.java:133)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.findClassForProperty(EntityManagerSetupImpl.java:842)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.updateServerPlatform(EntityManagerSetupImpl.java:639)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1159)
... 16 more
Caused by: java.lang.ClassNotFoundException: org/eclipse/persistence/platform/server/sunas/SunAS9ServerPlatform
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:119)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.findClass(EntityManagerSetupImpl.java:832)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.findClassForProperty(EntityManagerSetupImpl.java:838)
... 18 more
|#]
Comment 1 Aaron Whiteside CLA 2012-01-26 18:27:51 EST
Forgot to mention I'm running with JDK 1.7.0_01 on Linux.
Comment 2 Aaron Whiteside CLA 2012-01-26 18:30:45 EST
I also have hybrid mode enabled for JPA..

$GLASSFISH_HOME/glassfish/config/osgi.properties org.glassfish.osgijpa.extension.useHybridPersistenceProviderResolver=true 

Not sure if that is causing the problem.
Comment 3 Aaron Whiteside CLA 2012-01-26 18:35:20 EST
OK so I tried turning that off, no change, still get a ClassNotFoundException: org/eclipse/persistence/platform/server/sunas/SunAS9ServerPlatform.
Comment 4 Michael Keith CLA 2012-05-22 11:12:54 EDT
Is this still a problem? What was/is your configuration?
You seem to have the EclipseLink 2.3.2.v20111125-r10461 bundles installed (in the modules dir?). Where did you put the Gemini JPA bundle? How are you getting it to start?
Comment 5 Michael Keith CLA 2013-03-21 17:08:57 EDT
No more data received. 
Please reopen if this is seen to reoccur.
Comment 6 Giulio Ruggeri CLA 2013-04-11 06:13:01 EDT
I think this issue is not related to Gemini JPA but to Equinox-Glassfish.

I tried using Apache Aries JPA on Equinox based Glassfish instance and this is what happens:

javax.persistence.PersistenceException: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [codin.test.osgi.model] failed.
Internal Exception: Exception [EclipseLink-28006] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: ClassNotFound: [org.eclipse.persistence.platform.server.sunas.SunAS9ServerPlatform] specified in [eclipselink.target-server] property.
Internal Exception: java.lang.ClassNotFoundException: org.eclipse.persistence.platform.server.sunas.SunAS9ServerPlatform
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.createPredeployFailedPersistenceException(EntityManagerSetupImpl.java:1541)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1532)
	at org.eclipse.persistence.jpa.PersistenceProvider.createContainerEntityManagerFactory(PersistenceProvider.java:235)
	at org.apache.aries.jpa.container.impl.EntityManagerFactoryManager.createEntityManagerFactories(EntityManagerFactoryManager.java:329)
	at org.apache.aries.jpa.container.impl.EntityManagerFactoryManager.registerEntityManagerFactories(EntityManagerFactoryManager.java:242)
	at org.apache.aries.jpa.container.impl.EntityManagerFactoryManager.bundleStateChange(EntityManagerFactoryManager.java:185)
	at org.apache.aries.jpa.container.impl.PersistenceBundleManager.addingService(PersistenceBundleManager.java:197)
	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:932)
	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:1)
	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:894)
	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:107)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.dispatchEvent(BundleContextImpl.java:861)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:819)
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:771)
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:130)
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:214)
	at org.eclipse.osgi.framework.internal.core.BundleContextImpl.registerService(BundleContextImpl.java:433)
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerService(BlueprintContainerImpl.java:408)
	at org.apache.aries.blueprint.container.ServiceRecipe.register(ServiceRecipe.java:191)
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.registerServices(BlueprintContainerImpl.java:670)
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.doRun(BlueprintContainerImpl.java:339)
	at org.apache.aries.blueprint.container.BlueprintContainerImpl.run(BlueprintContainerImpl.java:242)
	at org.apache.aries.blueprint.utils.threading.impl.DiscardableRunnable.run(DiscardableRunnable.java:48)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
	at java.lang.Thread.run(Thread.java:662)
Caused by: Exception [EclipseLink-28018] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Predeployment of PersistenceUnit [codin.test.osgi.model] failed.
Internal Exception: Exception [EclipseLink-28006] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: ClassNotFound: [org.eclipse.persistence.platform.server.sunas.SunAS9ServerPlatform] specified in [eclipselink.target-server] property.
Internal Exception: java.lang.ClassNotFoundException: org.eclipse.persistence.platform.server.sunas.SunAS9ServerPlatform
	at org.eclipse.persistence.exceptions.EntityManagerSetupException.predeployFailed(EntityManagerSetupException.java:221)
	... 35 more
Caused by: Exception [EclipseLink-28006] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: ClassNotFound: [org.eclipse.persistence.platform.server.sunas.SunAS9ServerPlatform] specified in [eclipselink.target-server] property.
Internal Exception: java.lang.ClassNotFoundException: org.eclipse.persistence.platform.server.sunas.SunAS9ServerPlatform
	at org.eclipse.persistence.exceptions.EntityManagerSetupException.classNotFoundForProperty(EntityManagerSetupException.java:133)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.findClassForProperty(EntityManagerSetupImpl.java:966)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.updateServerPlatform(EntityManagerSetupImpl.java:736)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.predeploy(EntityManagerSetupImpl.java:1287)
	... 33 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.persistence.platform.server.sunas.SunAS9ServerPlatform
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
	at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:249)
	at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:124)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.findClass(EntityManagerSetupImpl.java:956)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.findClassForProperty(EntityManagerSetupImpl.java:962)
	... 35 more

The same configuration works on Felix

Details:
JDK version: 1.6.0_43
Glassfish version: 3.1.2.2
Equinox Framework version: 8.2.v20130124-134944
EclipseLink Core version: 2.4.1.v20121003-ad44345
Apache Aries JPA version: 1.0.0
Comment 7 Michael Keith CLA 2013-04-11 06:56:44 EDT
Ok. Thanks for the additional data point.