Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Eclipselink assumes erroneous NoPlatform when target-server not set
Eclipselink assumes erroneous NoPlatform when target-server not set [message #1778898] Sat, 23 December 2017 08:16 Go to next message
Wolfgang Winter is currently offline Wolfgang WinterFriend
Messages: 4
Registered: December 2017
Junior Member
Hello,
I use an own PersistenceProvider which is a wrapper around EclipseLink provider (2.7) in a JTA persistence unit on Tomee 7.0.2. Now eclipselink.target-server is not set by Tomee in PersistenceUnitInfo and EclipseLink sets NoServerPlatform which disables JTA. This is definitely wrong as the persistence unit is of transaction-type JTA. As a consequence I get TransactionRequiredException even if within a JTA transaction.

Proposed improvement: when transaction-type is JTA and eclipselink.target-server is not set, instead of silently setting NoServerPlatform an Exception should be thrown indicating that eclipselink.target-server must be set explicitly.
It took me a lot of hours to drill down the Eclipselink code to find this out.
thanks
Re: Eclipselink assumes erroneous NoPlatform when target-server not set [message #1779106 is a reply to message #1778898] Tue, 02 January 2018 20:43 Go to previous message
Wolfgang Winter is currently offline Wolfgang WinterFriend
Messages: 4
Registered: December 2017
Junior Member
Additional observation in Glassfish 4.1.2: Here a NullpointerException is thrown explicitly in the code if eclipselink.target-server is not set:
java.lang.NullPointerException
	at org.eclipse.persistence.platform.server.ServerPlatformUtils.createServerPlatform(ServerPlatformUtils.java:99)
	at org.eclipse.persistence.sessions.factories.SessionManager.init(SessionManager.java:77)
	at org.eclipse.persistence.sessions.factories.SessionManager.<clinit>(SessionManager.java:71)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.addSessionToGlobalSessionManager(EntityManagerSetupImpl.java:907)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.initSession(EntityManagerSetupImpl.java:2671)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:675)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:205)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:305)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:337)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:303)
	at org.glassfish.persistence.jpa.JPADeployer$2.visitPUD(JPADeployer.java:451)

In Glassfish/Toplink, additionally toplink.target-server must be set to the same value as eclipselink.target-server (SunAS9).
Please be a little more kind to us and give some more information in Exceptions and not only throw a NullPointerException if a required property is missing. Thank you
Previous Topic:Eclipselink sync rmi cache coordination and Database Change Notification in large scale project
Next Topic:@Version on @MappedSuperclass
Goto Forum:
  


Current Time: Sat Jul 21 11:36:18 GMT 2018

Powered by FUDForum. Page generated in 0.01635 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top