[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [eclipselink-users] Decrypting error message
|
Hi Laird,
The reason you see the exception on persist is likely because it is the first
action on the entity manager. EclipseLink entity manager, by default, do part
of their initialization the first time they are accessed.
Where is the query defined? Annotations? XML? Is it on an Entity?
MappedSuperclass? Can you provide a snippet of how it is defined and include the
annotations/XML that define the Entity itself?
Also, I am still interested in what happens if you change the name.
Thanks,
Tom
Laird Nelson wrote:
On Tue, Aug 9, 2011 at 9:28 AM, Tom Ware <tom.ware@xxxxxxxxxx
<mailto:tom.ware@xxxxxxxxxx>> wrote:
What is the full stack trace of the exception?
Stand back. The original report I got from the developer was that the
query failed on deployment, but that doesn't look to be the case. It
does look like it fails on persist:
Caused by: Exception [EclipseLink-7092] (Eclipse Persistence Services -
2.2.0.v20110202-r8913):
org.eclipse.persistence.exceptions.ValidationException
Exception Description: Cannot add a query whose types conflict with an
existing query. Query To Be Added: [ReadAllQuery(name="Minor.findAll"
referenceClass=MinorEntity jpql="SELECT o FROM Minor o")] is named:
[Minor.findAll] with arguments [[]].The existing conflicting query:
[ReadAllQuery(name="Minor.findAll" referenceClass=MinorEntity
jpql="SELECT o FROM Minor o")] is named: [Minor.findAll] with arguments:
[[]].
at
org.eclipse.persistence.exceptions.ValidationException.existingQueryTypeConflict(ValidationException.java:888)
at
org.eclipse.persistence.internal.sessions.AbstractSession.addQuery(AbstractSession.java:422)
at
org.eclipse.persistence.internal.sessions.AbstractSession.addQuery(AbstractSession.java:395)
at
org.eclipse.persistence.internal.sessions.AbstractSession.processJPAQueries(AbstractSession.java:2175)
at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.initializeDescriptors(DatabaseSessionImpl.java:414)
at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.postConnectDatasource(DatabaseSessionImpl.java:680)
at
org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:641)
at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:249)
at
org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:237)
at
com.sun.enterprise.container.common.impl.EntityManagerWrapper._getDelegate(EntityManagerWrapper.java:208)
at
com.sun.enterprise.container.common.impl.EntityManagerWrapper.persist(EntityManagerWrapper.java:269)
at
com.foobar.ngp.financial.assessment.ejb.AssessmentManagerBean.getCalculatedChargePreview(AssessmentManagerBean.java:762)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.glassfish.ejb.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1052)
at
org.glassfish.ejb.security.application.EJBSecurityManager.invoke(EJBSecurityManager.java:1124)
at
com.sun.ejb.containers.BaseContainer.invokeBeanMethod(BaseContainer.java:5367)
at
com.sun.ejb.EjbInvocation.invokeBeanMethod(EjbInvocation.java:619)
at
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
at com.sun.ejb.EjbInvocation.proceed(EjbInvocation.java:571)
at
com.sun.ejb.containers.interceptors.SystemInterceptorProxy.doAround(SystemInterceptorProxy.java:162)
at
com.sun.ejb.containers.interceptors.SystemInterceptorProxy.aroundInvoke(SystemInterceptorProxy.java:144)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.ejb.containers.interceptors.AroundInvokeInterceptor.intercept(InterceptorManager.java:862)
at
com.sun.ejb.containers.interceptors.AroundInvokeChainImpl.invokeNext(InterceptorManager.java:801)
at
com.sun.ejb.containers.interceptors.InterceptorManager.intercept(InterceptorManager.java:371)
at
com.sun.ejb.containers.BaseContainer.__intercept(BaseContainer.java:5339)
at
com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:5327)
at
com.sun.ejb.containers.EJBLocalObjectInvocationHandler.invoke(EJBLocalObjectInvocationHandler.java:214)
Try grepping for "Minor.findAll" instead of the query. Any results?
Still no duplicates. Believe me, I *want* there to be duplicates. :-)
What happens if you change the name of the "Minor.findall" query?
Does the exception still show up? Does it have the new name?
Not sure; I'll try that.
Have you tried the 2.2.1 release? The 2.3 release? Do you see the
problem in those releases?
We're in code freeze; can't upgrade right now. Thanks for your help.
Best,
Laird
------------------------------------------------------------------------
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users