Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Eclipselink 2.6 does not work with MongoDB(Eclipselink 2.6 does not work with MongoDB)
Eclipselink 2.6 does not work with MongoDB [message #1701729] Wed, 15 July 2015 09:35 Go to next message
Yaniv Peleg is currently offline Yaniv PelegFriend
Messages: 1
Registered: July 2015
Junior Member
When creating entity manager (factory.createEntityManager()) I get:
Internal Exception: java.lang.ClassCastException: org.eclipse.persistence.nosql.adapters.mongo.MongoPlatform cannot be cast to org.eclipse.persistence.platform.database.DatabasePlatform

When I rollbacked to version 2.5.2 it is working.
Re: Eclipselink 2.6 does not work with MongoDB [message #1701761 is a reply to message #1701729] Wed, 15 July 2015 13:03 Go to previous messageGo to next message
Lukas JungmannFriend
Messages: 36
Registered: November 2013
Location: Prague, Czech Republic
Member
Thanks for the heads up, it should be already fixed in latest 2.6.1/2.7 builds, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=462125

--lukas
Re: Eclipselink 2.6 does not work with MongoDB [message #1753655 is a reply to message #1701761] Wed, 08 February 2017 14:36 Go to previous message
Elisa Croci is currently offline Elisa CrociFriend
Messages: 1
Registered: February 2017
Junior Member
Hi,

When creating entity manager i get
(javax.ejb.EJBException) javax.ejb.EJBException: Cannot obtain a free instance.; nested exception is:
org.apache.openejb.InvalidateReferenceException: java.rmi.RemoteException: The bean encountered a non-application exception; nested exception is:
javax.persistence.PersistenceException: Exception [EclipseLink-28019] (Eclipse Persistence Services - 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Deployment of PersistenceUnit [nosqlgaucho-pu] failed. Close all factories for this PersistenceUnit.
Internal Exception: java.lang.ClassCastException: org.eclipse.persistence.nosql.adapters.mongo.MongoPlatform cannot be cast to org.eclipse.persistence.internal.databaseaccess.DatabasePlatform: The bean encountered a non-application exception;

I have tried with various versions of eclipse-link. From 2.5.2 to 2.6.4 but still I get always the same problem.
Maybe my pom's dependencies are wrong?

<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.nosql</artifactId>
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>org.mongodb</groupId>
<artifactId>mongo-java-driver</artifactId>
<version>2.13.3</version>
</dependency>


Thank you,
Elisa
Previous Topic:refreshObject after commit causes problem for value change in the next transaction
Next Topic:EclipseLink Moxy query by xpath using getValueByXPath
Goto Forum:
  


Current Time: Tue Mar 19 05:37:50 GMT 2024

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

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

Back to the top