Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » Issue with EclipseLink "ValidationException"(Cannot add a query whose types conflict with an existing query)
icon5.gif  Issue with EclipseLink "ValidationException" [message #1703666] Tue, 04 August 2015 05:10 Go to next message
Reiner Lott is currently offline Reiner LottFriend
Messages: 4
Registered: August 2013
Junior Member
Hi folks,

we do use EclipseLink 2.4.1 in a SE Environment.

Sometimes when we start our application the following error occures:

|31.07.2015 06:05:23:112|WARN|pool-7-thread-1|eclipselink|log:144| -- ServerSession(22497564)
Local Exception Stack: 


Exception [EclipseLink-7092] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Cannot add a query whose types conflict with an existing query. Query To Be Added: [ReadAllQuery(name="BauplanStueckliste_findByMandantKtrAndModellAndCatiaId" referenceClass=BauplanStueckliste jpql="SELECT s FROM BauplanStueckliste s where s.mandant = :mandant AND s.kostentraeger = :kostentraeger AND s.modell like :modell AND s.catiaId = :catiaId")] is named: [BauplanStueckliste_findByMandantKtrAndModellAndCatiaId] with arguments [[class java.lang.String, class java.lang.String, class java.lang.String, int]].The existing conflicting query: [ReadAllQuery(name="BauplanStueckliste_findByMandantKtrAndModellAndCatiaId" referenceClass=BauplanStueckliste jpql="SELECT s FROM BauplanStueckliste s where s.mandant = :mandant AND s.kostentraeger = :kostentraeger AND s.modell like :modell AND s.catiaId = :catiaId")] is named: [BauplanStueckliste_findByMandantKtrAndModellAndCatiaId] with arguments: [[class java.lang.String, class java.lang.String, class java.lang.String, int]].
	at org.eclipse.persistence.exceptions.ValidationException.existingQueryTypeConflict(ValidationException.java:919)
	at org.eclipse.persistence.internal.sessions.AbstractSession.addQuery(AbstractSession.java:456)
	at org.eclipse.persistence.internal.sessions.AbstractSession.addQuery(AbstractSession.java:421)
	at org.eclipse.persistence.internal.sessions.AbstractSession.processJPAQueries(AbstractSession.java:2246)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:540)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:777)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:735)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:217)
	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:282)
	at de.meyerwerft.common.db.helper.PersistenceService.getEntityManager(PersistenceService.java:160)
	at de.meyerwerft.common.db.helper.PersistenceService.begin(PersistenceService.java:219)
	at de.meyerwerft.it.infotexte.DF_InfotexteImpl.holenInfotexte(DF_InfotexteImpl.java:49)
	at de.meyerwerft.ui.swing.komponenten.supportcenter.presenter.Supportcenter_dlg_Presenter$Runnable_auslesenInfotexte.run(Supportcenter_dlg_Presenter.java:513)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
|31.07.2015 06:05:23:113|WARN|pool-3-thread-1|eclipselink|log:144| -- ServerSession(22497564)
javax.persistence.PersistenceException: Exception [EclipseLink-28019] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Deployment of PersistenceUnit [pu.jlm12] failed. Close all factories for this PersistenceUnit.
Internal Exception: Exception [EclipseLink-7092] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Cannot add a query whose types conflict with an existing query. Query To Be Added: [ReadAllQuery(name="BauplanStueckliste_findByMandantKtrAndModellAndCatiaId" referenceClass=BauplanStueckliste jpql="SELECT s FROM BauplanStueckliste s where s.mandant = :mandant AND s.kostentraeger = :kostentraeger AND s.modell like :modell AND s.catiaId = :catiaId")] is named: [BauplanStueckliste_findByMandantKtrAndModellAndCatiaId] with arguments [[class java.lang.String, class java.lang.String, class java.lang.String, int]].The existing conflicting query: [ReadAllQuery(name="BauplanStueckliste_findByMandantKtrAndModellAndCatiaId" referenceClass=BauplanStueckliste jpql="SELECT s FROM BauplanStueckliste s where s.mandant = :mandant AND s.kostentraeger = :kostentraeger AND s.modell like :modell AND s.catiaId = :catiaId")] is named: [BauplanStueckliste_findByMandantKtrAndModellAndCatiaId] with arguments: [[class java.lang.String, class java.lang.String, class java.lang.String, int]].
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.createDeployFailedPersistenceException(EntityManagerSetupImpl.java:616)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:596)
	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:282)
	at de.meyerwerft.common.db.helper.PersistenceService.getEntityManager(PersistenceService.java:160)
	at de.meyerwerft.common.db.helper.PersistenceService.begin(PersistenceService.java:219)
	at de.meyerwerft.it.infotexte.DF_InfotexteImpl.holenInfotexte(DF_InfotexteImpl.java:49)
	at de.meyerwerft.ui.swing.komponenten.supportcenter.presenter.Supportcenter_dlg_Presenter$Runnable_auslesenInfotexte.run(Supportcenter_dlg_Presenter.java:513)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: Exception [EclipseLink-28019] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.EntityManagerSetupException
Exception Description: Deployment of PersistenceUnit [pu.jlm12] failed. Close all factories for this PersistenceUnit.
Internal Exception: Exception [EclipseLink-7092] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Cannot add a query whose types conflict with an existing query. Query To Be Added: [ReadAllQuery(name="BauplanStueckliste_findByMandantKtrAndModellAndCatiaId" referenceClass=BauplanStueckliste jpql="SELECT s FROM BauplanStueckliste s where s.mandant = :mandant AND s.kostentraeger = :kostentraeger AND s.modell like :modell AND s.catiaId = :catiaId")] is named: [BauplanStueckliste_findByMandantKtrAndModellAndCatiaId] with arguments [[class java.lang.String, class java.lang.String, class java.lang.String, int]].The existing conflicting query: [ReadAllQuery(name="BauplanStueckliste_findByMandantKtrAndModellAndCatiaId" referenceClass=BauplanStueckliste jpql="SELECT s FROM BauplanStueckliste s where s.mandant = :mandant AND s.kostentraeger = :kostentraeger AND s.modell like :modell AND s.catiaId = :catiaId")] is named: [BauplanStueckliste_findByMandantKtrAndModellAndCatiaId] with arguments: [[class java.lang.String, class java.lang.String, class java.lang.String, int]].
	at org.eclipse.persistence.exceptions.EntityManagerSetupException.deployFailed(EntityManagerSetupException.java:229)
	... 13 more
Caused by: Exception [EclipseLink-7092] (Eclipse Persistence Services - 2.4.1.v20121003-ad44345): org.eclipse.persistence.exceptions.ValidationException
Exception Description: Cannot add a query whose types conflict with an existing query. Query To Be Added: [ReadAllQuery(name="BauplanStueckliste_findByMandantKtrAndModellAndCatiaId" referenceClass=BauplanStueckliste jpql="SELECT s FROM BauplanStueckliste s where s.mandant = :mandant AND s.kostentraeger = :kostentraeger AND s.modell like :modell AND s.catiaId = :catiaId")] is named: [BauplanStueckliste_findByMandantKtrAndModellAndCatiaId] with arguments [[class java.lang.String, class java.lang.String, class java.lang.String, int]].The existing conflicting query: [ReadAllQuery(name="BauplanStueckliste_findByMandantKtrAndModellAndCatiaId" referenceClass=BauplanStueckliste jpql="SELECT s FROM BauplanStueckliste s where s.mandant = :mandant AND s.kostentraeger = :kostentraeger AND s.modell like :modell AND s.catiaId = :catiaId")] is named: [BauplanStueckliste_findByMandantKtrAndModellAndCatiaId] with arguments: [[class java.lang.String, class java.lang.String, class java.lang.String, int]].
	at org.eclipse.persistence.exceptions.ValidationException.existingQueryTypeConflict(ValidationException.java:919)
	at org.eclipse.persistence.internal.sessions.AbstractSession.addQuery(AbstractSession.java:456)
	at org.eclipse.persistence.internal.sessions.AbstractSession.addQuery(AbstractSession.java:421)
	at org.eclipse.persistence.internal.sessions.AbstractSession.processJPAQueries(AbstractSession.java:2246)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:540)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:777)
	at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:735)
	at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:217)
	at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:542)
	... 11 more


This error is very hard to reproduce and occures randomly... Maybe this is a bug in the implementation of EclipseLink 2.4.1 ?

Does this error message lead to a common recipe for working around it? As in, "oh, right, when you see that error, look for a different syntactically invalid query" or something along those lines? I can tell you there are no duplicates.

Maybe someone already faced this dilemma, and I would like to know how he/she/they solved it.

Thanks in advance
Reiner

[Updated on: Tue, 04 August 2015 12:30]

Report message to a moderator

Re: Issue with EclipseLink "ValidationException" [message #1704878 is a reply to message #1703666] Mon, 10 August 2015 11:25 Go to previous message
Reiner Lott is currently offline Reiner LottFriend
Messages: 4
Registered: August 2013
Junior Member
Hi,

finally our team has solved this issue - there was a problem with our swing application and the asynchronous instatiation of the EntityManagerFactory.

KR,
Reiner
Previous Topic:Persistance external File JPA
Next Topic:[Moxy] Bean validation is not working if current class has no annoated fields
Goto Forum:
  


Current Time: Wed Sep 18 14:58:04 GMT 2024

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

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

Back to the top