Skip to main content

how do I use eclipselink 2 in glassfish 2.1.1?

No replies
matrixV
Offline
Joined: 2012-10-16
Points: 0

I'm trying to use eclipseLink 2.4 in glassfish 2.1.1.. is this possible?

I copied the eclipseLink jars in {glassfish-dir}/lib/endorsed as I saw somewhere in internet... to use jpa2.0 libraries instead of the default. I changed my persistence.xml to include
org.eclipse.persistence.jpa.PersistenceProvider

then, when ran the app, I got this error:

java.lang.NoClassDefFoundError: javax/transaction/Synchronization
at org.eclipse.persistence.transaction.JTATransactionController.(JTATransactionController.java:65)
at org.eclipse.persistence.transaction.glassfish.GlassfishTransactionController.(GlassfishTransactionController.java:36)...

I added the jta-1.1.jar to the {glassfish-dir}/lib/endorsed directory but now I'm having:

EclipseLink, version: Eclipse Persistence Services - 2.4.1.v20121003-ad44345...
java.lang.NullPointerException
at java.util.ResourceBundle.getBundle(ResourceBundle.java:950)
at org.eclipse.persistence.exceptions.i18n.ExceptionMessageGenerator.buildMessage(ExceptionMessageGenerator.java:47)
at org.eclipse.persistence.exceptions.ValidationException.platformClassNotFound(ValidationException.java:1531)
at org.eclipse.persistence.sessions.DatasourceLogin.setPlatformClassName(DatasourceLogin.java:515)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:692)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:215)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:542)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getDatabaseSession(EntityManagerFactoryDelegate.java:186)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:278)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:304)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:289)
at com.sun.enterprise.util.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:326)
at com.sun.enterprise.util.EntityManagerWrapper.createNamedQuery(EntityManagerWrapper.java:724)

maybe glassfish 2.1.1 doesn't support jpa2.0
please help

matrixV