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

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.


Back to the top