Anyone have any more suggestions on how to debug this? -----Original Message----- From: Phill Moran [mailto:[EMAIL PROTECTED] Sent: April 26, 2007 11:20 PM To: open-jpa-dev@incubator.apache.org Subject: RE: How to debug object retrieveal in JPA?
I don't close it in anyway directly -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: April 26, 2007 11:16 PM To: open-jpa-dev@incubator.apache.org Subject: Re: How to debug object retrieveal in JPA? Can it be that there is a glue code that closes EM in between? Just a thought... -marina Phill Moran wrote: > I had suspected the Locale so I made a set/getLocale that communicate > in String. > I figured that openJPA does not actually care how I implement. > > But for this run I removed it completely and did a clean rebuild. Good > news and bad the exception changed: > > > java.util.NoSuchElementException: The result list has been closed. > at > org.apache.openjpa.lib.rop.AbstractResultList.assertOpen(AbstractResul > tList.java > :91) > at > org.apache.openjpa.lib.rop.AbstractNonSequentialResultList.get(Abstrac > tNonSequen > tialResultList.java:68) > at > org.apache.openjpa.kernel.DelegatingResultList.get(DelegatingResultLis > t.java:241 > ) > at > ca.BidSpec.emall.user.PersonFactoryImpl.getLoginPersonValueObject(Pers > onFactoryI > mpl.java:99) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess > orImpl.jav > a:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflectio > n(AopUtils > .java:304) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoi > npoint(Ref > lectiveMethodInvocation.java:172) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(R > eflectiveM > ethodInvocation.java:139) > at > org.springframework.transaction.interceptor.TransactionInterceptor.inv > oke(Transa > ctionInterceptor.java:107) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(R > eflectiveM > ethodInvocation.java:161) > at > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamic > AopProxy.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(DelegatingMethodAccess > orImpl.jav > a:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflectio > n(AopUtils > .java:304) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoi > npoint(Ref > lectiveMethodInvocation.java:172) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(R > eflectiveM > ethodInvocation.java:139) > at > org.springframework.transaction.interceptor.TransactionInterceptor.inv > oke(Transa > ctionInterceptor.java:107) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(R > eflectiveM > ethodInvocation.java:161) > at > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamic > AopProxy.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(DelegatingMethodAccess > orImpl.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(ConditionalTestCa > se.java:69 > ) > at > org.springframework.test.annotation.AbstractAnnotationAwareTransaction > alTests.ac > cess$001(AbstractAnnotationAwareTransactionalTests.java:47) > at > org.springframework.test.annotation.AbstractAnnotationAwareTransactionalTests$1. > run(AbstractAnnotationAwareTransactionalTests.java:115) > at > org.springframework.test.annotation.AbstractAnnotationAwareTransaction > alTests.ru > nTest(AbstractAnnotationAwareTransactionalTests.java:180) > at > org.springframework.test.annotation.AbstractAnnotationAwareTransaction > alTests.ru > nTestTimed(AbstractAnnotationAwareTransactionalTests.java:153) > at > org.springframework.test.annotation.AbstractAnnotationAwareTransaction > alTests.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(TestClassR > unner.java > :42) > at > org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAnd > AfterRunne > r.java:34) > at > org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52) > at > org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4T > estReferen > ce.java:38) > at > org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(Remote > TestRunner > .java:460) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(Remote > TestRunner > .java:673) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestR > unner.java > :386) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTest > Runner.jav > a:196) > > -----Original Message----- > From: Patrick Linskey [mailto:[EMAIL PROTECTED] > Sent: April 26, 2007 9:59 PM > To: open-jpa-dev@incubator.apache.org > Subject: RE: How to debug object retrieveal in JPA? > > >>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) > > > Now we're getting somewhere.... what happens if you remove the Locale > field from the Person class? > > -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:[EMAIL PROTECTED] >>Sent: Thursday, April 26, 2007 6:32 PM >>To: open-jpa-dev@incubator.apache.org >>Subject: RE: How to debug object retrieveal in JPA? >> >>Run that config gives us this lovely message: >> >><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(JDBCStore >>Manager.java:773) >> at >>org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult >>.java:254) >> at >>org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(Selec >>tImpl.java:2115) >> at >>org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult >>.java:248) >> at >>org.apache.openjpa.jdbc.kernel.InstanceResultObjectProvider.ge >>tResultObject(Inst >>anceResultObjectProvider.java:56) >> at >>org.apache.openjpa.lib.rop.WindowResultList.getInternal(Window >>ResultList.java:12 >>8) >> at >>org.apache.openjpa.lib.rop.AbstractNonSequentialResultList.get >>(AbstractNonSequen >>tialResultList.java:69) >> at >>org.apache.openjpa.kernel.DelegatingResultList.get(DelegatingR >>esultList.java:241 >>) >> at >>ca.BidSpec.emall.user.PersonFactoryImpl.getLoginPersonValueObj >>ect(PersonFactoryI >>mpl.java:99) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess >>orImpl.java:39) >> at >>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth >>odAccessorImpl.jav >>a:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >>org.springframework.aop.support.AopUtils.invokeJoinpointUsingR >>eflection(AopUtils >>.java:304) >> at >>org.springframework.aop.framework.ReflectiveMethodInvocation.i >>nvokeJoinpoint(Ref >>lectiveMethodInvocation.java:172) >> at >>org.springframework.aop.framework.ReflectiveMethodInvocation.p >>roceed(ReflectiveM >>ethodInvocation.java:139) >> at >>org.springframework.transaction.interceptor.TransactionInterce >>ptor.invoke(Transa >>ctionInterceptor.java:107) >> at >>org.springframework.aop.framework.ReflectiveMethodInvocation.p >>roceed(ReflectiveM >>ethodInvocation.java:161) >> at >>org.springframework.aop.framework.JdkDynamicAopProxy.invoke(Jd >>kDynamicAopProxy.j >>ava:203) >> at $Proxy34.getLoginPersonValueObject(Unknown Source) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess >>orImpl.java:39) >> at >>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth >>odAccessorImpl.jav >>a:25) >> at java.lang.reflect.Method.invoke(Method.java:597) >> at >>org.springframework.aop.support.AopUtils.invokeJoinpointUsingR >>eflection(AopUtils >>.java:304) >> at >>org.springframework.aop.framework.ReflectiveMethodInvocation.i >>nvokeJoinpoint(Ref >>lectiveMethodInvocation.java:172) >> at >>org.springframework.aop.framework.ReflectiveMethodInvocation.p >>roceed(ReflectiveM >>ethodInvocation.java:139) >> at >>org.springframework.transaction.interceptor.TransactionInterce >>ptor.invoke(Transa >>ctionInterceptor.java:107) >> at >>org.springframework.aop.framework.ReflectiveMethodInvocation.p >>roceed(ReflectiveM >>ethodInvocation.java:161) >> at >>org.springframework.aop.framework.JdkDynamicAopProxy.invoke(Jd >>kDynamicAopProxy.j >>ava:203) >> at $Proxy34.getLoginPersonValueObject(Unknown Source) >> at >>ca.BidSpec.testing.emall.UserFactoryTest.testDelete(UserFactor >>yTest.java:119) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess >>orImpl.java:39) >> at >>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth >>odAccessorImpl.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(Condition >>alTestCase.java:69 >>) >> at >>org.springframework.test.annotation.AbstractAnnotationAwareTra >>nsactionalTests.ac >>cess$001(AbstractAnnotationAwareTransactionalTests.java:47) >> at >>org.springframework.test.annotation.AbstractAnnotationAwareTra >>nsactionalTests$1. >>run(AbstractAnnotationAwareTransactionalTests.java:115) >> at >>org.springframework.test.annotation.AbstractAnnotationAwareTra >>nsactionalTests.ru >>nTest(AbstractAnnotationAwareTransactionalTests.java:180) >> at >>org.springframework.test.annotation.AbstractAnnotationAwareTra >>nsactionalTests.ru >>nTestTimed(AbstractAnnotationAwareTransactionalTests.java:153) >> at >>org.springframework.test.annotation.AbstractAnnotationAwareTra >>nsactionalTests.ru >>nBare(AbstractAnnotationAwareTransactionalTests.java:111) >> at >>org.springframework.test.jpa.AbstractJpaTests.runBare(Abstract >>JpaTests.java:159) >> at >>org.springframework.test.jpa.AbstractJpaTests.runBare(Abstract >>JpaTests.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(OldTestClass >>Runner.java:35) >> at >>org.junit.internal.runners.CompositeRunner.run(CompositeRunner >>.java:29) >> at >>org.junit.internal.runners.TestClassRunner$1.runUnprotected(Te >>stClassRunner.java >>:42) >> at >>org.junit.internal.runners.BeforeAndAfterRunner.runProtected(B >>eforeAndAfterRunne >>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(TestEx >>ecution.java:38) >> at >>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTest >>s(RemoteTestRunner >>.java:460) >> at >>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTest >>s(RemoteTestRunner >>.java:673) >> at >>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(Rem >>oteTestRunner.java >>:386) >> at >>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(Re >>moteTestRunner.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(StateMan >>agerImpl.java:247) >> at >>org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeStat >>e(JDBCStoreManager >>.java:327) >> at >>org.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDB >>CStoreManager.java >>:252) >> at >>org.apache.openjpa.kernel.DelegatingStoreManager.initialize(De >>legatingStoreManag >>er.java:108) >> at >>org.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreM >>anager.java:54) >> at >>org.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:870) >> at >>org.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:828) >> ... 64 more >> >>-----Original Message----- >>From: Patrick Linskey [mailto:[EMAIL PROTECTED] >>Sent: April 26, 2007 5:40 PM >>To: open-jpa-dev@incubator.apache.org >>Subject: RE: How to debug object retrieveal in JPA? >> >> >>>Can you post what you get if you do '((Exception) >>>results.get(0)).printStackTrace()'? >> >>... so results.get(0) is returning a List? That's very odd. >>What if you >>do: >> >>System.out.println(results.get(0))? >> >>If it is a List of Exceptions, what if you print out the stacks of the >>exceptions in the list? >> >>-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:[EMAIL PROTECTED] >>>Sent: Thursday, April 26, 2007 2:36 PM >>>To: open-jpa-dev@incubator.apache.org >>>Subject: RE: How to debug object retrieveal in JPA? >>> >>>Can't cast List to Exception >>> >>>-----Original Message----- >>>From: Patrick Linskey [mailto:[EMAIL PROTECTED] >>>Sent: April 26, 2007 5:00 PM >>>To: open-jpa-dev@incubator.apache.org >>>Subject: RE: How to debug object retrieveal in JPA? >>> >>>So you're saying that the ResultList contains an Exception? >>>Can you post what you get if you do '((Exception) >>>results.get(0)).printStackTrace()'? >>> >>>-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:[EMAIL PROTECTED] >>>>Sent: Thursday, April 26, 2007 1:44 PM >>>>To: open-jpa-dev@incubator.apache.org >>>>Subject: RE: How to debug object retrieveal in JPA? >>>> >>>>Some more information on this exception >>>> >>>>Right after the execution the exception held inside the result is >>>>"com.sun.jdi.InvocationException occurred invoking >> >>method..." Can't >> >>>>seem to get more data out of it >>>> >>>>Once the system.out is executed the exception changes to >>> >>>"The result >>> >>>>list has been closed" >>>> >>>>-----Original Message----- >>>>From: Phill Moran [mailto:[EMAIL PROTECTED] >>>>Sent: April 26, 2007 4:18 PM >>>>To: open-jpa-dev@incubator.apache.org >>>>Subject: RE: How to debug object retrieveal in JPA? >>>> >>>>I did not mean it threw an NPE but I was left with a null >>> >>>result list. >>> >>>>I have setup trace already and I actually get nothing back. >>>>Here is the trace across the execution point >>>> >>>>13734 WARN [main] openjpa.MetaData - Found duplicate query >>>>"PersonFXLastFirst" in "class ca.BidSpec.emall.user.Person". >>>>Ignoring. >>>>22594 TRACE [main] openjpa.jdbc.SQL - <t 31845311, conn >>>>9575056> executing prepstmnt 31103354 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 person t0 INNER JOIN manufacturer t1 ON >>>>t0.manufacturerFK = t1.id LEFT OUTER JOIN category t2 ON >>> >>>t0.roleFK = >>> >>>>t2.id LEFT OUTER JOIN category >>>>t4 ON t0.salutationFK = t4.id LEFT OUTER JOIN category t5 >>> >>>ON t1.typeFK >>> >>>>= t5.id LEFT OUTER JOIN 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] >>>>22609 TRACE [main] openjpa.jdbc.SQL - <t 31845311, conn >>>>9575056> [15 ms] spent >>>>27469 TRACE [main] openjpa.jdbc.SQL - <t 31845311, conn >>>>9575056> executing prepstmnt 3888519 SELECT COUNT(*) FROM >>>>person t0 INNER JOIN manufacturer t1 ON t0.manufacturerFK = >>> >>>t1.id LEFT >>> >>>>OUTER JOIN category t2 ON t0.roleFK = t2.id LEFT OUTER >> >>JOIN category >> >>>>t4 ON t0.salutationFK = t4.id LEFT OUTER JOIN category t5 >>> >>>ON t1.typeFK >>> >>>>= t5.id LEFT OUTER JOIN categorytype t3 ON >>> >>>t2.categoryTypeFK = t3.id >>> >>>>WHERE >>>>(UPPER(t1.name) = ? AND UPPER(t0.loginName) = ?) >>>>[params=(String) BIDSPEC, >>>>(String) PMORAN] >>>>27469 TRACE [main] openjpa.jdbc.SQL - <t 31845311, conn >>>>9575056> [0 ms] spent >>>>1 >>>>[2007-04-26 16:07:36,125] INFO >>>>ca.BidSpec.testing.emall.UserFactoryTest Rolled back >>> >>>transaction after >>> >>>>test execution >>>> >>>>What is interesting is the line with a "1" (from >>>>System.out.println(results.size())). What this represents is the >>>>message that the "result list is closed" nothing else in >> >>the trace. >> >>>>So what causes the result list to be closed? >>>> >>>>Phill >>>> >>>>-----Original Message----- >>>>From: Marc Prud'hommeaux [mailto:[EMAIL PROTECTED] >>> >>>On Behalf >>> >>>>Of Marc Prud'hommeaux >>>>Sent: April 26, 2007 3:54 PM >>>>To: open-jpa-dev@incubator.apache.org >>>>Subject: Re: How to debug object retrieveal in JPA? >>>> >>>>Phill- >>>> >>>>The maximum verbosity of logging is obtained by specifying the >>>>"openjpa.Log" >>>>property to "DefaultLevel=TRACE". >>>> >>>>What is the full exception stack trace? We might be able to help >>>>identify the problem. In any case OpenJPA should never be >>> >>>throwing an >>> >>>>NPE, so we should at least probably fix the error message. >>>> >>>> >>>>On Apr 26, 2007, at 12:39 PM, Phill Moran wrote: >>>> >>>> >>>>>Community, >>>>> >>>>>How does one go about debugging object retrieval/creation. >>>> >>>>I continue >>>> >>>>>to have exceptions and little to go on as far as the cause. >>>>>The named JPQL is good since I know it generates a good sql >>>> >>>>(can trace >>>> >>>>>code and see it) . I know the sql is good as I can >>>> >>>>copy/paste it into >>>> >>>>>mysql query browser, execute and get the correct data back. The >>>>>problem is that these lines result in an NPE. >>>>> >>>>> Query q = >>>>> >> >>this.getEntityManager().createNamedQuery("PersonFXStoreAndLogin"); >> >>>>> q.setParameter("storeName", >> >>storeName.toUpperCase()); >> >>>>> q.setParameter("loginName", >> >>loginName.toUpperCase()); >> >>>>> List<Person> results = null; >>>>> try { >>>>> results = (List<Person>) q.getResultList(); >>>>> System.out.println(results.size()); >>>>> } >>>>> catch(Exception e) { >>>>> e.printStackTrace(); >>>>> } >>>>> if (results.isEmpty()) { <- NPE thrown here >>>>> throw new UserNotFoundException("No >>>> >>>>user found"); >>>> >>>>> } >>>>>Also the "mappingTool validate" seems to work fine. Of >> >>course how >> >>>>>would I know since I can find no description of what a good >>>> >>>>one looks >>>> >>>>>like but reading it (no >>>>>exceptions) seem to make sense. >>>>> >>>>>Any help would be much appreciated. >>>>> >>>>>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. >>> >>> >> >>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. >> >> > > > 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. >