You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Phill Moran <pj...@rogers.com> on 2007/04/09 23:49:45 UTC

PCEnhance

Anyway to get a trace out of a pcEnhance call?

Phill


Re: Post processing in JPA

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 4/19/07, Craig L Russell <Cr...@sun.com> wrote:

> Post processing is a common term used to describe anything done to
> a .class file after being generated by the compiler. And there
> certainly is the notion of post processing class files in JPA.

I stand corrected. Great you spot it and corrected. Thanks for the
info. I think I need to take a look at some of the chapters again.

Jacek

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

Post processing in JPA

Posted by Craig L Russell <Cr...@Sun.COM>.
Hi Jacek,

On Apr 19, 2007, at 7:56 AM, Jacek Laskowski wrote:

>> I thought I needed to add the class names to persistence.xml to  
>> have them
>> post-processed.
>
> What do you mean by "post-processed". There's no notion of
> "post-processing" in JPA.

Post processing is a common term used to describe anything done to  
a .class file after being generated by the compiler. And there  
certainly is the notion of post processing class files in JPA.

In a container, the JPA provider is given the chance to post process  
entities by an explicit callback. See section 7.1.

Outside the container, JPA providers typically use the java agent  
technology to perform post processing on the classes.

Some JPA providers have a static post processor that allows you to  
deploy applications without using agents or transformers at runtime.  
OpenJPA's processor is the PCEnhancer.

Craig

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell@sun.com
P.S. A good JDO? O, Gasp!


RE: Named query created in error

Posted by Phill Moran <pj...@rogers.com>.
Will do and thanks again 

-----Original Message-----
From: eljotpl@gmail.com [mailto:eljotpl@gmail.com] On Behalf Of Jacek Laskowski
Sent: April 19, 2007 10:57 AM
To: open-jpa-dev@incubator.apache.org
Subject: Re: Named query created in error

On 4/19/07, Phill Moran <pj...@rogers.com> wrote:
> Thanks Jacek,
>
> Store is annotated with @Entity:

That might imply an incorrect behaviour of OpenJPA. I doubt if I can help more
than just a spec guidance ;-) I'll have to set up the environment to reproduce
the issue as OpenJPA doesn't seem to fail with Derby and my simple test case.

I hope someone from the OpenJPA team will chime in and provide some additional
hints.

> I thought I needed to add the class names to persistence.xml to have 
> them post-processed.

What do you mean by "post-processed". There's no notion of "post-processing" in
JPA.

persistence.xml is a configuration file for persistence units (there can be more
than one in a single persistence.xml file). Each and every PU is distinguished
by its name (unique in the whole application).
There's plenty of work to do for a jpa provider to set up a PU - see the spec's
chapter 7. Container and Provider Contracts for Deployment and Bootstrapping.
One of the tasks is to find all of the persistence classes (aka entities).
Depending on your environment - Java SE or Java EE - the <class> element may be
required.

The spec reads in "6.2.1.6 mapping-file, jar-file, class,
exclude-unlisted-classes" page 138:

A list of all named managed persistence classes must be specified in Java SE
environments to insure portability. Portable Java SE applications should not
rely on the other mechanisms described here to specify the managed persistence
classes of a persistence unit.

> I recognized (since using java agent right now) they are all looked at 
> for persistence candidacy but figured this would be needed for compile 
> time processing that I would switch to later. Let me know if I am way off
here.

That's another thing. To let a jpa provider manage persistence classes
(entities) they might  be enhanced at build- or run-time. It's a choice you make
when you run your application. Under a heavy load every second might be of great
value so the sooner the classes are enhanced the better or else it might incur
performance penalty. With Java you can process classes while they're loaded and
enhance them to add capabilities like manageability.

> Also must I list all other classes in the <exclude-unlisted-classes> 
> section or can I simply list add <exclude-unlisted-classes/> after my 
> listed classes. -

Add <exclude-unlisted-classes> and give it a go. You should see the Ignoring.
warning message go away.

> Clearly I am uncertain to the full purpose of this file

persistence.xml? That's the most important file in the whole jpa application of
yours so treat it gently and with great care so it won't cause troubles ;-) Read
about it in the spec - 6.2 Persistence Unit Packaging page 134. It's easy to
read so highly recommended to read (before you crash after struggling with
setting up OpenJPA ;-))

Jacek

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


Re: Named query created in error

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 4/19/07, Phill Moran <pj...@rogers.com> wrote:
> Thanks Jacek,
>
> Store is annotated with @Entity:

That might imply an incorrect behaviour of OpenJPA. I doubt if I can
help more than just a spec guidance ;-) I'll have to set up the
environment to reproduce the issue as OpenJPA doesn't seem to fail
with Derby and my simple test case.

I hope someone from the OpenJPA team will chime in and provide some
additional hints.

> I thought I needed to add the class names to persistence.xml to have them
> post-processed.

What do you mean by "post-processed". There's no notion of
"post-processing" in JPA.

persistence.xml is a configuration file for persistence units (there
can be more than one in a single persistence.xml file). Each and every
PU is distinguished by its name (unique in the whole application).
There's plenty of work to do for a jpa provider to set up a PU - see
the spec's chapter 7. Container and Provider Contracts for Deployment
and Bootstrapping. One of the tasks is to find all of the persistence
classes (aka entities). Depending on your environment - Java SE or
Java EE - the <class> element may be required.

The spec reads in "6.2.1.6 mapping-file, jar-file, class,
exclude-unlisted-classes" page 138:

A list of all named managed persistence classes must be specified in Java SE
environments to insure portability. Portable Java SE applications
should not rely on the other mechanisms described here to specify the
managed persistence classes of a persistence unit.

> I recognized (since using java agent right now) they are all
> looked at for persistence candidacy but figured this would be needed for compile
> time processing that I would switch to later. Let me know if I am way off here.

That's another thing. To let a jpa provider manage persistence classes
(entities) they might  be enhanced at build- or run-time. It's a
choice you make when you run your application. Under a heavy load
every second might be of great value so the sooner the classes are
enhanced the better or else it might incur performance penalty. With
Java you can process classes while they're loaded and enhance them to
add capabilities like manageability.

> Also must I list all other classes in the <exclude-unlisted-classes> section or
> can I simply list add <exclude-unlisted-classes/> after my listed classes. -

Add <exclude-unlisted-classes> and give it a go. You should see the
Ignoring. warning message go away.

> Clearly I am uncertain to the full purpose of this file

persistence.xml? That's the most important file in the whole jpa
application of yours so treat it gently and with great care so it
won't cause troubles ;-) Read about it in the spec - 6.2 Persistence
Unit Packaging page 134. It's easy to read so highly recommended to
read (before you crash after struggling with setting up OpenJPA ;-))

Jacek

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

RE: Named query created in error

Posted by Phill Moran <pj...@rogers.com>.
Thanks Jacek,

Store is annotated with @Entity:

@Entity
@Table(name = "manufacturer", schema = "bidspec")
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@NamedQueries( {
		@NamedQuery(name = "StoreFXPK", query = "SELECT s FROM Store s
WHERE s.id = :primaryKey"),
		@NamedQuery(name = "StoreFXTypeAndName", query = "SELECT s FROM
Store s WHERE s.type = :type AND UPPER(s.name) = :storeName OR
UPPER(s.displayName) = :storeName"),
		@NamedQuery(name = "StoreFXName", query = "SELECT s FROM Store s
WHERE UPPER(s.name) = :storeName OR UPPER(s.displayName) = :storeName") })
public class Store extends Persistable {
....

I thought I needed to add the class names to persistence.xml to have them
post-processed. I recognized (since using java agent right now) they are all
looked at for persistence candidacy but figured this would be needed for compile
time processing that I would switch to later. Let me know if I am way off here.
Also must I list all other classes in the <exclude-unlisted-classes> section or
can I simply list add <exclude-unlisted-classes/> after my listed classes. -
Clearly I am uncertain to the full purpose of this file

Thanks for all this support

Phill

-----Original Message-----
From: eljotpl@gmail.com [mailto:eljotpl@gmail.com] On Behalf Of Jacek Laskowski
Sent: April 19, 2007 10:15 AM
To: open-jpa-dev@incubator.apache.org
Subject: Re: Named query created in error

On 4/19/07, Phill Moran <pj...@rogers.com> wrote:
> I am using MySQL version 5
> The stack trace only shows because  have wrapped this in a try/catch. 
> The exception becomes NPE due to  OpenJPA trying to make a Person 
> object form more than just Person Object data, it fails to do this 
> (silently) and the object it was to be assigned to become an NP

Could you make sure that the entity behind p.store is really an entity? Is it
annotated with @Entity?

> Nothing in the persistence.xml except class names (all persistable 
> classes represented in here) and OpenJPA settings.
> Interesting questions on why the duplicate query exception suddenly 
> showing up,

It's because you use <class> and no <exclude-unlisted-classes> in
persistence.xml. You should either remove the <class> elements or add
<exclude-unlisted-classes> and the Ignoring. warning message should go away.

Jacek

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


Re: Named query created in error

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 4/19/07, Phill Moran <pj...@rogers.com> wrote:
> I am using MySQL version 5
> The stack trace only shows because  have wrapped this in a try/catch. The
> exception becomes NPE due to  OpenJPA trying to make a Person object form more
> than just Person Object data, it fails to do this (silently) and the object it
> was to be assigned to become an NP

Could you make sure that the entity behind p.store is really an
entity? Is it annotated with @Entity?

> Nothing in the persistence.xml except class names (all persistable classes
> represented in here) and OpenJPA settings.
> Interesting questions on why the duplicate query exception suddenly showing up,

It's because you use <class> and no <exclude-unlisted-classes> in
persistence.xml. You should either remove the <class> elements or add
<exclude-unlisted-classes> and the Ignoring. warning message should go
away.

Jacek

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

RE: Named query created in error

Posted by Phill Moran <pj...@rogers.com>.
I am using MySQL version 5
The stack trace only shows because  have wrapped this in a try/catch. The
exception becomes NPE due to  OpenJPA trying to make a Person object form more
than just Person Object data, it fails to do this (silently) and the object it
was to be assigned to become an NP

I use annotations for this project so no ORM file

Nothing in the persistence.xml except class names (all persistable classes
represented in here) and OpenJPA settings.
Interesting questions on why the duplicate query exception suddenly showing up,
but a search on workspace tells me it is the only one with that name
Store is annotated as well. In fact both Person and Store both have other named
queries in them that are working. I also get other reports of dup queries and
they work as well. Another thread (Patrick I believe) described the reason for
these but not sure the impact of them

Here is the whole trace-not sure why the whole thing did not show up before

<0|false|0.9.6-incubating> org.apache.openjpa.persistence.PersistenceException:
null
	at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:851)
	at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:748)
	at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:773)
	at
org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:254)
	at
org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2115)
	at
org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:248)
	at
org.apache.openjpa.jdbc.kernel.InstanceResultObjectProvider.getResultObject(Inst
anceResultObjectProvider.java:56)
	at
org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:33)
	at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1203)
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:979)
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:832)
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:763)
	at
org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:520)
	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:212)
	at
org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:251)
	at
ca.BidSpec.emall.user.PersonFactoryImpl.getLoginPersonValueObject(PersonFactoryI
mpl.java:98)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils
.java:304)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(Ref
lectiveMethodInvocation.java:172)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:139)
	at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(Transa
ctionInterceptor.java:107)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:161)
	at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.j
ava:203)
	at $Proxy34.getLoginPersonValueObject(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils
.java:304)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(Ref
lectiveMethodInvocation.java:172)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:139)
	at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(Transa
ctionInterceptor.java:107)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:161)
	at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.j
ava:203)
	at $Proxy34.getLoginPersonValueObject(Unknown Source)
	at
ca.BidSpec.testing.emall.UserFactoryTest.testDelete(UserFactoryTest.java:119)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at junit.framework.TestCase.runTest(TestCase.java:168)
	at junit.framework.TestCase.runBare(TestCase.java:134)
	at
org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69
)
	at
org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.ac
cess$001(AbstractAnnotationAwareTransactionalTests.java:47)
	at
org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests$1.
run(AbstractAnnotationAwareTransactionalTests.java:115)
	at
org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.ru
nTest(AbstractAnnotationAwareTransactionalTests.java:180)
	at
org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.ru
nTestTimed(AbstractAnnotationAwareTransactionalTests.java:153)
	at
org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.ru
nBare(AbstractAnnotationAwareTransactionalTests.java:111)
	at
org.springframework.test.jpa.AbstractJpaTests.runBare(AbstractJpaTests.java:159)
	at
org.springframework.test.jpa.AbstractJpaTests.runBare(AbstractJpaTests.java:239)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at
org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
	at
org.junit.internal.runners.CompositeRunner.run(CompositeRunner.java:29)
	at
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java
:42)
	at
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunne
r.java:34)
	at
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
	at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReferen
ce.java:38)
	at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner
.java:460)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner
.java:673)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java
:386)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.jav
a:196)
Caused by: java.lang.NullPointerException
	at java.util.Locale.toLowerCase(Locale.java:1060)
	at java.util.Locale.convertOldISOCodes(Locale.java:1083)
	at java.util.Locale.<init>(Locale.java:272)
	at java.util.Locale.<init>(Locale.java:302)
	at ca.BidSpec.emall.user.Person.pcsetLocale(Person.java:375)
	at ca.BidSpec.emall.user.Person.pcClearFields(Person.java)
	at ca.BidSpec.emall.user.Person.pcNewInstance(Person.java)
	at
org.apache.openjpa.enhance.PCRegistry.newInstance(PCRegistry.java:117)
	at
org.apache.openjpa.kernel.StateManagerImpl.initialize(StateManagerImpl.java:247)
	at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager
.java:327)
	at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java
:252)
	at
org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManag
er.java:108)
	at
org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:54)
	at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:870)
	at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:828)
	... 69 more
This is all I get



-----Original Message-----
From: eljotpl@gmail.com [mailto:eljotpl@gmail.com] On Behalf Of Jacek Laskowski
Sent: April 19, 2007 2:18 AM
To: open-jpa-dev@incubator.apache.org
Subject: Re: Named query created in error

On 4/19/07, Phill Moran <pj...@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


Re: Named query created in error

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 4/19/07, Phill Moran <pj...@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

RE: Named query created in error

Posted by Phill Moran <pj...@rogers.com>.
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)
	at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:748)
	at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:773)
	at
org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:254)
	at
org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2115)
	at
org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:248)
	at
org.apache.openjpa.jdbc.kernel.InstanceResultObjectProvider.getResultObject(Inst
anceResultObjectProvider.java:56)
	at
org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:33)
	at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1203)
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:979)
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:832)
	at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:763)
	at
org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:520)
	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:212)
	at
org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:251)
	at
ca.BidSpec.emall.user.PersonFactoryImpl.getLoginPersonValueObject(PersonFactoryI
mpl.java:98)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils
.java:304)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(Ref
lectiveMethodInvocation.java:172)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:139)
	at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(Transa
ctionInterceptor.java:107)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:161)
	at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.j
ava:203)
	at $Proxy34.getLoginPersonValueObject(Unknown Source)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils
.java:304)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(Ref
lectiveMethodInvocation.java:172)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:139)
	at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(Transa
ctionInterceptor.java:107)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveM
ethodInvocation.java:161)
	at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.j
ava:203)
	at $Proxy34.getLoginPersonValueObject(Unknown Source)
	at
ca.BidSpec.testing.emall.UserFactoryTest.testDelete(UserFactoryTest.java:119)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.jav
a:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at junit.framework.TestCase.runTest(TestCase.java:168)
	at junit.framework.TestCase.runBare(TestCase.java:134)
	at
org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69
)
	at
org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.ac
cess$001(AbstractAnnotationAwareTransactionalTests.java:47)
	at
org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests$1.
run(AbstractAnnotationAwareTransactionalTests.java:115)
	at
org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.ru
nTest(AbstractAnnotationAwareTransactionalTests.java:180)
	at
org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.ru
nTestTimed(AbstractAnnotationAwareTransactionalTests.java:153)
	at
org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests.ru
nBare(AbstractAnnotationAwareTransactionalTests.java:111)
	at
org.springframework.test.jpa.AbstractJpaTests.runBare(AbstractJpaTests.java:159)
	at
org.springframework.test.jpa.AbstractJpaTests.runBare(AbstractJpaTests.java:239)
	at junit.framework.TestResult$1.protect(TestResult.java:110)
	at junit.framework.TestResult.runProtected(TestResult.java:128)
	at junit.framework.TestResult.run(TestResult.java:113)
	at junit.framework.TestCase.run(TestCase.java:124)
	at junit.framework.TestSuite.runTest(TestSuite.java:232)
	at junit.framework.TestSuite.run(TestSuite.java:227)
	at
org.junit.internal.runners.OldTestClassRunner.run(OldTestClassRunner.java:35)
	at
org.junit.internal.runners.CompositeRunner.run(CompositeRunner.java:29)
	at
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java
:42)
	at
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunne
r.java:34)
	at
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
	at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReferen
ce.java:38)
	at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner
.java:460)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner
.java:673)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java
:386)
	at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.jav
a:196)
Caused by: java.lang.NullPointerException
	at java.util.Locale.toLowerCase(Locale.java:1060)
	at java.util.Locale.convertOldISOCodes(Locale.java:1083)
	at java.util.Locale.<init>(Locale.java:272)
	at java.util.Locale.<init>(Locale.java:302)
	at ca.BidSpec.emall.user.Person.pcsetLocale(Person.java:375)
	at ca.BidSpec.emall.user.Person.pcClearFields(Person.java)
	at ca.BidSpec.emall.user.Person.pcNewInstance(Person.java)
	at
org.apache.openjpa.enhance.PCRegistry.newInstance(PCRegistry.java:117)
	at
org.apache.openjpa.kernel.StateManagerImpl.initialize(StateManagerImpl.java:247)
	at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager
.java:327)
	at
org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java
:252)
	at
org.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManag
er.java:108)
	at
org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:54)
	at org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:870)
	at org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:828)
	... 69 more 

-----Original Message-----
From: eljotpl@gmail.com [mailto:eljotpl@gmail.com] On Behalf Of Jacek Laskowski
Sent: April 18, 2007 5:34 PM
To: open-jpa-dev@incubator.apache.org
Subject: Re: Named query created in error

On 4/18/07, Phill Moran <pj...@rogers.com> wrote:

> The exception I get is null pointer from this line:
>
> List<Person> results = (List<Person>) q.getResultList();

Could you show the query creation and the stack trace you're getting?

Jacek

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


Re: Named query created in error

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 4/18/07, Phill Moran <pj...@rogers.com> wrote:

> The exception I get is null pointer from this line:
>
> List<Person> results = (List<Person>) q.getResultList();

Could you show the query creation and the stack trace you're getting?

Jacek

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

RE: Named query created in error

Posted by Phill Moran <pj...@rogers.com>.
These are all mainly many-to-one, but regardless are these not suppose to build
persistent objects? How can they do this if they mix data from several tables (I
am using table/class inheritance).

The exception I get is null pointer from this line: 

List<Person> results = (List<Person>) q.getResultList();

The query has both params populated on the input side.

I can change to lazy fetch but I would hope that his would not change the query
and cause it to suddenly work.

An interesting aside - I changed the named query to look like this

@NamedQuery(name = "PersonFXStoreAndLogin", query = "SELECT p FROM Person p,
IN(p.store) s WHERE UPPER(s.name) = :storeName and UPPER(p.loginName) =
:loginName ORDER BY p.lastName, p.firstName") })

And got the duplicate query I have asked about in the past. Also this generates
a similar SQL statement and resulted in a NPE

-----Original Message-----
From: Patrick Linskey [mailto:plinskey@bea.com] 
Sent: April 18, 2007 3:56 PM
To: open-jpa-dev@incubator.apache.org
Subject: RE: Named query created in error

What error do you get?

I expect that it's joining extra data because your one-to-ones and many-to-ones
are marked up to use eager fetching. Note that eager fetching is the default for
one-to-one and many-to-one relations, so if you have not marked up these
relations as lazy, then they're implicitly eager.

-Patrick

--
Patrick Linskey
BEA Systems, Inc.
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or legally
privileged, and is intended solely for the use of the individual or entity named
in this message. If you are not the intended recipient, and have received this
message in error, please immediately return this by email and then delete it. 

> -----Original Message-----
> From: Phill Moran [mailto:pjmoran@rogers.com]
> Sent: Wednesday, April 18, 2007 12:23 PM
> To: open-jpa-dev@incubator.apache.org
> Subject: Named query created in error
> 
> Anyone seen this before?
> 
> I have the following named query
> 
> @NamedQuery(name = "PersonFXStoreAndLogin", query = "SELECT p FROM 
> Person p WHERE UPPER(p.store.name) = :storeName and
> UPPER(p.loginName) = :loginName ORDER BY p.lastName, p.firstName")
> 
> That generated the following SQL statement
> 
> 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, t1.id, t1.lastUpdated, t1.created, 
> t1.description, t1.displayName, t1.name, t5.id, t5.lastUpdated, 
> t5.description, t5.categoryTypeFK, t5.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.category t5 ON 
> t1.typeFK = t5.id LEFT OUTER JOIN bidspec.categorytype t3 ON 
> t2.categoryTypeFK = t3.id WHERE
> (UPPER(t1.name) = ? AND UPPER(t0.loginName) = ?) ORDER BY t0.lastName 
> ASC, t0.firstName ASC [params=(String) BIDSPEC,
> (String) PMORAN]
> 
> Notice how it is grabbing columns from joined tables. This means it 
> cannot build the object (Person) I am expecting to get returned and 
> throws an exception. Cool huh?
> 
> My guess is that I should not be drilling down with the 
> "UPPER(p.store.name)"
> which is a field within one of these joined tables (t1).
> 
> Thoughts?
> 
> Phill
> 
> 

Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or legally
privileged, and is intended solely for the use of the individual or entity named
in this message. If you are not the intended recipient, and have received this
message in error, please immediately return this by email and then delete it.


RE: Named query created in error

Posted by Patrick Linskey <pl...@bea.com>.
What error do you get?

I expect that it's joining extra data because your one-to-ones and
many-to-ones are marked up to use eager fetching. Note that eager
fetching is the default for one-to-one and many-to-one relations, so if
you have not marked up these relations as lazy, then they're implicitly
eager.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc.
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: Phill Moran [mailto:pjmoran@rogers.com] 
> Sent: Wednesday, April 18, 2007 12:23 PM
> To: open-jpa-dev@incubator.apache.org
> Subject: Named query created in error
> 
> Anyone seen this before?
> 
> I have the following named query
> 
> @NamedQuery(name = "PersonFXStoreAndLogin", query = "SELECT p 
> FROM Person p WHERE UPPER(p.store.name) = :storeName and 
> UPPER(p.loginName) = :loginName ORDER BY p.lastName, p.firstName")
> 
> That generated the following SQL statement
> 
> 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, 
> t1.id, t1.lastUpdated, t1.created, t1.description, 
> t1.displayName, t1.name, t5.id, t5.lastUpdated, 
> t5.description, t5.categoryTypeFK, t5.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.category t5 ON t1.typeFK = t5.id LEFT 
> OUTER JOIN bidspec.categorytype t3 ON t2.categoryTypeFK = t3.id WHERE
> (UPPER(t1.name) = ? AND UPPER(t0.loginName) = ?) ORDER BY 
> t0.lastName ASC, t0.firstName ASC [params=(String) BIDSPEC, 
> (String) PMORAN]
> 
> Notice how it is grabbing columns from joined tables. This 
> means it cannot build the object (Person) I am expecting to 
> get returned and throws an exception. Cool huh?
> 
> My guess is that I should not be drilling down with the 
> "UPPER(p.store.name)"
> which is a field within one of these joined tables (t1).
> 
> Thoughts?
> 
> Phill
> 
> 

Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.

Named query created in error

Posted by Phill Moran <pj...@rogers.com>.
Anyone seen this before?

I have the following named query

@NamedQuery(name = "PersonFXStoreAndLogin", query = "SELECT p FROM Person p
WHERE UPPER(p.store.name) = :storeName and UPPER(p.loginName) = :loginName ORDER
BY p.lastName, p.firstName")

That generated the following SQL statement

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, t1.id, t1.lastUpdated, t1.created, t1.description,
t1.displayName, t1.name, t5.id, t5.lastUpdated, t5.description,
t5.categoryTypeFK, t5.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.category t5 ON t1.typeFK = t5.id
LEFT OUTER JOIN bidspec.categorytype t3 ON t2.categoryTypeFK = t3.id WHERE
(UPPER(t1.name) = ? AND UPPER(t0.loginName) = ?) ORDER BY t0.lastName ASC,
t0.firstName ASC [params=(String) BIDSPEC, (String) PMORAN]

Notice how it is grabbing columns from joined tables. This means it cannot build
the object (Person) I am expecting to get returned and throws an exception. Cool
huh?

My guess is that I should not be drilling down with the "UPPER(p.store.name)"
which is a field within one of these joined tables (t1).

Thoughts?

Phill


Re: Duplicate query

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 4/19/07, Jacek Laskowski <ja...@laskowski.net.pl> wrote:

> I assume you're working with Java SE environment, aren't you? I'm
> asking as the exclude-unlisted-classes is only intended for javase env
> not javaee.

Wrong, wrong, wrong! Sorry for messing simple things up. I meant that
exclude-unlisted-classes was for javaee env only. Shame on you, Jacek!

Jacek

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

RE: Duplicate query

Posted by Phill Moran <pj...@rogers.com>.
Interesting on the JTA stuff a lot of overhead if you are not planning dist
trans?

As an aside what is the Spring env considered? 

-----Original Message-----
From: eljotpl@gmail.com [mailto:eljotpl@gmail.com] On Behalf Of Jacek Laskowski
Sent: April 19, 2007 3:35 PM
To: open-jpa-dev@incubator.apache.org
Subject: Re: Duplicate query

On 4/19/07, Hans J. Prueller <ha...@gmx.net> wrote:

>  So in that case this won't change anything for us - "Not applicable 
> to Java SE PUs". We ARE using OpenJPA in a Java SE  persistence unit 
> (at least from the view of JPA our J2EE1.4 container will be only 
> "SE").
>
>  So did I understand you wrong? I thought this WOULD be applicable in 
> SE environments? NO? - So what are the options  for SE environments 
> once again?

Uff, I'm relieved. You're right - Java EE 1.4 application server is indeed
javase-like environment for jpa. In fact, you could run jpa in a
application-managed entity manager mode with no help of application server.

What worries me is that I'm unable to reproduce the error. I've got a test
environment with Derby and OpenJPA 0.9.8-incubator-SNAPSHOT and I don't run into
it. I'm leaning towards a conclusion that the application server environment
(even though it doesn't manage the PU) is the culprit. You're using JTA and I'm
not. Could you test out the app with JTA replaced by  RESOURCE_LOCAL.

I also wonder how you ended up with the following settings:

<properties>
<property name="openjpa.ConnectionFactoryMode" value="managed" /> <property
name="openjpa.TransactionMode" value="managed"/> <property
name="openjpa.Multithreaded" value="true"/> <property
name="openjpa.ManagedRuntime"
value="jndi(TransactionManagerName=java:comp/UserTransaction)" />

Did you configure it by purpose? These are settings I have never used so I doubt
if I help much.

Jacek

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


Re: Duplicate query

Posted by "Hans J. Prueller" <ha...@gmx.net>.
Am Donnerstag, den 19.04.2007, 21:34 +0200 schrieb Jacek Laskowski:

> Did you configure it by purpose? These are settings I have never used
> so I doubt if I help much. 


Definitely. I have to mix EJB2.1 CMP entity beans with the new JPA POJO
CMP3 Entity Beans within the J2EE1.4 
application servers managed transactions, that's why I am using OpenJPA
in a "Java SE" like environment with
JTA transactions.

But I don't think that the transaction behaviour could influence the
query parsing at initialization time of OpenJPA?

A difference is that I am using a some-weeks-old nightly snapshot of
0.9.7 and you are using 0.9.8 - perhaps there
was something like a bugfix meanwhile?

Hans

Re: Duplicate query

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 4/19/07, Hans J. Prueller <ha...@gmx.net> wrote:

>  So in that case this won't change anything for us - "Not applicable to Java
> SE PUs". We ARE using OpenJPA in a Java SE
>  persistence unit (at least from the view of JPA our J2EE1.4 container will
> be only "SE").
>
>  So did I understand you wrong? I thought this WOULD be applicable in SE
> environments? NO? - So what are the options
>  for SE environments once again?

Uff, I'm relieved. You're right - Java EE 1.4 application server is
indeed javase-like environment for jpa. In fact, you could run jpa in
a application-managed entity manager mode with no help of application
server.

What worries me is that I'm unable to reproduce the error. I've got a
test environment with Derby and OpenJPA 0.9.8-incubator-SNAPSHOT and I
don't run into it. I'm leaning towards a conclusion that the
application server environment (even though it doesn't manage the PU)
is the culprit. You're using JTA and I'm not. Could you test out the
app with JTA replaced by  RESOURCE_LOCAL.

I also wonder how you ended up with the following settings:

<properties>
<property name="openjpa.ConnectionFactoryMode" value="managed" />
<property name="openjpa.TransactionMode" value="managed"/>
<property name="openjpa.Multithreaded" value="true"/>
<property name="openjpa.ManagedRuntime"
value="jndi(TransactionManagerName=java:comp/UserTransaction)" />

Did you configure it by purpose? These are settings I have never used
so I doubt if I help much.

Jacek

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

Re: Duplicate query

Posted by "Hans J. Prueller" <ha...@gmx.net>.
Jacek,

don't bother that you messed something up. At least from the XML-Schema
definition I was able to derive the right
things I think:

Am Donnerstag, den 19.04.2007, 20:36 +0200 schrieb Jacek Laskowski:

> Not applicable to Java SE
> persistence units. 


So in that case this won't change anything for us - "Not applicable to
Java SE PUs". We ARE using OpenJPA in a Java SE
persistence unit (at least from the view of JPA our J2EE1.4 container
will be only "SE").

So did I understand you wrong? I thought this WOULD be applicable in SE
environments? NO? - So what are the options
for SE environments once again?

thanks,
Hans

Re: Duplicate query

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 4/19/07, Hans J. Prueller <ha...@gmx.net> wrote:

>  thank you for diving into this. I added the following node to my
> persistence.xml right
>  after the <classes> - List:
>
>  <exclude-unlisted-classes >true</exclude-unlisted-classes>
>
>  It seems that the "duplicate query" warning stays - did  I add it the wrong
> way?

I assume you're working with Java SE environment, aren't you? I'm
asking as the exclude-unlisted-classes is only intended for javase env
not javaee.

According to the spec the exclude-unlisted-classes defaults to false,
so empty element doesn't change much. Run with
<exclude-unlisted-classes>true</exclude-unlisted-classes> that should
do the magic.

<xsd:element name="exclude-unlisted-classes" type="xsd:boolean"
default="false" minOccurs="0">
  <xsd:annotation>
    <xsd:documentation>
      When set to true then only listed classes and jars will be
scanned for persistent classes, otherwise the enclosing
      jar or directory will also be scanned. Not applicable to Java SE
persistence units.
    </xsd:documentation>
  </xsd:annotation>
</xsd:element>

See the spec page 144.

Jacek

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

Re: Duplicate query

Posted by "Hans J. Prueller" <ha...@gmx.net>.
Am Donnerstag, den 19.04.2007, 12:14 -0500 schrieb Jay D. McHugh:

> You could try that and see if it makes a difference (hopefully it
> will)


Unfortunately NOT.

Can anybody else with that duplicate-query problem try it?

Hans

Re: Duplicate query

Posted by "Jay D. McHugh" <ja...@joyfulnoisewebdesign.com>.
Hello Hans,

I don't know if having a value of true should have made a difference, 
but most examples I have seen are simply:

        <exclude-unlisted-classes/>

You could try that and see if it makes a difference (hopefully it will)

Jay


Hans J. Prueller wrote:
> Jacek,
>
> thank you for diving into this. I added the following node to my 
> persistence.xml right
> after the <classes> - List:
>
> <exclude-unlisted-classes >true</exclude-unlisted-classes>
>
> It seems that the "duplicate query" warning stays - did  I add it the 
> wrong way?
>
> hans
>
> Am Mittwoch, den 18.04.2007, 00:16 +0200 schrieb Jacek Laskowski:
>> On 4/17/07, Hans J. Prueller <hans.prueller@gmx.net <ma...@gmx.net>> wrote:
>>
>> >  it took some time but finally I can send to the TRACE. As it is rather long
>> > I'll paste it below. Additional information:
>>
>> Thanks for the information. It's helped me a lot to narrow down the
>> issue. I think it's misconfiguration that causes it and I don't think
>> that we could call it a bug, but some improvements in OpenJPA
>> configuration of PUs would be welcome.
>>
>> I think that the first query parsing occurs because in Java EE
>> environments a jpa container is supposed to find all managed
>> persistence classes (see Chapter 6 Entity Packaging of the JPA spec).
>> So, OpenJPA searches all the roots of persistence units and collect
>> information on them. That's why you see the first message about the
>> query.
>>
>> 1679  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1]
>> openjpa.MetaData - parsePersistentTypeNames() found
>> [com.lbslogics.ims.model.PositionLog].
>> ...
>> 2203  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1]
>> openjpa.MetaData - Parsing class
>> "com.lbslogics.ims.model.PositionLog".
>> ...
>> 2546  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1]
>> openjpa.MetaData - Parsing query "PositionLog.byId".
>>
>> Then, since the persistence.xml file has
>> <class>com.lbslogics.ims.model.PositionLog</class> in it, it parses
>> the class again (it shouldn't, but that's what I could merely come up
>> with how OpenJPA works). That's when the other message about the query
>> pops up:
>>
>> 3123  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1]
>> openjpa.MetaData - Processing registered persistence-capable class
>> "class com.lbslogics.ims.model.PositionLog".
>> ...
>> 3134  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1]
>> openjpa.MetaData - Parsing query "PositionLog.byId".
>> 3135  lbsims  WARN   [RMI TCP Connection(7)-127.0.1.1]
>> openjpa.MetaData - Found duplicate query "PositionLog.byId" in "class
>> com.lbslogics.ims.model.PositionLog".  Ignoring.
>>
>> To prevent the double parsing from occuring, remove the class element
>> >from the persistence.xml file and let OpenJPA find the classes (not
>> recommended in Java EE env and mandatory in Java SE) or add
>> <exclude-unlisted-classes /> element to the persistence.xml file to
>> tell OpenJPA that listed classes only are to be managed (highly
>> recommended).
>>
>> I think it should help avoiding the message - "openjpa.MetaData -
>> Found duplicate query "PositionLog.byId" in "class
>> com.lbslogics.ims.model.PositionLog".  Ignoring."
>>
>> Jacek
>>
>>     

Re: Duplicate query

Posted by "Hans J. Prueller" <ha...@gmx.net>.
Jacek,

thank you for diving into this. I added the following node to my
persistence.xml right
after the <classes> - List:

<exclude-unlisted-classes >true</exclude-unlisted-classes>

It seems that the "duplicate query" warning stays - did  I add it the
wrong way?

hans

Am Mittwoch, den 18.04.2007, 00:16 +0200 schrieb Jacek Laskowski:

> On 4/17/07, Hans J. Prueller <ha...@gmx.net> wrote:
> 
> >  it took some time but finally I can send to the TRACE. As it is rather long
> > I'll paste it below. Additional information:
> 
> Thanks for the information. It's helped me a lot to narrow down the
> issue. I think it's misconfiguration that causes it and I don't think
> that we could call it a bug, but some improvements in OpenJPA
> configuration of PUs would be welcome.
> 
> I think that the first query parsing occurs because in Java EE
> environments a jpa container is supposed to find all managed
> persistence classes (see Chapter 6 Entity Packaging of the JPA spec).
> So, OpenJPA searches all the roots of persistence units and collect
> information on them. That's why you see the first message about the
> query.
> 
> 1679  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1]
> openjpa.MetaData - parsePersistentTypeNames() found
> [com.lbslogics.ims.model.PositionLog].
> ...
> 2203  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1]
> openjpa.MetaData - Parsing class
> "com.lbslogics.ims.model.PositionLog".
> ...
> 2546  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1]
> openjpa.MetaData - Parsing query "PositionLog.byId".
> 
> Then, since the persistence.xml file has
> <class>com.lbslogics.ims.model.PositionLog</class> in it, it parses
> the class again (it shouldn't, but that's what I could merely come up
> with how OpenJPA works). That's when the other message about the query
> pops up:
> 
> 3123  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1]
> openjpa.MetaData - Processing registered persistence-capable class
> "class com.lbslogics.ims.model.PositionLog".
> ...
> 3134  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1]
> openjpa.MetaData - Parsing query "PositionLog.byId".
> 3135  lbsims  WARN   [RMI TCP Connection(7)-127.0.1.1]
> openjpa.MetaData - Found duplicate query "PositionLog.byId" in "class
> com.lbslogics.ims.model.PositionLog".  Ignoring.
> 
> To prevent the double parsing from occuring, remove the class element
> >from the persistence.xml file and let OpenJPA find the classes (not
> recommended in Java EE env and mandatory in Java SE) or add
> <exclude-unlisted-classes /> element to the persistence.xml file to
> tell OpenJPA that listed classes only are to be managed (highly
> recommended).
> 
> I think it should help avoiding the message - "openjpa.MetaData -
> Found duplicate query "PositionLog.byId" in "class
> com.lbslogics.ims.model.PositionLog".  Ignoring."
> 
> Jacek
> 

RE: Duplicate query

Posted by Phill Moran <pj...@rogers.com>.
This is good information. I am good with ignoring it too as long as it does not
effect OpenJPA or any other functionality 

Phill

-----Original Message-----
From: eljotpl@gmail.com [mailto:eljotpl@gmail.com] On Behalf Of Jacek Laskowski
Sent: April 17, 2007 6:16 PM
To: open-jpa-dev@incubator.apache.org
Subject: Re: Duplicate query

On 4/17/07, Hans J. Prueller <ha...@gmx.net> wrote:

>  it took some time but finally I can send to the TRACE. As it is 
> rather long I'll paste it below. Additional information:

Thanks for the information. It's helped me a lot to narrow down the issue. I
think it's misconfiguration that causes it and I don't think that we could call
it a bug, but some improvements in OpenJPA configuration of PUs would be
welcome.

I think that the first query parsing occurs because in Java EE environments a
jpa container is supposed to find all managed persistence classes (see Chapter 6
Entity Packaging of the JPA spec).
So, OpenJPA searches all the roots of persistence units and collect information
on them. That's why you see the first message about the query.

1679  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData -
parsePersistentTypeNames() found [com.lbslogics.ims.model.PositionLog].
...
2203  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData -
Parsing class "com.lbslogics.ims.model.PositionLog".
...
2546  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData -
Parsing query "PositionLog.byId".

Then, since the persistence.xml file has
<class>com.lbslogics.ims.model.PositionLog</class> in it, it parses the class
again (it shouldn't, but that's what I could merely come up with how OpenJPA
works). That's when the other message about the query pops up:

3123  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData -
Processing registered persistence-capable class "class
com.lbslogics.ims.model.PositionLog".
...
3134  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData -
Parsing query "PositionLog.byId".
3135  lbsims  WARN   [RMI TCP Connection(7)-127.0.1.1]
openjpa.MetaData - Found duplicate query "PositionLog.byId" in "class
com.lbslogics.ims.model.PositionLog".  Ignoring.

To prevent the double parsing from occuring, remove the class element from the
persistence.xml file and let OpenJPA find the classes (not recommended in Java
EE env and mandatory in Java SE) or add <exclude-unlisted-classes /> element to
the persistence.xml file to tell OpenJPA that listed classes only are to be
managed (highly recommended).

I think it should help avoiding the message - "openjpa.MetaData - Found
duplicate query "PositionLog.byId" in "class
com.lbslogics.ims.model.PositionLog".  Ignoring."

Jacek

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


Re: Duplicate query

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 4/17/07, Hans J. Prueller <ha...@gmx.net> wrote:

>  it took some time but finally I can send to the TRACE. As it is rather long
> I'll paste it below. Additional information:

Thanks for the information. It's helped me a lot to narrow down the
issue. I think it's misconfiguration that causes it and I don't think
that we could call it a bug, but some improvements in OpenJPA
configuration of PUs would be welcome.

I think that the first query parsing occurs because in Java EE
environments a jpa container is supposed to find all managed
persistence classes (see Chapter 6 Entity Packaging of the JPA spec).
So, OpenJPA searches all the roots of persistence units and collect
information on them. That's why you see the first message about the
query.

1679  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1]
openjpa.MetaData - parsePersistentTypeNames() found
[com.lbslogics.ims.model.PositionLog].
...
2203  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1]
openjpa.MetaData - Parsing class
"com.lbslogics.ims.model.PositionLog".
...
2546  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1]
openjpa.MetaData - Parsing query "PositionLog.byId".

Then, since the persistence.xml file has
<class>com.lbslogics.ims.model.PositionLog</class> in it, it parses
the class again (it shouldn't, but that's what I could merely come up
with how OpenJPA works). That's when the other message about the query
pops up:

3123  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1]
openjpa.MetaData - Processing registered persistence-capable class
"class com.lbslogics.ims.model.PositionLog".
...
3134  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1]
openjpa.MetaData - Parsing query "PositionLog.byId".
3135  lbsims  WARN   [RMI TCP Connection(7)-127.0.1.1]
openjpa.MetaData - Found duplicate query "PositionLog.byId" in "class
com.lbslogics.ims.model.PositionLog".  Ignoring.

To prevent the double parsing from occuring, remove the class element
from the persistence.xml file and let OpenJPA find the classes (not
recommended in Java EE env and mandatory in Java SE) or add
<exclude-unlisted-classes /> element to the persistence.xml file to
tell OpenJPA that listed classes only are to be managed (highly
recommended).

I think it should help avoiding the message - "openjpa.MetaData -
Found duplicate query "PositionLog.byId" in "class
com.lbslogics.ims.model.PositionLog".  Ignoring."

Jacek

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

Re: Duplicate query

Posted by "Hans J. Prueller" <ha...@gmx.net>.
Jacek,

it took some time but finally I can send to the TRACE. As it is rather
long I'll paste it below. Additional information:

- there is NO orm.xml
- there is only a persistence.xml (I will paste it also below)
- the persistent pojo class is derived from a common base class and
implements some other interface - nothing special about it (I will paste
it too)

so: expect some LOC to follow ;-)

=========================
THE TRACE
=========================
308  lbsims  INFO   [RMI TCP Connection(7)-127.0.1.1] openjpa.Runtime -
Starting OpenJPA 0.9.7-incubating-SNAPSHOT
311  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.Runtime -
Properties: openjpa.EntityManagerFactory: default
openjpa.DataCache: false
openjpa.MetaDataFactory: jpa(Types=com.lbslogics.ims.model.PositionLog)
openjpa.InverseManager: false
openjpa.ReadLockLevel: read
openjpa.jdbc.SubclassFetchMode: join
openjpa.DataCacheManager: default
openjpa.ConnectionFactoryName: jdbc_lbsims
openjpa.jdbc.UpdateManager: default
openjpa.jdbc.SynchronizeMappings: false
openjpa.NontransactionalRead: true
openjpa.QueryCompilationCache: true
openjpa.MaxFetchDepth: -1
openjpa.RetainState: true
openjpa.DynamicDataStructs: false
openjpa.BrokerFactory: jdbc
openjpa.WriteLockLevel: write
openjpa.ManagedRuntime:
jndi(TransactionManagerName=java:comp/UserTransaction)
openjpa.jdbc.EagerFetchMode: parallel
openjpa.RestoreState: immutable
openjpa.jdbc.SchemaFactory: dynamic
openjpa.LockManager: version
openjpa.BrokerImpl: default
openjpa.NontransactionalWrite: true
openjpa.MetaDataRepository: default
openjpa.Log: DefaultLevel=TRACE,SQL=TRACE
openjpa.jdbc.ResultSetType: forward-only
openjpa.AutoDetach: 
openjpa.ConnectionRetainMode: on-demand
openjpa.SavepointManager: in-mem
openjpa.Optimistic: true
openjpa.ConnectionFactoryMode: managed
openjpa.Sequence: table
openjpa.FetchGroups: default
openjpa.jdbc.Schemas: 
openjpa.Id: lbsims
openjpa.OrphanedKeyAction: log
openjpa.FlushBeforeQueries: true
openjpa.AutoClear: datastore
openjpa.Compatibility: default
openjpa.jdbc.LRSSize: query
openjpa.DetachState: loaded
openjpa.Multithreaded: true
openjpa.FetchBatchSize: -1
openjpa.jdbc.SQLFactory: default
openjpa.IgnoreChanges: false
javax.persistence.provider:
org.apache.openjpa.persistence.PersistenceProviderImpl
openjpa.jdbc.MappingDefaults: jpa
openjpa.TransactionMode: managed
openjpa.RetryClassRegistration: false
openjpa.jdbc.FetchDirection: forward
openjpa.ClassResolver: default
openjpa.LockTimeout: -1
openjpa.DataCacheTimeout: -1
openjpa.QueryCache: true
openjpa.jdbc.DriverDataSource: simple
openjpa.jdbc.TransactionIsolation: default
openjpa.ProxyManager: default
729  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData -
Using metadata factory
"org.apache.openjpa.persistence.jdbc.PersistenceMappingFactory@28214".
740  lbsims  INFO   [RMI TCP Connection(7)-127.0.1.1] openjpa.jdbc.JDBC
- OpenJPA will now connect to the database to attempt to determine what
type of database dictionary to use.  To prevent this connection in the
future, set your openjpa.jdbc.DBDictionary configuration property to the
appropriate value for your database (see the documentation for available
values).
958  lbsims  INFO   [RMI TCP Connection(7)-127.0.1.1] openjpa.jdbc.JDBC
- Using dictionary class
"org.apache.openjpa.jdbc.sql.MySQLDictionary" (MySQL
5.0.24a-Debian_9ubuntu2-log ,MySQL-AB JDBC Driver
mysql-connector-java-5.0.4 ( $Date: 2006-10-19 17:47:48 +0200 (Thu, 19
Oct 2006) $, $Revision: 5908 $ )).
1027  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.jdbc.JDBC
- catalogSeparator: .
catalogTerm: database
databaseProductName: MySQL
databaseProductVersion: 5.0.24a-Debian_9ubuntu2-log
driverName: MySQL-AB JDBC Driver
driverVersion: mysql-connector-java-5.0.4 ( $Date: 2006-10-19 17:47:48
+0200 (Thu, 19 Oct 2006) $, $Revision: 5908 $ )
extraNameCharacters: #@
identifierQuoteString: `
numericFunctions:
ABS,ACOS,ASIN,ATAN,ATAN2,BIT_COUNT,CEILING,COS,COT,DEGREES,EXP,FLOOR,LOG,LOG10,MAX,MIN,MOD,PI,POW,POWER,RADIANS,RAND,ROUND,SIN,SQRT,TAN,TRUNCATE
procedureTerm: PROCEDURE
schemaTerm: 
searchStringEscape: \
sqlKeywords:
AUTO_INCREMENT,BINARY,BLOB,ENUM,INFILE,LOAD,MEDIUMINT,OPTION,OUTFILE,REPLACE,SET,TEXT,UNSIGNED,ZEROFILL
stringFunctions:
ASCII,BIN,BIT_LENGTH,CHAR,CHARACTER_LENGTH,CHAR_LENGTH,CONCAT,CONCAT_WS,CONV,ELT,EXPORT_SET,FIELD,FIND_IN_SET,HEX,INSERT,INSTR,LCASE,LEFT,LENGTH,LOAD_FILE,LOCATE,LOCATE,LOWER,LPAD,LTRIM,MAKE_SET,MATCH,MID,OCT,OCTET_LENGTH,ORD,POSITION,QUOTE,REPEAT,REPLACE,REVERSE,RIGHT,RPAD,RTRIM,SOUNDEX,SPACE,STRCMP,SUBSTRING,SUBSTRING,SUBSTRING,SUBSTRING,SUBSTRING_INDEX,TRIM,UCASE,UPPER
systemFunctions:
DATABASE,USER,SYSTEM_USER,SESSION_USER,PASSWORD,ENCRYPT,LAST_INSERT_ID,VERSION
timeDateFunctions:
DAYOFWEEK,WEEKDAY,DAYOFMONTH,DAYOFYEAR,MONTH,DAYNAME,MONTHNAME,QUARTER,WEEK,YEAR,HOUR,MINUTE,SECOND,PERIOD_ADD,PERIOD_DIFF,TO_DAYS,FROM_DAYS,DATE_FORMAT,TIME_FORMAT,CURDATE,CURRENT_DATE,CURTIME,CURRENT_TIME,NOW,SYSDATE,CURRENT_TIMESTAMP,UNIX_TIMESTAMP,FROM_UNIXTIME,SEC_TO_TIME,TIME_TO_SEC
url: jdbc:mysql://localhost:3306/lbsims?autoReconnect=true
userName: root@localhost
defaultTransactionIsolation: 2
driverMajorVersion: 5
driverMinorVersion: 0
maxBinaryLiteralLength: 16777208
maxCatalogNameLength: 32
maxCharLiteralLength: 16777208
maxColumnNameLength: 64
maxColumnsInGroupBy: 64
maxColumnsInIndex: 16
maxColumnsInOrderBy: 64
maxColumnsInSelect: 256
maxColumnsInTable: 512
maxConnections: 0
maxCursorNameLength: 64
maxIndexLength: 256
maxProcedureNameLength: 0
maxRowSize: 2147483639
maxSchemaNameLength: 0
maxStatementLength: 65531
maxStatements: 0
maxTableNameLength: 64
maxTablesInSelect: 256
maxUserNameLength: 16
isCatalogAtStart: true
isReadOnly: false
nullPlusNonNullIsNull: true
nullsAreSortedAtEnd: false
nullsAreSortedAtStart: false
nullsAreSortedHigh: false
nullsAreSortedLow: true
storesLowerCaseIdentifiers: true
storesLowerCaseQuotedIdentifiers: true
storesMixedCaseIdentifiers: false
storesMixedCaseQuotedIdentifiers: false
storesUpperCaseIdentifiers: false
storesUpperCaseQuotedIdentifiers: true
supportsAlterTableWithAddColumn: true
supportsAlterTableWithDropColumn: true
supportsANSI92EntryLevelSQL: true
supportsANSI92FullSQL: false
supportsANSI92IntermediateSQL: false
supportsCatalogsInDataManipulation: true
supportsCatalogsInIndexDefinitions: true
supportsCatalogsInPrivilegeDefinitions: true
supportsCatalogsInProcedureCalls: true
supportsCatalogsInTableDefinitions: true
supportsColumnAliasing: true
supportsConvert: false
supportsCoreSQLGrammar: true
supportsCorrelatedSubqueries: true
supportsDataDefinitionAndDataManipulationTransactions: false
supportsDataManipulationTransactionsOnly: false
supportsDifferentTableCorrelationNames: true
supportsExpressionsInOrderBy: true
supportsExtendedSQLGrammar: false
supportsFullOuterJoins: false
supportsGroupBy: true
supportsGroupByBeyondSelect: true
supportsGroupByUnrelated: true
supportsIntegrityEnhancementFacility: false
supportsLikeEscapeClause: true
supportsLimitedOuterJoins: true
supportsMinimumSQLGrammar: true
supportsMixedCaseIdentifiers: false
supportsMixedCaseQuotedIdentifiers: false
supportsMultipleResultSets: false
supportsMultipleTransactions: true
supportsNonNullableColumns: true
supportsOpenCursorsAcrossCommit: false
supportsOpenCursorsAcrossRollback: false
supportsOpenStatementsAcrossCommit: false
supportsOpenStatementsAcrossRollback: false
supportsOrderByUnrelated: false
supportsOuterJoins: true
supportsPositionedDelete: false
supportsPositionedUpdate: false
supportsSchemasInDataManipulation: false
supportsSchemasInIndexDefinitions: false
supportsSchemasInPrivilegeDefinitions: false
supportsSchemasInProcedureCalls: false
supportsSchemasInTableDefinitions: false
supportsSelectForUpdate: true
supportsStoredProcedures: true
supportsSubqueriesInComparisons: true
supportsSubqueriesInExists: true
supportsSubqueriesInIns: true
supportsSubqueriesInQuantifieds: true
supportsTableCorrelationNames: true
supportsTransactions: true
supportsUnion: true
supportsUnionAll: true
usesLocalFilePerTable: false
usesLocalFiles: false
allProceduresAreCallable: false
allTablesAreSelectable: false
dataDefinitionCausesTransactionCommit: true
dataDefinitionIgnoredInTransactions: false
doesMaxRowSizeIncludeBlobs: true
supportsBatchUpdates: true
1062  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.jdbc.JDBC
- <t 23207466, conn 11177593> [0 ms] close
1672  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Scanning resource "META-INF/orm.xml" for persistent types.
1679  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- parsePersistentTypeNames() found
[com.lbslogics.ims.model.PositionLog].
1679  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Found 1 classes with metadata in 25 milliseconds.
2203  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Parsing class "com.lbslogics.ims.model.PositionLog".
2203  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Parsing package "com.lbslogics.ims.model.PositionLog".
2396  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Generating default metadata for type
"com.lbslogics.ims.model.PositionLog".
2546  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Parsing query "PositionLog.byId".
2550  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Parsing query "PositionLog.allForCarByTimeRange".
2553  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Parsing query "PositionLog.matchingCID".
2558  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Parsing query "PositionLog.matchingNoTimeCID".
2561  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Parsing query "PositionLog.byCarTstampStopTransMovingTrans".
2564  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Parsing query "PositionLog.byBtripId".
2568  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Parsing query "PositionLog.byCarId".
2716  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Parsing query "PositionLog.unhandledJumperPointsForCar".
2720  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Parsing query "PositionLog.byBtripIdAndMetresDiff".
3123  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Processing registered persistence-capable class "class
com.lbslogics.ims.model.PositionLog".
3132  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Loading metadata for "class com.lbslogics.ims.model.PositionLog" under
mode "[META][QUERY]".
3133  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Parsing class "com.lbslogics.ims.model.PositionLog".
3134  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Parsing query "PositionLog.byId".
3135  lbsims  WARN   [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Found duplicate query "PositionLog.byId" in "class
com.lbslogics.ims.model.PositionLog".  Ignoring.
3372  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Parsing table generator "PositionLogGen".
3443  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Set persistence-capable superclass of
"com.lbslogics.ims.model.PositionLog" to "null".
3445  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Resolving metadata for "com.lbslogics.ims.model.PositionLog@30487164".
3445  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.businesstripId".
3446  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.carId".
3446  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.cid".
3446  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.course".
3447  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.employeeId".
3447  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.entityCreatedTstamp".
3447  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.fixType".
3447  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.id".
3447  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.isDriving".
3448  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.isIgnitionOn".
3448  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.isJumperPoint".
3448  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.isMovingTrans".
3448  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.isPowerOn".
3449  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.isStopTrans".
3449  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.latitude".
3449  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.longitude".
3449  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.metresCounter".
3449  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.metresDiffToPrev".
3450  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.numSat".
3450  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.saltDens1".
3450  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.saltDens2".
3450  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.saltSpSymm".
3450  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.saltWet".
3451  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.saltWidth".
3451  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.speedKmH".
3451  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.status1".
3451  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.status2".
3451  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.status3".
3452  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.status4".
3452  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.status5".
3452  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.tachoImpulse".
3452  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.tstamp".
3452  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.wasAtHome".
3452  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.wasHomeType".
3453  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.wasLMT".
3467  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Preparing mapping for "com.lbslogics.ims.model.PositionLog".
3623  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.id".
3738  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "id" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3739  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.businesstripId".
3739  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "businesstripId" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3740  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.carId".
3740  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "carId" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3740  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.cid".
3748  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "cid" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
3751  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.course".
3751  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "course" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3752  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.employeeId".
3752  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "employeeId" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3752  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.entityCreatedTstamp".
3753  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "entityCreatedTstamp" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3753  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.fixType".
3753  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "fixType" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3754  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.isDriving".
3754  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "isDriving" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3754  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.isIgnitionOn".
3755  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "isIgnitionOn" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3755  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.isJumperPoint".
3755  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "isJumperPoint" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3756  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.isMovingTrans".
3756  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "isMovingTrans" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3756  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.isPowerOn".
3756  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "isPowerOn" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3757  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.isStopTrans".
3757  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "isStopTrans" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3757  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.latitude".
3758  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "latitude" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3758  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.longitude".
3758  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "longitude" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3759  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.metresCounter".
3759  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "metresCounter" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3892  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.metresDiffToPrev".
3893  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "metresDiffToPrev" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3893  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.numSat".
3894  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "numSat" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3894  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.saltDens1".
3894  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "saltDens1" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
3895  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.saltDens2".
3895  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "saltDens2" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
3895  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.saltSpSymm".
3895  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "saltSpSymm" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
3896  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.saltWet".
3896  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "saltWet" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3896  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.saltWidth".
3897  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "saltWidth" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
3897  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.speedKmH".
3898  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "speedKmH" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3898  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.status1".
3898  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "status1" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
3898  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.status2".
3899  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "status2" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
3899  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.status3".
3899  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "status3" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
3900  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.status4".
3900  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "status4" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
3900  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.status5".
3900  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "status5" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.StringFieldStrategy".
3901  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.tachoImpulse".
3901  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "tachoImpulse" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3901  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.tstamp".
3902  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "tstamp" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3908  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.wasAtHome".
3908  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "wasAtHome" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3908  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.wasHomeType".
3909  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "wasHomeType" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
3909  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.wasLMT".
3910  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       "wasLMT" has mapping strategy
"org.apache.openjpa.jdbc.meta.strats.HandlerFieldStrategy".
4050  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- "com.lbslogics.ims.model.PositionLog<discriminator>" has mapping
strategy "none".
4058  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- "com.lbslogics.ims.model.PositionLog<version>" has mapping strategy
"none".
4058  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Resolving mapping for "com.lbslogics.ims.model.PositionLog@30487164".
4059  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- "com.lbslogics.ims.model.PositionLog" has mapping strategy "full".
4059  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
- Initializing mapping for
"com.lbslogics.ims.model.PositionLog@30487164".
4061  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.businesstripId".
4061  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.carId".
4062  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.cid".
4062  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.course".
4062  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.employeeId".
4062  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.entityCreatedTstamp".
4062  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.fixType".
4062  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.id".
4063  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.isDriving".
4063  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.isIgnitionOn".
4063  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.isJumperPoint".
4063  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.isMovingTrans".
4063  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.isPowerOn".
4064  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.isStopTrans".
4064  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.latitude".
4064  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.longitude".
4064  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.metresCounter".
4064  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.metresDiffToPrev".
4064  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.numSat".
4065  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.saltDens1".
4065  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.saltDens2".
4065  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.saltSpSymm".
4065  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.saltWet".
4066  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.saltWidth".
4066  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.speedKmH".
4066  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.status1".
4066  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.status2".
4066  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.status3".
4067  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.status4".
4067  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.status5".
4067  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.tachoImpulse".
4067  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.tstamp".
4067  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.wasAtHome".
4067  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.wasHomeType".
4068  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.MetaData
-       Resolving field
"com.lbslogics.ims.model.PositionLog@30487164.wasLMT".
4482  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.Query -
Executing query: [SELECT x FROM PositionLog x WHERE x.id = :id] with
parameters: {id=-21216258}
4801  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.jdbc.SQL
- <t 23207466, conn 11177593> executing prepstmnt 2099870706 SELECT
t0.id_, t0.BusinessTripBean_Id_, t0.CarBean_Id_, t0.cid_, t0.course_,
t0.employeeid_, t0.entityCreatedTstamp_, t0.fixType_, t0.isDriving_,
t0.isIgnitionOn_, t0.isJumperPoint_, t0.isMovingTrans_, t0.isPowerOn_,
t0.isStopTrans_, t0.latitude_, t0.longitude_, t0.metresCounter_,
t0.metresDiffToPrev_, t0.numSat_, t0.saltDens1_, t0.saltDens2_,
t0.saltSpSymm_, t0.saltWet_, t0.saltWidth_, t0.speedKmH_, t0.status1_,
t0.status2_, t0.status3_, t0.status4_, t0.status5_, t0.tachoImpulse_,
t0.tstamp_, t0.wasAtHome_, t0.wasHomeType_, t0.wasLMT_ FROM
PositionLogBean_ t0 WHERE (t0.id_ = ?) [params=(long) -21216258]
4804  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.jdbc.SQL
- <t 23207466, conn 11177593> [3 ms] spent
5060  lbsims  TRACE  [RMI TCP Connection(7)-127.0.1.1] openjpa.jdbc.JDBC
- <t 23207466, conn 11177593> [1 ms] close


========================
the PERSISTENCE.XML
========================

<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
	<persistence-unit name="lbsims" transaction-type="JTA">
		<provider>
			org.apache.openjpa.persistence.PersistenceProviderImpl
		</provider>
		<jta-data-source>jdbc_test</jta-data-source>
		<class>com.lbslogics.ims.model.PositionLog</class>
		<properties>
			<property name="openjpa.ConnectionFactoryMode" value="managed" />
			<property name="openjpa.TransactionMode" value="managed"/>
			<property name="openjpa.Log" value="DefaultLevel=TRACE,SQL=TRACE" />
			<property name="openjpa.Multithreaded" value="true"/>
			<property name="openjpa.ManagedRuntime"
				value="jndi(TransactionManagerName=java:comp/UserTransaction)" />
		</properties>
	</persistence-unit>
</persistence>


====================================
the PositionLog CLASS (SHORTENED)
====================================
package com.lbslogics.ims.model;

@javax.persistence.Entity
@Table(name = "PositionLogBean_")
@NamedQueries( {
		@NamedQuery(name = "PositionLog.byId", query = "SELECT x FROM
PositionLog x WHERE x.id = :id"),
		//SOME OTHER NAMED QUERIES WITH PROVEN DIFFERENT NAMES HERE
                 })
public class PositionLog extends AbstractPersistentModelObject
implements
		ModelObject {

	// CONSTANTS
	public static final String OBJREF = "ims/PositionLog";

	private static final Logger logger = java.util.logging.Logger
			.getLogger(PositionLog.class.getName());

	// FINDER METHODS

	public static PositionLog findById(EntityManager em, Long plId) {
		Query q = em.createNamedQuery("PositionLog.byId");
		q.setParameter("id", plId);

		try {
			return (PositionLog) q.getSingleResult();
		} catch (javax.persistence.NoResultException e) {
			logger.finest("findById: did not find result for id=" + plId);
			return null;
		}
	}

        // SOME OTHER METHODS HERE

	// IMPL

	@Id
	@Column(name = "id_")
	@GeneratedValue(strategy = GenerationType.TABLE, generator =
"PositionLogGen")
	@TableGenerator(name = "PositionLogGen", table = "SEQ_IDGEN",
pkColumnValue = "PositionLog")
	private Long id;

	@Basic
	@Column(name = "cid_")
	private String cid;

	@Basic
	@Column(name = "entityCreatedTstamp_")
	private Long entityCreatedTstamp;

         //SOME MORE @Basic attributes here...

	// POJO Model Object Entity Implementation

	private PositionLog() {
		setEntityCreatedTstamp(Long.valueOf(System.currentTimeMillis()));
	}

	/**
	 * default "constructing method" that initializes attribute values, a
	 * forced-parametrized constructor cannot be used as a
no-arg-constructor is
	 * required by JPA.
	 */
	public PositionLog(final String cid) {
		this();

		setCid(cid);
		
                 ....
	}

	// IMPLEMENTATION AND LOTS OF GETTERS / SETTERS FOLLOW HERE

}



Am Montag, den 16.04.2007, 22:27 +0200 schrieb Jacek Laskowski:

> On 4/16/07, Jacek Laskowski <ja...@laskowski.net.pl> wrote:
> 
> > >  2180  lbsims  WARN   [RMI TCP Connection(3)-127.0.1.1] openjpa.MetaData -
> > > Found duplicate query "PositionLog.byId" in "class
> > > com.lbslogics.ims.model.PositionLog".  Ignoring.
> >
> > Could you show the PositionLog entity and the corresponding
> > persistence.xml file with other referenced files (like orm.xml and
> > other mapping files if such exist)?
> 
> Could you also rise log level to TRACE:
> 
> <property name="openjpa.Log" value="DefaultLevel=TRACE,SQL=TRACE" />
> 
> to see what (Native)NamedQuery has already been parsed and when? Add
> it to the persistence.xml of yours.
> 
> Jacek
> 

Re: Duplicate query

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 4/16/07, Jacek Laskowski <ja...@laskowski.net.pl> wrote:

> >  2180  lbsims  WARN   [RMI TCP Connection(3)-127.0.1.1] openjpa.MetaData -
> > Found duplicate query "PositionLog.byId" in "class
> > com.lbslogics.ims.model.PositionLog".  Ignoring.
>
> Could you show the PositionLog entity and the corresponding
> persistence.xml file with other referenced files (like orm.xml and
> other mapping files if such exist)?

Could you also rise log level to TRACE:

<property name="openjpa.Log" value="DefaultLevel=TRACE,SQL=TRACE" />

to see what (Native)NamedQuery has already been parsed and when? Add
it to the persistence.xml of yours.

Jacek

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

Re: Duplicate query

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 4/16/07, Hans J. Prueller <ha...@gmx.net> wrote:

>  363  lbsims  INFO   [RMI TCP Connection(3)-127.0.1.1] openjpa.jdbc.JDBC -
> OpenJPA will now connect to the database to attempt to determine what type
> of database dictionary to use.  To prevent this connection in the future,
> set your openjpa.jdbc.DBDictionary configuration property to the appropriate
> value for your database (see the documentation for available values).
>  449  lbsims  INFO   [RMI TCP Connection(3)-127.0.1.1] openjpa.jdbc.JDBC -
> Using dictionary class
> "org.apache.openjpa.jdbc.sql.MySQLDictionary" (MySQL
> 5.0.24a-Debian_9ubuntu2-log ,MySQL-AB JDBC Driver mysql-connector-java-5.0.4
> ( $Date: 2006-10-19 17:47:48 +0200 (Thu, 19 Oct 2006) $, $Revision: 5908 $
> )).

Use

<property name="" value="mysql" />

in the persistence.xml of yours to avoid the info message. You may use
it to further fine-tune the jpa provider and its underlaying resources
like database connections.

I haven't tried it out myself, though so use it on your own risk ;-)

@see http://incubator.apache.org/openjpa/docs/latest/manual/manual.html#ref_guide_dbsetup_dbsupport

>  2180  lbsims  WARN   [RMI TCP Connection(3)-127.0.1.1] openjpa.MetaData -
> Found duplicate query "PositionLog.byId" in "class
> com.lbslogics.ims.model.PositionLog".  Ignoring.

Could you show the PositionLog entity and the corresponding
persistence.xml file with other referenced files (like orm.xml and
other mapping files if such exist)?

Jacek

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

RE: Duplicate query

Posted by Phill Moran <pj...@rogers.com>.
I guess the question then is what does this mean, is OpenJPA (not) doing
something due to this? You see I have another error that is not representative
of some real problem that I am trying to determine and I am looking to clear
away the noise.

  _____  

From: Hans J. Prueller [mailto:hans.prueller@gmx.net] 
Sent: April 16, 2007 3:20 PM
To: open-jpa-dev@incubator.apache.org
Cc: jacek@laskowski.net.pl
Subject: Re: Duplicate query


Phill,

I am still getting the same warning - although I am using a 0.9.7-snapshot that
is some weeks old meanwhile:

160  lbsims  INFO   [RMI TCP Connection(3)-127.0.1.1] openjpa.Runtime - Starting
OpenJPA 0.9.7-incubating-SNAPSHOT
363  lbsims  INFO   [RMI TCP Connection(3)-127.0.1.1] openjpa.jdbc.JDBC -
OpenJPA will now connect to the database to attempt to determine what type of
database dictionary to use.  To prevent this connection in the future, set your
openjpa.jdbc.DBDictionary configuration property to the appropriate value for
your database (see the documentation for available values).
449  lbsims  INFO   [RMI TCP Connection(3)-127.0.1.1] openjpa.jdbc.JDBC - Using
dictionary class "org.apache.openjpa.jdbc.sql.MySQLDictionary" (MySQL
5.0.24a-Debian_9ubuntu2-log ,MySQL-AB JDBC Driver mysql-connector-java-5.0.4 (
$Date: 2006-10-19 17:47:48 +0200 (Thu, 19 Oct 2006) $, $Revision: 5908 $ )).
2180  lbsims  WARN   [RMI TCP Connection(3)-127.0.1.1] openjpa.MetaData - Found
duplicate query "PositionLog.byId" in "class
com.lbslogics.ims.model.PositionLog".  Ignoring.


As you can see, I'm prefixing the query names with the Pojo-name to avoid
duplicate names but nevertheless, the warning comes up...

Hans

Am Montag, den 16.04.2007, 15:11 -0400 schrieb Phill Moran: 

 I am still getting a duplicate query where no duplicate exists. Did this get

resolved in the 0.97 release or may this be a config issue on my part? 



Phill


Re: Duplicate query

Posted by "Hans J. Prueller" <ha...@gmx.net>.
Phill,

I am still getting the same warning - although I am using a
0.9.7-snapshot that is some weeks old meanwhile:

160  lbsims  INFO   [RMI TCP Connection(3)-127.0.1.1] openjpa.Runtime -
Starting OpenJPA 0.9.7-incubating-SNAPSHOT
363  lbsims  INFO   [RMI TCP Connection(3)-127.0.1.1] openjpa.jdbc.JDBC
- OpenJPA will now connect to the database to attempt to determine what
type of database dictionary to use.  To prevent this connection in the
future, set your openjpa.jdbc.DBDictionary configuration property to the
appropriate value for your database (see the documentation for available
values).
449  lbsims  INFO   [RMI TCP Connection(3)-127.0.1.1] openjpa.jdbc.JDBC
- Using dictionary class
"org.apache.openjpa.jdbc.sql.MySQLDictionary" (MySQL
5.0.24a-Debian_9ubuntu2-log ,MySQL-AB JDBC Driver
mysql-connector-java-5.0.4 ( $Date: 2006-10-19 17:47:48 +0200 (Thu, 19
Oct 2006) $, $Revision: 5908 $ )).
2180  lbsims  WARN   [RMI TCP Connection(3)-127.0.1.1] openjpa.MetaData
- Found duplicate query "PositionLog.byId" in "class
com.lbslogics.ims.model.PositionLog".  Ignoring.


As you can see, I'm prefixing the query names with the Pojo-name to
avoid duplicate names but nevertheless, the warning comes up...

Hans

Am Montag, den 16.04.2007, 15:11 -0400 schrieb Phill Moran:

>  I am still getting a duplicate query where no duplicate exists. Did this get
> resolved in the 0.97 release or may this be a config issue on my part? 
> 
> Phill

RE: Duplicate query

Posted by Phill Moran <pj...@rogers.com>.
I am not sure if it was created (I did not) and I am unsure if my config is yet
straight so I would not want one created just due to me. Someone else had
responded the last time in seeing the same thing with only on named query
though.

I do know this though there is no duplicate query in my code so if I have
another error this is erroneously being reported

Phill

-----Original Message-----
From: Marc Prud'hommeaux [mailto:mprudhomapache@gmail.com] On Behalf Of Marc
Prud'hommeaux
Sent: April 16, 2007 3:22 PM
To: open-jpa-dev@incubator.apache.org
Cc: jacek@laskowski.net.pl
Subject: Re: Duplicate query

Phill-

Was there a JIRA issue created for this? I didn't see one.

I do recall not being able to reproduce it when you mentioned it, so I didn't
proceed with entering one...


On Apr 16, 2007, at 12:11 PM, Phill Moran wrote:

>
> I am still getting a duplicate query where no duplicate exists. Did 
> this get resolved in the 0.97 release or may this be a config issue on 
> my part?
>
> Phill
>


Re: Duplicate query

Posted by Marc Prud'hommeaux <mp...@apache.org>.
Phill-

Was there a JIRA issue created for this? I didn't see one.

I do recall not being able to reproduce it when you mentioned it, so  
I didn't proceed with entering one...


On Apr 16, 2007, at 12:11 PM, Phill Moran wrote:

>
> I am still getting a duplicate query where no duplicate exists. Did  
> this get
> resolved in the 0.97 release or may this be a config issue on my part?
>
> Phill
>


Duplicate query

Posted by Phill Moran <pj...@rogers.com>.
 
I am still getting a duplicate query where no duplicate exists. Did this get
resolved in the 0.97 release or may this be a config issue on my part? 

Phill


Re: PCEnhance

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 4/10/07, Phill Moran <pj...@rogers.com> wrote:

> This has been so frustrating that I have stopped trying to fix it and have moved
> to using Maven to compile and test. It means I also lose the ability to trace
> but I have not progressed my project in almost three weeks trying to solve
> various stack issues. I have also posted a message in the eclipse forum but
> there seems to be less attention paid to that one than this. When I figure it
> out I will post the solution back to this forum for others to discover

Why not to use the javaagent in Eclipse then and the PCEnhancer in
production? Run your apps in Eclipse with the following setting in the
VM arguments panel of the Run configuration of your choice.

-javaagent:c:/.m2/org/apache/openjpa/openjpa-all/0.9.7-incubating-SNAPSHOT/openjpa-all-0.9.7-incubating-SNAPSHOT.jar

You should change the path to your M2 repo, though.

Jacek

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

RE: PCEnhance

Posted by Phill Moran <pj...@rogers.com>.
Thanks Jacek, I have that entry in there and believe the issue is with
Eclipse/my development environment. You see it is stopping the build process
before it gets to enhance as I get no messages from OpenJPA (or eclipse) at all.


This has been so frustrating that I have stopped trying to fix it and have moved
to using Maven to compile and test. It means I also lose the ability to trace
but I have not progressed my project in almost three weeks trying to solve
various stack issues. I have also posted a message in the eclipse forum but
there seems to be less attention paid to that one than this. When I figure it
out I will post the solution back to this forum for others to discover

Thanks again,

	Phill

-----Original Message-----
From: eljotpl@gmail.com [mailto:eljotpl@gmail.com] On Behalf Of Jacek Laskowski
Sent: April 10, 2007 3:48 PM
To: open-jpa-dev@incubator.apache.org
Subject: Re: PCEnhance

On 4/10/07, Phill Moran <pj...@rogers.com> wrote:
> Through maven and eclipse. I have log level trace set in 
> persistence.xml but that has no impact. Maven is reporting that 
> PCEnhance is returning non-zero and no reason why. So trace is set on 
> either CLI or maven (same thing really). I don't remember seeing it 
> anywhere in the docs from maven is it in Configuration and what is the tag?

Use

<property name="openjpa.Log" value="DefaultLevel=TRACE,SQL=TRACE" />

in your persistence.xml file (I think SQL=TRACE is not necessary). I'm using
OpenJPA 0.9.7-SNAPSHOT's PCEnhancer from within M2 with maven-antrun-plugin. It
gives a lot of information, i.e.

     [java] 62  derbyPU  TRACE  [main] openjpa.MetaData - Found 3 classes with
metadata in 0 milliseconds.
     [java] 62  derbyPU  TRACE  [main] openjpa.Tool - Enhancer running on type
"class pl.jaceklaskowski.jpa.entity.PracownikSpecjalny".
     [java] 125  derbyPU  TRACE  [main] openjpa.MetaData - Loading metadata for
"class pl.jaceklaskowski.jpa.entity.PracownikSpecjalny"
under mode "[META]".
     [java] 140  derbyPU  TRACE  [main] openjpa.MetaData - Parsing class
"pl.jaceklaskowski.jpa.entity.PracownikSpecjalny".
     [java] 140  derbyPU  TRACE  [main] openjpa.MetaData - Parsing package
"pl.jaceklaskowski.jpa.entity.PracownikSpecjalny".
     [java] 187  derbyPU  TRACE  [main] openjpa.MetaData - Generating default
metadata for type "pl.jaceklaskowski.jpa.entity.PracownikSpecjalny".
     [java] 187  derbyPU  TRACE  [main] openjpa.MetaData - Using reflection for
metadata generation.
     [java] 218  derbyPU  TRACE  [main] openjpa.MetaData - Loading metadata for
"class pl.jaceklaskowski.jpa.entity.Osoba" under mode "[META]".
     [java] 218  derbyPU  TRACE  [main] openjpa.MetaData - Parsing class
"pl.jaceklaskowski.jpa.entity.Osoba".
...

Lots of information to digest.

Jacek

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


Re: PCEnhance

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 4/10/07, Phill Moran <pj...@rogers.com> wrote:
> Through maven and eclipse. I have log level trace set in persistence.xml but
> that has no impact. Maven is reporting that PCEnhance is returning non-zero and
> no reason why. So trace is set on either CLI or maven (same thing really). I
> don't remember seeing it anywhere in the docs from maven is it in Configuration
> and what is the tag?

Use

<property name="openjpa.Log" value="DefaultLevel=TRACE,SQL=TRACE" />

in your persistence.xml file (I think SQL=TRACE is not necessary). I'm
using OpenJPA 0.9.7-SNAPSHOT's PCEnhancer from within M2 with
maven-antrun-plugin. It gives a lot of information, i.e.

     [java] 62  derbyPU  TRACE  [main] openjpa.MetaData - Found 3
classes with metadata in 0 milliseconds.
     [java] 62  derbyPU  TRACE  [main] openjpa.Tool - Enhancer running
on type "class pl.jaceklaskowski.jpa.entity.PracownikSpecjalny".
     [java] 125  derbyPU  TRACE  [main] openjpa.MetaData - Loading
metadata for "class pl.jaceklaskowski.jpa.entity.PracownikSpecjalny"
under mode "[META]".
     [java] 140  derbyPU  TRACE  [main] openjpa.MetaData - Parsing
class "pl.jaceklaskowski.jpa.entity.PracownikSpecjalny".
     [java] 140  derbyPU  TRACE  [main] openjpa.MetaData - Parsing
package "pl.jaceklaskowski.jpa.entity.PracownikSpecjalny".
     [java] 187  derbyPU  TRACE  [main] openjpa.MetaData - Generating
default metadata for type
"pl.jaceklaskowski.jpa.entity.PracownikSpecjalny".
     [java] 187  derbyPU  TRACE  [main] openjpa.MetaData - Using
reflection for metadata generation.
     [java] 218  derbyPU  TRACE  [main] openjpa.MetaData - Loading
metadata for "class pl.jaceklaskowski.jpa.entity.Osoba" under mode
"[META]".
     [java] 218  derbyPU  TRACE  [main] openjpa.MetaData - Parsing
class "pl.jaceklaskowski.jpa.entity.Osoba".
...

Lots of information to digest.

Jacek

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

RE: PCEnhance

Posted by Phill Moran <pj...@rogers.com>.
Through maven and eclipse. I have log level trace set in persistence.xml but
that has no impact. Maven is reporting that PCEnhance is returning non-zero and
no reason why. So trace is set on either CLI or maven (same thing really). I
don't remember seeing it anywhere in the docs from maven is it in Configuration
and what is the tag?

Phill

-----Original Message-----
From: Patrick Linskey [mailto:plinskey@bea.com] 
Sent: April 9, 2007 5:57 PM
To: open-jpa-dev@incubator.apache.org
Subject: RE: PCEnhance

How are you invoking the enhancer? Setting the default log level to TRACE will
probably give you quite a bit of data.

-Patrick

--
Patrick Linskey
BEA Systems, Inc. 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or legally
privileged, and is intended solely for the use of the individual or entity named
in this message. If you are not the intended recipient, and have received this
message in error, please immediately return this by email and then delete it. 

> -----Original Message-----
> From: Phill Moran [mailto:pjmoran@rogers.com]
> Sent: Monday, April 09, 2007 2:50 PM
> To: open-jpa-dev@incubator.apache.org
> Subject: PCEnhance
> 
> Anyway to get a trace out of a pcEnhance call?
> 
> Phill
> 
> 

Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or legally
privileged, and is intended solely for the use of the individual or entity named
in this message. If you are not the intended recipient, and have received this
message in error, please immediately return this by email and then delete it.


RE: PCEnhance

Posted by Patrick Linskey <pl...@bea.com>.
How are you invoking the enhancer? Setting the default log level to
TRACE will probably give you quite a bit of data.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc. 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: Phill Moran [mailto:pjmoran@rogers.com] 
> Sent: Monday, April 09, 2007 2:50 PM
> To: open-jpa-dev@incubator.apache.org
> Subject: PCEnhance
> 
> Anyway to get a trace out of a pcEnhance call?
> 
> Phill
> 
> 

Notice:  This email message, together with any attachments, may contain information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated entities,  that may be confidential,  proprietary,  copyrighted  and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it.