openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacek Laskowski" <ja...@laskowski.net.pl>
Subject Re: Named query created in error
Date Thu, 19 Apr 2007 06:17:42 GMT
On 4/19/07, Phill Moran <pjmoran@rogers.com> wrote:
> Here it is:
>
> [2007-04-18 18:37:07,937] INFO  ca.BidSpec.testing.emall.UserFactoryTest Began
> transaction (1): transaction manager
> [org.springframework.orm.jpa.JpaTransactionManager@749ebc]; default rollback =
> true
> 25547  WARN   [main] openjpa.MetaData - Found duplicate query
> "PersonFXLastFirst" in "class ca.BidSpec.emall.user.Person".  Ignoring.
> 33360  TRACE  [main] openjpa.jdbc.SQL - <t 19399109, conn 28442012> executing
> prepstmnt 23861335 SELECT t0.id, t0.lastUpdated, t0.active, t0.activeFrom,
> t0.activeUntil, t0.created, t0.displayName, t0.firstName, t0.lastLogin,
> t0.lastName, t0.locale, t0.loginName, t0.middleName, t2.id, t2.lastUpdated,
> t2.description, t3.id, t3.lastUpdated, t3.description, t2.value, t4.id,
> t4.lastUpdated, t4.description, t4.categoryTypeFK, t4.value, t5.id,
> t5.lastUpdated, t5.created, t5.description, t5.displayName, t5.name, t6.id,
> t6.lastUpdated, t6.description, t6.categoryTypeFK, t6.value, t0.title,
> t0.visible FROM bidspec.person t0 INNER JOIN bidspec.manufacturer t1 ON
> t0.manufacturerFK = t1.id LEFT OUTER JOIN bidspec.category t2 ON t0.roleFK =
> t2.id LEFT OUTER JOIN bidspec.category t4 ON t0.salutationFK = t4.id LEFT OUTER
> JOIN bidspec.manufacturer t5 ON t0.manufacturerFK = t5.id LEFT OUTER JOIN
> bidspec.categorytype t3 ON t2.categoryTypeFK = t3.id LEFT OUTER JOIN
> bidspec.category t6 ON t5.typeFK = t6.id WHERE (UPPER(t1.name) = ? AND
> UPPER(t0.loginName) = ?) ORDER BY t0.lastName ASC, t0.firstName ASC
> [params=(String) BIDSPEC, (String) PMORAN]
> 33360  TRACE  [main] openjpa.jdbc.SQL - <t 19399109, conn 28442012> [0 ms] spent
> <0|false|0.9.6-incubating> org.apache.openjpa.persistence.PersistenceException:
> null
>         at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:851)

What database do you use? Show the line where the query is created and
the parameters are passed. How do the persistence.xml look like? Do
you happen to use orm.xml-like files? What Spring version is used?
Show the Person entity (ca.BidSpec.emall.user.Person).

I wonder why you only get the following warning message

25547  WARN   [main] openjpa.MetaData - Found duplicate query
"PersonFXLastFirst" in "class ca.BidSpec.emall.user.Person".  Ignoring.

, but there's no corresponding warning message for the entity behind
p.store (possibly <package>.Store). Do you happen to *not* annotate
the Store class with @Entity? Could you attach the whole TRACE output
of OpenJPA execution?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Mime
View raw message