Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] Exception with ManytoOne with latest version of eclipselink.jar

To answer your questions –

1)      I can get this to happen every time.

2)      So the lead up to this issue was that there is a different JDBC process that will update these objects in a different web app.  So what we needed to do was to turn off the caching of the entities so that when we loaded them it would grab them from the database every time.  At the time we were using the 2.2.0.v20100731-r7961 version.  When I turned it on, we started having issues with our entities that used a DiscriminatorColumn.  So what I tried was to update to the current RC4 version of the eclipselink jar.  This seems to have resolved the DiscriminatorColumn issue but now this issue with QueryException is happening.  There has been no other code changes to the entities themselves prior to these switches.  So I just tried taking out the <property name="eclipselink.cache.shared.default" value="false"/> and this does seem to  fix this QueryException issue.

3)      Here are the other items mapped in CpLocation –

    @OneToMany(cascade = CascadeType.ALL, mappedBy = "cpLocation")

    @PrivateOwned

    private Set<CpBuilding> cpBuildings = new HashSet<CpBuilding>(0);

 

    @OneToMany(cascade = CascadeType.ALL, mappedBy = "cpLocation")

    @PrivateOwned

    private Set<CpClassification> cpClassifications = new TreeSet<CpClassification>();

 

    // bi-directional many-to-many association to CpLobs

    @OneToMany(cascade = CascadeType.ALL, mappedBy = "cpLocation")

    private Set<CpLobLocation> cpLobLocations = new HashSet<CpLobLocation>(0);

 

    @OneToMany(cascade = CascadeType.ALL, mappedBy = "cpLocation")

    @PrivateOwned

    private Set<CpLocationInterestLink> cpLocationInterestLinks = new HashSet<CpLocationInterestLink>();

   

    //Certain Additional Interest Name Types are premium bearing.

    //For these, we are creating a coverage on the premise

    @OneToMany(cascade = CascadeType.ALL, mappedBy = "cpLocation")

    @PrivateOwned

    private Set<CpLocationCoverage> cpLocationCoverages = new HashSet<CpLocationCoverage>(0);

 

4)      From the flow of the code I have breakpoints in it seems like it goes through loading CpLob then goes into CpLobState then tries to grab CpLocations. .. Along with a half dozen other enities that are tied to CpLob.

5)      Right now just doing the persist is making this happen.

6)      So it  looks like it is in the CpLobState and trying to get all the CpLocations associated to it.

 

I am trying to pair this down to just the 4 entities I have included so far to see if this issue still persists.  Considering the amount of dependencies I have around it, it may take some time.

 

Thanks for all your help on this.

 

From: eclipselink-users-bounces@xxxxxxxxxxx [mailto:eclipselink-users-bounces@xxxxxxxxxxx] On Behalf Of Christopher Delahunt
Sent: Friday, February 04, 2011 1:49 PM
To: EclipseLink User Discussions
Subject: Re: [eclipselink-users] Exception with ManytoOne with latest version of eclipselink.jar

 

 To track down why the field value is null, you will need to go back to where valueholder that causes the query was created see whats going wrong.  I have generally found it easier to narrow down a test case than to try debugging through a large process, as the act of making a test case can be used to narrow down the code paths that might be involved in the problem - and is required anyway if it turns out to be a bug. 

 If you have this in a debugger, try figuring out the specific object who's indirection being triggered and then go back to see how that entity was read in, as this is what builds its valueholder (and sets the row to be used for the resulting query when triggered). 
From what you've shown, I suspect the problem is you are merging a detached Trans object with 1:M to Location which has 1:M relationship to State, all of which use lazy relations and are triggered.  The problem occurs when merging Transaction's collection of locations into the managed versions, as one of the managed versions has an untriggered collection of State objects.  The merge process forces these to be triggered, causing the problem exception. 

Some questions that might help track down the problem:
1) how frequently can you get this to occur?
2) In another forum post you mention you have the cache turned off - why, and does turning it on work around the problem?
3) what other objects are mapped to Location?
4) What is going on in the transaction that might cause Location objects to be read in? 
5) what types of queries are issues, and what are the settings used?  (ie are fetch joins, refreshes etc used, and how do they affect the Location object)
6) Can you narrow down which location object's collection is being accessed when the exception occurs? 

Best Regards,
Chris

On 04/02/2011 1:57 PM, Kevin Haskett wrote:

It does not seem to be going through this method for this query.  The exception is getting thrown because of this statement –

if (value == AbstractRecord.noEntry) {   - in ParameterExpression.getValue

The value is getting set from looking at translationRow.getIndicatingNoentry for this field CP_LOB_STATE.LOB_STATE_ID

Any ideas why this field is not on the translationRow (DatabaseRecord)?  I examine the fields and the underlying Vector has no values in it.

 

I am not sure I will easily be able to create a small reproducible scenario at this point in a short time frame.

 

From: Guy Pelletier [mailto:guy.pelletier@xxxxxxxxxx]
Sent: Friday, February 04, 2011 10:00 AM
To: Kevin Haskett
Cc: EclipseLink User Discussions
Subject: Re: [eclipselink-users] Exception with ManytoOne with latest version of eclipselink.jar

 

Still passes for me with this 1-M.

Have a look at rowFromArguments in org.eclipse.persistence.queries.DatabaseQuery.

Cheers,
Guy

On 04/02/2011 10:47 AM, Kevin Haskett wrote:

Not sure what was going on with my debugger.. I have recompiled and it now shows the HashSet getting set with the CpLocation item correctly.

 

I see your CpLobState entity does not have this –

    @OneToMany(cascade = CascadeType.ALL, mappedBy = "cpLobState")

    private Set<CpLocation> cpLocations = new HashSet<CpLocation>(0);

 

Thanks

 

Also … I am walking through the eclipselink Source… Where does it set the arguments for the ReadAllQuery?

 

From: Guy Pelletier [mailto:guy.pelletier@xxxxxxxxxx]
Sent: Friday, February 04, 2011 8:54 AM
To: Kevin Haskett
Cc: EclipseLink User Discussions
Subject: Re: [eclipselink-users] Exception with ManytoOne with latest version of eclipselink.jar

 

Hi Kevin,

The indirectset is used for the LAZY instantiation, that is ok.

So far I have not been able to reproduce your error. Below is the model and test I am running. I'm testing on Oracle.

Maybe I am missing something else?

Cheers,
Guy

----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

@Entity
@Table(name = "CP_TRANSACTION")
@Cache(alwaysRefresh = true)
public class CpTransaction {   
    public CpTransaction(){}

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "TRANSACTION_ID", /*unique = true,*/ nullable = false, precision = 11, scale = 0)
    private Long transactionId;

    @OneToMany(cascade = CascadeType.ALL, mappedBy = "cpTransaction")
    @PrivateOwned
    public Set<CpLocation> cpLocations = new HashSet<CpLocation>(0);
   
    public void addCpLocation(CpLocation cpLocation) {
        cpLocations.add(cpLocation);
        cpLocation.cpTransaction = this;
    }

}

@Entity
@Table(name = "CP_LOCATION")
@Cache(alwaysRefresh = true)
@SecondaryTable(name = "CP_LOCATION_PKG")
public class CpLocation  {
    public CpLocation() {}

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "LOCATION_ID", /*unique = true,*/ nullable = false, precision = 11, scale = 0)
    private Long locationId;

    @ManyToOne(cascade = CascadeType.ALL)
    @JoinColumn(name = "TRANSACTION_ID", nullable = false)
    public CpTransaction cpTransaction;

    @ManyToOne(cascade = CascadeType.ALL)
    @JoinColumn(name = "LOB_STATE_ID", table = "CP_LOCATION_PKG")
    public CpLobState cpLobState;
}

@Entity
@Table(name = "CP_LOB_STATE")
public class CpLobState {

    public CpLobState() {}

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "LOB_STATE_ID", /*unique = true,*/ nullable = false, precision = 11, scale = 0)
    private Long lobStateId;

    @Column(name = "LOB_STATE", nullable = false, length = 2)
    public String lobState;

}

and my test:

    public void testKevinHaskett() {
        EntityManager em = createEntityManager(DDL_PU);

        try {
            getServerSession(DDL_PU).setLogLevel(0);
           
            beginTransaction(em);
       
            CpTransaction transaction = new CpTransaction();
           
            CpLobState state1 = new CpLobState();
            state1.lobState = "s1";
           
            CpLocation location1 = new CpLocation();
            location1.cpLobState = state1;
            transaction.addCpLocation(location1);
           
            em.persist(transaction);
            commitTransaction(em);

            // Clear and try a refresh.
            clearCache(DDL_PU);
            em = createEntityManager(DDL_PU);
           
            beginTransaction(em);
            em.merge(transaction);
           
            CpLocation location2 = new CpLocation();
            CpLobState state2 = new CpLobState();
            state2.lobState = "s2";
            location2.cpLobState = state2;
            transaction.addCpLocation(location2);
           
            commitTransaction(em);
           
        } catch (RuntimeException e) {
            if (isTransactionActive(em)) {
                rollbackTransaction(em);
            }
   
            fail("Error occurred : " + e);
        } finally {
            closeEntityManager(em);
        }
    }

On 04/02/2011 9:47 AM, Kevin Haskett wrote:

I am not sure if this helps or not but while I was debugging this problem I noticed that the CpLocation entities cpLobState member was set but when I looked at the HashSet of cpLocations on CpLobState entity it says {IndirectSet: not instantiated}. So I put some break points in the method where these items are getting set.

 

For CpLobState  this is the member definitions I have been examining -

    @OneToMany(cascade = CascadeType.ALL, mappedBy = "cpLobState")

    private Set<CpLocation> cpLocations = new HashSet<CpLocation>(0);

 

    @OneToMany(cascade = CascadeType.ALL, mappedBy = "cpLobState")

    @PrivateOwned

    private Set<CpStateCoverage> cpStateCoverages = new HashSet<CpStateCoverage>(0);

 

And this is the code to add the cpLocation to CpLobState –

    public boolean addCpLocation(final CpLocation cpLocation) {

        boolean retVal = false;

        if (cpLocation != null) {

            retVal = this.cpLocations.add(cpLocation);

            // Set the parent object

            cpLocation.setCpLobState(this);

        }

        return retVal;

    }

 

And this is the code to set the CpLobState in CpLocation

    public void setCpLobState(final CpLobState cpLobState) {

        this.cpLobState = cpLobState;

 

        if (this.cpLobState != null && !this.cpLobState.getCpLocations().contains(this)) {

            this.cpLobState.addCpLocation(this, false);

        }

    }

 

FYI when I examine the cpStateCoverages it says {[]} vs the not instantiated message.

 

I have stepped through this code and it looks like it works fine and returns true on the add method call.

 

Thanks for your help on this.

 

 

From: eclipselink-users-bounces@xxxxxxxxxxx [mailto:eclipselink-users-bounces@xxxxxxxxxxx] On Behalf Of Guy Pelletier
Sent: Thursday, February 03, 2011 3:25 PM
To: eclipselink-users@xxxxxxxxxxx
Subject: Re: [eclipselink-users] Exception with ManytoOne with latest version of eclipselink.jar

 

Hi Kevin,

Can you send more info of the entity on the other side of the relationship? The one that your tried to merge?

I'm trying to reproduce your problem so I can debug it further.

Thanks,
Guy

On 03/02/2011 3:18 PM, Kevin Haskett wrote:

Here is the stack trace through the struts Action call -
 
[2/3/11 13:21:34:578 CST] 0000002d SystemErr     R Local Exception
Stack: 
Exception [EclipseLink-6094] (Eclipse Persistence Services -
2.2.0.v20110202-r8913):
org.eclipse.persistence.exceptions.QueryException
Exception Description: The parameter name [LOB_STATE_ID] in the query's
selection criteria does not match any parameter name defined in the
query.
Query: ReadAllQuery(name="cpLocations" referenceClass=CpLocation
sql="SELECT t0.LOCATION_ID, t1.LOCATION_ID, t0.BUILDINGS_SAME_ADDRESS,
t1.CLASS_CODE, t0.COUNTY_CODE, t0.COUNTY_NAME, t0.LOCATION_NUMBER,
t1.EARTHQUAKE_ZONE, t1.FIRE_PROTECTION_FD, t1.FIRE_PROTECTION_HYDRANT,
t0.LOCATION_STATE, t1.PREMIUM_ACTUAL, t1.PROTECTION_CLASS,
t1.PROTECTION_CLASS_OVERRIDE, t1.TERR_MULT, t1.TERRITORY,
t1.TERRITORY_BCEG, t1.TERRITORY_PREMOP, t1.TERRITORY_TIER,
t0.ACTION_CODE, t1.LOB_STATE_ID, t0.TRANSACTION_ID FROM CP_LOCATION t0,
CP_LOCATION_PKG t1 WHERE ((t1.LOB_STATE_ID = ?) AND (t1.LOCATION_ID =
t0.LOCATION_ID))")
        at
org.eclipse.persistence.exceptions.QueryException.parameterNameMismatch(
QueryException.java:1050)
        at
org.eclipse.persistence.internal.expressions.ParameterExpression.getValu
e(ParameterExpression.java:246)
        at
org.eclipse.persistence.internal.databaseaccess.DatabaseCall.translate(D
atabaseCall.java:951)
        at
org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.ex
ecuteCall(DatasourceCallQueryMechanism.java:206)
        at
org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.ex
ecuteCall(DatasourceCallQueryMechanism.java:193)
        at
org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.ex
ecuteSelectCall(DatasourceCallQueryMechanism.java:264)
        at
org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.se
lectAllRows(DatasourceCallQueryMechanism.java:647)
        at
org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.select
AllRowsFromTable(ExpressionQueryMechanism.java:2558)
        at
org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.select
AllRows(ExpressionQueryMechanism.java:2517)
        at
org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery
(ReadAllQuery.java:410)
        at
org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuer
y(ObjectLevelReadQuery.java:1080)
        at
org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java
:808)
        at
org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevel
ReadQuery.java:1040)
        at
org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:3
83)
        at
org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork
(ObjectLevelReadQuery.java:1126)
        at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecute
Query(UnitOfWorkImpl.java:2842)
        at
org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(A
bstractSession.java:1521)
        at
org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(A
bstractSession.java:1503)
        at
org.eclipse.persistence.internal.indirection.QueryBasedValueHolder.insta
ntiate(QueryBasedValueHolder.java:98)
        at
org.eclipse.persistence.internal.indirection.QueryBasedValueHolder.insta
ntiateForUnitOfWorkValueHolder(QueryBasedValueHolder.java:113)
        at
org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.insta
ntiateImpl(UnitOfWorkValueHolder.java:156)
        at
org.eclipse.persistence.internal.indirection.UnitOfWorkValueHolder.insta
ntiate(UnitOfWorkValueHolder.java:222)
        at
org.eclipse.persistence.internal.indirection.DatabaseValueHolder.getValu
e(DatabaseValueHolder.java:88)
        at
org.eclipse.persistence.indirection.IndirectSet.buildDelegate(IndirectSe
t.java:192)
        at
org.eclipse.persistence.indirection.IndirectSet.getDelegate(IndirectSet.
java:343)
        at
org.eclipse.persistence.indirection.IndirectSet.size(IndirectSet.java:50
0)
        at
org.eclipse.persistence.internal.queries.CollectionContainerPolicy.sizeF
or(CollectionContainerPolicy.java:177)
        at
org.eclipse.persistence.mappings.CollectionMapping.mergeIntoObject(Colle
ctionMapping.java:1395)
        at
org.eclipse.persistence.internal.descriptors.ObjectBuilder.mergeIntoObje
ct(ObjectBuilder.java:3254)
        at
org.eclipse.persistence.internal.sessions.MergeManager.mergeChangesOfClo
neIntoWorkingCopy(MergeManager.java:525)
        at
org.eclipse.persistence.internal.sessions.MergeManager.mergeChanges(Merg
eManager.java:263)
        at
org.eclipse.persistence.mappings.CollectionMapping.mergeIntoObject(Colle
ctionMapping.java:1452)
        at
org.eclipse.persistence.internal.descriptors.ObjectBuilder.mergeIntoObje
ct(ObjectBuilder.java:3254)
        at
org.eclipse.persistence.internal.sessions.MergeManager.mergeChangesOfClo
neIntoWorkingCopy(MergeManager.java:525)
        at
org.eclipse.persistence.internal.sessions.MergeManager.mergeChanges(Merg
eManager.java:263)
        at
org.eclipse.persistence.mappings.CollectionMapping.mergeIntoObject(Colle
ctionMapping.java:1452)
        at
org.eclipse.persistence.internal.descriptors.ObjectBuilder.mergeIntoObje
ct(ObjectBuilder.java:3254)
        at
org.eclipse.persistence.internal.sessions.MergeManager.mergeChangesOfClo
neIntoWorkingCopy(MergeManager.java:525)
        at
org.eclipse.persistence.internal.sessions.MergeManager.mergeChanges(Merg
eManager.java:263)
        at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.mergeCloneWithR
eferences(UnitOfWorkImpl.java:3467)
        at
org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.merg
eCloneWithReferences(RepeatableWriteUnitOfWork.java:363)
        at
org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.mergeCloneWithR
eferences(UnitOfWorkImpl.java:3427)
        at
org.eclipse.persistence.internal.jpa.EntityManagerImpl.mergeInternal(Ent
ityManagerImpl.java:452)
        at
org.eclipse.persistence.internal.jpa.EntityManagerImpl.merge(EntityManag
erImpl.java:429)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:48)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:600)
        at
org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManag
erInvocationHandler.invoke(SharedEntityManagerCreator.java:198)
        at $Proxy29.merge(Unknown Source)
        at
com.gmrc.jpa.domain.controller.CpTransactionManagerImpl.update(CpTransac
tionManagerImpl.java:1169)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:48)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:600)
        at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(
AopUtils.java:307)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinp
oint(ReflectiveMethodInvocation.java:182)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Ref
lectiveMethodInvocation.java:149)
        at
org.springframework.dao.support.PersistenceExceptionTranslationIntercept
or.invoke(PersistenceExceptionTranslationInterceptor.java:138)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Ref
lectiveMethodInvocation.java:171)
        at
org.springframework.transaction.interceptor.TransactionInterceptor.invok
e(TransactionInterceptor.java:106)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Ref
lectiveMethodInvocation.java:171)
        at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAo
pProxy.java:204)
        at $Proxy54.update(Unknown Source)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:48)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:600)
        at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(
AopUtils.java:307)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinp
oint(ReflectiveMethodInvocation.java:182)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Ref
lectiveMethodInvocation.java:149)
        at
org.springframework.transaction.interceptor.TransactionInterceptor.invok
e(TransactionInterceptor.java:106)
        at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(Ref
lectiveMethodInvocation.java:171)
        at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAo
pProxy.java:204)
        at $Proxy55.update(Unknown Source)
        at
com.gmrc.cpp.struts.actions.CppBaseAction.persistCpTrans(CppBaseAction.j
ava:1245)
        at
com.gmrc.cpp.struts.actions.CppBaseAction.persistCpTrans(CppBaseAction.j
ava:1233)
        at
com.gmrc.im.struts.actions.IMLobAction.saveBasic(IMLobAction.java:669)
        at
com.gmrc.im.struts.actions.IMLobAction.save(IMLobAction.java:523)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:48)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:600)
        at
com.gmrc.cpp.struts.actions.CppBaseAction.dispatchMethod(CppBaseAction.j
ava:902)
 
-----Original Message-----
From: eclipselink-users-bounces@xxxxxxxxxxx
[mailto:eclipselink-users-bounces@xxxxxxxxxxx] On Behalf Of Tom Ware
Sent: Thursday, February 03, 2011 2:02 PM
To: EclipseLink User Discussions
Subject: Re: [eclipselink-users] Exception with ManytoOne with latest
version of eclipselink.jar
 
Can you please send a more complete stack trace?
 
Kevin Haskett wrote:
This happened during a merge of a higher level object in my domain
tree.
 
-----Original Message-----
From: eclipselink-users-bounces@xxxxxxxxxxx
[mailto:eclipselink-users-bounces@xxxxxxxxxxx] On Behalf Of Tom Ware
Sent: Thursday, February 03, 2011 1:51 PM
To: EclipseLink User Discussions
Subject: Re: [eclipselink-users] Exception with ManytoOne with latest
version of eclipselink.jar
 
Hi Kevin,
 
   What query are you running?
 
Thanks,
Tom
 
Kevin Haskett wrote:
In the previous version we were using 2.2.0.v20100731-r7961 and were
not 
seeing this issue -
 
Exception [EclipseLink-6094] (Eclipse Persistence Services - 
2.2.0.v20110202-r8913):
_org.eclipse.persistence.exceptions.QueryException_
Exception Description: The parameter name [LOB_STATE_ID] in the
query's 
selection criteria does not match any parameter name defined in the
query.
Query: ReadAllQuery(name="cpLocations" referenceClass=CpLocation 
sql="SELECT t0.LOCATION_ID, t1.LOCATION_ID,
t0.BUILDINGS_SAME_ADDRESS,
 
t1.CLASS_CODE, t0.COUNTY_CODE, t0.COUNTY_NAME, t0.LOCATION_NUMBER, 
t1.EARTHQUAKE_ZONE, t1.FIRE_PROTECTION_FD,
t1.FIRE_PROTECTION_HYDRANT,
 
t0.LOCATION_STATE, t1.PREMIUM_ACTUAL, t1.PROTECTION_CLASS, 
t1.PROTECTION_CLASS_OVERRIDE, t1.TERR_MULT, t1.TERRITORY, 
t1.TERRITORY_BCEG, t1.TERRITORY_PREMOP, t1.TERRITORY_TIER, 
t0.ACTION_CODE, t1.LOB_STATE_ID, t0.TRANSACTION_ID FROM CP_LOCATION
t0, 
CP_LOCATION_PKG t1 WHERE ((t1.LOB_STATE_ID = ?) AND (t1.LOCATION_ID =
 
t0.LOCATION_ID))")
 
      at 
 
 
org.eclipse.persistence.exceptions.QueryException.parameterNameMismatch(
_QueryException.java:1050_)
      at 
 
 
org.eclipse.persistence.internal.expressions.ParameterExpression.getValu
e(_ParameterExpression.java:246_)
 
 
Here are my entities -
 
@Entity
 
@Table(name = "CP_LOCATION")
 
@Cache(alwaysRefresh = *true*)
 
@SecondaryTable(name = "CP_LOCATION_PKG")
 
@Converter(name = "boolean", converterClass = 
com.gmrc.jpa.domain.mappings.converters.BooleanYNConverter.*class*)
 
*public* *class* CpLocation *extends* BaseDomain *implements* 
Comparable<CpLocation> {
 
 
 
    // Fields
 
 
 
   @Id
 
    @GeneratedValue(strategy = GenerationType./IDENTITY/)
 
    @Column(name = "LOCATION_ID", unique = *true*, nullable =
*false*,
 
precision = 11, scale = 0)
 
    *private* Long locationId;
 
 
 
    @ManyToOne(cascade = CascadeType./ALL/)
 
    @JoinColumn(name = "TRANSACTION_ID", nullable = *false*)
 
    *private* CpTransaction cpTransaction;
 
 
 
    @Column(name = "LOCATION_NUMBER", nullable = *false*)
 
    *private* Integer displayNumber = Integer./valueOf/(0); // same
as
 
location number
 
...
 
    @Column(name = "TERRITORY_TIER", length = 10, table =
"CP_LOCATION_PKG")
    *private* String territoryTier;
 
 
 
    // _bi_-directional many-to-one association to CpLobState
 
    @ManyToOne()
 
    @JoinColumn(name = "LOB_STATE_ID", table = "CP_LOCATION_PKG")
 
    *private* CpLobState cpLobState;
 
 
 
   @Entity
 
   @Table(name = "CP_LOB_STATE")
 
   @Converter(name = "boolean", converterClass = 
com.gmrc.jpa.domain.mappings.converters.BooleanYNConverter.*class*)
 
*   public* *class* CpLobState *extends* BaseDomain {
 
 
 
    // Fields
 
    @Id
 
    @GeneratedValue(strategy = GenerationType./IDENTITY/)
 
    @Column(name = "LOB_STATE_ID", unique = *true*, nullable =
*false*, 
precision = 11, scale = 0)
 
    *private* Long lobStateId;
 
 
 
    @ManyToOne(cascade = CascadeType./ALL/)
 
    @JoinColumn(name = "LOB_ID", nullable = *false*)
 
    *private* CpLob cpLob;
 
 
 
    @Column(name = "LOB_STATE", nullable = *false*, length = 2)
 
    *private* String lobState;
 
 
 
...
 
 
 
Is there something different now that I need to do to fix this?
 
 
 
This message (including any attachments) is intended only for the use
of 
the individual or entity to which it is addressed and may contain 
information that is non-public, proprietary, privileged,
confidential,
 
and exempt from disclosure under applicable law or may constitute as 
attorney work product. If you are not the intended recipient, you are
 
hereby notified that any use, dissemination, distribution, or copying
of 
this communication is strictly prohibited. If you have received this 
communication in error, notify us immediately by telephone and (i) 
destroy this message if a facsimile or (ii) delete this message 
immediately if this is an electronic communication. Thank you.
 
 
 
 
------------------------------------------------------------------------
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
 
This message (including any attachments) is intended only for
the use of the individual or entity to which it is addressed and
may contain information that is non-public, proprietary,
privileged, confidential, and exempt from disclosure under
applicable law or may constitute as attorney work product.
If you are not the intended recipient, you are hereby notified
that any use, dissemination, distribution, or copying of this
communication is strictly prohibited. If you have received this
communication in error, notify us immediately by telephone and
(i) destroy this message if a facsimile or (ii) delete this message
immediately if this is an electronic communication.
 
Thank you.
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
 
This message (including any attachments) is intended only for
the use of the individual or entity to which it is addressed and
may contain information that is non-public, proprietary,
privileged, confidential, and exempt from disclosure under
applicable law or may constitute as attorney work product.
If you are not the intended recipient, you are hereby notified
that any use, dissemination, distribution, or copying of this
communication is strictly prohibited. If you have received this
communication in error, notify us immediately by telephone and
(i) destroy this message if a facsimile or (ii) delete this message
immediately if this is an electronic communication.
 
Thank you.
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
 

This message (including any attachments) is intended only for the use of the individual or entity to which it is addressed and may contain information that is non-public, proprietary, privileged, confidential, and exempt from disclosure under applicable law or may constitute as attorney work product. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, notify us immediately by telephone and (i) destroy this message if a facsimile or (ii) delete this message immediately if this is an electronic communication. Thank you.

This message (including any attachments) is intended only for the use of the individual or entity to which it is addressed and may contain information that is non-public, proprietary, privileged, confidential, and exempt from disclosure under applicable law or may constitute as attorney work product. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, notify us immediately by telephone and (i) destroy this message if a facsimile or (ii) delete this message immediately if this is an electronic communication. Thank you.

This message (including any attachments) is intended only for the use of the individual or entity to which it is addressed and may contain information that is non-public, proprietary, privileged, confidential, and exempt from disclosure under applicable law or may constitute as attorney work product. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, notify us immediately by telephone and (i) destroy this message if a facsimile or (ii) delete this message immediately if this is an electronic communication. Thank you.

 

 
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
  

This message (including any attachments) is intended only for the use of the individual or entity to which it is addressed and may contain information that is non-public, proprietary, privileged, confidential, and exempt from disclosure under applicable law or may constitute as attorney work product. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, notify us immediately by telephone and (i) destroy this message if a facsimile or (ii) delete this message immediately if this is an electronic communication. Thank you.


Back to the top