You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Kevin Sutter <kw...@gmail.com> on 2007/02/11 03:21:24 UTC

Strange, intermittent problem running the new models.company tests

Hi,
After synching up with the latest changes in SVN, I am hitting an
intermittent problem while running the new tests in
openjpa-persistence-jdbc.  Every once in a while, I am getting hundreds of
messsages like the following:

Running
org.apache.openjpa.persistence.models.company.propertyaccess.TestPropertyCompanyModel
0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 0.0.0
0  test  INFO   [main] 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.DBDictionaryconfiguration property to the appropriate
value for your database (see the
documentation foravailable values).
10  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "
org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby 10.2.2.0 -
(485682) ,Apache Derby Embedded JDBC Driver 10.2.2.0 - (485682)).
20  test  INFO   [main] openjpa.MetaData - Found 10 classes with metadata in
0 milliseconds.
:
:
4046  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.LineItem".
java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
Continuing ...
java.lang.NullPointerException: target should not be null
Continuing ...
java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
Continuing ...
java.lang.NullPointerException: target should not be null
Continuing ...
java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
Continuing ...
java.lang.NullPointerException: target should not be null
Continuing ...
java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
Continuing ...
java.lang.NullPointerException: target should not be null
Continuing ...
java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
Continuing ...
:
:   <these type of messages continue -- several dozen repeats>
:
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 4.346 sec
<<< FAILURE!
testBasicQueries(
org.apache.openjpa.persistence.models.company.propertyaccess.TestPropertyCompanyModel)
Time elapsed: 4.336 sec  <<< FAILURE!
junit.framework.AssertionFailedError: expected:<2> but was:<0>
        at junit.framework.Assert.fail(Assert.java:47)
        at junit.framework.Assert.failNotEquals(Assert.java:282)
        at junit.framework.Assert.assertEquals(Assert.java:64)
        at junit.framework.Assert.assertEquals(Assert.java:201)
        at junit.framework.Assert.assertEquals(Assert.java:207)
        at
org.apache.openjpa.persistence.models.company.CompanyModelTest.verifyModel(
CompanyModelTest.java:211)
        at
org.apache.openjpa.persistence.models.company.CompanyModelTest.checkModel(
CompanyModelTest.java:195)
        at
org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp(
CompanyModelTest.java:66)
        at junit.framework.TestCase.runBare(TestCase.java:125)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:64)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:615)
        at org.apache.maven.surefire.junit.JUnitTestSet.execute(
JUnitTestSet.java:210)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(
AbstractDirectoryTestSuite.java:135)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
AbstractDirectoryTestSuite.java:122)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:64)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:615)
        at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
SurefireBooter.java:225)
        at org.apache.maven.surefire.booter.SurefireBooter.main(
SurefireBooter.java:747)

They seem to most often happen when I do a complete top-down build from the
openjpa directory (mvn clean && mvn install) and let it traverse the
sub-projects.  This is from the command line (not Eclipse).

I can immediately turn around and do a "mvn test" from the openjpa directory
and everything tests out just fine.

Any ideas on what is causing these type of errors?  I don't see anywhere in
our code where we are producing these type of messages.  I'm not sure if
it's related to one of our dependencies (serp?), or maybe it's another IBM
JDK anomaly (haven't been able to reproduce with Sun yet, but it is an
intermittent problem).

Thanks,
Kevin

Re: Strange, intermittent problem running the new models.company tests

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

OK, glad it is working so far. Let me know if you see the problem again.

The companies.xml format is nice, since it will make it easier to add  
more test data for the models tests in the future, so it'd be nice if  
we could continue to use it.


On Feb 15, 2007, at 11:53 AM, Kevin Sutter wrote:

> Marc,
> I just moved up to SR4 of the IBM JDK and, so far (cross your  
> fingers), have
> not been able to reproduce the problem.  I know that problems like  
> this
> always seem to crop up again at the most inopportune time, but I'm  
> happy now
> with SR4.  Thus, no rush (or need?) to change the data-seeding  
> logic in your
> testcases.
>
> Thanks,
> Kevin
>
> On 2/15/07, Marc Prud'hommeaux <mp...@apache.org> wrote:
>>
>>
>> I expect this is just a glitch with the XMLDecoder (which I do
>> suspect is a bug with the JVM you are using) that I use to setup the
>> test cases and seed instances of the model. It can easily be swapped
>> out by just hard-coding the data-seeding logic into the test case,
>> which I've been meaning to do since you reported the problem, but
>> just haven't had time yet.
>>
>> I'll try to get it done today...
>>
>>
>>
>> On Feb 15, 2007, at 9:29 AM, Kevin Sutter wrote:
>>
>> > I am still experiencing the same problem.  Am I the only one having
>> > problems
>> > building and executing the tests?
>> >
>> > I have a workaround that hasn't failed me yet...  I separate the
>> > building
>> > from the testing.
>> >
>> > From the top-level openjpa directory...
>> >
>> >> mvn clean && mvn install -Dtest=false
>> >> mvn test
>> >
>> > But, more often than not, if I don't include the "-Dtest=false"
>> > stanza, the
>> > tests will fail as described earlier in this thread.
>> >
>> > If nobody else is experiencing this, maybe it's a JDK thing again.
>> > I could
>> > try to reproduce with the Sun JDK.  Any other thoughts?
>> >
>> > Kevin
>> >
>> > On 2/12/07, Kevin Sutter <kw...@gmail.com> wrote:
>> >>
>> >> That clarification works for me...  ;-)
>> >>
>> >> On 2/12/07, Marc Prud'hommeaux <mp...@apache.org> wrote:
>> >> >
>> >> > Kevin-
>> >> >
>> >> > It could, but it would just be a spec compliance. OpenJPA does
>> >> allow
>> >> > you to have final classes. The spec just prohibits it because
>> >> one of
>> >> > the ways to implement support for property access is to  
>> dynamically
>> >> > generate a subclass to the entity (which isn't possible if the
>> >> entity
>> >> > is final).
>> >> >
>> >> >
>> >> >
>> >> > On Feb 12, 2007, at 4:33 AM, Kevin Sutter wrote:
>> >> >
>> >> > > Marc (and others),
>> >> > > Shouldn't OpenJPA be detecting these final classes and  
>> issuing an
>> >> > > error
>> >> > > message?
>> >> > >
>> >> > > Kevin
>> >> > >
>> >> > > On 2/12/07, Marc Prud'hommeaux < mprudhom@apache.org> wrote:
>> >> > >>
>> >> > >> Craig-
>> >> > >>
>> >> > >> You're right that the classes shouldn't be final, but I don't
>> >> think
>> >> > >> that's the cause of the problem.
>> >> > >>
>> >> > >> I've committed a fix to the final class issue, though. Thanks
>> >> for
>> >> > >> pointing it out.
>> >> > >>
>> >> > >>
>> >> > >>
>> >> > >> On Feb 10, 2007, at 10:07 PM, Craig L Russell wrote:
>> >> > >>
>> >> > >> > Hi Kevin,
>> >> > >> >
>> >> > >> > I don't know if it's relevant, but persistent classes must
>> >> not be
>> >> > >> > final. It seems that the entities in the model.company
>> >> packages are
>> >> >
>> >> > >> > (all) final, which is wrong. From spec 2.1, "The entity
>> >> class must
>> >> > >> > not be final. No methods or persistent instance variables
>> >> of the
>> >> > >> > entity class may be final. "
>> >> > >> >
>> >> > >> > The relevant part of the stack trace appears to be:
>> >> > >> >> Caused by: java.lang.NoSuchMethodException:
>> >> <unbound>=Class.create
>> >> > >> >> (Class);
>> >> > >> >>        at java.beans.Statement.invoke(Statement.java:269)
>> >> > >> >>        at <unknown class>.<unknown method>(Unknown Source)
>> >> > >> >>        at com.sun.beans.ObjectHandler.eval
>> >> (ObjectHandler.java:148)
>> >> > >> >>        at com.sun.beans.ObjectHandler.startElement
>> >> > >> >> (ObjectHandler.java:250)
>> >> > >> >>        at
>> >> org.apache.xerces.parsers.AbstractSAXParser.startElement
>> >> > >> >> (Unknown
>> >> > >> >> Source)
>> >> > >> >>        at
>> >> org.apache.xerces.impl.dtd.XMLDTDValidator.startElement
>> >> > >> >> (Unknown
>> >> > >> >
>> >> > >> > which sounds like an issue with the xerces parser. Don't
>> >> you hate
>> >> > >> > exceptions from parsers rather than error messages?
>> >> > >> >
>> >> > >> > Craig
>> >> > >> >
>> >> > >> > On Feb 10, 2007, at 8:08 PM, Kevin Sutter wrote:
>> >> > >> >
>> >> > >> >> Marc,
>> >> > >> >> It took a while to reproduce, but I finally got the
>> >> following...
>> >> > >> >> Does this
>> >> > >> >> help?  Thanks for your help!
>> >> > >> >>
>> >> > >> >> Kevin
>> >> > >> >>
>> >> > >> >> Running
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.TestProp
>> >> > >> >> ertyCompanyModel
>> >> > >> >> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA
>> >> 0.0.0
>> >> > >> >> 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the
>> >> appropriate
>> >> > >> >> value for your database (see the
>> >> > >> >> documentation foravailable values).
>> >> > >> >> 0  test  INFO   [main] openjpa.jdbc.JDBC - Using  
>> dictionary
>> >> > >> class "
>> >> > >> >> org.apache.openjpa.jdbc.sql.DerbyDictionary " (Apache  
>> Derby
>> >> > >> 10.2.2.0 -
>> >> > >> >> (485682) ,Apache Derby
>> >> > >> >> Embedded JDBC Driver 10.2.2.0 - (485682)).
>> >> > >> >> 10  test  INFO   [main] openjpa.MetaData - Found 10
>> >> classes with
>> >> > >> >> metadata in
>> >> > >> >> 0 milliseconds.
>> >> > >> >> 20  test  INFO   [main] openjpa.MetaData - Found 10
>> >> classes with
>> >> > >> >> metadata in
>> >> > >> >> 10 milliseconds.
>> >> > >> >> 20  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
>> >> > >> >> .
>> >> > >> >> 20  test  INFO   [main] openjpa.MetaData - Parsing  
>> package "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
>> >> >
>> >> > >> >> .
>> >> > >> >> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
>> >> > >> >> .
>> >> > >> >> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Address"
>> >> > >> >> .
>> >> > >> >> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Employee
>> >> > >> >> ".
>> >> > >> >> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Person".
>> >> > >> >> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.FullTime
>> >> > >> >> Employee
>> >> > >> >> ".
>> >> > >> >> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem
>> >> > >> >> ".
>> >> > >> >> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.ProductO
>> >> > >> >> rder".
>> >> > >> >> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Customer
>> >> > >> >> ".
>> >> > >> >> 70  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.PartTime
>> >> > >> >> Employee
>> >> > >> >> ".
>> >> > >> >> 70  test  INFO   [main] openjpa.jdbc.Schema - Reading  
>> table
>> >> > >> >> information for
>> >> > >> >> schema name "null", table name "PRP_Address".
>> >> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading  
>> table
>> >> > >> >> information for
>> >> > >> >> schema name "null", table name "PRP_Company".
>> >> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading  
>> table
>> >> > >> >> information for
>> >> > >> >> schema name "null", table name "PRP_LineItem".
>> >> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading  
>> table
>> >> > >> >> information for
>> >> > >> >> schema name "null", table name "PRP_Person".
>> >> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading  
>> table
>> >> > >> >> information for
>> >> > >> >> schema name "null", table name "PRP_Product".
>> >> > >> >> 110  test  INFO   [main] openjpa.jdbc.Schema - Reading  
>> table
>> >> > >> >> information for
>> >> > >> >> schema name "null", table name "PRP_ProductOrder".
>> >> > >> >> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading  
>> table
>> >> > >> >> information for
>> >> > >> >> schema name "null", table name
>> >> "PRP_ProductOrder_PRP_LineItem".
>> >> > >> >> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading  
>> table
>> >> > >> >> information for
>> >> > >> >> schema name "null", table name "PRP_Product_PRP_Company".
>> >> > >> >> 140  test  INFO   [main] openjpa.jdbc.Schema - Reading
>> >> sequence
>> >> > >> >> information
>> >> > >> >> for schema "null", sequence name "null".
>> >> > >> >> 3856  test  INFO   [main] openjpa.MetaData - Parsing  
>> class "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
>> >> > >> >> .
>> >> > >> >> 3856  test  INFO   [main] openjpa.MetaData - Parsing
>> >> package "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
>> >> > >> >> .
>> >> > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing  
>> class "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Address"
>> >> > >> >> .
>> >> > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing  
>> class "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Employee
>> >> > >> >> ".
>> >> > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing  
>> class "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Person".
>> >> >
>> >> > >> >> 3876  test  INFO   [main] openjpa.MetaData - Parsing  
>> class "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
>> >> > >> >> .
>> >> > >> >> 3876  test  INFO   [main] openjpa.MetaData - Parsing  
>> class "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.FullTime
>> >> > >> >> Employee
>> >> > >> >> ".
>> >> > >> >> 3936  test  INFO   [main] openjpa.MetaData - Parsing  
>> class "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.ProductO
>> >> > >> >> rder".
>> >> > >> >> 3966  test  INFO   [main] openjpa.MetaData - Parsing  
>> class "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Customer
>> >> > >> >> ".
>> >> > >> >> 3976  test  INFO   [main] openjpa.MetaData - Parsing  
>> class "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem
>> >> > >> >> ".
>> >> > >> >> 4026  test  INFO   [main] openjpa.MetaData - Parsing  
>> class "
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.PartTime
>> >> > >> >> Employee
>> >> > >> >> ".
>> >> > >> >> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time
>> >> elapsed:
>> >> > >> >> 4.336 sec
>> >> > >> >> <<< FAILURE!
>> >> > >> >> testBasicQueries(
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.TestProp
>> >> > >> >> ertyCompanyModel)
>> >> > >> >> Time elapsed: 4.326 sec  <<< ERROR!
>> >> > >> >> java.lang.IllegalStateException:
>> >> java.lang.NoSuchMethodException:
>> >> > >> >> <unbound>=
>> >> > >> >> Class.create (Class);
>> >> > >> >>        at
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkM
>> >> > >> >> odel(
>> >> > >> >> CompanyModelTest.java:194)
>> >> > >> >>        at
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp(
>> >> > >> >> CompanyModelTest.java:66)
>> >> > >> >>        at junit.framework.TestCase.runBare (TestCase.java:
>> >> 125)
>> >> > >> >>        at junit.framework.TestResult$1.protect
>> >> (TestResult.java:
>> >> > >> 106)
>> >> > >> >>        at junit.framework.TestResult.runProtected
>> >> (TestResult.java:
>> >> > >> >> 124)
>> >> > >> >>        at junit.framework.TestResult.run 
>> (TestResult.java:109)
>> >> > >> >>        at junit.framework.TestCase.run(TestCase.java:118)
>> >> > >> >>        at junit.framework.TestSuite.runTest
>> >> (TestSuite.java:208)
>> >> > >> >>        at junit.framework.TestSuite.run(TestSuite.java: 
>> 203)
>> >> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0 
>> (Native
>> >> > >> Method)
>> >> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke(
>> >> > >> >> NativeMethodAccessorImpl.java:64)
>> >> > >> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> >> > >> >> DelegatingMethodAccessorImpl.java :43)
>> >> > >> >>        at java.lang.reflect.Method.invoke(Method.java:615)
>> >> > >> >>        at
>> >> org.apache.maven.surefire.junit.JUnitTestSet.execute(
>> >> > >> >> JUnitTestSet.java:210)
>> >> > >> >>        at
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
>> >> > >> >> tSet(
>> >> > >> >> AbstractDirectoryTestSuite.java:135)
>> >> > >> >>        at
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
>> >> > >> >> AbstractDirectoryTestSuite.java:122)
>> >> > >> >>        at org.apache.maven.surefire.Surefire.run
>> >> (Surefire.java:
>> >> > >> 129)
>> >> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0 
>> (Native
>> >> > >> Method)
>> >> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke(
>> >> > >> >> NativeMethodAccessorImpl.java:64)
>> >> > >> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> >> > >> >> DelegatingMethodAccessorImpl.java:43)
>> >> > >> >>        at java.lang.reflect.Method.invoke (Method.java: 
>> 615)
>> >> > >> >>        at
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
>> >> > >> >> SurefireBooter.java:225)
>> >> > >> >>        at
>> >> org.apache.maven.surefire.booter.SurefireBooter.main(
>> >> > >> >> SurefireBooter.java:747)
>> >> > >> >> Caused by: java.lang.NoSuchMethodException:
>> >> <unbound>=Class.create
>> >> > >> >> (Class);
>> >> > >> >>        at java.beans.Statement.invoke(Statement.java:269)
>> >> > >> >>        at <unknown class>.<unknown method>(Unknown Source)
>> >> > >> >>        at com.sun.beans.ObjectHandler.eval
>> >> (ObjectHandler.java
>> >> > :148)
>> >> > >> >>        at com.sun.beans.ObjectHandler.startElement
>> >> > >> >> (ObjectHandler.java:250)
>> >> > >> >>        at
>> >> org.apache.xerces.parsers.AbstractSAXParser.startElement
>> >> > >> >> (Unknown
>> >> > >> >> Source)
>> >> > >> >>        at
>> >> org.apache.xerces.impl.dtd.XMLDTDValidator.startElement
>> >> > >> >> (Unknown
>> >> > >> >> Source)
>> >> > >> >>        at
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
>> >> > >> >> t(Unknown
>> >> > >> >> Source)
>> >> > >> >>        at
>> >> > >> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
>> >> > >> >> $FragmentContentDispatcher.dispatch(Unknown
>> >> > >> >> Source)
>> >> > >> >>        at
>> >> > >> >>
>> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
>> >> > >> >> (Unknown
>> >> > >> >> Source)
>> >> > >> >>        at org.apache.xerces.parsers.DTDConfiguration.parse
>> >> (Unknown
>> >> > >> >> Source)
>> >> > >> >>        at org.apache.xerces.parsers.DTDConfiguration.parse
>> >> (Unknown
>> >> > >> >> Source)
>> >> > >> >>        at org.apache.xerces.parsers.XMLParser.parse 
>> (Unknown
>> >> > >> Source)
>> >> > >> >>        at  
>> org.apache.xerces.parsers.AbstractSAXParser.parse
>> >> > >> >> (Unknown Source)
>> >> > >> >>        at org.apache.xerces.jaxp.SAXParserImpl.parse 
>> (Unknown
>> >> > >> Source)
>> >> > >> >>        at javax.xml.parsers.SAXParser.parse(Unknown  
>> Source)
>> >> > >> >>        at java.beans.XMLDecoder.readObject 
>> (XMLDecoder.java:
>> >> 220)
>> >> > >> >>        at
>> >> > >> >>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkM
>> >> > >> >> odel(
>> >> > >> >> CompanyModelTest.java:191)
>> >> > >> >>        ... 22 more
>> >> > >> >>
>> >> > >> >>
>> >> > >> >> On 2/10/07, Marc Prud'hommeaux < mprudhom@apache.org>  
>> wrote:
>> >> > >> >>>
>> >> > >> >>> Kevin-
>> >> > >> >>>
>> >> > >> >>> Weird. From the error message, it looks like there is  
>> some
>> >> > >> problem
>> >> > >> >>> with deserializing the default model from the
>> >> companies.xml file
>> >> > >> >>> from
>> >> > >> >>> the XMLDecoder.
>> >> > >> >>>
>> >> > >> >>> I've put some extra debugging logic in the
>> >> CompanyModelTest.java
>> >> > >> >>> that
>> >> > >> >>> should throw a better error when the deserialization  
>> fails.
>> >> > >> Can you
>> >> > >> >>> update and re-run the test and let us know if the stack
>> >> trace
>> >> > >> >>> changes?
>> >> > >> >>>
>> >> > >> >>>
>> >> > >> >>>
>> >> > >> >>> On Feb 10, 2007, at 6:21 PM, Kevin Sutter wrote:
>> >> > >> >>>
>> >> > >> >>> > Hi,
>> >> > >> >>> > After synching up with the latest changes in SVN, I am
>> >> > >> hitting an
>> >> > >> >>> > intermittent problem while running the new tests in
>> >> > >> >>> > openjpa-persistence-jdbc.  Every once in a while, I am
>> >> getting
>> >> > >> >>> > hundreds of
>> >> > >> >>> > messsages like the following:
>> >> > >> >>> >
>> >> > >> >>> > Running
>> >> > >> >>> >
>> >> > >> >>>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro
>> >> > >> >>> pe
>> >> > >> >>> > rtyCompanyModel
>> >> > >> >>> > 0  test  INFO   [main] openjpa.Runtime - Starting
>> >> OpenJPA 0.0.0
>> >> > >> >>> > 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the
>> >> > >> appropriate
>> >> > >> >>> > value for your database (see the
>> >> > >> >>> > documentation foravailable values).
>> >> > >> >>> > 10  test  INFO   [main] openjpa.jdbc.JDBC - Using
>> >> dictionary
>> >> > >> >>> class "
>> >> > >> >>> > org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache  
>> Derby
>> >> > >> >>> 10.2.2.0 -
>> >> > >> >>> > (485682) ,Apache Derby Embedded JDBC Driver 10.2.2.0 -
>> >> > >> (485682)).
>> >> > >> >>> > 20  test  INFO   [main] openjpa.MetaData - Found 10
>> >> classes
>> >> > >> with
>> >> > >> >>> > metadata in
>> >> > >> >>> > 0 milliseconds.
>> >> > >> >>> > :
>> >> > >> >>> > :
>> >> > >> >>> > 4046  test  INFO   [main] openjpa.MetaData - Parsing
>> >> class "
>> >> > >> >>> >
>> >> > >> >>>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.LineIte
>> >> > >> >>> m"
>> >> > >> >>> > .
>> >> > >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create
>> >> (Class);
>> >> > >> >>> > Continuing ...
>> >> > >> >>> > java.lang.NullPointerException: target should not be  
>> null
>> >> > >> >>> > Continuing ...
>> >> > >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create
>> >> (Class);
>> >> > >> >>> > Continuing ...
>> >> > >> >>> > java.lang.NullPointerException: target should not be  
>> null
>> >> > >> >>> > Continuing ...
>> >> > >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create
>> >> (Class);
>> >> > >> >>> > Continuing ...
>> >> > >> >>> > java.lang.NullPointerException: target should not be  
>> null
>> >> > >> >>> > Continuing ...
>> >> > >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create
>> >> (Class);
>> >> > >> >>> > Continuing ...
>> >> > >> >>> > java.lang.NullPointerException: target should not be  
>> null
>> >> > >> >>> > Continuing ...
>> >> > >> >>> > java.lang.NoSuchMethodException :  
>> <unbound>=Class.create
>> >> > (Class);
>> >> > >> >>> > Continuing ...
>> >> > >> >>> > :
>> >> > >> >>> > :   <these type of messages continue -- several dozen
>> >> repeats>
>> >> > >> >>> > :
>> >> > >> >>> > Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time
>> >> elapsed:
>> >> > >> >>> > 4.346 sec
>> >> > >> >>> > <<< FAILURE!
>> >> > >> >>> > testBasicQueries(
>> >> > >> >>> >
>> >> > >> >>>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro
>> >> > >> >>> pe
>> >> > >> >>> > rtyCompanyModel)
>> >> > >> >>> > Time elapsed: 4.336 sec  <<< FAILURE!
>> >> > >> >>> > junit.framework.AssertionFailedError: expected:<2> but
>> >> was:<0>
>> >> > >> >>> >        at junit.framework.Assert.fail(Assert.java:47)
>> >> > >> >>> >        at junit.framework.Assert.failNotEquals
>> >> (Assert.java:282)
>> >> > >> >>> >        at junit.framework.Assert.assertEquals
>> >> (Assert.java:64)
>> >> > >> >>> >        at junit.framework.Assert.assertEquals
>> >> (Assert.java:201)
>> >> > >> >>> >        at junit.framework.Assert.assertEquals
>> >> (Assert.java:207)
>> >> > >> >>> >        at
>> >> > >> >>> >
>> >> > >> >>>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.verif
>> >> > >> >>> yM
>> >> > >> >>> > odel(
>> >> > >> >>> > CompanyModelTest.java:211)
>> >> > >> >>> >        at
>> >> > >> >>> >
>> >> > >> >>>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.check
>> >> > >> >>> Mo
>> >> > >> >>> > del(
>> >> > >> >>> > CompanyModelTest.java:195)
>> >> > >> >>> >        at
>> >> > >> >>> >
>> >> > >> >>>
>> >> > >>
>> >>  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp
>> >> > >> >>> (
>> >> > >> >>> > CompanyModelTest.java:66)
>> >> > >> >>> >        at junit.framework.TestCase.runBare
>> >> (TestCase.java:125)
>> >> > >> >>> >        at junit.framework.TestResult$1.protect
>> >> (TestResult.java
>> >> > :
>> >> > >> >>> 106)
>> >> > >> >>> >        at junit.framework.TestResult.runProtected
>> >> > >> >>> (TestResult.java:124)
>> >> > >> >>> >        at junit.framework.TestResult.run
>> >> (TestResult.java:109)
>> >> > >> >>> >        at junit.framework.TestCase.run(TestCase.java: 
>> 118)
>> >> > >> >>> >        at junit.framework.TestSuite.runTest
>> >> (TestSuite.java:208)
>> >> > >> >>> >        at junit.framework.TestSuite.run(TestSuite.java:
>> >> 203)
>> >> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0
>> >> (Native
>> >> > >> >>> Method)
>> >> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke (
>> >> > >> >>> > NativeMethodAccessorImpl.java:64)
>> >> > >> >>> >        at  
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> >> > >> >>> > DelegatingMethodAccessorImpl.java:43)
>> >> > >> >>> >        at java.lang.reflect.Method.invoke 
>> (Method.java:615)
>> >> > >> >>> >        at
>> >> org.apache.maven.surefire.junit.JUnitTestSet.execute(
>> >> > >> >>> > JUnitTestSet.java :210)
>> >> > >> >>> >        at
>> >> > >> >>> >
>> >> > >> >>>
>> >> > >>
>> >>  
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTe
>> >> > >> >>> st
>> >> > >> >>> > Set(
>> >> > >> >>> > AbstractDirectoryTestSuite.java:135)
>> >> > >> >>> >        at
>> >> > >> >>> >
>> >> > >> >>>
>> >> > >>
>> >>  
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute (
>> >> > >> >>> > AbstractDirectoryTestSuite.java:122)
>> >> > >> >>> >        at org.apache.maven.surefire.Surefire.run
>> >> (Surefire.java:
>> >> > >> >>> 129)
>> >> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0
>> >> (Native
>> >> > >> >>> Method)
>> >> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke(
>> >> > >> >>> > NativeMethodAccessorImpl.java :64)
>> >> > >> >>> >        at  
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> >> > >> >>> > DelegatingMethodAccessorImpl.java:43)
>> >> > >> >>> >        at java.lang.reflect.Method.invoke (Method.java:
>> >> 615)
>> >> > >> >>> >        at
>> >> > >> >>> >
>> >> > >> >>>
>> >> > >>
>> >>  
>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
>> >> > >> >>> > SurefireBooter.java:225)
>> >> > >> >>> >        at
>> >> org.apache.maven.surefire.booter.SurefireBooter.main(
>> >> > >> >>> > SurefireBooter.java:747)
>> >> > >> >>> >
>> >> > >> >>> > They seem to most often happen when I do a complete  
>> top-
>> >> down
>> >> > >> build
>> >> > >> >>> > from the
>> >> > >> >>> > openjpa directory (mvn clean && mvn install) and let it
>> >> > >> >>> traverse the
>> >> > >> >>> > sub-projects.  This is from the command line (not
>> >> Eclipse).
>> >> > >> >>> >
>> >> > >> >>> > I can immediately turn around and do a "mvn test"  
>> from the
>> >> > >> openjpa
>> >> > >> >>> > directory
>> >> > >> >>> > and everything tests out just fine.
>> >> > >> >>> >
>> >> > >> >>> > Any ideas on what is causing these type of errors?  I
>> >> don't see
>> >> > >> >>> > anywhere in
>> >> > >> >>> > our code where we are producing these type of
>> >> messages.  I'm
>> >> > >> not
>> >> > >> >>> > sure if
>> >> > >> >>> > it's related to one of our dependencies (serp?), or
>> >> maybe it's
>> >> > >> >>> > another IBM
>> >> > >> >>> > JDK anomaly (haven't been able to reproduce with Sun
>> >> yet, but
>> >> > >> >>> it is an
>> >> > >> >>> > intermittent problem).
>> >> > >> >>> >
>> >> > >> >>> > Thanks,
>> >> > >> >>> > Kevin
>> >> > >> >>>
>> >> > >> >>>
>> >> > >> >
>> >> > >> > 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: Strange, intermittent problem running the new models.company tests

Posted by Kevin Sutter <kw...@gmail.com>.
Marc,
I just moved up to SR4 of the IBM JDK and, so far (cross your fingers), have
not been able to reproduce the problem.  I know that problems like this
always seem to crop up again at the most inopportune time, but I'm happy now
with SR4.  Thus, no rush (or need?) to change the data-seeding logic in your
testcases.

Thanks,
Kevin

On 2/15/07, Marc Prud'hommeaux <mp...@apache.org> wrote:
>
>
> I expect this is just a glitch with the XMLDecoder (which I do
> suspect is a bug with the JVM you are using) that I use to setup the
> test cases and seed instances of the model. It can easily be swapped
> out by just hard-coding the data-seeding logic into the test case,
> which I've been meaning to do since you reported the problem, but
> just haven't had time yet.
>
> I'll try to get it done today...
>
>
>
> On Feb 15, 2007, at 9:29 AM, Kevin Sutter wrote:
>
> > I am still experiencing the same problem.  Am I the only one having
> > problems
> > building and executing the tests?
> >
> > I have a workaround that hasn't failed me yet...  I separate the
> > building
> > from the testing.
> >
> > From the top-level openjpa directory...
> >
> >> mvn clean && mvn install -Dtest=false
> >> mvn test
> >
> > But, more often than not, if I don't include the "-Dtest=false"
> > stanza, the
> > tests will fail as described earlier in this thread.
> >
> > If nobody else is experiencing this, maybe it's a JDK thing again.
> > I could
> > try to reproduce with the Sun JDK.  Any other thoughts?
> >
> > Kevin
> >
> > On 2/12/07, Kevin Sutter <kw...@gmail.com> wrote:
> >>
> >> That clarification works for me...  ;-)
> >>
> >> On 2/12/07, Marc Prud'hommeaux <mp...@apache.org> wrote:
> >> >
> >> > Kevin-
> >> >
> >> > It could, but it would just be a spec compliance. OpenJPA does
> >> allow
> >> > you to have final classes. The spec just prohibits it because
> >> one of
> >> > the ways to implement support for property access is to dynamically
> >> > generate a subclass to the entity (which isn't possible if the
> >> entity
> >> > is final).
> >> >
> >> >
> >> >
> >> > On Feb 12, 2007, at 4:33 AM, Kevin Sutter wrote:
> >> >
> >> > > Marc (and others),
> >> > > Shouldn't OpenJPA be detecting these final classes and issuing an
> >> > > error
> >> > > message?
> >> > >
> >> > > Kevin
> >> > >
> >> > > On 2/12/07, Marc Prud'hommeaux < mprudhom@apache.org> wrote:
> >> > >>
> >> > >> Craig-
> >> > >>
> >> > >> You're right that the classes shouldn't be final, but I don't
> >> think
> >> > >> that's the cause of the problem.
> >> > >>
> >> > >> I've committed a fix to the final class issue, though. Thanks
> >> for
> >> > >> pointing it out.
> >> > >>
> >> > >>
> >> > >>
> >> > >> On Feb 10, 2007, at 10:07 PM, Craig L Russell wrote:
> >> > >>
> >> > >> > Hi Kevin,
> >> > >> >
> >> > >> > I don't know if it's relevant, but persistent classes must
> >> not be
> >> > >> > final. It seems that the entities in the model.company
> >> packages are
> >> >
> >> > >> > (all) final, which is wrong. From spec 2.1, "The entity
> >> class must
> >> > >> > not be final. No methods or persistent instance variables
> >> of the
> >> > >> > entity class may be final. "
> >> > >> >
> >> > >> > The relevant part of the stack trace appears to be:
> >> > >> >> Caused by: java.lang.NoSuchMethodException:
> >> <unbound>=Class.create
> >> > >> >> (Class);
> >> > >> >>        at java.beans.Statement.invoke(Statement.java:269)
> >> > >> >>        at <unknown class>.<unknown method>(Unknown Source)
> >> > >> >>        at com.sun.beans.ObjectHandler.eval
> >> (ObjectHandler.java:148)
> >> > >> >>        at com.sun.beans.ObjectHandler.startElement
> >> > >> >> (ObjectHandler.java:250)
> >> > >> >>        at
> >> org.apache.xerces.parsers.AbstractSAXParser.startElement
> >> > >> >> (Unknown
> >> > >> >> Source)
> >> > >> >>        at
> >> org.apache.xerces.impl.dtd.XMLDTDValidator.startElement
> >> > >> >> (Unknown
> >> > >> >
> >> > >> > which sounds like an issue with the xerces parser. Don't
> >> you hate
> >> > >> > exceptions from parsers rather than error messages?
> >> > >> >
> >> > >> > Craig
> >> > >> >
> >> > >> > On Feb 10, 2007, at 8:08 PM, Kevin Sutter wrote:
> >> > >> >
> >> > >> >> Marc,
> >> > >> >> It took a while to reproduce, but I finally got the
> >> following...
> >> > >> >> Does this
> >> > >> >> help?  Thanks for your help!
> >> > >> >>
> >> > >> >> Kevin
> >> > >> >>
> >> > >> >> Running
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.TestProp
> >> > >> >> ertyCompanyModel
> >> > >> >> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA
> >> 0.0.0
> >> > >> >> 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the
> >> appropriate
> >> > >> >> value for your database (see the
> >> > >> >> documentation foravailable values).
> >> > >> >> 0  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary
> >> > >> class "
> >> > >> >> org.apache.openjpa.jdbc.sql.DerbyDictionary " (Apache Derby
> >> > >> 10.2.2.0 -
> >> > >> >> (485682) ,Apache Derby
> >> > >> >> Embedded JDBC Driver 10.2.2.0 - (485682)).
> >> > >> >> 10  test  INFO   [main] openjpa.MetaData - Found 10
> >> classes with
> >> > >> >> metadata in
> >> > >> >> 0 milliseconds.
> >> > >> >> 20  test  INFO   [main] openjpa.MetaData - Found 10
> >> classes with
> >> > >> >> metadata in
> >> > >> >> 10 milliseconds.
> >> > >> >> 20  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
> >> > >> >> .
> >> > >> >> 20  test  INFO   [main] openjpa.MetaData - Parsing package "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
> >> >
> >> > >> >> .
> >> > >> >> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
> >> > >> >> .
> >> > >> >> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Address"
> >> > >> >> .
> >> > >> >> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Employee
> >> > >> >> ".
> >> > >> >> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Person".
> >> > >> >> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.FullTime
> >> > >> >> Employee
> >> > >> >> ".
> >> > >> >> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem
> >> > >> >> ".
> >> > >> >> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.ProductO
> >> > >> >> rder".
> >> > >> >> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Customer
> >> > >> >> ".
> >> > >> >> 70  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.PartTime
> >> > >> >> Employee
> >> > >> >> ".
> >> > >> >> 70  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> > >> >> information for
> >> > >> >> schema name "null", table name "PRP_Address".
> >> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> > >> >> information for
> >> > >> >> schema name "null", table name "PRP_Company".
> >> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> > >> >> information for
> >> > >> >> schema name "null", table name "PRP_LineItem".
> >> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> > >> >> information for
> >> > >> >> schema name "null", table name "PRP_Person".
> >> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> > >> >> information for
> >> > >> >> schema name "null", table name "PRP_Product".
> >> > >> >> 110  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> > >> >> information for
> >> > >> >> schema name "null", table name "PRP_ProductOrder".
> >> > >> >> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> > >> >> information for
> >> > >> >> schema name "null", table name
> >> "PRP_ProductOrder_PRP_LineItem".
> >> > >> >> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> > >> >> information for
> >> > >> >> schema name "null", table name "PRP_Product_PRP_Company".
> >> > >> >> 140  test  INFO   [main] openjpa.jdbc.Schema - Reading
> >> sequence
> >> > >> >> information
> >> > >> >> for schema "null", sequence name "null".
> >> > >> >> 3856  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
> >> > >> >> .
> >> > >> >> 3856  test  INFO   [main] openjpa.MetaData - Parsing
> >> package "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
> >> > >> >> .
> >> > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Address"
> >> > >> >> .
> >> > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Employee
> >> > >> >> ".
> >> > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Person".
> >> >
> >> > >> >> 3876  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
> >> > >> >> .
> >> > >> >> 3876  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.FullTime
> >> > >> >> Employee
> >> > >> >> ".
> >> > >> >> 3936  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.ProductO
> >> > >> >> rder".
> >> > >> >> 3966  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Customer
> >> > >> >> ".
> >> > >> >> 3976  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem
> >> > >> >> ".
> >> > >> >> 4026  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.PartTime
> >> > >> >> Employee
> >> > >> >> ".
> >> > >> >> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time
> >> elapsed:
> >> > >> >> 4.336 sec
> >> > >> >> <<< FAILURE!
> >> > >> >> testBasicQueries(
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.TestProp
> >> > >> >> ertyCompanyModel)
> >> > >> >> Time elapsed: 4.326 sec  <<< ERROR!
> >> > >> >> java.lang.IllegalStateException:
> >> java.lang.NoSuchMethodException:
> >> > >> >> <unbound>=
> >> > >> >> Class.create (Class);
> >> > >> >>        at
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkM
> >> > >> >> odel(
> >> > >> >> CompanyModelTest.java:194)
> >> > >> >>        at
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp(
> >> > >> >> CompanyModelTest.java:66)
> >> > >> >>        at junit.framework.TestCase.runBare (TestCase.java:
> >> 125)
> >> > >> >>        at junit.framework.TestResult$1.protect
> >> (TestResult.java:
> >> > >> 106)
> >> > >> >>        at junit.framework.TestResult.runProtected
> >> (TestResult.java:
> >> > >> >> 124)
> >> > >> >>        at junit.framework.TestResult.run(TestResult.java:109)
> >> > >> >>        at junit.framework.TestCase.run(TestCase.java:118)
> >> > >> >>        at junit.framework.TestSuite.runTest
> >> (TestSuite.java:208)
> >> > >> >>        at junit.framework.TestSuite.run(TestSuite.java:203)
> >> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >> > >> Method)
> >> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke(
> >> > >> >> NativeMethodAccessorImpl.java:64)
> >> > >> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >> > >> >> DelegatingMethodAccessorImpl.java :43)
> >> > >> >>        at java.lang.reflect.Method.invoke(Method.java:615)
> >> > >> >>        at
> >> org.apache.maven.surefire.junit.JUnitTestSet.execute(
> >> > >> >> JUnitTestSet.java:210)
> >> > >> >>        at
> >> > >> >>
> >> > >>
> >> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
> >> > >> >> tSet(
> >> > >> >> AbstractDirectoryTestSuite.java:135)
> >> > >> >>        at
> >> > >> >>
> >> > >>
> >> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
> >> > >> >> AbstractDirectoryTestSuite.java:122)
> >> > >> >>        at org.apache.maven.surefire.Surefire.run
> >> (Surefire.java:
> >> > >> 129)
> >> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >> > >> Method)
> >> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke(
> >> > >> >> NativeMethodAccessorImpl.java:64)
> >> > >> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >> > >> >> DelegatingMethodAccessorImpl.java:43)
> >> > >> >>        at java.lang.reflect.Method.invoke (Method.java:615)
> >> > >> >>        at
> >> > >> >>
> >> > >>
> >> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> >> > >> >> SurefireBooter.java:225)
> >> > >> >>        at
> >> org.apache.maven.surefire.booter.SurefireBooter.main(
> >> > >> >> SurefireBooter.java:747)
> >> > >> >> Caused by: java.lang.NoSuchMethodException:
> >> <unbound>=Class.create
> >> > >> >> (Class);
> >> > >> >>        at java.beans.Statement.invoke(Statement.java:269)
> >> > >> >>        at <unknown class>.<unknown method>(Unknown Source)
> >> > >> >>        at com.sun.beans.ObjectHandler.eval
> >> (ObjectHandler.java
> >> > :148)
> >> > >> >>        at com.sun.beans.ObjectHandler.startElement
> >> > >> >> (ObjectHandler.java:250)
> >> > >> >>        at
> >> org.apache.xerces.parsers.AbstractSAXParser.startElement
> >> > >> >> (Unknown
> >> > >> >> Source)
> >> > >> >>        at
> >> org.apache.xerces.impl.dtd.XMLDTDValidator.startElement
> >> > >> >> (Unknown
> >> > >> >> Source)
> >> > >> >>        at
> >> > >> >>
> >> > >>
> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
> >> > >> >> t(Unknown
> >> > >> >> Source)
> >> > >> >>        at
> >> > >> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
> >> > >> >> $FragmentContentDispatcher.dispatch(Unknown
> >> > >> >> Source)
> >> > >> >>        at
> >> > >> >>
> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
> >> > >> >> (Unknown
> >> > >> >> Source)
> >> > >> >>        at org.apache.xerces.parsers.DTDConfiguration.parse
> >> (Unknown
> >> > >> >> Source)
> >> > >> >>        at org.apache.xerces.parsers.DTDConfiguration.parse
> >> (Unknown
> >> > >> >> Source)
> >> > >> >>        at org.apache.xerces.parsers.XMLParser.parse(Unknown
> >> > >> Source)
> >> > >> >>        at org.apache.xerces.parsers.AbstractSAXParser.parse
> >> > >> >> (Unknown Source)
> >> > >> >>        at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown
> >> > >> Source)
> >> > >> >>        at javax.xml.parsers.SAXParser.parse(Unknown Source)
> >> > >> >>        at java.beans.XMLDecoder.readObject(XMLDecoder.java:
> >> 220)
> >> > >> >>        at
> >> > >> >>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkM
> >> > >> >> odel(
> >> > >> >> CompanyModelTest.java:191)
> >> > >> >>        ... 22 more
> >> > >> >>
> >> > >> >>
> >> > >> >> On 2/10/07, Marc Prud'hommeaux < mprudhom@apache.org> wrote:
> >> > >> >>>
> >> > >> >>> Kevin-
> >> > >> >>>
> >> > >> >>> Weird. From the error message, it looks like there is some
> >> > >> problem
> >> > >> >>> with deserializing the default model from the
> >> companies.xml file
> >> > >> >>> from
> >> > >> >>> the XMLDecoder.
> >> > >> >>>
> >> > >> >>> I've put some extra debugging logic in the
> >> CompanyModelTest.java
> >> > >> >>> that
> >> > >> >>> should throw a better error when the deserialization fails.
> >> > >> Can you
> >> > >> >>> update and re-run the test and let us know if the stack
> >> trace
> >> > >> >>> changes?
> >> > >> >>>
> >> > >> >>>
> >> > >> >>>
> >> > >> >>> On Feb 10, 2007, at 6:21 PM, Kevin Sutter wrote:
> >> > >> >>>
> >> > >> >>> > Hi,
> >> > >> >>> > After synching up with the latest changes in SVN, I am
> >> > >> hitting an
> >> > >> >>> > intermittent problem while running the new tests in
> >> > >> >>> > openjpa-persistence-jdbc.  Every once in a while, I am
> >> getting
> >> > >> >>> > hundreds of
> >> > >> >>> > messsages like the following:
> >> > >> >>> >
> >> > >> >>> > Running
> >> > >> >>> >
> >> > >> >>>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro
> >> > >> >>> pe
> >> > >> >>> > rtyCompanyModel
> >> > >> >>> > 0  test  INFO   [main] openjpa.Runtime - Starting
> >> OpenJPA 0.0.0
> >> > >> >>> > 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the
> >> > >> appropriate
> >> > >> >>> > value for your database (see the
> >> > >> >>> > documentation foravailable values).
> >> > >> >>> > 10  test  INFO   [main] openjpa.jdbc.JDBC - Using
> >> dictionary
> >> > >> >>> class "
> >> > >> >>> > org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby
> >> > >> >>> 10.2.2.0 -
> >> > >> >>> > (485682) ,Apache Derby Embedded JDBC Driver 10.2.2.0 -
> >> > >> (485682)).
> >> > >> >>> > 20  test  INFO   [main] openjpa.MetaData - Found 10
> >> classes
> >> > >> with
> >> > >> >>> > metadata in
> >> > >> >>> > 0 milliseconds.
> >> > >> >>> > :
> >> > >> >>> > :
> >> > >> >>> > 4046  test  INFO   [main] openjpa.MetaData - Parsing
> >> class "
> >> > >> >>> >
> >> > >> >>>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.LineIte
> >> > >> >>> m"
> >> > >> >>> > .
> >> > >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create
> >> (Class);
> >> > >> >>> > Continuing ...
> >> > >> >>> > java.lang.NullPointerException: target should not be null
> >> > >> >>> > Continuing ...
> >> > >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create
> >> (Class);
> >> > >> >>> > Continuing ...
> >> > >> >>> > java.lang.NullPointerException: target should not be null
> >> > >> >>> > Continuing ...
> >> > >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create
> >> (Class);
> >> > >> >>> > Continuing ...
> >> > >> >>> > java.lang.NullPointerException: target should not be null
> >> > >> >>> > Continuing ...
> >> > >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create
> >> (Class);
> >> > >> >>> > Continuing ...
> >> > >> >>> > java.lang.NullPointerException: target should not be null
> >> > >> >>> > Continuing ...
> >> > >> >>> > java.lang.NoSuchMethodException : <unbound>=Class.create
> >> > (Class);
> >> > >> >>> > Continuing ...
> >> > >> >>> > :
> >> > >> >>> > :   <these type of messages continue -- several dozen
> >> repeats>
> >> > >> >>> > :
> >> > >> >>> > Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time
> >> elapsed:
> >> > >> >>> > 4.346 sec
> >> > >> >>> > <<< FAILURE!
> >> > >> >>> > testBasicQueries(
> >> > >> >>> >
> >> > >> >>>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro
> >> > >> >>> pe
> >> > >> >>> > rtyCompanyModel)
> >> > >> >>> > Time elapsed: 4.336 sec  <<< FAILURE!
> >> > >> >>> > junit.framework.AssertionFailedError: expected:<2> but
> >> was:<0>
> >> > >> >>> >        at junit.framework.Assert.fail(Assert.java:47)
> >> > >> >>> >        at junit.framework.Assert.failNotEquals
> >> (Assert.java:282)
> >> > >> >>> >        at junit.framework.Assert.assertEquals
> >> (Assert.java:64)
> >> > >> >>> >        at junit.framework.Assert.assertEquals
> >> (Assert.java:201)
> >> > >> >>> >        at junit.framework.Assert.assertEquals
> >> (Assert.java:207)
> >> > >> >>> >        at
> >> > >> >>> >
> >> > >> >>>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.CompanyModelTest.verif
> >> > >> >>> yM
> >> > >> >>> > odel(
> >> > >> >>> > CompanyModelTest.java:211)
> >> > >> >>> >        at
> >> > >> >>> >
> >> > >> >>>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.CompanyModelTest.check
> >> > >> >>> Mo
> >> > >> >>> > del(
> >> > >> >>> > CompanyModelTest.java:195)
> >> > >> >>> >        at
> >> > >> >>> >
> >> > >> >>>
> >> > >>
> >> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp
> >> > >> >>> (
> >> > >> >>> > CompanyModelTest.java:66)
> >> > >> >>> >        at junit.framework.TestCase.runBare
> >> (TestCase.java:125)
> >> > >> >>> >        at junit.framework.TestResult$1.protect
> >> (TestResult.java
> >> > :
> >> > >> >>> 106)
> >> > >> >>> >        at junit.framework.TestResult.runProtected
> >> > >> >>> (TestResult.java:124)
> >> > >> >>> >        at junit.framework.TestResult.run
> >> (TestResult.java:109)
> >> > >> >>> >        at junit.framework.TestCase.run(TestCase.java:118)
> >> > >> >>> >        at junit.framework.TestSuite.runTest
> >> (TestSuite.java:208)
> >> > >> >>> >        at junit.framework.TestSuite.run(TestSuite.java:
> >> 203)
> >> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0
> >> (Native
> >> > >> >>> Method)
> >> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke (
> >> > >> >>> > NativeMethodAccessorImpl.java:64)
> >> > >> >>> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >> > >> >>> > DelegatingMethodAccessorImpl.java:43)
> >> > >> >>> >        at java.lang.reflect.Method.invoke(Method.java:615)
> >> > >> >>> >        at
> >> org.apache.maven.surefire.junit.JUnitTestSet.execute(
> >> > >> >>> > JUnitTestSet.java :210)
> >> > >> >>> >        at
> >> > >> >>> >
> >> > >> >>>
> >> > >>
> >> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTe
> >> > >> >>> st
> >> > >> >>> > Set(
> >> > >> >>> > AbstractDirectoryTestSuite.java:135)
> >> > >> >>> >        at
> >> > >> >>> >
> >> > >> >>>
> >> > >>
> >> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute (
> >> > >> >>> > AbstractDirectoryTestSuite.java:122)
> >> > >> >>> >        at org.apache.maven.surefire.Surefire.run
> >> (Surefire.java:
> >> > >> >>> 129)
> >> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0
> >> (Native
> >> > >> >>> Method)
> >> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke(
> >> > >> >>> > NativeMethodAccessorImpl.java :64)
> >> > >> >>> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >> > >> >>> > DelegatingMethodAccessorImpl.java:43)
> >> > >> >>> >        at java.lang.reflect.Method.invoke (Method.java:
> >> 615)
> >> > >> >>> >        at
> >> > >> >>> >
> >> > >> >>>
> >> > >>
> >> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> >> > >> >>> > SurefireBooter.java:225)
> >> > >> >>> >        at
> >> org.apache.maven.surefire.booter.SurefireBooter.main(
> >> > >> >>> > SurefireBooter.java:747)
> >> > >> >>> >
> >> > >> >>> > They seem to most often happen when I do a complete top-
> >> down
> >> > >> build
> >> > >> >>> > from the
> >> > >> >>> > openjpa directory (mvn clean && mvn install) and let it
> >> > >> >>> traverse the
> >> > >> >>> > sub-projects.  This is from the command line (not
> >> Eclipse).
> >> > >> >>> >
> >> > >> >>> > I can immediately turn around and do a "mvn test" from the
> >> > >> openjpa
> >> > >> >>> > directory
> >> > >> >>> > and everything tests out just fine.
> >> > >> >>> >
> >> > >> >>> > Any ideas on what is causing these type of errors?  I
> >> don't see
> >> > >> >>> > anywhere in
> >> > >> >>> > our code where we are producing these type of
> >> messages.  I'm
> >> > >> not
> >> > >> >>> > sure if
> >> > >> >>> > it's related to one of our dependencies (serp?), or
> >> maybe it's
> >> > >> >>> > another IBM
> >> > >> >>> > JDK anomaly (haven't been able to reproduce with Sun
> >> yet, but
> >> > >> >>> it is an
> >> > >> >>> > intermittent problem).
> >> > >> >>> >
> >> > >> >>> > Thanks,
> >> > >> >>> > Kevin
> >> > >> >>>
> >> > >> >>>
> >> > >> >
> >> > >> > 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: Strange, intermittent problem running the new models.company tests

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

On Feb 15, 2007, at 12:34 PM, Marc Prud'hommeaux wrote:

>
> Can you send the stack trace?
>
I think this is all the good stuff and no extraneous garbage:

Running  
org.apache.openjpa.persistence.models.company.propertyaccess.TestPropert 
yCompanyModel
0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 0.0.0
3  test  INFO   [main] 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).
10  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class  
"org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby 10.2.2.0  
- (485682) ,Apache Derby Embedded JDBC Driver 10.2.2.0 - (485682)).
29  test  INFO   [main] openjpa.MetaData - Found 10 classes with  
metadata in 1 milliseconds.
33  test  INFO   [main] openjpa.MetaData - Found 10 classes with  
metadata in 0 milliseconds.
35  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.models.company.propertyaccess.FullTimeEm 
ployee".
35  test  INFO   [main] openjpa.MetaData - Parsing package  
"org.apache.openjpa.persistence.models.company.propertyaccess.FullTimeEm 
ployee".
135  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.models.company.propertyaccess.Employee".
173  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.models.company.propertyaccess.Person".
180  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.models.company.propertyaccess.Address".
218  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.models.company.propertyaccess.Company".
288  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.models.company.propertyaccess.Product".
303  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.models.company.propertyaccess.LineItem".
355  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.models.company.propertyaccess.Customer".
363  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.models.company.propertyaccess.ProductOrd 
er".
406  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.models.company.propertyaccess.PartTimeEm 
ployee".
417  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
information for schema name "null", table name "PRP_Address".
484  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
information for schema name "null", table name "PRP_Company".
532  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
information for schema name "null", table name "PRP_LineItem".
537  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
information for schema name "null", table name "PRP_Person".
554  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
information for schema name "null", table name "PRP_Product".
600  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
information for schema name "null", table name "PRP_ProductOrder".
607  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
information for schema name "null", table name  
"PRP_ProductOrder_PRP_LineItem".
612  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
information for schema name "null", table name  
"PRP_Product_PRP_Company".
659  test  INFO   [main] openjpa.jdbc.Schema - Reading sequence  
information for schema "null", sequence name "null".
1791  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.models.company.propertyaccess.Company".
1791  test  INFO   [main] openjpa.MetaData - Parsing package  
"org.apache.openjpa.persistence.models.company.propertyaccess.Company".
1799  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.models.company.propertyaccess.Address".
1842  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.models.company.propertyaccess.Employee".
1849  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.models.company.propertyaccess.Person".
1854  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.models.company.propertyaccess.Product".
1885  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.models.company.propertyaccess.FullTimeEm 
ployee".
1996  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.models.company.propertyaccess.PartTimeEm 
ployee".
2021  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.models.company.propertyaccess.Customer".
2039  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.models.company.propertyaccess.ProductOrd 
er".
2058  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.models.company.propertyaccess.LineItem".
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed:  
133.615 sec <<< FAILURE!
testBasicQueries 
(org.apache.openjpa.persistence.models.company.propertyaccess.TestProper 
tyCompanyModel)  Time elapsed: 133.582 sec  <<< ERROR!
<0|false|0.0.0> org.apache.openjpa.persistence.PersistenceException:  
The exception 'java.lang.NullPointerException' was thrown while  
evaluating an expression. {prepstmnt 8542064 SELECT t0.id, t0.DTYPE,  
t0.firstName, t2.id, t2.city, t2.phoneNumber, t2.postalCode,  
t2.state, t2.streetAddress, t0.lastName, t3.id, t4.id, t4.city,  
t4.phoneNumber, t4.postalCode, t4.state, t4.streetAddress, t3.name,  
t0.hireDate, t1.id, t1.DTYPE, t1.firstName, t1.homeAddress_id,  
t1.lastName, t1.company_id, t1.hireDate, t1.title, t1.salary,  
t0.title, t0.salary, t0.wage, t0.weeklyHours FROM PRP_Person t0 LEFT  
OUTER JOIN PRP_Person t1 ON t0.manager_id = t1.id LEFT OUTER JOIN  
PRP_Address t2 ON t0.homeAddress_id = t2.id LEFT OUTER JOIN  
PRP_Company t3 ON t0.company_id = t3.id LEFT OUTER JOIN PRP_Address  
t4 ON t3.address_id = t4.id WHERE (ABS(t0.manager_id) <> ? OR CAST(ABS 
(t1.salary) AS REAL) <> CAST(? AS REAL) OR (CAST(t1.firstName AS  
VARCHAR(1000)))||(CAST(t1.firstName AS VARCHAR(1000))) = ? OR (CAST 
(t1.lastName AS VARCHAR(1000)))||(CAST(t1.lastName AS VARCHAR(1000)))  
= ? OR (CAST(t1.title AS VARCHAR(1000)))||(CAST(t1.title AS VARCHAR 
(1000))) = ? OR CAST(LENGTH(t1.firstName) AS BIGINT) > CAST(? AS  
BIGINT) OR CAST(LENGTH(t1.lastName) AS BIGINT) > CAST(? AS BIGINT) OR  
CAST(LENGTH(t1.title) AS BIGINT) > CAST(? AS BIGINT) OR CAST(((LOCATE 
(CAST((t1.firstName) AS VARCHAR(1000)), CAST((?) AS VARCHAR(1000)),  
CAST(((CAST(? AS BIGINT) - CAST(? AS BIGINT))) AS INTEGER) + 1) - 1)  
+ ?) AS BIGINT) > CAST(? AS BIGINT) OR CAST(((LOCATE(CAST 
((t1.lastName) AS VARCHAR(1000)), CAST((?) AS VARCHAR(1000)), CAST 
(((CAST(? AS BIGINT) - CAST(? AS BIGINT))) AS INTEGER) + 1) - 1) + ?)  
AS BIGINT) > CAST(? AS BIGINT) OR CAST(((LOCATE(CAST((t1.title) AS  
VARCHAR(1000)), CAST((?) AS VARCHAR(1000)), CAST(((CAST(? AS BIGINT)  
- CAST(? AS BIGINT))) AS INTEGER) + 1) - 1) + ?) AS BIGINT) > CAST(?  
AS BIGINT) OR LOWER(CAST(t1.firstName AS VARCHAR(1000))) = ? OR LOWER 
(CAST(t1.lastName AS VARCHAR(1000))) = ? OR LOWER(CAST(t1.title AS  
VARCHAR(1000))) = ? OR CAST(SQRT(t0.manager_id) AS DOUBLE) <> CAST(?  
AS DOUBLE) OR CAST(SQRT(t1.salary) AS DOUBLE) <> CAST(? AS DOUBLE) OR  
SUBSTR(CAST((t1.firstName) AS VARCHAR(1000)), CAST(((CAST(? AS  
BIGINT) - CAST(? AS BIGINT))) AS INTEGER) + 1, CAST(((? + (CAST(? AS  
BIGINT) - CAST(? AS BIGINT)))) AS INTEGER) - CAST(((CAST(? AS BIGINT)  
- CAST(? AS BIGINT))) AS INTEGER)) = ? OR SUBSTR(CAST((t1.lastName)  
AS VARCHAR(1000)), CAST(((CAST(? AS BIGINT) - CAST(? AS BIGINT))) AS  
INTEGER) + 1, CAST(((? + (CAST(? AS BIGINT) - CAST(? AS BIGINT)))) AS  
INTEGER) - CAST(((CAST(? AS BIGINT) - CAST(? AS BIGINT))) AS  
INTEGER)) = ? OR SUBSTR(CAST((t1.title) AS VARCHAR(1000)), CAST(((CAST 
(? AS BIGINT) - CAST(? AS BIGINT))) AS INTEGER) + 1, CAST(((? + (CAST 
(? AS BIGINT) - CAST(? AS BIGINT)))) AS INTEGER) - CAST(((CAST(? AS  
BIGINT) - CAST(? AS BIGINT))) AS INTEGER)) = ? OR LTRIM(t1.firstName)  
= ? OR LTRIM(t1.lastName) = ? OR LTRIM(t1.title) = ? OR UPPER(CAST 
(t1.firstName AS VARCHAR(1000))) = ? OR UPPER(CAST(t1.lastName AS  
VARCHAR(1000))) = ? OR UPPER(CAST(t1.title AS VARCHAR(1000))) = ? OR  
t0.manager_id IS NOT NULL OR t0.manager_id IS NULL OR t1.company_id  
IS NOT NULL OR t1.company_id IS NULL OR t1.firstName IS NOT NULL OR  
t1.firstName IS NULL OR t1.hireDate <> CURRENT_TIMESTAMP OR  
t1.hireDate IS NOT NULL OR t1.hireDate IS NULL OR t1.homeAddress_id  
IS NOT NULL OR t1.homeAddress_id IS NULL OR t0.manager_id < ? OR  
t0.manager_id <= ? OR t0.manager_id <> ? OR t0.manager_id = ? OR  
t0.manager_id > ? OR t0.manager_id >= ? OR t0.manager_id IS NOT NULL  
OR t0.manager_id IS NULL OR t1.lastName IS NOT NULL OR t1.lastName IS  
NULL OR t1.manager_id IS NOT NULL OR t1.manager_id IS NULL OR CAST 
(t1.salary AS REAL) < CAST(? AS REAL) OR CAST(t1.salary AS REAL) <=  
CAST(? AS REAL) OR CAST(t1.salary AS REAL) <> CAST(? AS REAL) OR CAST 
(t1.salary AS REAL) = CAST(? AS REAL) OR CAST(t1.salary AS REAL) >  
CAST(? AS REAL) OR CAST(t1.salary AS REAL) >= CAST(? AS REAL) OR  
t1.salary IS NOT NULL OR t1.salary IS NULL OR t1.title IS NOT NULL OR  
t1.title IS NULL) AND t0.DTYPE IN (?, ?, ?) [params=(long) 0, (long)  
0, (String) x, (String) x, (String) x, (long) 0, (long) 0, (long) 0,  
(String) x, (long) 1, (int) 1, (int) 1, (long) 0, (String) x, (long)  
1, (int) 1, (int) 1, (long) 0, (String) x, (long) 1, (int) 1, (int)  
1, (long) 0, (String) x, (String) x, (String) x, (long) 0, (long) 0,  
(long) 1, (int) 1, (long) 2, (long) 1, (int) 1, (long) 1, (int) 1,  
(String) x, (long) 1, (int) 1, (long) 2, (long) 1, (int) 1, (long) 1,  
(int) 1, (String) x, (long) 1, (int) 1, (long) 2, (long) 1, (int) 1,  
(long) 1, (int) 1, (String) x, (String) x, (String) x, (String) x,  
(String) x, (String) x, (String) x, (long) 0, (long) 0, (long) 0,  
(long) 0, (long) 0, (long) 0, (long) 0, (long) 0, (long) 0, (long) 0,  
(long) 0, (long) 0, (String) Employee, (String) FullTimeEmployee,  
(String) PartTimeEmployee]} [code=30000, state=38000]
         at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException 
(DBDictionary.java:3765)
         at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore 
(SQLExceptions.java:94)
         at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore 
(SQLExceptions.java:80)
         at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore 
(SQLExceptions.java:56)
         at  
org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.handleCheckedE 
xception(SelectResultObjectProvider.java:152)
         at org.apache.openjpa.lib.rop.EagerResultList.<init> 
(EagerResultList.java:37)
         at org.apache.openjpa.kernel.QueryImpl.toResult 
(QueryImpl.java:1214)
         at org.apache.openjpa.kernel.QueryImpl.execute 
(QueryImpl.java:981)
         at org.apache.openjpa.kernel.QueryImpl.execute 
(QueryImpl.java:791)
         at org.apache.openjpa.kernel.QueryImpl.execute 
(QueryImpl.java:761)
         at org.apache.openjpa.kernel.QueryImpl.execute 
(QueryImpl.java:757)
         at org.apache.openjpa.kernel.DelegatingQuery.execute 
(DelegatingQuery.java:512)
         at org.apache.openjpa.persistence.QueryImpl.execute 
(QueryImpl.java:225)
         at org.apache.openjpa.persistence.QueryImpl.getResultList 
(QueryImpl.java:264)
         at org.apache.openjpa.persistence.test.SingleEMTest.find 
(SingleEMTest.java:250)
         at  
org.apache.openjpa.persistence.models.company.CompanyModelTest.testBasic 
Queries(CompanyModelTest.java:99)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at junit.framework.TestCase.runTest(TestCase.java:154)
         at junit.framework.TestCase.runBare(TestCase.java:127)
         at junit.framework.TestResult$1.protect(TestResult.java:106)
         at junit.framework.TestResult.runProtected(TestResult.java:124)
         at junit.framework.TestResult.run(TestResult.java:109)
         at junit.framework.TestCase.run(TestCase.java:118)
         at junit.framework.TestSuite.runTest(TestSuite.java:208)
         at junit.framework.TestSuite.run(TestSuite.java:203)
         at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown  
Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.maven.surefire.junit.JUnitTestSet.execute 
(JUnitTestSet.java:210)
         at  
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSe 
t(AbstractDirectoryTestSuite.java:135)
         at  
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute 
(AbstractDirectoryTestSuite.java:122)
         at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at  
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess 
(SurefireBooter.java:225)
         at org.apache.maven.surefire.booter.SurefireBooter.main 
(SurefireBooter.java:747)
Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: The  
exception 'java.lang.NullPointerException' was thrown while  
evaluating an expression. {prepstmnt 8542064 SELECT t0.id, t0.DTYPE,  
t0.firstName, t2.id, t2.city, t2.phoneNumber, t2.postalCode,  
t2.state, t2.streetAddress, t0.lastName, t3.id, t4.id, t4.city,  
t4.phoneNumber, t4.postalCode, t4.state, t4.streetAddress, t3.name,  
t0.hireDate, t1.id, t1.DTYPE, t1.firstName, t1.homeAddress_id,  
t1.lastName, t1.company_id, t1.hireDate, t1.title, t1.salary,  
t0.title, t0.salary, t0.wage, t0.weeklyHours FROM PRP_Person t0 LEFT  
OUTER JOIN PRP_Person t1 ON t0.manager_id = t1.id LEFT OUTER JOIN  
PRP_Address t2 ON t0.homeAddress_id = t2.id LEFT OUTER JOIN  
PRP_Company t3 ON t0.company_id = t3.id LEFT OUTER JOIN PRP_Address  
t4 ON t3.address_id = t4.id WHERE (ABS(t0.manager_id) <> ? OR CAST(ABS 
(t1.salary) AS REAL) <> CAST(? AS REAL) OR (CAST(t1.firstName AS  
VARCHAR(1000)))||(CAST(t1.firstName AS VARCHAR(1000))) = ? OR (CAST 
(t1.lastName AS VARCHAR(1000)))||(CAST(t1.lastName AS VARCHAR(1000)))  
= ? OR (CAST(t1.title AS VARCHAR(1000)))||(CAST(t1.title AS VARCHAR 
(1000))) = ? OR CAST(LENGTH(t1.firstName) AS BIGINT) > CAST(? AS  
BIGINT) OR CAST(LENGTH(t1.lastName) AS BIGINT) > CAST(? AS BIGINT) OR  
CAST(LENGTH(t1.title) AS BIGINT) > CAST(? AS BIGINT) OR CAST(((LOCATE 
(CAST((t1.firstName) AS VARCHAR(1000)), CAST((?) AS VARCHAR(1000)),  
CAST(((CAST(? AS BIGINT) - CAST(? AS BIGINT))) AS INTEGER) + 1) - 1)  
+ ?) AS BIGINT) > CAST(? AS BIGINT) OR CAST(((LOCATE(CAST 
((t1.lastName) AS VARCHAR(1000)), CAST((?) AS VARCHAR(1000)), CAST 
(((CAST(? AS BIGINT) - CAST(? AS BIGINT))) AS INTEGER) + 1) - 1) + ?)  
AS BIGINT) > CAST(? AS BIGINT) OR CAST(((LOCATE(CAST((t1.title) AS  
VARCHAR(1000)), CAST((?) AS VARCHAR(1000)), CAST(((CAST(? AS BIGINT)  
- CAST(? AS BIGINT))) AS INTEGER) + 1) - 1) + ?) AS BIGINT) > CAST(?  
AS BIGINT) OR LOWER(CAST(t1.firstName AS VARCHAR(1000))) = ? OR LOWER 
(CAST(t1.lastName AS VARCHAR(1000))) = ? OR LOWER(CAST(t1.title AS  
VARCHAR(1000))) = ? OR CAST(SQRT(t0.manager_id) AS DOUBLE) <> CAST(?  
AS DOUBLE) OR CAST(SQRT(t1.salary) AS DOUBLE) <> CAST(? AS DOUBLE) OR  
SUBSTR(CAST((t1.firstName) AS VARCHAR(1000)), CAST(((CAST(? AS  
BIGINT) - CAST(? AS BIGINT))) AS INTEGER) + 1, CAST(((? + (CAST(? AS  
BIGINT) - CAST(? AS BIGINT)))) AS INTEGER) - CAST(((CAST(? AS BIGINT)  
- CAST(? AS BIGINT))) AS INTEGER)) = ? OR SUBSTR(CAST((t1.lastName)  
AS VARCHAR(1000)), CAST(((CAST(? AS BIGINT) - CAST(? AS BIGINT))) AS  
INTEGER) + 1, CAST(((? + (CAST(? AS BIGINT) - CAST(? AS BIGINT)))) AS  
INTEGER) - CAST(((CAST(? AS BIGINT) - CAST(? AS BIGINT))) AS  
INTEGER)) = ? OR SUBSTR(CAST((t1.title) AS VARCHAR(1000)), CAST(((CAST 
(? AS BIGINT) - CAST(? AS BIGINT))) AS INTEGER) + 1, CAST(((? + (CAST 
(? AS BIGINT) - CAST(? AS BIGINT)))) AS INTEGER) - CAST(((CAST(? AS  
BIGINT) - CAST(? AS BIGINT))) AS INTEGER)) = ? OR LTRIM(t1.firstName)  
= ? OR LTRIM(t1.lastName) = ? OR LTRIM(t1.title) = ? OR UPPER(CAST 
(t1.firstName AS VARCHAR(1000))) = ? OR UPPER(CAST(t1.lastName AS  
VARCHAR(1000))) = ? OR UPPER(CAST(t1.title AS VARCHAR(1000))) = ? OR  
t0.manager_id IS NOT NULL OR t0.manager_id IS NULL OR t1.company_id  
IS NOT NULL OR t1.company_id IS NULL OR t1.firstName IS NOT NULL OR  
t1.firstName IS NULL OR t1.hireDate <> CURRENT_TIMESTAMP OR  
t1.hireDate IS NOT NULL OR t1.hireDate IS NULL OR t1.homeAddress_id  
IS NOT NULL OR t1.homeAddress_id IS NULL OR t0.manager_id < ? OR  
t0.manager_id <= ? OR t0.manager_id <> ? OR t0.manager_id = ? OR  
t0.manager_id > ? OR t0.manager_id >= ? OR t0.manager_id IS NOT NULL  
OR t0.manager_id IS NULL OR t1.lastName IS NOT NULL OR t1.lastName IS  
NULL OR t1.manager_id IS NOT NULL OR t1.manager_id IS NULL OR CAST 
(t1.salary AS REAL) < CAST(? AS REAL) OR CAST(t1.salary AS REAL) <=  
CAST(? AS REAL) OR CAST(t1.salary AS REAL) <> CAST(? AS REAL) OR CAST 
(t1.salary AS REAL) = CAST(? AS REAL) OR CAST(t1.salary AS REAL) >  
CAST(? AS REAL) OR CAST(t1.salary AS REAL) >= CAST(? AS REAL) OR  
t1.salary IS NOT NULL OR t1.salary IS NULL OR t1.title IS NOT NULL OR  
t1.title IS NULL) AND t0.DTYPE IN (?, ?, ?) [params=(long) 0, (long)  
0, (String) x, (String) x, (String) x, (long) 0, (long) 0, (long) 0,  
(String) x, (long) 1, (int) 1, (int) 1, (long) 0, (String) x, (long)  
1, (int) 1, (int) 1, (long) 0, (String) x, (long) 1, (int) 1, (int)  
1, (long) 0, (String) x, (String) x, (String) x, (long) 0, (long) 0,  
(long) 1, (int) 1, (long) 2, (long) 1, (int) 1, (long) 1, (int) 1,  
(String) x, (long) 1, (int) 1, (long) 2, (long) 1, (int) 1, (long) 1,  
(int) 1, (String) x, (long) 1, (int) 1, (long) 2, (long) 1, (int) 1,  
(long) 1, (int) 1, (String) x, (String) x, (String) x, (String) x,  
(String) x, (String) x, (String) x, (long) 0, (long) 0, (long) 0,  
(long) 0, (long) 0, (long) 0, (long) 0, (long) 0, (long) 0, (long) 0,  
(long) 0, (long) 0, (String) Employee, (String) FullTimeEmployee,  
(String) PartTimeEmployee]} [code=30000, state=38000]
         at  
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap 
(LoggingConnectionDecorator.java:188)
         at  
org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$800 
(LoggingConnectionDecorator.java:53)
         at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator 
$LoggingConnection$LoggingPreparedStatement.executeQuery 
(LoggingConnectionDecorator.java:840)
         at  
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery 
(DelegatingPreparedStatement.java:259)
         at org.apache.openjpa.jdbc.kernel.JDBCStoreManager 
$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1369)
         at  
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery 
(DelegatingPreparedStatement.java:249)
         at org.apache.openjpa.jdbc.sql.SelectImpl.execute 
(SelectImpl.java:324)
         at org.apache.openjpa.jdbc.sql.SelectImpl.execute 
(SelectImpl.java:296)
         at org.apache.openjpa.jdbc.sql.LogicalUnion 
$UnionSelect.execute(LogicalUnion.java:402)
         at org.apache.openjpa.jdbc.sql.LogicalUnion.execute 
(LogicalUnion.java:213)
         at org.apache.openjpa.jdbc.sql.LogicalUnion.execute 
(LogicalUnion.java:203)
         at  
org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open 
(SelectResultObjectProvider.java:91)
         at org.apache.openjpa.lib.rop.EagerResultList.<init> 
(EagerResultList.java:31)
         ... 35 more
NestedThrowables:
ERROR 38000: The exception 'java.lang.NullPointerException' was  
thrown while evaluating an expression.
         at org.apache.derby.iapi.error.StandardException.newException 
(Unknown Source)
         at  
org.apache.derby.iapi.error.StandardException.unexpectedUserException 
(Unknown Source)
         at  
org.apache.derby.impl.services.reflect.ReflectMethod.invoke(Unknown  
Source)
         at  
org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCor 
e(Unknown Source)
         at org.apache.derby.impl.sql.execute.JoinResultSet.openCore 
(Unknown Source)
         at org.apache.derby.impl.sql.execute.JoinResultSet.openCore 
(Unknown Source)
         at org.apache.derby.impl.sql.execute.JoinResultSet.openCore 
(Unknown Source)
         at  
org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore 
(Unknown Source)
         at  
org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open 
(Unknown Source)
         at org.apache.derby.impl.sql.GenericPreparedStatement.execute 
(Unknown Source)
         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement 
(Unknown Source)
         at  
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement 
(Unknown Source)
         at  
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery 
(Unknown Source)
         at  
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery 
(DelegatingPreparedStatement.java:92)
         at  
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery 
(DelegatingPreparedStatement.java:261)
         at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator 
$LoggingConnection$LoggingPreparedStatement.executeQuery 
(LoggingConnectionDecorator.java:838)
         at  
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery 
(DelegatingPreparedStatement.java:259)
         at org.apache.openjpa.jdbc.kernel.JDBCStoreManager 
$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1369)
         at  
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery 
(DelegatingPreparedStatement.java:249)
         at org.apache.openjpa.jdbc.sql.SelectImpl.execute 
(SelectImpl.java:324)
         at org.apache.openjpa.jdbc.sql.SelectImpl.execute 
(SelectImpl.java:296)
         at org.apache.openjpa.jdbc.sql.LogicalUnion 
$UnionSelect.execute(LogicalUnion.java:402)
         at org.apache.openjpa.jdbc.sql.LogicalUnion.execute 
(LogicalUnion.java:213)
         at org.apache.openjpa.jdbc.sql.LogicalUnion.execute 
(LogicalUnion.java:203)
         at  
org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open 
(SelectResultObjectProvider.java:91)
         at org.apache.openjpa.lib.rop.EagerResultList.<init> 
(EagerResultList.java:31)
         at org.apache.openjpa.kernel.QueryImpl.toResult 
(QueryImpl.java:1214)
         at org.apache.openjpa.kernel.QueryImpl.execute 
(QueryImpl.java:981)
         at org.apache.openjpa.kernel.QueryImpl.execute 
(QueryImpl.java:791)
         at org.apache.openjpa.kernel.QueryImpl.execute 
(QueryImpl.java:761)
         at org.apache.openjpa.kernel.QueryImpl.execute 
(QueryImpl.java:757)
         at org.apache.openjpa.kernel.DelegatingQuery.execute 
(DelegatingQuery.java:512)
         at org.apache.openjpa.persistence.QueryImpl.execute 
(QueryImpl.java:225)
         at org.apache.openjpa.persistence.QueryImpl.getResultList 
(QueryImpl.java:264)
         at org.apache.openjpa.persistence.test.SingleEMTest.find 
(SingleEMTest.java:250)
         at  
org.apache.openjpa.persistence.models.company.CompanyModelTest.testBasic 
Queries(CompanyModelTest.java:99)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at junit.framework.TestCase.runTest(TestCase.java:154)
         at junit.framework.TestCase.runBare(TestCase.java:127)
         at junit.framework.TestResult$1.protect(TestResult.java:106)
         at junit.framework.TestResult.runProtected(TestResult.java:124)
         at junit.framework.TestResult.run(TestResult.java:109)
         at junit.framework.TestCase.run(TestCase.java:118)
         at junit.framework.TestSuite.runTest(TestSuite.java:208)
         at junit.framework.TestSuite.run(TestSuite.java:203)
         at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown  
Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.maven.surefire.junit.JUnitTestSet.execute 
(JUnitTestSet.java:210)
         at  
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSe 
t(AbstractDirectoryTestSuite.java:135)
         at  
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute 
(AbstractDirectoryTestSuite.java:122)
         at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at  
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess 
(SurefireBooter.java:225)
         at org.apache.maven.surefire.booter.SurefireBooter.main 
(SurefireBooter.java:747)
java.lang.NullPointerException
         at  
org.apache.derby.exe.aca6399fbdx0110xc701x7f61x0000000c58d00.e11 
(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at  
org.apache.derby.impl.services.reflect.ReflectMethod.invoke(Unknown  
Source)
         at  
org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.getNextRowCor 
e(Unknown Source)
         at org.apache.derby.impl.sql.execute.JoinResultSet.openCore 
(Unknown Source)
         at org.apache.derby.impl.sql.execute.JoinResultSet.openCore 
(Unknown Source)
         at org.apache.derby.impl.sql.execute.JoinResultSet.openCore 
(Unknown Source)
         at  
org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.openCore 
(Unknown Source)
         at  
org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.open 
(Unknown Source)
         at org.apache.derby.impl.sql.GenericPreparedStatement.execute 
(Unknown Source)
         at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement 
(Unknown Source)
0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 0.0.0
2  test  INFO   [main] 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).
8  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class  
"org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby 10.2.2.0  
- (485682) ,Apache Derby Embedded JDBC Driver 10.2.2.0 - (485682)).
18  test  INFO   [main] openjpa.MetaData - Found 1 classes with  
metadata in 1 milliseconds.
24  test  INFO   [main] openjpa.MetaData - Found 1 classes with  
metadata in 1 milliseconds.
24  test  INFO   [main] openjpa.MetaData - Parsing class  
"org.apache.openjpa.persistence.callbacks.ExceptionsFromCallbacksEntity" 
.
24  test  INFO   [main] openjpa.MetaData - Parsing package  
"org.apache.openjpa.persistence.callbacks.ExceptionsFromCallbacksEntity" 
.
119  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
information for schema name "null", table name  
"ExceptionsFromCallbacksEntity".
         at  
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement 
(Unknown Source)
         at  
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery 
(Unknown Source)
         at  
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery 
(DelegatingPreparedStatement.java:92)
         at  
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery 
(DelegatingPreparedStatement.java:261)
         at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator 
$LoggingConnection$LoggingPreparedStatement.executeQuery 
(LoggingConnectionDecorator.java:838)
         at  
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery 
(DelegatingPreparedStatement.java:259)
         at org.apache.openjpa.jdbc.kernel.JDBCStoreManager 
$CancelPreparedStatement.executeQuery(JDBCStoreManager.java:1369)
         at  
org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement.executeQuery 
(DelegatingPreparedStatement.java:249)
         at org.apache.openjpa.jdbc.sql.SelectImpl.execute 
(SelectImpl.java:324)
         at org.apache.openjpa.jdbc.sql.SelectImpl.execute 
(SelectImpl.java:296)
         at org.apache.openjpa.jdbc.sql.LogicalUnion 
$UnionSelect.execute(LogicalUnion.java:402)
         at org.apache.openjpa.jdbc.sql.LogicalUnion.execute 
(LogicalUnion.java:213)
         at org.apache.openjpa.jdbc.sql.LogicalUnion.execute 
(LogicalUnion.java:203)
         at  
org.apache.openjpa.jdbc.kernel.SelectResultObjectProvider.open 
(SelectResultObjectProvider.java:91)
         at org.apache.openjpa.lib.rop.EagerResultList.<init> 
(EagerResultList.java:31)
         at org.apache.openjpa.kernel.QueryImpl.toResult 
(QueryImpl.java:1214)
         at org.apache.openjpa.kernel.QueryImpl.execute 
(QueryImpl.java:981)
         at org.apache.openjpa.kernel.QueryImpl.execute 
(QueryImpl.java:791)
         at org.apache.openjpa.kernel.QueryImpl.execute 
(QueryImpl.java:761)
         at org.apache.openjpa.kernel.QueryImpl.execute 
(QueryImpl.java:757)
         at org.apache.openjpa.kernel.DelegatingQuery.execute 
(DelegatingQuery.java:512)
         at org.apache.openjpa.persistence.QueryImpl.execute 
(QueryImpl.java:225)
         at org.apache.openjpa.persistence.QueryImpl.getResultList 
(QueryImpl.java:264)
         at org.apache.openjpa.persistence.test.SingleEMTest.find 
(SingleEMTest.java:250)
         at  
org.apache.openjpa.persistence.models.company.CompanyModelTest.testBasic 
Queries(CompanyModelTest.java:99)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at junit.framework.TestCase.runTest(TestCase.java:154)
         at junit.framework.TestCase.runBare(TestCase.java:127)
         at junit.framework.TestResult$1.protect(TestResult.java:106)
         at junit.framework.TestResult.runProtected(TestResult.java:124)
         at junit.framework.TestResult.run(TestResult.java:109)
         at junit.framework.TestCase.run(TestCase.java:118)
         at junit.framework.TestSuite.runTest(TestSuite.java:208)
         at junit.framework.TestSuite.run(TestSuite.java:203)
         at sun.reflect.GeneratedMethodAccessor106.invoke(Unknown  
Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.maven.surefire.junit.JUnitTestSet.execute 
(JUnitTestSet.java:210)
         at  
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSe 
t(AbstractDirectoryTestSuite.java:135)
         at  
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute 
(AbstractDirectoryTestSuite.java:122)
         at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at  
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess 
(SurefireBooter.java:225)
         at org.apache.maven.surefire.booter.SurefireBooter.main 
(SurefireBooter.java:747)


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: Strange, intermittent problem running the new models.company tests

Posted by Marc Prud'hommeaux <mp...@apache.org>.
Can you send the stack trace?


On Feb 15, 2007, at 12:27 PM, Craig L Russell wrote:

> I'm seeing an NPE Error in the test testBasicQueries 
> (org.apache.openjpa.persistence.models.company.propertyaccess.TestProp 
> ertyCompanyModel)  when running mvn clean package.
>
> I can send the error log if anyone would like to see it.
>
> Craig
>
> On Feb 15, 2007, at 10:44 AM, Marc Prud'hommeaux wrote:
>
>>
>> I expect this is just a glitch with the XMLDecoder (which I do  
>> suspect is a bug with the JVM you are using) that I use to setup  
>> the test cases and seed instances of the model. It can easily be  
>> swapped out by just hard-coding the data-seeding logic into the  
>> test case, which I've been meaning to do since you reported the  
>> problem, but just haven't had time yet.
>>
>> I'll try to get it done today...
>>
>>
>>
>> On Feb 15, 2007, at 9:29 AM, Kevin Sutter wrote:
>>
>>> I am still experiencing the same problem.  Am I the only one  
>>> having problems
>>> building and executing the tests?
>>>
>>> I have a workaround that hasn't failed me yet...  I separate the  
>>> building
>>> from the testing.
>>>
>>> From the top-level openjpa directory...
>>>
>>>> mvn clean && mvn install -Dtest=false
>>>> mvn test
>>>
>>> But, more often than not, if I don't include the "-Dtest=false"  
>>> stanza, the
>>> tests will fail as described earlier in this thread.
>>>
>>> If nobody else is experiencing this, maybe it's a JDK thing  
>>> again.  I could
>>> try to reproduce with the Sun JDK.  Any other thoughts?
>>>
>>> Kevin
>>>
>>> On 2/12/07, Kevin Sutter <kw...@gmail.com> wrote:
>>>>
>>>> That clarification works for me...  ;-)
>>>>
>>>> On 2/12/07, Marc Prud'hommeaux <mp...@apache.org> wrote:
>>>> >
>>>> > Kevin-
>>>> >
>>>> > It could, but it would just be a spec compliance. OpenJPA does  
>>>> allow
>>>> > you to have final classes. The spec just prohibits it because  
>>>> one of
>>>> > the ways to implement support for property access is to  
>>>> dynamically
>>>> > generate a subclass to the entity (which isn't possible if the  
>>>> entity
>>>> > is final).
>>>> >
>>>> >
>>>> >
>>>> > On Feb 12, 2007, at 4:33 AM, Kevin Sutter wrote:
>>>> >
>>>> > > Marc (and others),
>>>> > > Shouldn't OpenJPA be detecting these final classes and  
>>>> issuing an
>>>> > > error
>>>> > > message?
>>>> > >
>>>> > > Kevin
>>>> > >
>>>> > > On 2/12/07, Marc Prud'hommeaux < mprudhom@apache.org> wrote:
>>>> > >>
>>>> > >> Craig-
>>>> > >>
>>>> > >> You're right that the classes shouldn't be final, but I  
>>>> don't think
>>>> > >> that's the cause of the problem.
>>>> > >>
>>>> > >> I've committed a fix to the final class issue, though.  
>>>> Thanks for
>>>> > >> pointing it out.
>>>> > >>
>>>> > >>
>>>> > >>
>>>> > >> On Feb 10, 2007, at 10:07 PM, Craig L Russell wrote:
>>>> > >>
>>>> > >> > Hi Kevin,
>>>> > >> >
>>>> > >> > I don't know if it's relevant, but persistent classes  
>>>> must not be
>>>> > >> > final. It seems that the entities in the model.company  
>>>> packages are
>>>> >
>>>> > >> > (all) final, which is wrong. From spec 2.1, "The entity  
>>>> class must
>>>> > >> > not be final. No methods or persistent instance variables  
>>>> of the
>>>> > >> > entity class may be final. "
>>>> > >> >
>>>> > >> > The relevant part of the stack trace appears to be:
>>>> > >> >> Caused by: java.lang.NoSuchMethodException:  
>>>> <unbound>=Class.create
>>>> > >> >> (Class);
>>>> > >> >>        at java.beans.Statement.invoke(Statement.java:269)
>>>> > >> >>        at <unknown class>.<unknown method>(Unknown Source)
>>>> > >> >>        at com.sun.beans.ObjectHandler.eval 
>>>> (ObjectHandler.java:148)
>>>> > >> >>        at com.sun.beans.ObjectHandler.startElement
>>>> > >> >> (ObjectHandler.java:250)
>>>> > >> >>        at  
>>>> org.apache.xerces.parsers.AbstractSAXParser.startElement
>>>> > >> >> (Unknown
>>>> > >> >> Source)
>>>> > >> >>        at  
>>>> org.apache.xerces.impl.dtd.XMLDTDValidator.startElement
>>>> > >> >> (Unknown
>>>> > >> >
>>>> > >> > which sounds like an issue with the xerces parser. Don't  
>>>> you hate
>>>> > >> > exceptions from parsers rather than error messages?
>>>> > >> >
>>>> > >> > Craig
>>>> > >> >
>>>> > >> > On Feb 10, 2007, at 8:08 PM, Kevin Sutter wrote:
>>>> > >> >
>>>> > >> >> Marc,
>>>> > >> >> It took a while to reproduce, but I finally got the  
>>>> following...
>>>> > >> >> Does this
>>>> > >> >> help?  Thanks for your help!
>>>> > >> >>
>>>> > >> >> Kevin
>>>> > >> >>
>>>> > >> >> Running
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.TestPr 
>>>> op
>>>> > >> >> ertyCompanyModel
>>>> > >> >> 0  test  INFO   [main] openjpa.Runtime - Starting  
>>>> OpenJPA 0.0.0
>>>> > >> >> 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the  
>>>> appropriate
>>>> > >> >> value for your database (see the
>>>> > >> >> documentation foravailable values).
>>>> > >> >> 0  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary
>>>> > >> class "
>>>> > >> >> org.apache.openjpa.jdbc.sql.DerbyDictionary " (Apache Derby
>>>> > >> 10.2.2.0 -
>>>> > >> >> (485682) ,Apache Derby
>>>> > >> >> Embedded JDBC Driver 10.2.2.0 - (485682)).
>>>> > >> >> 10  test  INFO   [main] openjpa.MetaData - Found 10  
>>>> classes with
>>>> > >> >> metadata in
>>>> > >> >> 0 milliseconds.
>>>> > >> >> 20  test  INFO   [main] openjpa.MetaData - Found 10  
>>>> classes with
>>>> > >> >> metadata in
>>>> > >> >> 10 milliseconds.
>>>> > >> >> 20  test  INFO   [main] openjpa.MetaData - Parsing class "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.Produc 
>>>> t"
>>>> > >> >> .
>>>> > >> >> 20  test  INFO   [main] openjpa.MetaData - Parsing  
>>>> package "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.Produc 
>>>> t"
>>>> >
>>>> > >> >> .
>>>> > >> >> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.Compan 
>>>> y"
>>>> > >> >> .
>>>> > >> >> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.Addres 
>>>> s"
>>>> > >> >> .
>>>> > >> >> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.Employ 
>>>> ee
>>>> > >> >> ".
>>>> > >> >> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.Person 
>>>> ".
>>>> > >> >> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.FullTi 
>>>> me
>>>> > >> >> Employee
>>>> > >> >> ".
>>>> > >> >> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.LineIt 
>>>> em
>>>> > >> >> ".
>>>> > >> >> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.Produc 
>>>> tO
>>>> > >> >> rder".
>>>> > >> >> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.Custom 
>>>> er
>>>> > >> >> ".
>>>> > >> >> 70  test  INFO   [main] openjpa.MetaData - Parsing class "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.PartTi 
>>>> me
>>>> > >> >> Employee
>>>> > >> >> ".
>>>> > >> >> 70  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>>>> > >> >> information for
>>>> > >> >> schema name "null", table name "PRP_Address".
>>>> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>>>> > >> >> information for
>>>> > >> >> schema name "null", table name "PRP_Company".
>>>> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>>>> > >> >> information for
>>>> > >> >> schema name "null", table name "PRP_LineItem".
>>>> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>>>> > >> >> information for
>>>> > >> >> schema name "null", table name "PRP_Person".
>>>> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>>>> > >> >> information for
>>>> > >> >> schema name "null", table name "PRP_Product".
>>>> > >> >> 110  test  INFO   [main] openjpa.jdbc.Schema - Reading  
>>>> table
>>>> > >> >> information for
>>>> > >> >> schema name "null", table name "PRP_ProductOrder".
>>>> > >> >> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading  
>>>> table
>>>> > >> >> information for
>>>> > >> >> schema name "null", table name  
>>>> "PRP_ProductOrder_PRP_LineItem".
>>>> > >> >> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading  
>>>> table
>>>> > >> >> information for
>>>> > >> >> schema name "null", table name "PRP_Product_PRP_Company".
>>>> > >> >> 140  test  INFO   [main] openjpa.jdbc.Schema - Reading  
>>>> sequence
>>>> > >> >> information
>>>> > >> >> for schema "null", sequence name "null".
>>>> > >> >> 3856  test  INFO   [main] openjpa.MetaData - Parsing  
>>>> class "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.Compan 
>>>> y"
>>>> > >> >> .
>>>> > >> >> 3856  test  INFO   [main] openjpa.MetaData - Parsing  
>>>> package "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.Compan 
>>>> y"
>>>> > >> >> .
>>>> > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing  
>>>> class "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.Addres 
>>>> s"
>>>> > >> >> .
>>>> > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing  
>>>> class "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.Employ 
>>>> ee
>>>> > >> >> ".
>>>> > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing  
>>>> class "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.Person 
>>>> ".
>>>> >
>>>> > >> >> 3876  test  INFO   [main] openjpa.MetaData - Parsing  
>>>> class "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.Produc 
>>>> t"
>>>> > >> >> .
>>>> > >> >> 3876  test  INFO   [main] openjpa.MetaData - Parsing  
>>>> class "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.FullTi 
>>>> me
>>>> > >> >> Employee
>>>> > >> >> ".
>>>> > >> >> 3936  test  INFO   [main] openjpa.MetaData - Parsing  
>>>> class "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.Produc 
>>>> tO
>>>> > >> >> rder".
>>>> > >> >> 3966  test  INFO   [main] openjpa.MetaData - Parsing  
>>>> class "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.Custom 
>>>> er
>>>> > >> >> ".
>>>> > >> >> 3976  test  INFO   [main] openjpa.MetaData - Parsing  
>>>> class "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.LineIt 
>>>> em
>>>> > >> >> ".
>>>> > >> >> 4026  test  INFO   [main] openjpa.MetaData - Parsing  
>>>> class "
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.PartTi 
>>>> me
>>>> > >> >> Employee
>>>> > >> >> ".
>>>> > >> >> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time  
>>>> elapsed:
>>>> > >> >> 4.336 sec
>>>> > >> >> <<< FAILURE!
>>>> > >> >> testBasicQueries(
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.TestPr 
>>>> op
>>>> > >> >> ertyCompanyModel)
>>>> > >> >> Time elapsed: 4.326 sec  <<< ERROR!
>>>> > >> >> java.lang.IllegalStateException:  
>>>> java.lang.NoSuchMethodException:
>>>> > >> >> <unbound>=
>>>> > >> >> Class.create (Class);
>>>> > >> >>        at
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.CompanyModelTest.chec 
>>>> kM
>>>> > >> >> odel(
>>>> > >> >> CompanyModelTest.java:194)
>>>> > >> >>        at
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.CompanyModelTest.setU 
>>>> p(
>>>> > >> >> CompanyModelTest.java:66)
>>>> > >> >>        at junit.framework.TestCase.runBare  
>>>> (TestCase.java:125)
>>>> > >> >>        at junit.framework.TestResult$1.protect 
>>>> (TestResult.java:
>>>> > >> 106)
>>>> > >> >>        at junit.framework.TestResult.runProtected 
>>>> (TestResult.java:
>>>> > >> >> 124)
>>>> > >> >>        at junit.framework.TestResult.run(TestResult.java: 
>>>> 109)
>>>> > >> >>        at junit.framework.TestCase.run(TestCase.java:118)
>>>> > >> >>        at junit.framework.TestSuite.runTest  
>>>> (TestSuite.java:208)
>>>> > >> >>        at junit.framework.TestSuite.run(TestSuite.java:203)
>>>> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0 
>>>> (Native
>>>> > >> Method)
>>>> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke(
>>>> > >> >> NativeMethodAccessorImpl.java:64)
>>>> > >> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>>> > >> >> DelegatingMethodAccessorImpl.java :43)
>>>> > >> >>        at java.lang.reflect.Method.invoke(Method.java:615)
>>>> > >> >>        at  
>>>> org.apache.maven.surefire.junit.JUnitTestSet.execute(
>>>> > >> >> JUnitTestSet.java:210)
>>>> > >> >>        at
>>>> > >> >>
>>>> > >>  
>>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeT 
>>>> es
>>>> > >> >> tSet(
>>>> > >> >> AbstractDirectoryTestSuite.java:135)
>>>> > >> >>        at
>>>> > >> >>
>>>> > >>  
>>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
>>>> > >> >> AbstractDirectoryTestSuite.java:122)
>>>> > >> >>        at org.apache.maven.surefire.Surefire.run  
>>>> (Surefire.java:
>>>> > >> 129)
>>>> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0 
>>>> (Native
>>>> > >> Method)
>>>> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke(
>>>> > >> >> NativeMethodAccessorImpl.java:64)
>>>> > >> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>>> > >> >> DelegatingMethodAccessorImpl.java:43)
>>>> > >> >>        at java.lang.reflect.Method.invoke (Method.java:615)
>>>> > >> >>        at
>>>> > >> >>
>>>> > >>  
>>>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
>>>> > >> >> SurefireBooter.java:225)
>>>> > >> >>        at  
>>>> org.apache.maven.surefire.booter.SurefireBooter.main(
>>>> > >> >> SurefireBooter.java:747)
>>>> > >> >> Caused by: java.lang.NoSuchMethodException:  
>>>> <unbound>=Class.create
>>>> > >> >> (Class);
>>>> > >> >>        at java.beans.Statement.invoke(Statement.java:269)
>>>> > >> >>        at <unknown class>.<unknown method>(Unknown Source)
>>>> > >> >>        at com.sun.beans.ObjectHandler.eval  
>>>> (ObjectHandler.java
>>>> > :148)
>>>> > >> >>        at com.sun.beans.ObjectHandler.startElement
>>>> > >> >> (ObjectHandler.java:250)
>>>> > >> >>        at  
>>>> org.apache.xerces.parsers.AbstractSAXParser.startElement
>>>> > >> >> (Unknown
>>>> > >> >> Source)
>>>> > >> >>        at  
>>>> org.apache.xerces.impl.dtd.XMLDTDValidator.startElement
>>>> > >> >> (Unknown
>>>> > >> >> Source)
>>>> > >> >>        at
>>>> > >> >>
>>>> > >>  
>>>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElem 
>>>> en
>>>> > >> >> t(Unknown
>>>> > >> >> Source)
>>>> > >> >>        at
>>>> > >> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
>>>> > >> >> $FragmentContentDispatcher.dispatch(Unknown
>>>> > >> >> Source)
>>>> > >> >>        at
>>>> > >> >>  
>>>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
>>>> > >> >> (Unknown
>>>> > >> >> Source)
>>>> > >> >>        at  
>>>> org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
>>>> > >> >> Source)
>>>> > >> >>        at  
>>>> org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
>>>> > >> >> Source)
>>>> > >> >>        at org.apache.xerces.parsers.XMLParser.parse(Unknown
>>>> > >> Source)
>>>> > >> >>        at org.apache.xerces.parsers.AbstractSAXParser.parse
>>>> > >> >> (Unknown Source)
>>>> > >> >>        at org.apache.xerces.jaxp.SAXParserImpl.parse 
>>>> (Unknown
>>>> > >> Source)
>>>> > >> >>        at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>>> > >> >>        at java.beans.XMLDecoder.readObject 
>>>> (XMLDecoder.java:220)
>>>> > >> >>        at
>>>> > >> >>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.CompanyModelTest.chec 
>>>> kM
>>>> > >> >> odel(
>>>> > >> >> CompanyModelTest.java:191)
>>>> > >> >>        ... 22 more
>>>> > >> >>
>>>> > >> >>
>>>> > >> >> On 2/10/07, Marc Prud'hommeaux < mprudhom@apache.org>  
>>>> wrote:
>>>> > >> >>>
>>>> > >> >>> Kevin-
>>>> > >> >>>
>>>> > >> >>> Weird. From the error message, it looks like there is some
>>>> > >> problem
>>>> > >> >>> with deserializing the default model from the  
>>>> companies.xml file
>>>> > >> >>> from
>>>> > >> >>> the XMLDecoder.
>>>> > >> >>>
>>>> > >> >>> I've put some extra debugging logic in the  
>>>> CompanyModelTest.java
>>>> > >> >>> that
>>>> > >> >>> should throw a better error when the deserialization  
>>>> fails.
>>>> > >> Can you
>>>> > >> >>> update and re-run the test and let us know if the stack  
>>>> trace
>>>> > >> >>> changes?
>>>> > >> >>>
>>>> > >> >>>
>>>> > >> >>>
>>>> > >> >>> On Feb 10, 2007, at 6:21 PM, Kevin Sutter wrote:
>>>> > >> >>>
>>>> > >> >>> > Hi,
>>>> > >> >>> > After synching up with the latest changes in SVN, I am
>>>> > >> hitting an
>>>> > >> >>> > intermittent problem while running the new tests in
>>>> > >> >>> > openjpa-persistence-jdbc.  Every once in a while, I  
>>>> am getting
>>>> > >> >>> > hundreds of
>>>> > >> >>> > messsages like the following:
>>>> > >> >>> >
>>>> > >> >>> > Running
>>>> > >> >>> >
>>>> > >> >>>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.TestPr 
>>>> o
>>>> > >> >>> pe
>>>> > >> >>> > rtyCompanyModel
>>>> > >> >>> > 0  test  INFO   [main] openjpa.Runtime - Starting  
>>>> OpenJPA 0.0.0
>>>> > >> >>> > 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the
>>>> > >> appropriate
>>>> > >> >>> > value for your database (see the
>>>> > >> >>> > documentation foravailable values).
>>>> > >> >>> > 10  test  INFO   [main] openjpa.jdbc.JDBC - Using  
>>>> dictionary
>>>> > >> >>> class "
>>>> > >> >>> > org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache  
>>>> Derby
>>>> > >> >>> 10.2.2.0 -
>>>> > >> >>> > (485682) ,Apache Derby Embedded JDBC Driver 10.2.2.0 -
>>>> > >> (485682)).
>>>> > >> >>> > 20  test  INFO   [main] openjpa.MetaData - Found 10  
>>>> classes
>>>> > >> with
>>>> > >> >>> > metadata in
>>>> > >> >>> > 0 milliseconds.
>>>> > >> >>> > :
>>>> > >> >>> > :
>>>> > >> >>> > 4046  test  INFO   [main] openjpa.MetaData - Parsing  
>>>> class "
>>>> > >> >>> >
>>>> > >> >>>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.LineIt 
>>>> e
>>>> > >> >>> m"
>>>> > >> >>> > .
>>>> > >> >>> > java.lang.NoSuchMethodException:  
>>>> <unbound>=Class.create(Class);
>>>> > >> >>> > Continuing ...
>>>> > >> >>> > java.lang.NullPointerException: target should not be  
>>>> null
>>>> > >> >>> > Continuing ...
>>>> > >> >>> > java.lang.NoSuchMethodException:  
>>>> <unbound>=Class.create(Class);
>>>> > >> >>> > Continuing ...
>>>> > >> >>> > java.lang.NullPointerException: target should not be  
>>>> null
>>>> > >> >>> > Continuing ...
>>>> > >> >>> > java.lang.NoSuchMethodException:  
>>>> <unbound>=Class.create(Class);
>>>> > >> >>> > Continuing ...
>>>> > >> >>> > java.lang.NullPointerException: target should not be  
>>>> null
>>>> > >> >>> > Continuing ...
>>>> > >> >>> > java.lang.NoSuchMethodException:  
>>>> <unbound>=Class.create(Class);
>>>> > >> >>> > Continuing ...
>>>> > >> >>> > java.lang.NullPointerException: target should not be  
>>>> null
>>>> > >> >>> > Continuing ...
>>>> > >> >>> > java.lang.NoSuchMethodException : <unbound>=Class.create
>>>> > (Class);
>>>> > >> >>> > Continuing ...
>>>> > >> >>> > :
>>>> > >> >>> > :   <these type of messages continue -- several dozen  
>>>> repeats>
>>>> > >> >>> > :
>>>> > >> >>> > Tests run: 1, Failures: 1, Errors: 0, Skipped: 0,  
>>>> Time elapsed:
>>>> > >> >>> > 4.346 sec
>>>> > >> >>> > <<< FAILURE!
>>>> > >> >>> > testBasicQueries(
>>>> > >> >>> >
>>>> > >> >>>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.propertyaccess.TestPr 
>>>> o
>>>> > >> >>> pe
>>>> > >> >>> > rtyCompanyModel)
>>>> > >> >>> > Time elapsed: 4.336 sec  <<< FAILURE!
>>>> > >> >>> > junit.framework.AssertionFailedError: expected:<2>  
>>>> but was:<0>
>>>> > >> >>> >        at junit.framework.Assert.fail(Assert.java:47)
>>>> > >> >>> >        at junit.framework.Assert.failNotEquals 
>>>> (Assert.java:282)
>>>> > >> >>> >        at junit.framework.Assert.assertEquals 
>>>> (Assert.java:64)
>>>> > >> >>> >        at junit.framework.Assert.assertEquals 
>>>> (Assert.java:201)
>>>> > >> >>> >        at junit.framework.Assert.assertEquals 
>>>> (Assert.java:207)
>>>> > >> >>> >        at
>>>> > >> >>> >
>>>> > >> >>>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.CompanyModelTest.veri 
>>>> f
>>>> > >> >>> yM
>>>> > >> >>> > odel(
>>>> > >> >>> > CompanyModelTest.java:211)
>>>> > >> >>> >        at
>>>> > >> >>> >
>>>> > >> >>>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.CompanyModelTest.chec 
>>>> k
>>>> > >> >>> Mo
>>>> > >> >>> > del(
>>>> > >> >>> > CompanyModelTest.java:195)
>>>> > >> >>> >        at
>>>> > >> >>> >
>>>> > >> >>>
>>>> > >>  
>>>> org.apache.openjpa.persistence.models.company.CompanyModelTest.setU 
>>>> p
>>>> > >> >>> (
>>>> > >> >>> > CompanyModelTest.java:66)
>>>> > >> >>> >        at junit.framework.TestCase.runBare 
>>>> (TestCase.java:125)
>>>> > >> >>> >        at junit.framework.TestResult$1.protect  
>>>> (TestResult.java
>>>> > :
>>>> > >> >>> 106)
>>>> > >> >>> >        at junit.framework.TestResult.runProtected
>>>> > >> >>> (TestResult.java:124)
>>>> > >> >>> >        at junit.framework.TestResult.run  
>>>> (TestResult.java:109)
>>>> > >> >>> >        at junit.framework.TestCase.run(TestCase.java: 
>>>> 118)
>>>> > >> >>> >        at junit.framework.TestSuite.runTest 
>>>> (TestSuite.java:208)
>>>> > >> >>> >        at junit.framework.TestSuite.run 
>>>> (TestSuite.java:203)
>>>> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0 
>>>> (Native
>>>> > >> >>> Method)
>>>> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke (
>>>> > >> >>> > NativeMethodAccessorImpl.java:64)
>>>> > >> >>> >        at  
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>>> > >> >>> > DelegatingMethodAccessorImpl.java:43)
>>>> > >> >>> >        at java.lang.reflect.Method.invoke(Method.java: 
>>>> 615)
>>>> > >> >>> >        at  
>>>> org.apache.maven.surefire.junit.JUnitTestSet.execute(
>>>> > >> >>> > JUnitTestSet.java :210)
>>>> > >> >>> >        at
>>>> > >> >>> >
>>>> > >> >>>
>>>> > >>  
>>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeT 
>>>> e
>>>> > >> >>> st
>>>> > >> >>> > Set(
>>>> > >> >>> > AbstractDirectoryTestSuite.java:135)
>>>> > >> >>> >        at
>>>> > >> >>> >
>>>> > >> >>>
>>>> > >>  
>>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute  
>>>> (
>>>> > >> >>> > AbstractDirectoryTestSuite.java:122)
>>>> > >> >>> >        at org.apache.maven.surefire.Surefire.run 
>>>> (Surefire.java:
>>>> > >> >>> 129)
>>>> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0 
>>>> (Native
>>>> > >> >>> Method)
>>>> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke(
>>>> > >> >>> > NativeMethodAccessorImpl.java :64)
>>>> > >> >>> >        at  
>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>>> > >> >>> > DelegatingMethodAccessorImpl.java:43)
>>>> > >> >>> >        at java.lang.reflect.Method.invoke  
>>>> (Method.java:615)
>>>> > >> >>> >        at
>>>> > >> >>> >
>>>> > >> >>>
>>>> > >>  
>>>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
>>>> > >> >>> > SurefireBooter.java:225)
>>>> > >> >>> >        at  
>>>> org.apache.maven.surefire.booter.SurefireBooter.main(
>>>> > >> >>> > SurefireBooter.java:747)
>>>> > >> >>> >
>>>> > >> >>> > They seem to most often happen when I do a complete  
>>>> top-down
>>>> > >> build
>>>> > >> >>> > from the
>>>> > >> >>> > openjpa directory (mvn clean && mvn install) and let it
>>>> > >> >>> traverse the
>>>> > >> >>> > sub-projects.  This is from the command line (not  
>>>> Eclipse).
>>>> > >> >>> >
>>>> > >> >>> > I can immediately turn around and do a "mvn test"  
>>>> from the
>>>> > >> openjpa
>>>> > >> >>> > directory
>>>> > >> >>> > and everything tests out just fine.
>>>> > >> >>> >
>>>> > >> >>> > Any ideas on what is causing these type of errors?  I  
>>>> don't see
>>>> > >> >>> > anywhere in
>>>> > >> >>> > our code where we are producing these type of  
>>>> messages.  I'm
>>>> > >> not
>>>> > >> >>> > sure if
>>>> > >> >>> > it's related to one of our dependencies (serp?), or  
>>>> maybe it's
>>>> > >> >>> > another IBM
>>>> > >> >>> > JDK anomaly (haven't been able to reproduce with Sun  
>>>> yet, but
>>>> > >> >>> it is an
>>>> > >> >>> > intermittent problem).
>>>> > >> >>> >
>>>> > >> >>> > Thanks,
>>>> > >> >>> > Kevin
>>>> > >> >>>
>>>> > >> >>>
>>>> > >> >
>>>> > >> > 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!
>>>> > >> >
>>>> > >>
>>>> > >>
>>>> >
>>>> >
>>>>
>>
>
> 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: Strange, intermittent problem running the new models.company tests

Posted by Craig L Russell <Cr...@Sun.COM>.
I'm seeing an NPE Error in the test testBasicQueries 
(org.apache.openjpa.persistence.models.company.propertyaccess.TestProper 
tyCompanyModel)  when running mvn clean package.

I can send the error log if anyone would like to see it.

Craig

On Feb 15, 2007, at 10:44 AM, Marc Prud'hommeaux wrote:

>
> I expect this is just a glitch with the XMLDecoder (which I do  
> suspect is a bug with the JVM you are using) that I use to setup  
> the test cases and seed instances of the model. It can easily be  
> swapped out by just hard-coding the data-seeding logic into the  
> test case, which I've been meaning to do since you reported the  
> problem, but just haven't had time yet.
>
> I'll try to get it done today...
>
>
>
> On Feb 15, 2007, at 9:29 AM, Kevin Sutter wrote:
>
>> I am still experiencing the same problem.  Am I the only one  
>> having problems
>> building and executing the tests?
>>
>> I have a workaround that hasn't failed me yet...  I separate the  
>> building
>> from the testing.
>>
>> From the top-level openjpa directory...
>>
>>> mvn clean && mvn install -Dtest=false
>>> mvn test
>>
>> But, more often than not, if I don't include the "-Dtest=false"  
>> stanza, the
>> tests will fail as described earlier in this thread.
>>
>> If nobody else is experiencing this, maybe it's a JDK thing  
>> again.  I could
>> try to reproduce with the Sun JDK.  Any other thoughts?
>>
>> Kevin
>>
>> On 2/12/07, Kevin Sutter <kw...@gmail.com> wrote:
>>>
>>> That clarification works for me...  ;-)
>>>
>>> On 2/12/07, Marc Prud'hommeaux <mp...@apache.org> wrote:
>>> >
>>> > Kevin-
>>> >
>>> > It could, but it would just be a spec compliance. OpenJPA does  
>>> allow
>>> > you to have final classes. The spec just prohibits it because  
>>> one of
>>> > the ways to implement support for property access is to  
>>> dynamically
>>> > generate a subclass to the entity (which isn't possible if the  
>>> entity
>>> > is final).
>>> >
>>> >
>>> >
>>> > On Feb 12, 2007, at 4:33 AM, Kevin Sutter wrote:
>>> >
>>> > > Marc (and others),
>>> > > Shouldn't OpenJPA be detecting these final classes and  
>>> issuing an
>>> > > error
>>> > > message?
>>> > >
>>> > > Kevin
>>> > >
>>> > > On 2/12/07, Marc Prud'hommeaux < mprudhom@apache.org> wrote:
>>> > >>
>>> > >> Craig-
>>> > >>
>>> > >> You're right that the classes shouldn't be final, but I  
>>> don't think
>>> > >> that's the cause of the problem.
>>> > >>
>>> > >> I've committed a fix to the final class issue, though.  
>>> Thanks for
>>> > >> pointing it out.
>>> > >>
>>> > >>
>>> > >>
>>> > >> On Feb 10, 2007, at 10:07 PM, Craig L Russell wrote:
>>> > >>
>>> > >> > Hi Kevin,
>>> > >> >
>>> > >> > I don't know if it's relevant, but persistent classes must  
>>> not be
>>> > >> > final. It seems that the entities in the model.company  
>>> packages are
>>> >
>>> > >> > (all) final, which is wrong. From spec 2.1, "The entity  
>>> class must
>>> > >> > not be final. No methods or persistent instance variables  
>>> of the
>>> > >> > entity class may be final. "
>>> > >> >
>>> > >> > The relevant part of the stack trace appears to be:
>>> > >> >> Caused by: java.lang.NoSuchMethodException:  
>>> <unbound>=Class.create
>>> > >> >> (Class);
>>> > >> >>        at java.beans.Statement.invoke(Statement.java:269)
>>> > >> >>        at <unknown class>.<unknown method>(Unknown Source)
>>> > >> >>        at com.sun.beans.ObjectHandler.eval 
>>> (ObjectHandler.java:148)
>>> > >> >>        at com.sun.beans.ObjectHandler.startElement
>>> > >> >> (ObjectHandler.java:250)
>>> > >> >>        at  
>>> org.apache.xerces.parsers.AbstractSAXParser.startElement
>>> > >> >> (Unknown
>>> > >> >> Source)
>>> > >> >>        at  
>>> org.apache.xerces.impl.dtd.XMLDTDValidator.startElement
>>> > >> >> (Unknown
>>> > >> >
>>> > >> > which sounds like an issue with the xerces parser. Don't  
>>> you hate
>>> > >> > exceptions from parsers rather than error messages?
>>> > >> >
>>> > >> > Craig
>>> > >> >
>>> > >> > On Feb 10, 2007, at 8:08 PM, Kevin Sutter wrote:
>>> > >> >
>>> > >> >> Marc,
>>> > >> >> It took a while to reproduce, but I finally got the  
>>> following...
>>> > >> >> Does this
>>> > >> >> help?  Thanks for your help!
>>> > >> >>
>>> > >> >> Kevin
>>> > >> >>
>>> > >> >> Running
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro 
>>> p
>>> > >> >> ertyCompanyModel
>>> > >> >> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA  
>>> 0.0.0
>>> > >> >> 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the  
>>> appropriate
>>> > >> >> value for your database (see the
>>> > >> >> documentation foravailable values).
>>> > >> >> 0  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary
>>> > >> class "
>>> > >> >> org.apache.openjpa.jdbc.sql.DerbyDictionary " (Apache Derby
>>> > >> 10.2.2.0 -
>>> > >> >> (485682) ,Apache Derby
>>> > >> >> Embedded JDBC Driver 10.2.2.0 - (485682)).
>>> > >> >> 10  test  INFO   [main] openjpa.MetaData - Found 10  
>>> classes with
>>> > >> >> metadata in
>>> > >> >> 0 milliseconds.
>>> > >> >> 20  test  INFO   [main] openjpa.MetaData - Found 10  
>>> classes with
>>> > >> >> metadata in
>>> > >> >> 10 milliseconds.
>>> > >> >> 20  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.Product 
>>> "
>>> > >> >> .
>>> > >> >> 20  test  INFO   [main] openjpa.MetaData - Parsing package "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.Product 
>>> "
>>> >
>>> > >> >> .
>>> > >> >> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.Company 
>>> "
>>> > >> >> .
>>> > >> >> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.Address 
>>> "
>>> > >> >> .
>>> > >> >> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.Employe 
>>> e
>>> > >> >> ".
>>> > >> >> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.Person" 
>>> .
>>> > >> >> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.FullTim 
>>> e
>>> > >> >> Employee
>>> > >> >> ".
>>> > >> >> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.LineIte 
>>> m
>>> > >> >> ".
>>> > >> >> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.Product 
>>> O
>>> > >> >> rder".
>>> > >> >> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.Custome 
>>> r
>>> > >> >> ".
>>> > >> >> 70  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.PartTim 
>>> e
>>> > >> >> Employee
>>> > >> >> ".
>>> > >> >> 70  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>>> > >> >> information for
>>> > >> >> schema name "null", table name "PRP_Address".
>>> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>>> > >> >> information for
>>> > >> >> schema name "null", table name "PRP_Company".
>>> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>>> > >> >> information for
>>> > >> >> schema name "null", table name "PRP_LineItem".
>>> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>>> > >> >> information for
>>> > >> >> schema name "null", table name "PRP_Person".
>>> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>>> > >> >> information for
>>> > >> >> schema name "null", table name "PRP_Product".
>>> > >> >> 110  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>>> > >> >> information for
>>> > >> >> schema name "null", table name "PRP_ProductOrder".
>>> > >> >> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>>> > >> >> information for
>>> > >> >> schema name "null", table name  
>>> "PRP_ProductOrder_PRP_LineItem".
>>> > >> >> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>>> > >> >> information for
>>> > >> >> schema name "null", table name "PRP_Product_PRP_Company".
>>> > >> >> 140  test  INFO   [main] openjpa.jdbc.Schema - Reading  
>>> sequence
>>> > >> >> information
>>> > >> >> for schema "null", sequence name "null".
>>> > >> >> 3856  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.Company 
>>> "
>>> > >> >> .
>>> > >> >> 3856  test  INFO   [main] openjpa.MetaData - Parsing  
>>> package "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.Company 
>>> "
>>> > >> >> .
>>> > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.Address 
>>> "
>>> > >> >> .
>>> > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.Employe 
>>> e
>>> > >> >> ".
>>> > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.Person" 
>>> .
>>> >
>>> > >> >> 3876  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.Product 
>>> "
>>> > >> >> .
>>> > >> >> 3876  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.FullTim 
>>> e
>>> > >> >> Employee
>>> > >> >> ".
>>> > >> >> 3936  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.Product 
>>> O
>>> > >> >> rder".
>>> > >> >> 3966  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.Custome 
>>> r
>>> > >> >> ".
>>> > >> >> 3976  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.LineIte 
>>> m
>>> > >> >> ".
>>> > >> >> 4026  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.PartTim 
>>> e
>>> > >> >> Employee
>>> > >> >> ".
>>> > >> >> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time  
>>> elapsed:
>>> > >> >> 4.336 sec
>>> > >> >> <<< FAILURE!
>>> > >> >> testBasicQueries(
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro 
>>> p
>>> > >> >> ertyCompanyModel)
>>> > >> >> Time elapsed: 4.326 sec  <<< ERROR!
>>> > >> >> java.lang.IllegalStateException:  
>>> java.lang.NoSuchMethodException:
>>> > >> >> <unbound>=
>>> > >> >> Class.create (Class);
>>> > >> >>        at
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.CompanyModelTest.check 
>>> M
>>> > >> >> odel(
>>> > >> >> CompanyModelTest.java:194)
>>> > >> >>        at
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp 
>>> (
>>> > >> >> CompanyModelTest.java:66)
>>> > >> >>        at junit.framework.TestCase.runBare (TestCase.java: 
>>> 125)
>>> > >> >>        at junit.framework.TestResult$1.protect 
>>> (TestResult.java:
>>> > >> 106)
>>> > >> >>        at junit.framework.TestResult.runProtected 
>>> (TestResult.java:
>>> > >> >> 124)
>>> > >> >>        at junit.framework.TestResult.run(TestResult.java: 
>>> 109)
>>> > >> >>        at junit.framework.TestCase.run(TestCase.java:118)
>>> > >> >>        at junit.framework.TestSuite.runTest  
>>> (TestSuite.java:208)
>>> > >> >>        at junit.framework.TestSuite.run(TestSuite.java:203)
>>> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0 
>>> (Native
>>> > >> Method)
>>> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke(
>>> > >> >> NativeMethodAccessorImpl.java:64)
>>> > >> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>> > >> >> DelegatingMethodAccessorImpl.java :43)
>>> > >> >>        at java.lang.reflect.Method.invoke(Method.java:615)
>>> > >> >>        at  
>>> org.apache.maven.surefire.junit.JUnitTestSet.execute(
>>> > >> >> JUnitTestSet.java:210)
>>> > >> >>        at
>>> > >> >>
>>> > >>  
>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTe 
>>> s
>>> > >> >> tSet(
>>> > >> >> AbstractDirectoryTestSuite.java:135)
>>> > >> >>        at
>>> > >> >>
>>> > >>  
>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
>>> > >> >> AbstractDirectoryTestSuite.java:122)
>>> > >> >>        at org.apache.maven.surefire.Surefire.run  
>>> (Surefire.java:
>>> > >> 129)
>>> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0 
>>> (Native
>>> > >> Method)
>>> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke(
>>> > >> >> NativeMethodAccessorImpl.java:64)
>>> > >> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>> > >> >> DelegatingMethodAccessorImpl.java:43)
>>> > >> >>        at java.lang.reflect.Method.invoke (Method.java:615)
>>> > >> >>        at
>>> > >> >>
>>> > >>  
>>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
>>> > >> >> SurefireBooter.java:225)
>>> > >> >>        at  
>>> org.apache.maven.surefire.booter.SurefireBooter.main(
>>> > >> >> SurefireBooter.java:747)
>>> > >> >> Caused by: java.lang.NoSuchMethodException:  
>>> <unbound>=Class.create
>>> > >> >> (Class);
>>> > >> >>        at java.beans.Statement.invoke(Statement.java:269)
>>> > >> >>        at <unknown class>.<unknown method>(Unknown Source)
>>> > >> >>        at com.sun.beans.ObjectHandler.eval  
>>> (ObjectHandler.java
>>> > :148)
>>> > >> >>        at com.sun.beans.ObjectHandler.startElement
>>> > >> >> (ObjectHandler.java:250)
>>> > >> >>        at  
>>> org.apache.xerces.parsers.AbstractSAXParser.startElement
>>> > >> >> (Unknown
>>> > >> >> Source)
>>> > >> >>        at  
>>> org.apache.xerces.impl.dtd.XMLDTDValidator.startElement
>>> > >> >> (Unknown
>>> > >> >> Source)
>>> > >> >>        at
>>> > >> >>
>>> > >>  
>>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartEleme 
>>> n
>>> > >> >> t(Unknown
>>> > >> >> Source)
>>> > >> >>        at
>>> > >> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
>>> > >> >> $FragmentContentDispatcher.dispatch(Unknown
>>> > >> >> Source)
>>> > >> >>        at
>>> > >> >>  
>>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
>>> > >> >> (Unknown
>>> > >> >> Source)
>>> > >> >>        at org.apache.xerces.parsers.DTDConfiguration.parse 
>>> (Unknown
>>> > >> >> Source)
>>> > >> >>        at org.apache.xerces.parsers.DTDConfiguration.parse 
>>> (Unknown
>>> > >> >> Source)
>>> > >> >>        at org.apache.xerces.parsers.XMLParser.parse(Unknown
>>> > >> Source)
>>> > >> >>        at org.apache.xerces.parsers.AbstractSAXParser.parse
>>> > >> >> (Unknown Source)
>>> > >> >>        at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown
>>> > >> Source)
>>> > >> >>        at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>> > >> >>        at java.beans.XMLDecoder.readObject 
>>> (XMLDecoder.java:220)
>>> > >> >>        at
>>> > >> >>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.CompanyModelTest.check 
>>> M
>>> > >> >> odel(
>>> > >> >> CompanyModelTest.java:191)
>>> > >> >>        ... 22 more
>>> > >> >>
>>> > >> >>
>>> > >> >> On 2/10/07, Marc Prud'hommeaux < mprudhom@apache.org> wrote:
>>> > >> >>>
>>> > >> >>> Kevin-
>>> > >> >>>
>>> > >> >>> Weird. From the error message, it looks like there is some
>>> > >> problem
>>> > >> >>> with deserializing the default model from the  
>>> companies.xml file
>>> > >> >>> from
>>> > >> >>> the XMLDecoder.
>>> > >> >>>
>>> > >> >>> I've put some extra debugging logic in the  
>>> CompanyModelTest.java
>>> > >> >>> that
>>> > >> >>> should throw a better error when the deserialization fails.
>>> > >> Can you
>>> > >> >>> update and re-run the test and let us know if the stack  
>>> trace
>>> > >> >>> changes?
>>> > >> >>>
>>> > >> >>>
>>> > >> >>>
>>> > >> >>> On Feb 10, 2007, at 6:21 PM, Kevin Sutter wrote:
>>> > >> >>>
>>> > >> >>> > Hi,
>>> > >> >>> > After synching up with the latest changes in SVN, I am
>>> > >> hitting an
>>> > >> >>> > intermittent problem while running the new tests in
>>> > >> >>> > openjpa-persistence-jdbc.  Every once in a while, I am  
>>> getting
>>> > >> >>> > hundreds of
>>> > >> >>> > messsages like the following:
>>> > >> >>> >
>>> > >> >>> > Running
>>> > >> >>> >
>>> > >> >>>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro
>>> > >> >>> pe
>>> > >> >>> > rtyCompanyModel
>>> > >> >>> > 0  test  INFO   [main] openjpa.Runtime - Starting  
>>> OpenJPA 0.0.0
>>> > >> >>> > 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the
>>> > >> appropriate
>>> > >> >>> > value for your database (see the
>>> > >> >>> > documentation foravailable values).
>>> > >> >>> > 10  test  INFO   [main] openjpa.jdbc.JDBC - Using  
>>> dictionary
>>> > >> >>> class "
>>> > >> >>> > org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache  
>>> Derby
>>> > >> >>> 10.2.2.0 -
>>> > >> >>> > (485682) ,Apache Derby Embedded JDBC Driver 10.2.2.0 -
>>> > >> (485682)).
>>> > >> >>> > 20  test  INFO   [main] openjpa.MetaData - Found 10  
>>> classes
>>> > >> with
>>> > >> >>> > metadata in
>>> > >> >>> > 0 milliseconds.
>>> > >> >>> > :
>>> > >> >>> > :
>>> > >> >>> > 4046  test  INFO   [main] openjpa.MetaData - Parsing  
>>> class "
>>> > >> >>> >
>>> > >> >>>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.LineIte
>>> > >> >>> m"
>>> > >> >>> > .
>>> > >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create 
>>> (Class);
>>> > >> >>> > Continuing ...
>>> > >> >>> > java.lang.NullPointerException: target should not be null
>>> > >> >>> > Continuing ...
>>> > >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create 
>>> (Class);
>>> > >> >>> > Continuing ...
>>> > >> >>> > java.lang.NullPointerException: target should not be null
>>> > >> >>> > Continuing ...
>>> > >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create 
>>> (Class);
>>> > >> >>> > Continuing ...
>>> > >> >>> > java.lang.NullPointerException: target should not be null
>>> > >> >>> > Continuing ...
>>> > >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create 
>>> (Class);
>>> > >> >>> > Continuing ...
>>> > >> >>> > java.lang.NullPointerException: target should not be null
>>> > >> >>> > Continuing ...
>>> > >> >>> > java.lang.NoSuchMethodException : <unbound>=Class.create
>>> > (Class);
>>> > >> >>> > Continuing ...
>>> > >> >>> > :
>>> > >> >>> > :   <these type of messages continue -- several dozen  
>>> repeats>
>>> > >> >>> > :
>>> > >> >>> > Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time  
>>> elapsed:
>>> > >> >>> > 4.346 sec
>>> > >> >>> > <<< FAILURE!
>>> > >> >>> > testBasicQueries(
>>> > >> >>> >
>>> > >> >>>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro
>>> > >> >>> pe
>>> > >> >>> > rtyCompanyModel)
>>> > >> >>> > Time elapsed: 4.336 sec  <<< FAILURE!
>>> > >> >>> > junit.framework.AssertionFailedError: expected:<2> but  
>>> was:<0>
>>> > >> >>> >        at junit.framework.Assert.fail(Assert.java:47)
>>> > >> >>> >        at junit.framework.Assert.failNotEquals 
>>> (Assert.java:282)
>>> > >> >>> >        at junit.framework.Assert.assertEquals 
>>> (Assert.java:64)
>>> > >> >>> >        at junit.framework.Assert.assertEquals 
>>> (Assert.java:201)
>>> > >> >>> >        at junit.framework.Assert.assertEquals 
>>> (Assert.java:207)
>>> > >> >>> >        at
>>> > >> >>> >
>>> > >> >>>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.CompanyModelTest.verif
>>> > >> >>> yM
>>> > >> >>> > odel(
>>> > >> >>> > CompanyModelTest.java:211)
>>> > >> >>> >        at
>>> > >> >>> >
>>> > >> >>>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.CompanyModelTest.check
>>> > >> >>> Mo
>>> > >> >>> > del(
>>> > >> >>> > CompanyModelTest.java:195)
>>> > >> >>> >        at
>>> > >> >>> >
>>> > >> >>>
>>> > >>  
>>> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp
>>> > >> >>> (
>>> > >> >>> > CompanyModelTest.java:66)
>>> > >> >>> >        at junit.framework.TestCase.runBare 
>>> (TestCase.java:125)
>>> > >> >>> >        at junit.framework.TestResult$1.protect  
>>> (TestResult.java
>>> > :
>>> > >> >>> 106)
>>> > >> >>> >        at junit.framework.TestResult.runProtected
>>> > >> >>> (TestResult.java:124)
>>> > >> >>> >        at junit.framework.TestResult.run  
>>> (TestResult.java:109)
>>> > >> >>> >        at junit.framework.TestCase.run(TestCase.java:118)
>>> > >> >>> >        at junit.framework.TestSuite.runTest 
>>> (TestSuite.java:208)
>>> > >> >>> >        at junit.framework.TestSuite.run(TestSuite.java: 
>>> 203)
>>> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0 
>>> (Native
>>> > >> >>> Method)
>>> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke (
>>> > >> >>> > NativeMethodAccessorImpl.java:64)
>>> > >> >>> >        at  
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>> > >> >>> > DelegatingMethodAccessorImpl.java:43)
>>> > >> >>> >        at java.lang.reflect.Method.invoke(Method.java: 
>>> 615)
>>> > >> >>> >        at  
>>> org.apache.maven.surefire.junit.JUnitTestSet.execute(
>>> > >> >>> > JUnitTestSet.java :210)
>>> > >> >>> >        at
>>> > >> >>> >
>>> > >> >>>
>>> > >>  
>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTe
>>> > >> >>> st
>>> > >> >>> > Set(
>>> > >> >>> > AbstractDirectoryTestSuite.java:135)
>>> > >> >>> >        at
>>> > >> >>> >
>>> > >> >>>
>>> > >>  
>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute (
>>> > >> >>> > AbstractDirectoryTestSuite.java:122)
>>> > >> >>> >        at org.apache.maven.surefire.Surefire.run 
>>> (Surefire.java:
>>> > >> >>> 129)
>>> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0 
>>> (Native
>>> > >> >>> Method)
>>> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke(
>>> > >> >>> > NativeMethodAccessorImpl.java :64)
>>> > >> >>> >        at  
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>> > >> >>> > DelegatingMethodAccessorImpl.java:43)
>>> > >> >>> >        at java.lang.reflect.Method.invoke (Method.java: 
>>> 615)
>>> > >> >>> >        at
>>> > >> >>> >
>>> > >> >>>
>>> > >>  
>>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
>>> > >> >>> > SurefireBooter.java:225)
>>> > >> >>> >        at  
>>> org.apache.maven.surefire.booter.SurefireBooter.main(
>>> > >> >>> > SurefireBooter.java:747)
>>> > >> >>> >
>>> > >> >>> > They seem to most often happen when I do a complete  
>>> top-down
>>> > >> build
>>> > >> >>> > from the
>>> > >> >>> > openjpa directory (mvn clean && mvn install) and let it
>>> > >> >>> traverse the
>>> > >> >>> > sub-projects.  This is from the command line (not  
>>> Eclipse).
>>> > >> >>> >
>>> > >> >>> > I can immediately turn around and do a "mvn test" from  
>>> the
>>> > >> openjpa
>>> > >> >>> > directory
>>> > >> >>> > and everything tests out just fine.
>>> > >> >>> >
>>> > >> >>> > Any ideas on what is causing these type of errors?  I  
>>> don't see
>>> > >> >>> > anywhere in
>>> > >> >>> > our code where we are producing these type of  
>>> messages.  I'm
>>> > >> not
>>> > >> >>> > sure if
>>> > >> >>> > it's related to one of our dependencies (serp?), or  
>>> maybe it's
>>> > >> >>> > another IBM
>>> > >> >>> > JDK anomaly (haven't been able to reproduce with Sun  
>>> yet, but
>>> > >> >>> it is an
>>> > >> >>> > intermittent problem).
>>> > >> >>> >
>>> > >> >>> > Thanks,
>>> > >> >>> > Kevin
>>> > >> >>>
>>> > >> >>>
>>> > >> >
>>> > >> > 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!
>>> > >> >
>>> > >>
>>> > >>
>>> >
>>> >
>>>
>

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: Strange, intermittent problem running the new models.company tests

Posted by Marc Prud'hommeaux <mp...@apache.org>.
I expect this is just a glitch with the XMLDecoder (which I do  
suspect is a bug with the JVM you are using) that I use to setup the  
test cases and seed instances of the model. It can easily be swapped  
out by just hard-coding the data-seeding logic into the test case,  
which I've been meaning to do since you reported the problem, but  
just haven't had time yet.

I'll try to get it done today...



On Feb 15, 2007, at 9:29 AM, Kevin Sutter wrote:

> I am still experiencing the same problem.  Am I the only one having  
> problems
> building and executing the tests?
>
> I have a workaround that hasn't failed me yet...  I separate the  
> building
> from the testing.
>
> From the top-level openjpa directory...
>
>> mvn clean && mvn install -Dtest=false
>> mvn test
>
> But, more often than not, if I don't include the "-Dtest=false"  
> stanza, the
> tests will fail as described earlier in this thread.
>
> If nobody else is experiencing this, maybe it's a JDK thing again.   
> I could
> try to reproduce with the Sun JDK.  Any other thoughts?
>
> Kevin
>
> On 2/12/07, Kevin Sutter <kw...@gmail.com> wrote:
>>
>> That clarification works for me...  ;-)
>>
>> On 2/12/07, Marc Prud'hommeaux <mp...@apache.org> wrote:
>> >
>> > Kevin-
>> >
>> > It could, but it would just be a spec compliance. OpenJPA does  
>> allow
>> > you to have final classes. The spec just prohibits it because  
>> one of
>> > the ways to implement support for property access is to dynamically
>> > generate a subclass to the entity (which isn't possible if the  
>> entity
>> > is final).
>> >
>> >
>> >
>> > On Feb 12, 2007, at 4:33 AM, Kevin Sutter wrote:
>> >
>> > > Marc (and others),
>> > > Shouldn't OpenJPA be detecting these final classes and issuing an
>> > > error
>> > > message?
>> > >
>> > > Kevin
>> > >
>> > > On 2/12/07, Marc Prud'hommeaux < mprudhom@apache.org> wrote:
>> > >>
>> > >> Craig-
>> > >>
>> > >> You're right that the classes shouldn't be final, but I don't  
>> think
>> > >> that's the cause of the problem.
>> > >>
>> > >> I've committed a fix to the final class issue, though. Thanks  
>> for
>> > >> pointing it out.
>> > >>
>> > >>
>> > >>
>> > >> On Feb 10, 2007, at 10:07 PM, Craig L Russell wrote:
>> > >>
>> > >> > Hi Kevin,
>> > >> >
>> > >> > I don't know if it's relevant, but persistent classes must  
>> not be
>> > >> > final. It seems that the entities in the model.company  
>> packages are
>> >
>> > >> > (all) final, which is wrong. From spec 2.1, "The entity  
>> class must
>> > >> > not be final. No methods or persistent instance variables  
>> of the
>> > >> > entity class may be final. "
>> > >> >
>> > >> > The relevant part of the stack trace appears to be:
>> > >> >> Caused by: java.lang.NoSuchMethodException:  
>> <unbound>=Class.create
>> > >> >> (Class);
>> > >> >>        at java.beans.Statement.invoke(Statement.java:269)
>> > >> >>        at <unknown class>.<unknown method>(Unknown Source)
>> > >> >>        at com.sun.beans.ObjectHandler.eval 
>> (ObjectHandler.java:148)
>> > >> >>        at com.sun.beans.ObjectHandler.startElement
>> > >> >> (ObjectHandler.java:250)
>> > >> >>        at  
>> org.apache.xerces.parsers.AbstractSAXParser.startElement
>> > >> >> (Unknown
>> > >> >> Source)
>> > >> >>        at  
>> org.apache.xerces.impl.dtd.XMLDTDValidator.startElement
>> > >> >> (Unknown
>> > >> >
>> > >> > which sounds like an issue with the xerces parser. Don't  
>> you hate
>> > >> > exceptions from parsers rather than error messages?
>> > >> >
>> > >> > Craig
>> > >> >
>> > >> > On Feb 10, 2007, at 8:08 PM, Kevin Sutter wrote:
>> > >> >
>> > >> >> Marc,
>> > >> >> It took a while to reproduce, but I finally got the  
>> following...
>> > >> >> Does this
>> > >> >> help?  Thanks for your help!
>> > >> >>
>> > >> >> Kevin
>> > >> >>
>> > >> >> Running
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.TestProp
>> > >> >> ertyCompanyModel
>> > >> >> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA  
>> 0.0.0
>> > >> >> 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the  
>> appropriate
>> > >> >> value for your database (see the
>> > >> >> documentation foravailable values).
>> > >> >> 0  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary
>> > >> class "
>> > >> >> org.apache.openjpa.jdbc.sql.DerbyDictionary " (Apache Derby
>> > >> 10.2.2.0 -
>> > >> >> (485682) ,Apache Derby
>> > >> >> Embedded JDBC Driver 10.2.2.0 - (485682)).
>> > >> >> 10  test  INFO   [main] openjpa.MetaData - Found 10  
>> classes with
>> > >> >> metadata in
>> > >> >> 0 milliseconds.
>> > >> >> 20  test  INFO   [main] openjpa.MetaData - Found 10  
>> classes with
>> > >> >> metadata in
>> > >> >> 10 milliseconds.
>> > >> >> 20  test  INFO   [main] openjpa.MetaData - Parsing class "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
>> > >> >> .
>> > >> >> 20  test  INFO   [main] openjpa.MetaData - Parsing package "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
>> >
>> > >> >> .
>> > >> >> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
>> > >> >> .
>> > >> >> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Address"
>> > >> >> .
>> > >> >> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Employee
>> > >> >> ".
>> > >> >> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Person".
>> > >> >> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.FullTime
>> > >> >> Employee
>> > >> >> ".
>> > >> >> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem
>> > >> >> ".
>> > >> >> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.ProductO
>> > >> >> rder".
>> > >> >> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Customer
>> > >> >> ".
>> > >> >> 70  test  INFO   [main] openjpa.MetaData - Parsing class "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.PartTime
>> > >> >> Employee
>> > >> >> ".
>> > >> >> 70  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>> > >> >> information for
>> > >> >> schema name "null", table name "PRP_Address".
>> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>> > >> >> information for
>> > >> >> schema name "null", table name "PRP_Company".
>> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>> > >> >> information for
>> > >> >> schema name "null", table name "PRP_LineItem".
>> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>> > >> >> information for
>> > >> >> schema name "null", table name "PRP_Person".
>> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>> > >> >> information for
>> > >> >> schema name "null", table name "PRP_Product".
>> > >> >> 110  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>> > >> >> information for
>> > >> >> schema name "null", table name "PRP_ProductOrder".
>> > >> >> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>> > >> >> information for
>> > >> >> schema name "null", table name  
>> "PRP_ProductOrder_PRP_LineItem".
>> > >> >> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>> > >> >> information for
>> > >> >> schema name "null", table name "PRP_Product_PRP_Company".
>> > >> >> 140  test  INFO   [main] openjpa.jdbc.Schema - Reading  
>> sequence
>> > >> >> information
>> > >> >> for schema "null", sequence name "null".
>> > >> >> 3856  test  INFO   [main] openjpa.MetaData - Parsing class "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
>> > >> >> .
>> > >> >> 3856  test  INFO   [main] openjpa.MetaData - Parsing  
>> package "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
>> > >> >> .
>> > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Address"
>> > >> >> .
>> > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Employee
>> > >> >> ".
>> > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Person".
>> >
>> > >> >> 3876  test  INFO   [main] openjpa.MetaData - Parsing class "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
>> > >> >> .
>> > >> >> 3876  test  INFO   [main] openjpa.MetaData - Parsing class "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.FullTime
>> > >> >> Employee
>> > >> >> ".
>> > >> >> 3936  test  INFO   [main] openjpa.MetaData - Parsing class "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.ProductO
>> > >> >> rder".
>> > >> >> 3966  test  INFO   [main] openjpa.MetaData - Parsing class "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Customer
>> > >> >> ".
>> > >> >> 3976  test  INFO   [main] openjpa.MetaData - Parsing class "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem
>> > >> >> ".
>> > >> >> 4026  test  INFO   [main] openjpa.MetaData - Parsing class "
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.PartTime
>> > >> >> Employee
>> > >> >> ".
>> > >> >> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time  
>> elapsed:
>> > >> >> 4.336 sec
>> > >> >> <<< FAILURE!
>> > >> >> testBasicQueries(
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.TestProp
>> > >> >> ertyCompanyModel)
>> > >> >> Time elapsed: 4.326 sec  <<< ERROR!
>> > >> >> java.lang.IllegalStateException:  
>> java.lang.NoSuchMethodException:
>> > >> >> <unbound>=
>> > >> >> Class.create (Class);
>> > >> >>        at
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkM
>> > >> >> odel(
>> > >> >> CompanyModelTest.java:194)
>> > >> >>        at
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp(
>> > >> >> CompanyModelTest.java:66)
>> > >> >>        at junit.framework.TestCase.runBare (TestCase.java: 
>> 125)
>> > >> >>        at junit.framework.TestResult$1.protect 
>> (TestResult.java:
>> > >> 106)
>> > >> >>        at junit.framework.TestResult.runProtected 
>> (TestResult.java:
>> > >> >> 124)
>> > >> >>        at junit.framework.TestResult.run(TestResult.java:109)
>> > >> >>        at junit.framework.TestCase.run(TestCase.java:118)
>> > >> >>        at junit.framework.TestSuite.runTest  
>> (TestSuite.java:208)
>> > >> >>        at junit.framework.TestSuite.run(TestSuite.java:203)
>> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>> > >> Method)
>> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke(
>> > >> >> NativeMethodAccessorImpl.java:64)
>> > >> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> > >> >> DelegatingMethodAccessorImpl.java :43)
>> > >> >>        at java.lang.reflect.Method.invoke(Method.java:615)
>> > >> >>        at  
>> org.apache.maven.surefire.junit.JUnitTestSet.execute(
>> > >> >> JUnitTestSet.java:210)
>> > >> >>        at
>> > >> >>
>> > >>  
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
>> > >> >> tSet(
>> > >> >> AbstractDirectoryTestSuite.java:135)
>> > >> >>        at
>> > >> >>
>> > >>  
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
>> > >> >> AbstractDirectoryTestSuite.java:122)
>> > >> >>        at org.apache.maven.surefire.Surefire.run  
>> (Surefire.java:
>> > >> 129)
>> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>> > >> Method)
>> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke(
>> > >> >> NativeMethodAccessorImpl.java:64)
>> > >> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> > >> >> DelegatingMethodAccessorImpl.java:43)
>> > >> >>        at java.lang.reflect.Method.invoke (Method.java:615)
>> > >> >>        at
>> > >> >>
>> > >>  
>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
>> > >> >> SurefireBooter.java:225)
>> > >> >>        at  
>> org.apache.maven.surefire.booter.SurefireBooter.main(
>> > >> >> SurefireBooter.java:747)
>> > >> >> Caused by: java.lang.NoSuchMethodException:  
>> <unbound>=Class.create
>> > >> >> (Class);
>> > >> >>        at java.beans.Statement.invoke(Statement.java:269)
>> > >> >>        at <unknown class>.<unknown method>(Unknown Source)
>> > >> >>        at com.sun.beans.ObjectHandler.eval  
>> (ObjectHandler.java
>> > :148)
>> > >> >>        at com.sun.beans.ObjectHandler.startElement
>> > >> >> (ObjectHandler.java:250)
>> > >> >>        at  
>> org.apache.xerces.parsers.AbstractSAXParser.startElement
>> > >> >> (Unknown
>> > >> >> Source)
>> > >> >>        at  
>> org.apache.xerces.impl.dtd.XMLDTDValidator.startElement
>> > >> >> (Unknown
>> > >> >> Source)
>> > >> >>        at
>> > >> >>
>> > >>  
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
>> > >> >> t(Unknown
>> > >> >> Source)
>> > >> >>        at
>> > >> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
>> > >> >> $FragmentContentDispatcher.dispatch(Unknown
>> > >> >> Source)
>> > >> >>        at
>> > >> >>  
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
>> > >> >> (Unknown
>> > >> >> Source)
>> > >> >>        at org.apache.xerces.parsers.DTDConfiguration.parse 
>> (Unknown
>> > >> >> Source)
>> > >> >>        at org.apache.xerces.parsers.DTDConfiguration.parse 
>> (Unknown
>> > >> >> Source)
>> > >> >>        at org.apache.xerces.parsers.XMLParser.parse(Unknown
>> > >> Source)
>> > >> >>        at org.apache.xerces.parsers.AbstractSAXParser.parse
>> > >> >> (Unknown Source)
>> > >> >>        at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown
>> > >> Source)
>> > >> >>        at javax.xml.parsers.SAXParser.parse(Unknown Source)
>> > >> >>        at java.beans.XMLDecoder.readObject(XMLDecoder.java: 
>> 220)
>> > >> >>        at
>> > >> >>
>> > >>  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkM
>> > >> >> odel(
>> > >> >> CompanyModelTest.java:191)
>> > >> >>        ... 22 more
>> > >> >>
>> > >> >>
>> > >> >> On 2/10/07, Marc Prud'hommeaux < mprudhom@apache.org> wrote:
>> > >> >>>
>> > >> >>> Kevin-
>> > >> >>>
>> > >> >>> Weird. From the error message, it looks like there is some
>> > >> problem
>> > >> >>> with deserializing the default model from the  
>> companies.xml file
>> > >> >>> from
>> > >> >>> the XMLDecoder.
>> > >> >>>
>> > >> >>> I've put some extra debugging logic in the  
>> CompanyModelTest.java
>> > >> >>> that
>> > >> >>> should throw a better error when the deserialization fails.
>> > >> Can you
>> > >> >>> update and re-run the test and let us know if the stack  
>> trace
>> > >> >>> changes?
>> > >> >>>
>> > >> >>>
>> > >> >>>
>> > >> >>> On Feb 10, 2007, at 6:21 PM, Kevin Sutter wrote:
>> > >> >>>
>> > >> >>> > Hi,
>> > >> >>> > After synching up with the latest changes in SVN, I am
>> > >> hitting an
>> > >> >>> > intermittent problem while running the new tests in
>> > >> >>> > openjpa-persistence-jdbc.  Every once in a while, I am  
>> getting
>> > >> >>> > hundreds of
>> > >> >>> > messsages like the following:
>> > >> >>> >
>> > >> >>> > Running
>> > >> >>> >
>> > >> >>>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro
>> > >> >>> pe
>> > >> >>> > rtyCompanyModel
>> > >> >>> > 0  test  INFO   [main] openjpa.Runtime - Starting  
>> OpenJPA 0.0.0
>> > >> >>> > 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the
>> > >> appropriate
>> > >> >>> > value for your database (see the
>> > >> >>> > documentation foravailable values).
>> > >> >>> > 10  test  INFO   [main] openjpa.jdbc.JDBC - Using  
>> dictionary
>> > >> >>> class "
>> > >> >>> > org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby
>> > >> >>> 10.2.2.0 -
>> > >> >>> > (485682) ,Apache Derby Embedded JDBC Driver 10.2.2.0 -
>> > >> (485682)).
>> > >> >>> > 20  test  INFO   [main] openjpa.MetaData - Found 10  
>> classes
>> > >> with
>> > >> >>> > metadata in
>> > >> >>> > 0 milliseconds.
>> > >> >>> > :
>> > >> >>> > :
>> > >> >>> > 4046  test  INFO   [main] openjpa.MetaData - Parsing  
>> class "
>> > >> >>> >
>> > >> >>>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.LineIte
>> > >> >>> m"
>> > >> >>> > .
>> > >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create 
>> (Class);
>> > >> >>> > Continuing ...
>> > >> >>> > java.lang.NullPointerException: target should not be null
>> > >> >>> > Continuing ...
>> > >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create 
>> (Class);
>> > >> >>> > Continuing ...
>> > >> >>> > java.lang.NullPointerException: target should not be null
>> > >> >>> > Continuing ...
>> > >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create 
>> (Class);
>> > >> >>> > Continuing ...
>> > >> >>> > java.lang.NullPointerException: target should not be null
>> > >> >>> > Continuing ...
>> > >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create 
>> (Class);
>> > >> >>> > Continuing ...
>> > >> >>> > java.lang.NullPointerException: target should not be null
>> > >> >>> > Continuing ...
>> > >> >>> > java.lang.NoSuchMethodException : <unbound>=Class.create
>> > (Class);
>> > >> >>> > Continuing ...
>> > >> >>> > :
>> > >> >>> > :   <these type of messages continue -- several dozen  
>> repeats>
>> > >> >>> > :
>> > >> >>> > Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time  
>> elapsed:
>> > >> >>> > 4.346 sec
>> > >> >>> > <<< FAILURE!
>> > >> >>> > testBasicQueries(
>> > >> >>> >
>> > >> >>>
>> > >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro
>> > >> >>> pe
>> > >> >>> > rtyCompanyModel)
>> > >> >>> > Time elapsed: 4.336 sec  <<< FAILURE!
>> > >> >>> > junit.framework.AssertionFailedError: expected:<2> but  
>> was:<0>
>> > >> >>> >        at junit.framework.Assert.fail(Assert.java:47)
>> > >> >>> >        at junit.framework.Assert.failNotEquals 
>> (Assert.java:282)
>> > >> >>> >        at junit.framework.Assert.assertEquals 
>> (Assert.java:64)
>> > >> >>> >        at junit.framework.Assert.assertEquals 
>> (Assert.java:201)
>> > >> >>> >        at junit.framework.Assert.assertEquals 
>> (Assert.java:207)
>> > >> >>> >        at
>> > >> >>> >
>> > >> >>>
>> > >>  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.verif
>> > >> >>> yM
>> > >> >>> > odel(
>> > >> >>> > CompanyModelTest.java:211)
>> > >> >>> >        at
>> > >> >>> >
>> > >> >>>
>> > >>  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.check
>> > >> >>> Mo
>> > >> >>> > del(
>> > >> >>> > CompanyModelTest.java:195)
>> > >> >>> >        at
>> > >> >>> >
>> > >> >>>
>> > >>  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp
>> > >> >>> (
>> > >> >>> > CompanyModelTest.java:66)
>> > >> >>> >        at junit.framework.TestCase.runBare 
>> (TestCase.java:125)
>> > >> >>> >        at junit.framework.TestResult$1.protect  
>> (TestResult.java
>> > :
>> > >> >>> 106)
>> > >> >>> >        at junit.framework.TestResult.runProtected
>> > >> >>> (TestResult.java:124)
>> > >> >>> >        at junit.framework.TestResult.run  
>> (TestResult.java:109)
>> > >> >>> >        at junit.framework.TestCase.run(TestCase.java:118)
>> > >> >>> >        at junit.framework.TestSuite.runTest 
>> (TestSuite.java:208)
>> > >> >>> >        at junit.framework.TestSuite.run(TestSuite.java: 
>> 203)
>> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0 
>> (Native
>> > >> >>> Method)
>> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke (
>> > >> >>> > NativeMethodAccessorImpl.java:64)
>> > >> >>> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> > >> >>> > DelegatingMethodAccessorImpl.java:43)
>> > >> >>> >        at java.lang.reflect.Method.invoke(Method.java:615)
>> > >> >>> >        at  
>> org.apache.maven.surefire.junit.JUnitTestSet.execute(
>> > >> >>> > JUnitTestSet.java :210)
>> > >> >>> >        at
>> > >> >>> >
>> > >> >>>
>> > >>  
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTe
>> > >> >>> st
>> > >> >>> > Set(
>> > >> >>> > AbstractDirectoryTestSuite.java:135)
>> > >> >>> >        at
>> > >> >>> >
>> > >> >>>
>> > >>  
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute (
>> > >> >>> > AbstractDirectoryTestSuite.java:122)
>> > >> >>> >        at org.apache.maven.surefire.Surefire.run 
>> (Surefire.java:
>> > >> >>> 129)
>> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0 
>> (Native
>> > >> >>> Method)
>> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke(
>> > >> >>> > NativeMethodAccessorImpl.java :64)
>> > >> >>> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> > >> >>> > DelegatingMethodAccessorImpl.java:43)
>> > >> >>> >        at java.lang.reflect.Method.invoke (Method.java: 
>> 615)
>> > >> >>> >        at
>> > >> >>> >
>> > >> >>>
>> > >>  
>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
>> > >> >>> > SurefireBooter.java:225)
>> > >> >>> >        at  
>> org.apache.maven.surefire.booter.SurefireBooter.main(
>> > >> >>> > SurefireBooter.java:747)
>> > >> >>> >
>> > >> >>> > They seem to most often happen when I do a complete top- 
>> down
>> > >> build
>> > >> >>> > from the
>> > >> >>> > openjpa directory (mvn clean && mvn install) and let it
>> > >> >>> traverse the
>> > >> >>> > sub-projects.  This is from the command line (not  
>> Eclipse).
>> > >> >>> >
>> > >> >>> > I can immediately turn around and do a "mvn test" from the
>> > >> openjpa
>> > >> >>> > directory
>> > >> >>> > and everything tests out just fine.
>> > >> >>> >
>> > >> >>> > Any ideas on what is causing these type of errors?  I  
>> don't see
>> > >> >>> > anywhere in
>> > >> >>> > our code where we are producing these type of  
>> messages.  I'm
>> > >> not
>> > >> >>> > sure if
>> > >> >>> > it's related to one of our dependencies (serp?), or  
>> maybe it's
>> > >> >>> > another IBM
>> > >> >>> > JDK anomaly (haven't been able to reproduce with Sun  
>> yet, but
>> > >> >>> it is an
>> > >> >>> > intermittent problem).
>> > >> >>> >
>> > >> >>> > Thanks,
>> > >> >>> > Kevin
>> > >> >>>
>> > >> >>>
>> > >> >
>> > >> > 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: Strange, intermittent problem running the new models.company tests

Posted by Patrick Linskey <pl...@bea.com>.
I get different errors with the models.company tests (NPEs from Derby)
when running 'mvn package'.

Let's turn this question around. Does 'mvn clean package' work for
anyone?

-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: Kevin Sutter [mailto:kwsutter@gmail.com] 
> Sent: Thursday, February 15, 2007 9:30 AM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: Strange, intermittent problem running the new 
> models.company tests
> 
> I am still experiencing the same problem.  Am I the only one 
> having problems
> building and executing the tests?
> 
> I have a workaround that hasn't failed me yet...  I separate 
> the building
> from the testing.
> 
> From the top-level openjpa directory...
> 
> > mvn clean && mvn install -Dtest=false
> > mvn test
> 
> But, more often than not, if I don't include the 
> "-Dtest=false" stanza, the
> tests will fail as described earlier in this thread.
> 
> If nobody else is experiencing this, maybe it's a JDK thing 
> again.  I could
> try to reproduce with the Sun JDK.  Any other thoughts?
> 
> Kevin
> 
> On 2/12/07, Kevin Sutter <kw...@gmail.com> wrote:
> >
> > That clarification works for me...  ;-)
> >
> > On 2/12/07, Marc Prud'hommeaux <mp...@apache.org> wrote:
> > >
> > > Kevin-
> > >
> > > It could, but it would just be a spec compliance. OpenJPA 
> does allow
> > > you to have final classes. The spec just prohibits it 
> because one of
> > > the ways to implement support for property access is to 
> dynamically
> > > generate a subclass to the entity (which isn't possible 
> if the entity
> > > is final).
> > >
> > >
> > >
> > > On Feb 12, 2007, at 4:33 AM, Kevin Sutter wrote:
> > >
> > > > Marc (and others),
> > > > Shouldn't OpenJPA be detecting these final classes and 
> issuing an
> > > > error
> > > > message?
> > > >
> > > > Kevin
> > > >
> > > > On 2/12/07, Marc Prud'hommeaux < mprudhom@apache.org> wrote:
> > > >>
> > > >> Craig-
> > > >>
> > > >> You're right that the classes shouldn't be final, but 
> I don't think
> > > >> that's the cause of the problem.
> > > >>
> > > >> I've committed a fix to the final class issue, though. 
> Thanks for
> > > >> pointing it out.
> > > >>
> > > >>
> > > >>
> > > >> On Feb 10, 2007, at 10:07 PM, Craig L Russell wrote:
> > > >>
> > > >> > Hi Kevin,
> > > >> >
> > > >> > I don't know if it's relevant, but persistent 
> classes must not be
> > > >> > final. It seems that the entities in the 
> model.company packages are
> > >
> > > >> > (all) final, which is wrong. From spec 2.1, "The 
> entity class must
> > > >> > not be final. No methods or persistent instance 
> variables of the
> > > >> > entity class may be final. "
> > > >> >
> > > >> > The relevant part of the stack trace appears to be:
> > > >> >> Caused by: java.lang.NoSuchMethodException: 
> <unbound>=Class.create
> > > >> >> (Class);
> > > >> >>        at java.beans.Statement.invoke(Statement.java:269)
> > > >> >>        at <unknown class>.<unknown method>(Unknown Source)
> > > >> >>        at 
> com.sun.beans.ObjectHandler.eval(ObjectHandler.java:148)
> > > >> >>        at com.sun.beans.ObjectHandler.startElement
> > > >> >> (ObjectHandler.java:250)
> > > >> >>        at 
> org.apache.xerces.parsers.AbstractSAXParser.startElement
> > > >> >> (Unknown
> > > >> >> Source)
> > > >> >>        at 
> org.apache.xerces.impl.dtd.XMLDTDValidator.startElement
> > > >> >> (Unknown
> > > >> >
> > > >> > which sounds like an issue with the xerces parser. 
> Don't you hate
> > > >> > exceptions from parsers rather than error messages?
> > > >> >
> > > >> > Craig
> > > >> >
> > > >> > On Feb 10, 2007, at 8:08 PM, Kevin Sutter wrote:
> > > >> >
> > > >> >> Marc,
> > > >> >> It took a while to reproduce, but I finally got the 
> following...
> > > >> >> Does this
> > > >> >> help?  Thanks for your help!
> > > >> >>
> > > >> >> Kevin
> > > >> >>
> > > >> >> Running
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.TestProp
> > > >> >> ertyCompanyModel
> > > >> >> 0  test  INFO   [main] openjpa.Runtime - Starting 
> OpenJPA 0.0.0
> > > >> >> 0  test  INFO   [main] 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.DBDictionaryconfiguration property to 
> the appropriate
> > > >> >> value for your database (see the
> > > >> >> documentation foravailable values).
> > > >> >> 0  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary
> > > >> class "
> > > >> >> org.apache.openjpa.jdbc.sql.DerbyDictionary " (Apache Derby
> > > >> 10.2.2.0 -
> > > >> >> (485682) ,Apache Derby
> > > >> >> Embedded JDBC Driver 10.2.2.0 - (485682)).
> > > >> >> 10  test  INFO   [main] openjpa.MetaData - Found 10 
> classes with
> > > >> >> metadata in
> > > >> >> 0 milliseconds.
> > > >> >> 20  test  INFO   [main] openjpa.MetaData - Found 10 
> classes with
> > > >> >> metadata in
> > > >> >> 10 milliseconds.
> > > >> >> 20  test  INFO   [main] openjpa.MetaData - Parsing class "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
> > > >> >> .
> > > >> >> 20  test  INFO   [main] openjpa.MetaData - Parsing package "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
> > >
> > > >> >> .
> > > >> >> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
> > > >> >> .
> > > >> >> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.Address"
> > > >> >> .
> > > >> >> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.Employee
> > > >> >> ".
> > > >> >> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.Person".
> > > >> >> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.FullTime
> > > >> >> Employee
> > > >> >> ".
> > > >> >> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem
> > > >> >> ".
> > > >> >> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.ProductO
> > > >> >> rder".
> > > >> >> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.Customer
> > > >> >> ".
> > > >> >> 70  test  INFO   [main] openjpa.MetaData - Parsing class "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.PartTime
> > > >> >> Employee
> > > >> >> ".
> > > >> >> 70  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> > > >> >> information for
> > > >> >> schema name "null", table name "PRP_Address".
> > > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> > > >> >> information for
> > > >> >> schema name "null", table name "PRP_Company".
> > > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> > > >> >> information for
> > > >> >> schema name "null", table name "PRP_LineItem".
> > > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> > > >> >> information for
> > > >> >> schema name "null", table name "PRP_Person".
> > > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> > > >> >> information for
> > > >> >> schema name "null", table name "PRP_Product".
> > > >> >> 110  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> > > >> >> information for
> > > >> >> schema name "null", table name "PRP_ProductOrder".
> > > >> >> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> > > >> >> information for
> > > >> >> schema name "null", table name 
> "PRP_ProductOrder_PRP_LineItem".
> > > >> >> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> > > >> >> information for
> > > >> >> schema name "null", table name "PRP_Product_PRP_Company".
> > > >> >> 140  test  INFO   [main] openjpa.jdbc.Schema - 
> Reading sequence
> > > >> >> information
> > > >> >> for schema "null", sequence name "null".
> > > >> >> 3856  test  INFO   [main] openjpa.MetaData - Parsing class "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
> > > >> >> .
> > > >> >> 3856  test  INFO   [main] openjpa.MetaData - 
> Parsing package "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
> > > >> >> .
> > > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.Address"
> > > >> >> .
> > > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.Employee
> > > >> >> ".
> > > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.Person".
> > >
> > > >> >> 3876  test  INFO   [main] openjpa.MetaData - Parsing class "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
> > > >> >> .
> > > >> >> 3876  test  INFO   [main] openjpa.MetaData - Parsing class "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.FullTime
> > > >> >> Employee
> > > >> >> ".
> > > >> >> 3936  test  INFO   [main] openjpa.MetaData - Parsing class "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.ProductO
> > > >> >> rder".
> > > >> >> 3966  test  INFO   [main] openjpa.MetaData - Parsing class "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.Customer
> > > >> >> ".
> > > >> >> 3976  test  INFO   [main] openjpa.MetaData - Parsing class "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem
> > > >> >> ".
> > > >> >> 4026  test  INFO   [main] openjpa.MetaData - Parsing class "
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.PartTime
> > > >> >> Employee
> > > >> >> ".
> > > >> >> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, 
> Time elapsed:
> > > >> >> 4.336 sec
> > > >> >> <<< FAILURE!
> > > >> >> testBasicQueries(
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.TestProp
> > > >> >> ertyCompanyModel)
> > > >> >> Time elapsed: 4.326 sec  <<< ERROR!
> > > >> >> java.lang.IllegalStateException: 
> java.lang.NoSuchMethodException:
> > > >> >> <unbound>=
> > > >> >> Class.create (Class);
> > > >> >>        at
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkM
> > > >> >> odel(
> > > >> >> CompanyModelTest.java:194)
> > > >> >>        at
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp(
> > > >> >> CompanyModelTest.java:66)
> > > >> >>        at junit.framework.TestCase.runBare 
> (TestCase.java:125)
> > > >> >>        at 
> junit.framework.TestResult$1.protect(TestResult.java:
> > > >> 106)
> > > >> >>        at 
> junit.framework.TestResult.runProtected(TestResult.java:
> > > >> >> 124)
> > > >> >>        at 
> junit.framework.TestResult.run(TestResult.java:109)
> > > >> >>        at junit.framework.TestCase.run(TestCase.java:118)
> > > >> >>        at junit.framework.TestSuite.runTest 
> (TestSuite.java:208)
> > > >> >>        at junit.framework.TestSuite.run(TestSuite.java:203)
> > > >> >>        at 
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > >> Method)
> > > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke(
> > > >> >> NativeMethodAccessorImpl.java:64)
> > > >> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > > >> >> DelegatingMethodAccessorImpl.java :43)
> > > >> >>        at java.lang.reflect.Method.invoke(Method.java:615)
> > > >> >>        at 
> org.apache.maven.surefire.junit.JUnitTestSet.execute(
> > > >> >> JUnitTestSet.java:210)
> > > >> >>        at
> > > >> >>
> > > >> 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
> > > >> >> tSet(
> > > >> >> AbstractDirectoryTestSuite.java:135)
> > > >> >>        at
> > > >> >>
> > > >> 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
> > > >> >> AbstractDirectoryTestSuite.java:122)
> > > >> >>        at org.apache.maven.surefire.Surefire.run 
> (Surefire.java:
> > > >> 129)
> > > >> >>        at 
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > >> Method)
> > > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke(
> > > >> >> NativeMethodAccessorImpl.java:64)
> > > >> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > > >> >> DelegatingMethodAccessorImpl.java:43)
> > > >> >>        at java.lang.reflect.Method.invoke (Method.java:615)
> > > >> >>        at
> > > >> >>
> > > >> 
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> > > >> >> SurefireBooter.java:225)
> > > >> >>        at 
> org.apache.maven.surefire.booter.SurefireBooter.main(
> > > >> >> SurefireBooter.java:747)
> > > >> >> Caused by: java.lang.NoSuchMethodException: 
> <unbound>=Class.create
> > > >> >> (Class);
> > > >> >>        at java.beans.Statement.invoke(Statement.java:269)
> > > >> >>        at <unknown class>.<unknown method>(Unknown Source)
> > > >> >>        at com.sun.beans.ObjectHandler.eval 
> (ObjectHandler.java
> > > :148)
> > > >> >>        at com.sun.beans.ObjectHandler.startElement
> > > >> >> (ObjectHandler.java:250)
> > > >> >>        at 
> org.apache.xerces.parsers.AbstractSAXParser.startElement
> > > >> >> (Unknown
> > > >> >> Source)
> > > >> >>        at 
> org.apache.xerces.impl.dtd.XMLDTDValidator.startElement
> > > >> >> (Unknown
> > > >> >> Source)
> > > >> >>        at
> > > >> >>
> > > >> 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
> > > >> >> t(Unknown
> > > >> >> Source)
> > > >> >>        at
> > > >> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
> > > >> >> $FragmentContentDispatcher.dispatch(Unknown
> > > >> >> Source)
> > > >> >>        at
> > > >> >> 
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
> > > >> >> (Unknown
> > > >> >> Source)
> > > >> >>        at 
> org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> > > >> >> Source)
> > > >> >>        at 
> org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> > > >> >> Source)
> > > >> >>        at org.apache.xerces.parsers.XMLParser.parse(Unknown
> > > >> Source)
> > > >> >>        at org.apache.xerces.parsers.AbstractSAXParser.parse
> > > >> >> (Unknown Source)
> > > >> >>        at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown
> > > >> Source)
> > > >> >>        at javax.xml.parsers.SAXParser.parse(Unknown Source)
> > > >> >>        at 
> java.beans.XMLDecoder.readObject(XMLDecoder.java:220)
> > > >> >>        at
> > > >> >>
> > > >> 
> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkM
> > > >> >> odel(
> > > >> >> CompanyModelTest.java:191)
> > > >> >>        ... 22 more
> > > >> >>
> > > >> >>
> > > >> >> On 2/10/07, Marc Prud'hommeaux < mprudhom@apache.org> wrote:
> > > >> >>>
> > > >> >>> Kevin-
> > > >> >>>
> > > >> >>> Weird. From the error message, it looks like there is some
> > > >> problem
> > > >> >>> with deserializing the default model from the 
> companies.xml file
> > > >> >>> from
> > > >> >>> the XMLDecoder.
> > > >> >>>
> > > >> >>> I've put some extra debugging logic in the 
> CompanyModelTest.java
> > > >> >>> that
> > > >> >>> should throw a better error when the deserialization fails.
> > > >> Can you
> > > >> >>> update and re-run the test and let us know if the 
> stack trace
> > > >> >>> changes?
> > > >> >>>
> > > >> >>>
> > > >> >>>
> > > >> >>> On Feb 10, 2007, at 6:21 PM, Kevin Sutter wrote:
> > > >> >>>
> > > >> >>> > Hi,
> > > >> >>> > After synching up with the latest changes in SVN, I am
> > > >> hitting an
> > > >> >>> > intermittent problem while running the new tests in
> > > >> >>> > openjpa-persistence-jdbc.  Every once in a 
> while, I am getting
> > > >> >>> > hundreds of
> > > >> >>> > messsages like the following:
> > > >> >>> >
> > > >> >>> > Running
> > > >> >>> >
> > > >> >>>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro
> > > >> >>> pe
> > > >> >>> > rtyCompanyModel
> > > >> >>> > 0  test  INFO   [main] openjpa.Runtime - 
> Starting OpenJPA 0.0.0
> > > >> >>> > 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the
> > > >> appropriate
> > > >> >>> > value for your database (see the
> > > >> >>> > documentation foravailable values).
> > > >> >>> > 10  test  INFO   [main] openjpa.jdbc.JDBC - 
> Using dictionary
> > > >> >>> class "
> > > >> >>> > org.apache.openjpa.jdbc.sql.DerbyDictionary" 
> (Apache Derby
> > > >> >>> 10.2.2.0 -
> > > >> >>> > (485682) ,Apache Derby Embedded JDBC Driver 10.2.2.0 -
> > > >> (485682)).
> > > >> >>> > 20  test  INFO   [main] openjpa.MetaData - Found 
> 10 classes
> > > >> with
> > > >> >>> > metadata in
> > > >> >>> > 0 milliseconds.
> > > >> >>> > :
> > > >> >>> > :
> > > >> >>> > 4046  test  INFO   [main] openjpa.MetaData - 
> Parsing class "
> > > >> >>> >
> > > >> >>>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.LineIte
> > > >> >>> m"
> > > >> >>> > .
> > > >> >>> > java.lang.NoSuchMethodException: 
> <unbound>=Class.create(Class);
> > > >> >>> > Continuing ...
> > > >> >>> > java.lang.NullPointerException: target should not be null
> > > >> >>> > Continuing ...
> > > >> >>> > java.lang.NoSuchMethodException: 
> <unbound>=Class.create(Class);
> > > >> >>> > Continuing ...
> > > >> >>> > java.lang.NullPointerException: target should not be null
> > > >> >>> > Continuing ...
> > > >> >>> > java.lang.NoSuchMethodException: 
> <unbound>=Class.create(Class);
> > > >> >>> > Continuing ...
> > > >> >>> > java.lang.NullPointerException: target should not be null
> > > >> >>> > Continuing ...
> > > >> >>> > java.lang.NoSuchMethodException: 
> <unbound>=Class.create(Class);
> > > >> >>> > Continuing ...
> > > >> >>> > java.lang.NullPointerException: target should not be null
> > > >> >>> > Continuing ...
> > > >> >>> > java.lang.NoSuchMethodException : <unbound>=Class.create
> > > (Class);
> > > >> >>> > Continuing ...
> > > >> >>> > :
> > > >> >>> > :   <these type of messages continue -- several 
> dozen repeats>
> > > >> >>> > :
> > > >> >>> > Tests run: 1, Failures: 1, Errors: 0, Skipped: 
> 0, Time elapsed:
> > > >> >>> > 4.346 sec
> > > >> >>> > <<< FAILURE!
> > > >> >>> > testBasicQueries(
> > > >> >>> >
> > > >> >>>
> > > >> 
> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro
> > > >> >>> pe
> > > >> >>> > rtyCompanyModel)
> > > >> >>> > Time elapsed: 4.336 sec  <<< FAILURE!
> > > >> >>> > junit.framework.AssertionFailedError: 
> expected:<2> but was:<0>
> > > >> >>> >        at junit.framework.Assert.fail(Assert.java:47)
> > > >> >>> >        at 
> junit.framework.Assert.failNotEquals(Assert.java:282)
> > > >> >>> >        at 
> junit.framework.Assert.assertEquals(Assert.java:64)
> > > >> >>> >        at 
> junit.framework.Assert.assertEquals(Assert.java:201)
> > > >> >>> >        at 
> junit.framework.Assert.assertEquals(Assert.java:207)
> > > >> >>> >        at
> > > >> >>> >
> > > >> >>>
> > > >> 
> org.apache.openjpa.persistence.models.company.CompanyModelTest.verif
> > > >> >>> yM
> > > >> >>> > odel(
> > > >> >>> > CompanyModelTest.java:211)
> > > >> >>> >        at
> > > >> >>> >
> > > >> >>>
> > > >> 
> org.apache.openjpa.persistence.models.company.CompanyModelTest.check
> > > >> >>> Mo
> > > >> >>> > del(
> > > >> >>> > CompanyModelTest.java:195)
> > > >> >>> >        at
> > > >> >>> >
> > > >> >>>
> > > >> 
> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp
> > > >> >>> (
> > > >> >>> > CompanyModelTest.java:66)
> > > >> >>> >        at 
> junit.framework.TestCase.runBare(TestCase.java:125)
> > > >> >>> >        at junit.framework.TestResult$1.protect 
> (TestResult.java
> > > :
> > > >> >>> 106)
> > > >> >>> >        at junit.framework.TestResult.runProtected
> > > >> >>> (TestResult.java:124)
> > > >> >>> >        at junit.framework.TestResult.run 
> (TestResult.java:109)
> > > >> >>> >        at junit.framework.TestCase.run(TestCase.java:118)
> > > >> >>> >        at 
> junit.framework.TestSuite.runTest(TestSuite.java:208)
> > > >> >>> >        at 
> junit.framework.TestSuite.run(TestSuite.java:203)
> > > >> >>> >        at 
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > >> >>> Method)
> > > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke (
> > > >> >>> > NativeMethodAccessorImpl.java:64)
> > > >> >>> >        at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > > >> >>> > DelegatingMethodAccessorImpl.java:43)
> > > >> >>> >        at 
> java.lang.reflect.Method.invoke(Method.java:615)
> > > >> >>> >        at 
> org.apache.maven.surefire.junit.JUnitTestSet.execute(
> > > >> >>> > JUnitTestSet.java :210)
> > > >> >>> >        at
> > > >> >>> >
> > > >> >>>
> > > >> 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTe
> > > >> >>> st
> > > >> >>> > Set(
> > > >> >>> > AbstractDirectoryTestSuite.java:135)
> > > >> >>> >        at
> > > >> >>> >
> > > >> >>>
> > > >> 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute (
> > > >> >>> > AbstractDirectoryTestSuite.java:122)
> > > >> >>> >        at 
> org.apache.maven.surefire.Surefire.run(Surefire.java:
> > > >> >>> 129)
> > > >> >>> >        at 
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > >> >>> Method)
> > > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke(
> > > >> >>> > NativeMethodAccessorImpl.java :64)
> > > >> >>> >        at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > > >> >>> > DelegatingMethodAccessorImpl.java:43)
> > > >> >>> >        at java.lang.reflect.Method.invoke 
> (Method.java:615)
> > > >> >>> >        at
> > > >> >>> >
> > > >> >>>
> > > >> 
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> > > >> >>> > SurefireBooter.java:225)
> > > >> >>> >        at 
> org.apache.maven.surefire.booter.SurefireBooter.main(
> > > >> >>> > SurefireBooter.java:747)
> > > >> >>> >
> > > >> >>> > They seem to most often happen when I do a 
> complete top-down
> > > >> build
> > > >> >>> > from the
> > > >> >>> > openjpa directory (mvn clean && mvn install) and let it
> > > >> >>> traverse the
> > > >> >>> > sub-projects.  This is from the command line 
> (not Eclipse).
> > > >> >>> >
> > > >> >>> > I can immediately turn around and do a "mvn 
> test" from the
> > > >> openjpa
> > > >> >>> > directory
> > > >> >>> > and everything tests out just fine.
> > > >> >>> >
> > > >> >>> > Any ideas on what is causing these type of 
> errors?  I don't see
> > > >> >>> > anywhere in
> > > >> >>> > our code where we are producing these type of 
> messages.  I'm
> > > >> not
> > > >> >>> > sure if
> > > >> >>> > it's related to one of our dependencies (serp?), 
> or maybe it's
> > > >> >>> > another IBM
> > > >> >>> > JDK anomaly (haven't been able to reproduce with 
> Sun yet, but
> > > >> >>> it is an
> > > >> >>> > intermittent problem).
> > > >> >>> >
> > > >> >>> > Thanks,
> > > >> >>> > Kevin
> > > >> >>>
> > > >> >>>
> > > >> >
> > > >> > 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: Strange, intermittent problem running the new models.company tests

Posted by Kevin Sutter <kw...@gmail.com>.
I am still experiencing the same problem.  Am I the only one having problems
building and executing the tests?

I have a workaround that hasn't failed me yet...  I separate the building
from the testing.

>From the top-level openjpa directory...

> mvn clean && mvn install -Dtest=false
> mvn test

But, more often than not, if I don't include the "-Dtest=false" stanza, the
tests will fail as described earlier in this thread.

If nobody else is experiencing this, maybe it's a JDK thing again.  I could
try to reproduce with the Sun JDK.  Any other thoughts?

Kevin

On 2/12/07, Kevin Sutter <kw...@gmail.com> wrote:
>
> That clarification works for me...  ;-)
>
> On 2/12/07, Marc Prud'hommeaux <mp...@apache.org> wrote:
> >
> > Kevin-
> >
> > It could, but it would just be a spec compliance. OpenJPA does allow
> > you to have final classes. The spec just prohibits it because one of
> > the ways to implement support for property access is to dynamically
> > generate a subclass to the entity (which isn't possible if the entity
> > is final).
> >
> >
> >
> > On Feb 12, 2007, at 4:33 AM, Kevin Sutter wrote:
> >
> > > Marc (and others),
> > > Shouldn't OpenJPA be detecting these final classes and issuing an
> > > error
> > > message?
> > >
> > > Kevin
> > >
> > > On 2/12/07, Marc Prud'hommeaux < mprudhom@apache.org> wrote:
> > >>
> > >> Craig-
> > >>
> > >> You're right that the classes shouldn't be final, but I don't think
> > >> that's the cause of the problem.
> > >>
> > >> I've committed a fix to the final class issue, though. Thanks for
> > >> pointing it out.
> > >>
> > >>
> > >>
> > >> On Feb 10, 2007, at 10:07 PM, Craig L Russell wrote:
> > >>
> > >> > Hi Kevin,
> > >> >
> > >> > I don't know if it's relevant, but persistent classes must not be
> > >> > final. It seems that the entities in the model.company packages are
> >
> > >> > (all) final, which is wrong. From spec 2.1, "The entity class must
> > >> > not be final. No methods or persistent instance variables of the
> > >> > entity class may be final. "
> > >> >
> > >> > The relevant part of the stack trace appears to be:
> > >> >> Caused by: java.lang.NoSuchMethodException: <unbound>=Class.create
> > >> >> (Class);
> > >> >>        at java.beans.Statement.invoke(Statement.java:269)
> > >> >>        at <unknown class>.<unknown method>(Unknown Source)
> > >> >>        at com.sun.beans.ObjectHandler.eval(ObjectHandler.java:148)
> > >> >>        at com.sun.beans.ObjectHandler.startElement
> > >> >> (ObjectHandler.java:250)
> > >> >>        at org.apache.xerces.parsers.AbstractSAXParser.startElement
> > >> >> (Unknown
> > >> >> Source)
> > >> >>        at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement
> > >> >> (Unknown
> > >> >
> > >> > which sounds like an issue with the xerces parser. Don't you hate
> > >> > exceptions from parsers rather than error messages?
> > >> >
> > >> > Craig
> > >> >
> > >> > On Feb 10, 2007, at 8:08 PM, Kevin Sutter wrote:
> > >> >
> > >> >> Marc,
> > >> >> It took a while to reproduce, but I finally got the following...
> > >> >> Does this
> > >> >> help?  Thanks for your help!
> > >> >>
> > >> >> Kevin
> > >> >>
> > >> >> Running
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.TestProp
> > >> >> ertyCompanyModel
> > >> >> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 0.0.0
> > >> >> 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the appropriate
> > >> >> value for your database (see the
> > >> >> documentation foravailable values).
> > >> >> 0  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary
> > >> class "
> > >> >> org.apache.openjpa.jdbc.sql.DerbyDictionary " (Apache Derby
> > >> 10.2.2.0 -
> > >> >> (485682) ,Apache Derby
> > >> >> Embedded JDBC Driver 10.2.2.0 - (485682)).
> > >> >> 10  test  INFO   [main] openjpa.MetaData - Found 10 classes with
> > >> >> metadata in
> > >> >> 0 milliseconds.
> > >> >> 20  test  INFO   [main] openjpa.MetaData - Found 10 classes with
> > >> >> metadata in
> > >> >> 10 milliseconds.
> > >> >> 20  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
> > >> >> .
> > >> >> 20  test  INFO   [main] openjpa.MetaData - Parsing package "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
> >
> > >> >> .
> > >> >> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
> > >> >> .
> > >> >> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.Address"
> > >> >> .
> > >> >> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.Employee
> > >> >> ".
> > >> >> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.Person".
> > >> >> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.FullTime
> > >> >> Employee
> > >> >> ".
> > >> >> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem
> > >> >> ".
> > >> >> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.ProductO
> > >> >> rder".
> > >> >> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.Customer
> > >> >> ".
> > >> >> 70  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.PartTime
> > >> >> Employee
> > >> >> ".
> > >> >> 70  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> > >> >> information for
> > >> >> schema name "null", table name "PRP_Address".
> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> > >> >> information for
> > >> >> schema name "null", table name "PRP_Company".
> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> > >> >> information for
> > >> >> schema name "null", table name "PRP_LineItem".
> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> > >> >> information for
> > >> >> schema name "null", table name "PRP_Person".
> > >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> > >> >> information for
> > >> >> schema name "null", table name "PRP_Product".
> > >> >> 110  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> > >> >> information for
> > >> >> schema name "null", table name "PRP_ProductOrder".
> > >> >> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> > >> >> information for
> > >> >> schema name "null", table name "PRP_ProductOrder_PRP_LineItem".
> > >> >> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> > >> >> information for
> > >> >> schema name "null", table name "PRP_Product_PRP_Company".
> > >> >> 140  test  INFO   [main] openjpa.jdbc.Schema - Reading sequence
> > >> >> information
> > >> >> for schema "null", sequence name "null".
> > >> >> 3856  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
> > >> >> .
> > >> >> 3856  test  INFO   [main] openjpa.MetaData - Parsing package "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
> > >> >> .
> > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.Address"
> > >> >> .
> > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.Employee
> > >> >> ".
> > >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.Person".
> >
> > >> >> 3876  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
> > >> >> .
> > >> >> 3876  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.FullTime
> > >> >> Employee
> > >> >> ".
> > >> >> 3936  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.ProductO
> > >> >> rder".
> > >> >> 3966  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.Customer
> > >> >> ".
> > >> >> 3976  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem
> > >> >> ".
> > >> >> 4026  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.PartTime
> > >> >> Employee
> > >> >> ".
> > >> >> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed:
> > >> >> 4.336 sec
> > >> >> <<< FAILURE!
> > >> >> testBasicQueries(
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.TestProp
> > >> >> ertyCompanyModel)
> > >> >> Time elapsed: 4.326 sec  <<< ERROR!
> > >> >> java.lang.IllegalStateException: java.lang.NoSuchMethodException:
> > >> >> <unbound>=
> > >> >> Class.create (Class);
> > >> >>        at
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkM
> > >> >> odel(
> > >> >> CompanyModelTest.java:194)
> > >> >>        at
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp(
> > >> >> CompanyModelTest.java:66)
> > >> >>        at junit.framework.TestCase.runBare (TestCase.java:125)
> > >> >>        at junit.framework.TestResult$1.protect(TestResult.java:
> > >> 106)
> > >> >>        at junit.framework.TestResult.runProtected(TestResult.java:
> > >> >> 124)
> > >> >>        at junit.framework.TestResult.run(TestResult.java:109)
> > >> >>        at junit.framework.TestCase.run(TestCase.java:118)
> > >> >>        at junit.framework.TestSuite.runTest (TestSuite.java:208)
> > >> >>        at junit.framework.TestSuite.run(TestSuite.java:203)
> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > >> Method)
> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke(
> > >> >> NativeMethodAccessorImpl.java:64)
> > >> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > >> >> DelegatingMethodAccessorImpl.java :43)
> > >> >>        at java.lang.reflect.Method.invoke(Method.java:615)
> > >> >>        at org.apache.maven.surefire.junit.JUnitTestSet.execute(
> > >> >> JUnitTestSet.java:210)
> > >> >>        at
> > >> >>
> > >> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
> > >> >> tSet(
> > >> >> AbstractDirectoryTestSuite.java:135)
> > >> >>        at
> > >> >>
> > >> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
> > >> >> AbstractDirectoryTestSuite.java:122)
> > >> >>        at org.apache.maven.surefire.Surefire.run (Surefire.java:
> > >> 129)
> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > >> Method)
> > >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke(
> > >> >> NativeMethodAccessorImpl.java:64)
> > >> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > >> >> DelegatingMethodAccessorImpl.java:43)
> > >> >>        at java.lang.reflect.Method.invoke (Method.java:615)
> > >> >>        at
> > >> >>
> > >> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> > >> >> SurefireBooter.java:225)
> > >> >>        at org.apache.maven.surefire.booter.SurefireBooter.main(
> > >> >> SurefireBooter.java:747)
> > >> >> Caused by: java.lang.NoSuchMethodException: <unbound>=Class.create
> > >> >> (Class);
> > >> >>        at java.beans.Statement.invoke(Statement.java:269)
> > >> >>        at <unknown class>.<unknown method>(Unknown Source)
> > >> >>        at com.sun.beans.ObjectHandler.eval (ObjectHandler.java
> > :148)
> > >> >>        at com.sun.beans.ObjectHandler.startElement
> > >> >> (ObjectHandler.java:250)
> > >> >>        at org.apache.xerces.parsers.AbstractSAXParser.startElement
> > >> >> (Unknown
> > >> >> Source)
> > >> >>        at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement
> > >> >> (Unknown
> > >> >> Source)
> > >> >>        at
> > >> >>
> > >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
> > >> >> t(Unknown
> > >> >> Source)
> > >> >>        at
> > >> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
> > >> >> $FragmentContentDispatcher.dispatch(Unknown
> > >> >> Source)
> > >> >>        at
> > >> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
> > >> >> (Unknown
> > >> >> Source)
> > >> >>        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> > >> >> Source)
> > >> >>        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> > >> >> Source)
> > >> >>        at org.apache.xerces.parsers.XMLParser.parse(Unknown
> > >> Source)
> > >> >>        at org.apache.xerces.parsers.AbstractSAXParser.parse
> > >> >> (Unknown Source)
> > >> >>        at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown
> > >> Source)
> > >> >>        at javax.xml.parsers.SAXParser.parse(Unknown Source)
> > >> >>        at java.beans.XMLDecoder.readObject(XMLDecoder.java:220)
> > >> >>        at
> > >> >>
> > >> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkM
> > >> >> odel(
> > >> >> CompanyModelTest.java:191)
> > >> >>        ... 22 more
> > >> >>
> > >> >>
> > >> >> On 2/10/07, Marc Prud'hommeaux < mprudhom@apache.org> wrote:
> > >> >>>
> > >> >>> Kevin-
> > >> >>>
> > >> >>> Weird. From the error message, it looks like there is some
> > >> problem
> > >> >>> with deserializing the default model from the companies.xml file
> > >> >>> from
> > >> >>> the XMLDecoder.
> > >> >>>
> > >> >>> I've put some extra debugging logic in the CompanyModelTest.java
> > >> >>> that
> > >> >>> should throw a better error when the deserialization fails.
> > >> Can you
> > >> >>> update and re-run the test and let us know if the stack trace
> > >> >>> changes?
> > >> >>>
> > >> >>>
> > >> >>>
> > >> >>> On Feb 10, 2007, at 6:21 PM, Kevin Sutter wrote:
> > >> >>>
> > >> >>> > Hi,
> > >> >>> > After synching up with the latest changes in SVN, I am
> > >> hitting an
> > >> >>> > intermittent problem while running the new tests in
> > >> >>> > openjpa-persistence-jdbc.  Every once in a while, I am getting
> > >> >>> > hundreds of
> > >> >>> > messsages like the following:
> > >> >>> >
> > >> >>> > Running
> > >> >>> >
> > >> >>>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro
> > >> >>> pe
> > >> >>> > rtyCompanyModel
> > >> >>> > 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 0.0.0
> > >> >>> > 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the
> > >> appropriate
> > >> >>> > value for your database (see the
> > >> >>> > documentation foravailable values).
> > >> >>> > 10  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary
> > >> >>> class "
> > >> >>> > org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby
> > >> >>> 10.2.2.0 -
> > >> >>> > (485682) ,Apache Derby Embedded JDBC Driver 10.2.2.0 -
> > >> (485682)).
> > >> >>> > 20  test  INFO   [main] openjpa.MetaData - Found 10 classes
> > >> with
> > >> >>> > metadata in
> > >> >>> > 0 milliseconds.
> > >> >>> > :
> > >> >>> > :
> > >> >>> > 4046  test  INFO   [main] openjpa.MetaData - Parsing class "
> > >> >>> >
> > >> >>>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.LineIte
> > >> >>> m"
> > >> >>> > .
> > >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> > >> >>> > Continuing ...
> > >> >>> > java.lang.NullPointerException: target should not be null
> > >> >>> > Continuing ...
> > >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> > >> >>> > Continuing ...
> > >> >>> > java.lang.NullPointerException: target should not be null
> > >> >>> > Continuing ...
> > >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> > >> >>> > Continuing ...
> > >> >>> > java.lang.NullPointerException: target should not be null
> > >> >>> > Continuing ...
> > >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> > >> >>> > Continuing ...
> > >> >>> > java.lang.NullPointerException: target should not be null
> > >> >>> > Continuing ...
> > >> >>> > java.lang.NoSuchMethodException : <unbound>=Class.create
> > (Class);
> > >> >>> > Continuing ...
> > >> >>> > :
> > >> >>> > :   <these type of messages continue -- several dozen repeats>
> > >> >>> > :
> > >> >>> > Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
> > >> >>> > 4.346 sec
> > >> >>> > <<< FAILURE!
> > >> >>> > testBasicQueries(
> > >> >>> >
> > >> >>>
> > >> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro
> > >> >>> pe
> > >> >>> > rtyCompanyModel)
> > >> >>> > Time elapsed: 4.336 sec  <<< FAILURE!
> > >> >>> > junit.framework.AssertionFailedError: expected:<2> but was:<0>
> > >> >>> >        at junit.framework.Assert.fail(Assert.java:47)
> > >> >>> >        at junit.framework.Assert.failNotEquals(Assert.java:282)
> > >> >>> >        at junit.framework.Assert.assertEquals(Assert.java:64)
> > >> >>> >        at junit.framework.Assert.assertEquals(Assert.java:201)
> > >> >>> >        at junit.framework.Assert.assertEquals(Assert.java:207)
> > >> >>> >        at
> > >> >>> >
> > >> >>>
> > >> org.apache.openjpa.persistence.models.company.CompanyModelTest.verif
> > >> >>> yM
> > >> >>> > odel(
> > >> >>> > CompanyModelTest.java:211)
> > >> >>> >        at
> > >> >>> >
> > >> >>>
> > >> org.apache.openjpa.persistence.models.company.CompanyModelTest.check
> > >> >>> Mo
> > >> >>> > del(
> > >> >>> > CompanyModelTest.java:195)
> > >> >>> >        at
> > >> >>> >
> > >> >>>
> > >> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp
> > >> >>> (
> > >> >>> > CompanyModelTest.java:66)
> > >> >>> >        at junit.framework.TestCase.runBare(TestCase.java:125)
> > >> >>> >        at junit.framework.TestResult$1.protect (TestResult.java
> > :
> > >> >>> 106)
> > >> >>> >        at junit.framework.TestResult.runProtected
> > >> >>> (TestResult.java:124)
> > >> >>> >        at junit.framework.TestResult.run (TestResult.java:109)
> > >> >>> >        at junit.framework.TestCase.run(TestCase.java:118)
> > >> >>> >        at junit.framework.TestSuite.runTest(TestSuite.java:208)
> > >> >>> >        at junit.framework.TestSuite.run(TestSuite.java:203)
> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > >> >>> Method)
> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke (
> > >> >>> > NativeMethodAccessorImpl.java:64)
> > >> >>> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > >> >>> > DelegatingMethodAccessorImpl.java:43)
> > >> >>> >        at java.lang.reflect.Method.invoke(Method.java:615)
> > >> >>> >        at org.apache.maven.surefire.junit.JUnitTestSet.execute(
> > >> >>> > JUnitTestSet.java :210)
> > >> >>> >        at
> > >> >>> >
> > >> >>>
> > >> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTe
> > >> >>> st
> > >> >>> > Set(
> > >> >>> > AbstractDirectoryTestSuite.java:135)
> > >> >>> >        at
> > >> >>> >
> > >> >>>
> > >> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute (
> > >> >>> > AbstractDirectoryTestSuite.java:122)
> > >> >>> >        at org.apache.maven.surefire.Surefire.run(Surefire.java:
> > >> >>> 129)
> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > >> >>> Method)
> > >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke(
> > >> >>> > NativeMethodAccessorImpl.java :64)
> > >> >>> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > >> >>> > DelegatingMethodAccessorImpl.java:43)
> > >> >>> >        at java.lang.reflect.Method.invoke (Method.java:615)
> > >> >>> >        at
> > >> >>> >
> > >> >>>
> > >> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> > >> >>> > SurefireBooter.java:225)
> > >> >>> >        at org.apache.maven.surefire.booter.SurefireBooter.main(
> > >> >>> > SurefireBooter.java:747)
> > >> >>> >
> > >> >>> > They seem to most often happen when I do a complete top-down
> > >> build
> > >> >>> > from the
> > >> >>> > openjpa directory (mvn clean && mvn install) and let it
> > >> >>> traverse the
> > >> >>> > sub-projects.  This is from the command line (not Eclipse).
> > >> >>> >
> > >> >>> > I can immediately turn around and do a "mvn test" from the
> > >> openjpa
> > >> >>> > directory
> > >> >>> > and everything tests out just fine.
> > >> >>> >
> > >> >>> > Any ideas on what is causing these type of errors?  I don't see
> > >> >>> > anywhere in
> > >> >>> > our code where we are producing these type of messages.  I'm
> > >> not
> > >> >>> > sure if
> > >> >>> > it's related to one of our dependencies (serp?), or maybe it's
> > >> >>> > another IBM
> > >> >>> > JDK anomaly (haven't been able to reproduce with Sun yet, but
> > >> >>> it is an
> > >> >>> > intermittent problem).
> > >> >>> >
> > >> >>> > Thanks,
> > >> >>> > Kevin
> > >> >>>
> > >> >>>
> > >> >
> > >> > 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: Strange, intermittent problem running the new models.company tests

Posted by Kevin Sutter <kw...@gmail.com>.
That clarification works for me...  ;-)

On 2/12/07, Marc Prud'hommeaux <mp...@apache.org> wrote:
>
> Kevin-
>
> It could, but it would just be a spec compliance. OpenJPA does allow
> you to have final classes. The spec just prohibits it because one of
> the ways to implement support for property access is to dynamically
> generate a subclass to the entity (which isn't possible if the entity
> is final).
>
>
>
> On Feb 12, 2007, at 4:33 AM, Kevin Sutter wrote:
>
> > Marc (and others),
> > Shouldn't OpenJPA be detecting these final classes and issuing an
> > error
> > message?
> >
> > Kevin
> >
> > On 2/12/07, Marc Prud'hommeaux <mp...@apache.org> wrote:
> >>
> >> Craig-
> >>
> >> You're right that the classes shouldn't be final, but I don't think
> >> that's the cause of the problem.
> >>
> >> I've committed a fix to the final class issue, though. Thanks for
> >> pointing it out.
> >>
> >>
> >>
> >> On Feb 10, 2007, at 10:07 PM, Craig L Russell wrote:
> >>
> >> > Hi Kevin,
> >> >
> >> > I don't know if it's relevant, but persistent classes must not be
> >> > final. It seems that the entities in the model.company packages are
> >> > (all) final, which is wrong. From spec 2.1, "The entity class must
> >> > not be final. No methods or persistent instance variables of the
> >> > entity class may be final. "
> >> >
> >> > The relevant part of the stack trace appears to be:
> >> >> Caused by: java.lang.NoSuchMethodException: <unbound>=Class.create
> >> >> (Class);
> >> >>        at java.beans.Statement.invoke(Statement.java:269)
> >> >>        at <unknown class>.<unknown method>(Unknown Source)
> >> >>        at com.sun.beans.ObjectHandler.eval(ObjectHandler.java:148)
> >> >>        at com.sun.beans.ObjectHandler.startElement
> >> >> (ObjectHandler.java:250)
> >> >>        at org.apache.xerces.parsers.AbstractSAXParser.startElement
> >> >> (Unknown
> >> >> Source)
> >> >>        at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement
> >> >> (Unknown
> >> >
> >> > which sounds like an issue with the xerces parser. Don't you hate
> >> > exceptions from parsers rather than error messages?
> >> >
> >> > Craig
> >> >
> >> > On Feb 10, 2007, at 8:08 PM, Kevin Sutter wrote:
> >> >
> >> >> Marc,
> >> >> It took a while to reproduce, but I finally got the following...
> >> >> Does this
> >> >> help?  Thanks for your help!
> >> >>
> >> >> Kevin
> >> >>
> >> >> Running
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.TestProp
> >> >> ertyCompanyModel
> >> >> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 0.0.0
> >> >> 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the appropriate
> >> >> value for your database (see the
> >> >> documentation foravailable values).
> >> >> 0  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary
> >> class "
> >> >> org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby
> >> 10.2.2.0 -
> >> >> (485682) ,Apache Derby
> >> >> Embedded JDBC Driver 10.2.2.0 - (485682)).
> >> >> 10  test  INFO   [main] openjpa.MetaData - Found 10 classes with
> >> >> metadata in
> >> >> 0 milliseconds.
> >> >> 20  test  INFO   [main] openjpa.MetaData - Found 10 classes with
> >> >> metadata in
> >> >> 10 milliseconds.
> >> >> 20  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
> >> >> .
> >> >> 20  test  INFO   [main] openjpa.MetaData - Parsing package "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
> >> >> .
> >> >> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
> >> >> .
> >> >> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Address"
> >> >> .
> >> >> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Employee
> >> >> ".
> >> >> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Person".
> >> >> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.FullTime
> >> >> Employee
> >> >> ".
> >> >> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem
> >> >> ".
> >> >> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.ProductO
> >> >> rder".
> >> >> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Customer
> >> >> ".
> >> >> 70  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.PartTime
> >> >> Employee
> >> >> ".
> >> >> 70  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> >> information for
> >> >> schema name "null", table name "PRP_Address".
> >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> >> information for
> >> >> schema name "null", table name "PRP_Company".
> >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> >> information for
> >> >> schema name "null", table name "PRP_LineItem".
> >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> >> information for
> >> >> schema name "null", table name "PRP_Person".
> >> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> >> information for
> >> >> schema name "null", table name "PRP_Product".
> >> >> 110  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> >> information for
> >> >> schema name "null", table name "PRP_ProductOrder".
> >> >> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> >> information for
> >> >> schema name "null", table name "PRP_ProductOrder_PRP_LineItem".
> >> >> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> >> information for
> >> >> schema name "null", table name "PRP_Product_PRP_Company".
> >> >> 140  test  INFO   [main] openjpa.jdbc.Schema - Reading sequence
> >> >> information
> >> >> for schema "null", sequence name "null".
> >> >> 3856  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
> >> >> .
> >> >> 3856  test  INFO   [main] openjpa.MetaData - Parsing package "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
> >> >> .
> >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Address"
> >> >> .
> >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Employee
> >> >> ".
> >> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Person".
> >> >> 3876  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
> >> >> .
> >> >> 3876  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.FullTime
> >> >> Employee
> >> >> ".
> >> >> 3936  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.ProductO
> >> >> rder".
> >> >> 3966  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Customer
> >> >> ".
> >> >> 3976  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem
> >> >> ".
> >> >> 4026  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.PartTime
> >> >> Employee
> >> >> ".
> >> >> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed:
> >> >> 4.336 sec
> >> >> <<< FAILURE!
> >> >> testBasicQueries(
> >> >>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.TestProp
> >> >> ertyCompanyModel)
> >> >> Time elapsed: 4.326 sec  <<< ERROR!
> >> >> java.lang.IllegalStateException: java.lang.NoSuchMethodException:
> >> >> <unbound>=
> >> >> Class.create(Class);
> >> >>        at
> >> >>
> >> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkM
> >> >> odel(
> >> >> CompanyModelTest.java:194)
> >> >>        at
> >> >>
> >> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp(
> >> >> CompanyModelTest.java:66)
> >> >>        at junit.framework.TestCase.runBare(TestCase.java:125)
> >> >>        at junit.framework.TestResult$1.protect(TestResult.java:
> >> 106)
> >> >>        at junit.framework.TestResult.runProtected(TestResult.java:
> >> >> 124)
> >> >>        at junit.framework.TestResult.run(TestResult.java:109)
> >> >>        at junit.framework.TestCase.run(TestCase.java:118)
> >> >>        at junit.framework.TestSuite.runTest(TestSuite.java:208)
> >> >>        at junit.framework.TestSuite.run(TestSuite.java:203)
> >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >> Method)
> >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke(
> >> >> NativeMethodAccessorImpl.java:64)
> >> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >> >> DelegatingMethodAccessorImpl.java:43)
> >> >>        at java.lang.reflect.Method.invoke(Method.java:615)
> >> >>        at org.apache.maven.surefire.junit.JUnitTestSet.execute(
> >> >> JUnitTestSet.java:210)
> >> >>        at
> >> >>
> >> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
> >> >> tSet(
> >> >> AbstractDirectoryTestSuite.java:135)
> >> >>        at
> >> >>
> >> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
> >> >> AbstractDirectoryTestSuite.java:122)
> >> >>        at org.apache.maven.surefire.Surefire.run(Surefire.java:
> >> 129)
> >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >> Method)
> >> >>        at sun.reflect.NativeMethodAccessorImpl.invoke(
> >> >> NativeMethodAccessorImpl.java:64)
> >> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >> >> DelegatingMethodAccessorImpl.java:43)
> >> >>        at java.lang.reflect.Method.invoke(Method.java:615)
> >> >>        at
> >> >>
> >> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> >> >> SurefireBooter.java:225)
> >> >>        at org.apache.maven.surefire.booter.SurefireBooter.main(
> >> >> SurefireBooter.java:747)
> >> >> Caused by: java.lang.NoSuchMethodException: <unbound>=Class.create
> >> >> (Class);
> >> >>        at java.beans.Statement.invoke(Statement.java:269)
> >> >>        at <unknown class>.<unknown method>(Unknown Source)
> >> >>        at com.sun.beans.ObjectHandler.eval(ObjectHandler.java:148)
> >> >>        at com.sun.beans.ObjectHandler.startElement
> >> >> (ObjectHandler.java:250)
> >> >>        at org.apache.xerces.parsers.AbstractSAXParser.startElement
> >> >> (Unknown
> >> >> Source)
> >> >>        at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement
> >> >> (Unknown
> >> >> Source)
> >> >>        at
> >> >>
> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
> >> >> t(Unknown
> >> >> Source)
> >> >>        at
> >> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
> >> >> $FragmentContentDispatcher.dispatch(Unknown
> >> >> Source)
> >> >>        at
> >> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
> >> >> (Unknown
> >> >> Source)
> >> >>        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> >> >> Source)
> >> >>        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> >> >> Source)
> >> >>        at org.apache.xerces.parsers.XMLParser.parse(Unknown
> >> Source)
> >> >>        at org.apache.xerces.parsers.AbstractSAXParser.parse
> >> >> (Unknown Source)
> >> >>        at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown
> >> Source)
> >> >>        at javax.xml.parsers.SAXParser.parse(Unknown Source)
> >> >>        at java.beans.XMLDecoder.readObject(XMLDecoder.java:220)
> >> >>        at
> >> >>
> >> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkM
> >> >> odel(
> >> >> CompanyModelTest.java:191)
> >> >>        ... 22 more
> >> >>
> >> >>
> >> >> On 2/10/07, Marc Prud'hommeaux <mp...@apache.org> wrote:
> >> >>>
> >> >>> Kevin-
> >> >>>
> >> >>> Weird. From the error message, it looks like there is some
> >> problem
> >> >>> with deserializing the default model from the companies.xml file
> >> >>> from
> >> >>> the XMLDecoder.
> >> >>>
> >> >>> I've put some extra debugging logic in the CompanyModelTest.java
> >> >>> that
> >> >>> should throw a better error when the deserialization fails.
> >> Can you
> >> >>> update and re-run the test and let us know if the stack trace
> >> >>> changes?
> >> >>>
> >> >>>
> >> >>>
> >> >>> On Feb 10, 2007, at 6:21 PM, Kevin Sutter wrote:
> >> >>>
> >> >>> > Hi,
> >> >>> > After synching up with the latest changes in SVN, I am
> >> hitting an
> >> >>> > intermittent problem while running the new tests in
> >> >>> > openjpa-persistence-jdbc.  Every once in a while, I am getting
> >> >>> > hundreds of
> >> >>> > messsages like the following:
> >> >>> >
> >> >>> > Running
> >> >>> >
> >> >>>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro
> >> >>> pe
> >> >>> > rtyCompanyModel
> >> >>> > 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 0.0.0
> >> >>> > 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the
> >> appropriate
> >> >>> > value for your database (see the
> >> >>> > documentation foravailable values).
> >> >>> > 10  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary
> >> >>> class "
> >> >>> > org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby
> >> >>> 10.2.2.0 -
> >> >>> > (485682) ,Apache Derby Embedded JDBC Driver 10.2.2.0 -
> >> (485682)).
> >> >>> > 20  test  INFO   [main] openjpa.MetaData - Found 10 classes
> >> with
> >> >>> > metadata in
> >> >>> > 0 milliseconds.
> >> >>> > :
> >> >>> > :
> >> >>> > 4046  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> >>> >
> >> >>>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.LineIte
> >> >>> m"
> >> >>> > .
> >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> >> >>> > Continuing ...
> >> >>> > java.lang.NullPointerException: target should not be null
> >> >>> > Continuing ...
> >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> >> >>> > Continuing ...
> >> >>> > java.lang.NullPointerException: target should not be null
> >> >>> > Continuing ...
> >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> >> >>> > Continuing ...
> >> >>> > java.lang.NullPointerException: target should not be null
> >> >>> > Continuing ...
> >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> >> >>> > Continuing ...
> >> >>> > java.lang.NullPointerException: target should not be null
> >> >>> > Continuing ...
> >> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> >> >>> > Continuing ...
> >> >>> > :
> >> >>> > :   <these type of messages continue -- several dozen repeats>
> >> >>> > :
> >> >>> > Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
> >> >>> > 4.346 sec
> >> >>> > <<< FAILURE!
> >> >>> > testBasicQueries(
> >> >>> >
> >> >>>
> >> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro
> >> >>> pe
> >> >>> > rtyCompanyModel)
> >> >>> > Time elapsed: 4.336 sec  <<< FAILURE!
> >> >>> > junit.framework.AssertionFailedError: expected:<2> but was:<0>
> >> >>> >        at junit.framework.Assert.fail(Assert.java:47)
> >> >>> >        at junit.framework.Assert.failNotEquals(Assert.java:282)
> >> >>> >        at junit.framework.Assert.assertEquals(Assert.java:64)
> >> >>> >        at junit.framework.Assert.assertEquals(Assert.java:201)
> >> >>> >        at junit.framework.Assert.assertEquals(Assert.java:207)
> >> >>> >        at
> >> >>> >
> >> >>>
> >> org.apache.openjpa.persistence.models.company.CompanyModelTest.verif
> >> >>> yM
> >> >>> > odel(
> >> >>> > CompanyModelTest.java:211)
> >> >>> >        at
> >> >>> >
> >> >>>
> >> org.apache.openjpa.persistence.models.company.CompanyModelTest.check
> >> >>> Mo
> >> >>> > del(
> >> >>> > CompanyModelTest.java:195)
> >> >>> >        at
> >> >>> >
> >> >>>
> >> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp
> >> >>> (
> >> >>> > CompanyModelTest.java:66)
> >> >>> >        at junit.framework.TestCase.runBare(TestCase.java:125)
> >> >>> >        at junit.framework.TestResult$1.protect(TestResult.java:
> >> >>> 106)
> >> >>> >        at junit.framework.TestResult.runProtected
> >> >>> (TestResult.java:124)
> >> >>> >        at junit.framework.TestResult.run(TestResult.java:109)
> >> >>> >        at junit.framework.TestCase.run(TestCase.java:118)
> >> >>> >        at junit.framework.TestSuite.runTest(TestSuite.java:208)
> >> >>> >        at junit.framework.TestSuite.run(TestSuite.java:203)
> >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >> >>> Method)
> >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke(
> >> >>> > NativeMethodAccessorImpl.java:64)
> >> >>> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >> >>> > DelegatingMethodAccessorImpl.java:43)
> >> >>> >        at java.lang.reflect.Method.invoke(Method.java:615)
> >> >>> >        at org.apache.maven.surefire.junit.JUnitTestSet.execute(
> >> >>> > JUnitTestSet.java:210)
> >> >>> >        at
> >> >>> >
> >> >>>
> >> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTe
> >> >>> st
> >> >>> > Set(
> >> >>> > AbstractDirectoryTestSuite.java:135)
> >> >>> >        at
> >> >>> >
> >> >>>
> >> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
> >> >>> > AbstractDirectoryTestSuite.java:122)
> >> >>> >        at org.apache.maven.surefire.Surefire.run(Surefire.java:
> >> >>> 129)
> >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >> >>> Method)
> >> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke(
> >> >>> > NativeMethodAccessorImpl.java:64)
> >> >>> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >> >>> > DelegatingMethodAccessorImpl.java:43)
> >> >>> >        at java.lang.reflect.Method.invoke(Method.java:615)
> >> >>> >        at
> >> >>> >
> >> >>>
> >> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> >> >>> > SurefireBooter.java:225)
> >> >>> >        at org.apache.maven.surefire.booter.SurefireBooter.main(
> >> >>> > SurefireBooter.java:747)
> >> >>> >
> >> >>> > They seem to most often happen when I do a complete top-down
> >> build
> >> >>> > from the
> >> >>> > openjpa directory (mvn clean && mvn install) and let it
> >> >>> traverse the
> >> >>> > sub-projects.  This is from the command line (not Eclipse).
> >> >>> >
> >> >>> > I can immediately turn around and do a "mvn test" from the
> >> openjpa
> >> >>> > directory
> >> >>> > and everything tests out just fine.
> >> >>> >
> >> >>> > Any ideas on what is causing these type of errors?  I don't see
> >> >>> > anywhere in
> >> >>> > our code where we are producing these type of messages.  I'm
> >> not
> >> >>> > sure if
> >> >>> > it's related to one of our dependencies (serp?), or maybe it's
> >> >>> > another IBM
> >> >>> > JDK anomaly (haven't been able to reproduce with Sun yet, but
> >> >>> it is an
> >> >>> > intermittent problem).
> >> >>> >
> >> >>> > Thanks,
> >> >>> > Kevin
> >> >>>
> >> >>>
> >> >
> >> > 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: Strange, intermittent problem running the new models.company tests

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

It could, but it would just be a spec compliance. OpenJPA does allow  
you to have final classes. The spec just prohibits it because one of  
the ways to implement support for property access is to dynamically  
generate a subclass to the entity (which isn't possible if the entity  
is final).



On Feb 12, 2007, at 4:33 AM, Kevin Sutter wrote:

> Marc (and others),
> Shouldn't OpenJPA be detecting these final classes and issuing an  
> error
> message?
>
> Kevin
>
> On 2/12/07, Marc Prud'hommeaux <mp...@apache.org> wrote:
>>
>> Craig-
>>
>> You're right that the classes shouldn't be final, but I don't think
>> that's the cause of the problem.
>>
>> I've committed a fix to the final class issue, though. Thanks for
>> pointing it out.
>>
>>
>>
>> On Feb 10, 2007, at 10:07 PM, Craig L Russell wrote:
>>
>> > Hi Kevin,
>> >
>> > I don't know if it's relevant, but persistent classes must not be
>> > final. It seems that the entities in the model.company packages are
>> > (all) final, which is wrong. From spec 2.1, "The entity class must
>> > not be final. No methods or persistent instance variables of the
>> > entity class may be final. "
>> >
>> > The relevant part of the stack trace appears to be:
>> >> Caused by: java.lang.NoSuchMethodException: <unbound>=Class.create
>> >> (Class);
>> >>        at java.beans.Statement.invoke(Statement.java:269)
>> >>        at <unknown class>.<unknown method>(Unknown Source)
>> >>        at com.sun.beans.ObjectHandler.eval(ObjectHandler.java:148)
>> >>        at com.sun.beans.ObjectHandler.startElement
>> >> (ObjectHandler.java:250)
>> >>        at org.apache.xerces.parsers.AbstractSAXParser.startElement
>> >> (Unknown
>> >> Source)
>> >>        at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement
>> >> (Unknown
>> >
>> > which sounds like an issue with the xerces parser. Don't you hate
>> > exceptions from parsers rather than error messages?
>> >
>> > Craig
>> >
>> > On Feb 10, 2007, at 8:08 PM, Kevin Sutter wrote:
>> >
>> >> Marc,
>> >> It took a while to reproduce, but I finally got the following...
>> >> Does this
>> >> help?  Thanks for your help!
>> >>
>> >> Kevin
>> >>
>> >> Running
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.TestProp
>> >> ertyCompanyModel
>> >> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 0.0.0
>> >> 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the appropriate
>> >> value for your database (see the
>> >> documentation foravailable values).
>> >> 0  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary  
>> class "
>> >> org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby  
>> 10.2.2.0 -
>> >> (485682) ,Apache Derby
>> >> Embedded JDBC Driver 10.2.2.0 - (485682)).
>> >> 10  test  INFO   [main] openjpa.MetaData - Found 10 classes with
>> >> metadata in
>> >> 0 milliseconds.
>> >> 20  test  INFO   [main] openjpa.MetaData - Found 10 classes with
>> >> metadata in
>> >> 10 milliseconds.
>> >> 20  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
>> >> .
>> >> 20  test  INFO   [main] openjpa.MetaData - Parsing package "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
>> >> .
>> >> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
>> >> .
>> >> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Address"
>> >> .
>> >> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Employee
>> >> ".
>> >> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Person".
>> >> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.FullTime
>> >> Employee
>> >> ".
>> >> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem
>> >> ".
>> >> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.ProductO
>> >> rder".
>> >> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Customer
>> >> ".
>> >> 70  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.PartTime
>> >> Employee
>> >> ".
>> >> 70  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>> >> information for
>> >> schema name "null", table name "PRP_Address".
>> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>> >> information for
>> >> schema name "null", table name "PRP_Company".
>> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>> >> information for
>> >> schema name "null", table name "PRP_LineItem".
>> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>> >> information for
>> >> schema name "null", table name "PRP_Person".
>> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>> >> information for
>> >> schema name "null", table name "PRP_Product".
>> >> 110  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>> >> information for
>> >> schema name "null", table name "PRP_ProductOrder".
>> >> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>> >> information for
>> >> schema name "null", table name "PRP_ProductOrder_PRP_LineItem".
>> >> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading table
>> >> information for
>> >> schema name "null", table name "PRP_Product_PRP_Company".
>> >> 140  test  INFO   [main] openjpa.jdbc.Schema - Reading sequence
>> >> information
>> >> for schema "null", sequence name "null".
>> >> 3856  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
>> >> .
>> >> 3856  test  INFO   [main] openjpa.MetaData - Parsing package "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
>> >> .
>> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Address"
>> >> .
>> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Employee
>> >> ".
>> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Person".
>> >> 3876  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
>> >> .
>> >> 3876  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.FullTime
>> >> Employee
>> >> ".
>> >> 3936  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.ProductO
>> >> rder".
>> >> 3966  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.Customer
>> >> ".
>> >> 3976  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem
>> >> ".
>> >> 4026  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.PartTime
>> >> Employee
>> >> ".
>> >> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed:
>> >> 4.336 sec
>> >> <<< FAILURE!
>> >> testBasicQueries(
>> >>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.TestProp
>> >> ertyCompanyModel)
>> >> Time elapsed: 4.326 sec  <<< ERROR!
>> >> java.lang.IllegalStateException: java.lang.NoSuchMethodException:
>> >> <unbound>=
>> >> Class.create(Class);
>> >>        at
>> >>  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkM
>> >> odel(
>> >> CompanyModelTest.java:194)
>> >>        at
>> >>  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp(
>> >> CompanyModelTest.java:66)
>> >>        at junit.framework.TestCase.runBare(TestCase.java:125)
>> >>        at junit.framework.TestResult$1.protect(TestResult.java: 
>> 106)
>> >>        at junit.framework.TestResult.runProtected(TestResult.java:
>> >> 124)
>> >>        at junit.framework.TestResult.run(TestResult.java:109)
>> >>        at junit.framework.TestCase.run(TestCase.java:118)
>> >>        at junit.framework.TestSuite.runTest(TestSuite.java:208)
>> >>        at junit.framework.TestSuite.run(TestSuite.java:203)
>> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native  
>> Method)
>> >>        at sun.reflect.NativeMethodAccessorImpl.invoke(
>> >> NativeMethodAccessorImpl.java:64)
>> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> >> DelegatingMethodAccessorImpl.java:43)
>> >>        at java.lang.reflect.Method.invoke(Method.java:615)
>> >>        at org.apache.maven.surefire.junit.JUnitTestSet.execute(
>> >> JUnitTestSet.java:210)
>> >>        at
>> >>  
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
>> >> tSet(
>> >> AbstractDirectoryTestSuite.java:135)
>> >>        at
>> >>  
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
>> >> AbstractDirectoryTestSuite.java:122)
>> >>        at org.apache.maven.surefire.Surefire.run(Surefire.java: 
>> 129)
>> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native  
>> Method)
>> >>        at sun.reflect.NativeMethodAccessorImpl.invoke(
>> >> NativeMethodAccessorImpl.java:64)
>> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> >> DelegatingMethodAccessorImpl.java:43)
>> >>        at java.lang.reflect.Method.invoke(Method.java:615)
>> >>        at
>> >>  
>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
>> >> SurefireBooter.java:225)
>> >>        at org.apache.maven.surefire.booter.SurefireBooter.main(
>> >> SurefireBooter.java:747)
>> >> Caused by: java.lang.NoSuchMethodException: <unbound>=Class.create
>> >> (Class);
>> >>        at java.beans.Statement.invoke(Statement.java:269)
>> >>        at <unknown class>.<unknown method>(Unknown Source)
>> >>        at com.sun.beans.ObjectHandler.eval(ObjectHandler.java:148)
>> >>        at com.sun.beans.ObjectHandler.startElement
>> >> (ObjectHandler.java:250)
>> >>        at org.apache.xerces.parsers.AbstractSAXParser.startElement
>> >> (Unknown
>> >> Source)
>> >>        at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement
>> >> (Unknown
>> >> Source)
>> >>        at
>> >>  
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
>> >> t(Unknown
>> >> Source)
>> >>        at
>> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
>> >> $FragmentContentDispatcher.dispatch(Unknown
>> >> Source)
>> >>        at
>> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
>> >> (Unknown
>> >> Source)
>> >>        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
>> >> Source)
>> >>        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
>> >> Source)
>> >>        at org.apache.xerces.parsers.XMLParser.parse(Unknown  
>> Source)
>> >>        at org.apache.xerces.parsers.AbstractSAXParser.parse
>> >> (Unknown Source)
>> >>        at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown  
>> Source)
>> >>        at javax.xml.parsers.SAXParser.parse(Unknown Source)
>> >>        at java.beans.XMLDecoder.readObject(XMLDecoder.java:220)
>> >>        at
>> >>  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkM
>> >> odel(
>> >> CompanyModelTest.java:191)
>> >>        ... 22 more
>> >>
>> >>
>> >> On 2/10/07, Marc Prud'hommeaux <mp...@apache.org> wrote:
>> >>>
>> >>> Kevin-
>> >>>
>> >>> Weird. From the error message, it looks like there is some  
>> problem
>> >>> with deserializing the default model from the companies.xml file
>> >>> from
>> >>> the XMLDecoder.
>> >>>
>> >>> I've put some extra debugging logic in the CompanyModelTest.java
>> >>> that
>> >>> should throw a better error when the deserialization fails.  
>> Can you
>> >>> update and re-run the test and let us know if the stack trace
>> >>> changes?
>> >>>
>> >>>
>> >>>
>> >>> On Feb 10, 2007, at 6:21 PM, Kevin Sutter wrote:
>> >>>
>> >>> > Hi,
>> >>> > After synching up with the latest changes in SVN, I am  
>> hitting an
>> >>> > intermittent problem while running the new tests in
>> >>> > openjpa-persistence-jdbc.  Every once in a while, I am getting
>> >>> > hundreds of
>> >>> > messsages like the following:
>> >>> >
>> >>> > Running
>> >>> >
>> >>>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro
>> >>> pe
>> >>> > rtyCompanyModel
>> >>> > 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 0.0.0
>> >>> > 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the  
>> appropriate
>> >>> > value for your database (see the
>> >>> > documentation foravailable values).
>> >>> > 10  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary
>> >>> class "
>> >>> > org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby
>> >>> 10.2.2.0 -
>> >>> > (485682) ,Apache Derby Embedded JDBC Driver 10.2.2.0 -  
>> (485682)).
>> >>> > 20  test  INFO   [main] openjpa.MetaData - Found 10 classes  
>> with
>> >>> > metadata in
>> >>> > 0 milliseconds.
>> >>> > :
>> >>> > :
>> >>> > 4046  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >>> >
>> >>>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.LineIte
>> >>> m"
>> >>> > .
>> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
>> >>> > Continuing ...
>> >>> > java.lang.NullPointerException: target should not be null
>> >>> > Continuing ...
>> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
>> >>> > Continuing ...
>> >>> > java.lang.NullPointerException: target should not be null
>> >>> > Continuing ...
>> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
>> >>> > Continuing ...
>> >>> > java.lang.NullPointerException: target should not be null
>> >>> > Continuing ...
>> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
>> >>> > Continuing ...
>> >>> > java.lang.NullPointerException: target should not be null
>> >>> > Continuing ...
>> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
>> >>> > Continuing ...
>> >>> > :
>> >>> > :   <these type of messages continue -- several dozen repeats>
>> >>> > :
>> >>> > Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
>> >>> > 4.346 sec
>> >>> > <<< FAILURE!
>> >>> > testBasicQueries(
>> >>> >
>> >>>  
>> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro
>> >>> pe
>> >>> > rtyCompanyModel)
>> >>> > Time elapsed: 4.336 sec  <<< FAILURE!
>> >>> > junit.framework.AssertionFailedError: expected:<2> but was:<0>
>> >>> >        at junit.framework.Assert.fail(Assert.java:47)
>> >>> >        at junit.framework.Assert.failNotEquals(Assert.java:282)
>> >>> >        at junit.framework.Assert.assertEquals(Assert.java:64)
>> >>> >        at junit.framework.Assert.assertEquals(Assert.java:201)
>> >>> >        at junit.framework.Assert.assertEquals(Assert.java:207)
>> >>> >        at
>> >>> >
>> >>>  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.verif
>> >>> yM
>> >>> > odel(
>> >>> > CompanyModelTest.java:211)
>> >>> >        at
>> >>> >
>> >>>  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.check
>> >>> Mo
>> >>> > del(
>> >>> > CompanyModelTest.java:195)
>> >>> >        at
>> >>> >
>> >>>  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp
>> >>> (
>> >>> > CompanyModelTest.java:66)
>> >>> >        at junit.framework.TestCase.runBare(TestCase.java:125)
>> >>> >        at junit.framework.TestResult$1.protect(TestResult.java:
>> >>> 106)
>> >>> >        at junit.framework.TestResult.runProtected
>> >>> (TestResult.java:124)
>> >>> >        at junit.framework.TestResult.run(TestResult.java:109)
>> >>> >        at junit.framework.TestCase.run(TestCase.java:118)
>> >>> >        at junit.framework.TestSuite.runTest(TestSuite.java:208)
>> >>> >        at junit.framework.TestSuite.run(TestSuite.java:203)
>> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>> >>> Method)
>> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke(
>> >>> > NativeMethodAccessorImpl.java:64)
>> >>> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> >>> > DelegatingMethodAccessorImpl.java:43)
>> >>> >        at java.lang.reflect.Method.invoke(Method.java:615)
>> >>> >        at org.apache.maven.surefire.junit.JUnitTestSet.execute(
>> >>> > JUnitTestSet.java:210)
>> >>> >        at
>> >>> >
>> >>>  
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTe
>> >>> st
>> >>> > Set(
>> >>> > AbstractDirectoryTestSuite.java:135)
>> >>> >        at
>> >>> >
>> >>>  
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
>> >>> > AbstractDirectoryTestSuite.java:122)
>> >>> >        at org.apache.maven.surefire.Surefire.run(Surefire.java:
>> >>> 129)
>> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>> >>> Method)
>> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke(
>> >>> > NativeMethodAccessorImpl.java:64)
>> >>> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> >>> > DelegatingMethodAccessorImpl.java:43)
>> >>> >        at java.lang.reflect.Method.invoke(Method.java:615)
>> >>> >        at
>> >>> >
>> >>>  
>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
>> >>> > SurefireBooter.java:225)
>> >>> >        at org.apache.maven.surefire.booter.SurefireBooter.main(
>> >>> > SurefireBooter.java:747)
>> >>> >
>> >>> > They seem to most often happen when I do a complete top-down  
>> build
>> >>> > from the
>> >>> > openjpa directory (mvn clean && mvn install) and let it
>> >>> traverse the
>> >>> > sub-projects.  This is from the command line (not Eclipse).
>> >>> >
>> >>> > I can immediately turn around and do a "mvn test" from the  
>> openjpa
>> >>> > directory
>> >>> > and everything tests out just fine.
>> >>> >
>> >>> > Any ideas on what is causing these type of errors?  I don't see
>> >>> > anywhere in
>> >>> > our code where we are producing these type of messages.  I'm  
>> not
>> >>> > sure if
>> >>> > it's related to one of our dependencies (serp?), or maybe it's
>> >>> > another IBM
>> >>> > JDK anomaly (haven't been able to reproduce with Sun yet, but
>> >>> it is an
>> >>> > intermittent problem).
>> >>> >
>> >>> > Thanks,
>> >>> > Kevin
>> >>>
>> >>>
>> >
>> > 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: Strange, intermittent problem running the new models.company tests

Posted by Kevin Sutter <kw...@gmail.com>.
Marc (and others),
Shouldn't OpenJPA be detecting these final classes and issuing an error
message?

Kevin

On 2/12/07, Marc Prud'hommeaux <mp...@apache.org> wrote:
>
> Craig-
>
> You're right that the classes shouldn't be final, but I don't think
> that's the cause of the problem.
>
> I've committed a fix to the final class issue, though. Thanks for
> pointing it out.
>
>
>
> On Feb 10, 2007, at 10:07 PM, Craig L Russell wrote:
>
> > Hi Kevin,
> >
> > I don't know if it's relevant, but persistent classes must not be
> > final. It seems that the entities in the model.company packages are
> > (all) final, which is wrong. From spec 2.1, "The entity class must
> > not be final. No methods or persistent instance variables of the
> > entity class may be final. "
> >
> > The relevant part of the stack trace appears to be:
> >> Caused by: java.lang.NoSuchMethodException: <unbound>=Class.create
> >> (Class);
> >>        at java.beans.Statement.invoke(Statement.java:269)
> >>        at <unknown class>.<unknown method>(Unknown Source)
> >>        at com.sun.beans.ObjectHandler.eval(ObjectHandler.java:148)
> >>        at com.sun.beans.ObjectHandler.startElement
> >> (ObjectHandler.java:250)
> >>        at org.apache.xerces.parsers.AbstractSAXParser.startElement
> >> (Unknown
> >> Source)
> >>        at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement
> >> (Unknown
> >
> > which sounds like an issue with the xerces parser. Don't you hate
> > exceptions from parsers rather than error messages?
> >
> > Craig
> >
> > On Feb 10, 2007, at 8:08 PM, Kevin Sutter wrote:
> >
> >> Marc,
> >> It took a while to reproduce, but I finally got the following...
> >> Does this
> >> help?  Thanks for your help!
> >>
> >> Kevin
> >>
> >> Running
> >> org.apache.openjpa.persistence.models.company.propertyaccess.TestProp
> >> ertyCompanyModel
> >> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 0.0.0
> >> 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the appropriate
> >> value for your database (see the
> >> documentation foravailable values).
> >> 0  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "
> >> org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby 10.2.2.0 -
> >> (485682) ,Apache Derby
> >> Embedded JDBC Driver 10.2.2.0 - (485682)).
> >> 10  test  INFO   [main] openjpa.MetaData - Found 10 classes with
> >> metadata in
> >> 0 milliseconds.
> >> 20  test  INFO   [main] openjpa.MetaData - Found 10 classes with
> >> metadata in
> >> 10 milliseconds.
> >> 20  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
> >> .
> >> 20  test  INFO   [main] openjpa.MetaData - Parsing package "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
> >> .
> >> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
> >> .
> >> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Address"
> >> .
> >> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Employee
> >> ".
> >> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Person".
> >> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.FullTime
> >> Employee
> >> ".
> >> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem
> >> ".
> >> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.ProductO
> >> rder".
> >> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Customer
> >> ".
> >> 70  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.PartTime
> >> Employee
> >> ".
> >> 70  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> information for
> >> schema name "null", table name "PRP_Address".
> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> information for
> >> schema name "null", table name "PRP_Company".
> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> information for
> >> schema name "null", table name "PRP_LineItem".
> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> information for
> >> schema name "null", table name "PRP_Person".
> >> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> information for
> >> schema name "null", table name "PRP_Product".
> >> 110  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> information for
> >> schema name "null", table name "PRP_ProductOrder".
> >> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> information for
> >> schema name "null", table name "PRP_ProductOrder_PRP_LineItem".
> >> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading table
> >> information for
> >> schema name "null", table name "PRP_Product_PRP_Company".
> >> 140  test  INFO   [main] openjpa.jdbc.Schema - Reading sequence
> >> information
> >> for schema "null", sequence name "null".
> >> 3856  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
> >> .
> >> 3856  test  INFO   [main] openjpa.MetaData - Parsing package "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Company"
> >> .
> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Address"
> >> .
> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Employee
> >> ".
> >> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Person".
> >> 3876  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Product"
> >> .
> >> 3876  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.FullTime
> >> Employee
> >> ".
> >> 3936  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.ProductO
> >> rder".
> >> 3966  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.Customer
> >> ".
> >> 3976  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem
> >> ".
> >> 4026  test  INFO   [main] openjpa.MetaData - Parsing class "
> >> org.apache.openjpa.persistence.models.company.propertyaccess.PartTime
> >> Employee
> >> ".
> >> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed:
> >> 4.336 sec
> >> <<< FAILURE!
> >> testBasicQueries(
> >> org.apache.openjpa.persistence.models.company.propertyaccess.TestProp
> >> ertyCompanyModel)
> >> Time elapsed: 4.326 sec  <<< ERROR!
> >> java.lang.IllegalStateException: java.lang.NoSuchMethodException:
> >> <unbound>=
> >> Class.create(Class);
> >>        at
> >> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkM
> >> odel(
> >> CompanyModelTest.java:194)
> >>        at
> >> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp(
> >> CompanyModelTest.java:66)
> >>        at junit.framework.TestCase.runBare(TestCase.java:125)
> >>        at junit.framework.TestResult$1.protect(TestResult.java:106)
> >>        at junit.framework.TestResult.runProtected(TestResult.java:
> >> 124)
> >>        at junit.framework.TestResult.run(TestResult.java:109)
> >>        at junit.framework.TestCase.run(TestCase.java:118)
> >>        at junit.framework.TestSuite.runTest(TestSuite.java:208)
> >>        at junit.framework.TestSuite.run(TestSuite.java:203)
> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>        at sun.reflect.NativeMethodAccessorImpl.invoke(
> >> NativeMethodAccessorImpl.java:64)
> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >> DelegatingMethodAccessorImpl.java:43)
> >>        at java.lang.reflect.Method.invoke(Method.java:615)
> >>        at org.apache.maven.surefire.junit.JUnitTestSet.execute(
> >> JUnitTestSet.java:210)
> >>        at
> >> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes
> >> tSet(
> >> AbstractDirectoryTestSuite.java:135)
> >>        at
> >> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
> >> AbstractDirectoryTestSuite.java:122)
> >>        at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
> >>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>        at sun.reflect.NativeMethodAccessorImpl.invoke(
> >> NativeMethodAccessorImpl.java:64)
> >>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >> DelegatingMethodAccessorImpl.java:43)
> >>        at java.lang.reflect.Method.invoke(Method.java:615)
> >>        at
> >> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> >> SurefireBooter.java:225)
> >>        at org.apache.maven.surefire.booter.SurefireBooter.main(
> >> SurefireBooter.java:747)
> >> Caused by: java.lang.NoSuchMethodException: <unbound>=Class.create
> >> (Class);
> >>        at java.beans.Statement.invoke(Statement.java:269)
> >>        at <unknown class>.<unknown method>(Unknown Source)
> >>        at com.sun.beans.ObjectHandler.eval(ObjectHandler.java:148)
> >>        at com.sun.beans.ObjectHandler.startElement
> >> (ObjectHandler.java:250)
> >>        at org.apache.xerces.parsers.AbstractSAXParser.startElement
> >> (Unknown
> >> Source)
> >>        at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement
> >> (Unknown
> >> Source)
> >>        at
> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen
> >> t(Unknown
> >> Source)
> >>        at
> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
> >> $FragmentContentDispatcher.dispatch(Unknown
> >> Source)
> >>        at
> >> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument
> >> (Unknown
> >> Source)
> >>        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> >> Source)
> >>        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
> >> Source)
> >>        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
> >>        at org.apache.xerces.parsers.AbstractSAXParser.parse
> >> (Unknown Source)
> >>        at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
> >>        at javax.xml.parsers.SAXParser.parse(Unknown Source)
> >>        at java.beans.XMLDecoder.readObject(XMLDecoder.java:220)
> >>        at
> >> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkM
> >> odel(
> >> CompanyModelTest.java:191)
> >>        ... 22 more
> >>
> >>
> >> On 2/10/07, Marc Prud'hommeaux <mp...@apache.org> wrote:
> >>>
> >>> Kevin-
> >>>
> >>> Weird. From the error message, it looks like there is some problem
> >>> with deserializing the default model from the companies.xml file
> >>> from
> >>> the XMLDecoder.
> >>>
> >>> I've put some extra debugging logic in the CompanyModelTest.java
> >>> that
> >>> should throw a better error when the deserialization fails. Can you
> >>> update and re-run the test and let us know if the stack trace
> >>> changes?
> >>>
> >>>
> >>>
> >>> On Feb 10, 2007, at 6:21 PM, Kevin Sutter wrote:
> >>>
> >>> > Hi,
> >>> > After synching up with the latest changes in SVN, I am hitting an
> >>> > intermittent problem while running the new tests in
> >>> > openjpa-persistence-jdbc.  Every once in a while, I am getting
> >>> > hundreds of
> >>> > messsages like the following:
> >>> >
> >>> > Running
> >>> >
> >>> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro
> >>> pe
> >>> > rtyCompanyModel
> >>> > 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 0.0.0
> >>> > 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the appropriate
> >>> > value for your database (see the
> >>> > documentation foravailable values).
> >>> > 10  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary
> >>> class "
> >>> > org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby
> >>> 10.2.2.0 -
> >>> > (485682) ,Apache Derby Embedded JDBC Driver 10.2.2.0 - (485682)).
> >>> > 20  test  INFO   [main] openjpa.MetaData - Found 10 classes with
> >>> > metadata in
> >>> > 0 milliseconds.
> >>> > :
> >>> > :
> >>> > 4046  test  INFO   [main] openjpa.MetaData - Parsing class "
> >>> >
> >>> org.apache.openjpa.persistence.models.company.propertyaccess.LineIte
> >>> m"
> >>> > .
> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> >>> > Continuing ...
> >>> > java.lang.NullPointerException: target should not be null
> >>> > Continuing ...
> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> >>> > Continuing ...
> >>> > java.lang.NullPointerException: target should not be null
> >>> > Continuing ...
> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> >>> > Continuing ...
> >>> > java.lang.NullPointerException: target should not be null
> >>> > Continuing ...
> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> >>> > Continuing ...
> >>> > java.lang.NullPointerException: target should not be null
> >>> > Continuing ...
> >>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> >>> > Continuing ...
> >>> > :
> >>> > :   <these type of messages continue -- several dozen repeats>
> >>> > :
> >>> > Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
> >>> > 4.346 sec
> >>> > <<< FAILURE!
> >>> > testBasicQueries(
> >>> >
> >>> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro
> >>> pe
> >>> > rtyCompanyModel)
> >>> > Time elapsed: 4.336 sec  <<< FAILURE!
> >>> > junit.framework.AssertionFailedError: expected:<2> but was:<0>
> >>> >        at junit.framework.Assert.fail(Assert.java:47)
> >>> >        at junit.framework.Assert.failNotEquals(Assert.java:282)
> >>> >        at junit.framework.Assert.assertEquals(Assert.java:64)
> >>> >        at junit.framework.Assert.assertEquals(Assert.java:201)
> >>> >        at junit.framework.Assert.assertEquals(Assert.java:207)
> >>> >        at
> >>> >
> >>> org.apache.openjpa.persistence.models.company.CompanyModelTest.verif
> >>> yM
> >>> > odel(
> >>> > CompanyModelTest.java:211)
> >>> >        at
> >>> >
> >>> org.apache.openjpa.persistence.models.company.CompanyModelTest.check
> >>> Mo
> >>> > del(
> >>> > CompanyModelTest.java:195)
> >>> >        at
> >>> >
> >>> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp
> >>> (
> >>> > CompanyModelTest.java:66)
> >>> >        at junit.framework.TestCase.runBare(TestCase.java:125)
> >>> >        at junit.framework.TestResult$1.protect(TestResult.java:
> >>> 106)
> >>> >        at junit.framework.TestResult.runProtected
> >>> (TestResult.java:124)
> >>> >        at junit.framework.TestResult.run(TestResult.java:109)
> >>> >        at junit.framework.TestCase.run(TestCase.java:118)
> >>> >        at junit.framework.TestSuite.runTest(TestSuite.java:208)
> >>> >        at junit.framework.TestSuite.run(TestSuite.java:203)
> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >>> Method)
> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke(
> >>> > NativeMethodAccessorImpl.java:64)
> >>> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >>> > DelegatingMethodAccessorImpl.java:43)
> >>> >        at java.lang.reflect.Method.invoke(Method.java:615)
> >>> >        at org.apache.maven.surefire.junit.JUnitTestSet.execute(
> >>> > JUnitTestSet.java:210)
> >>> >        at
> >>> >
> >>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTe
> >>> st
> >>> > Set(
> >>> > AbstractDirectoryTestSuite.java:135)
> >>> >        at
> >>> >
> >>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
> >>> > AbstractDirectoryTestSuite.java:122)
> >>> >        at org.apache.maven.surefire.Surefire.run(Surefire.java:
> >>> 129)
> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >>> Method)
> >>> >        at sun.reflect.NativeMethodAccessorImpl.invoke(
> >>> > NativeMethodAccessorImpl.java:64)
> >>> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> >>> > DelegatingMethodAccessorImpl.java:43)
> >>> >        at java.lang.reflect.Method.invoke(Method.java:615)
> >>> >        at
> >>> >
> >>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> >>> > SurefireBooter.java:225)
> >>> >        at org.apache.maven.surefire.booter.SurefireBooter.main(
> >>> > SurefireBooter.java:747)
> >>> >
> >>> > They seem to most often happen when I do a complete top-down build
> >>> > from the
> >>> > openjpa directory (mvn clean && mvn install) and let it
> >>> traverse the
> >>> > sub-projects.  This is from the command line (not Eclipse).
> >>> >
> >>> > I can immediately turn around and do a "mvn test" from the openjpa
> >>> > directory
> >>> > and everything tests out just fine.
> >>> >
> >>> > Any ideas on what is causing these type of errors?  I don't see
> >>> > anywhere in
> >>> > our code where we are producing these type of messages.  I'm not
> >>> > sure if
> >>> > it's related to one of our dependencies (serp?), or maybe it's
> >>> > another IBM
> >>> > JDK anomaly (haven't been able to reproduce with Sun yet, but
> >>> it is an
> >>> > intermittent problem).
> >>> >
> >>> > Thanks,
> >>> > Kevin
> >>>
> >>>
> >
> > 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: Strange, intermittent problem running the new models.company tests

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

You're right that the classes shouldn't be final, but I don't think  
that's the cause of the problem.

I've committed a fix to the final class issue, though. Thanks for  
pointing it out.



On Feb 10, 2007, at 10:07 PM, Craig L Russell wrote:

> Hi Kevin,
>
> I don't know if it's relevant, but persistent classes must not be  
> final. It seems that the entities in the model.company packages are  
> (all) final, which is wrong. From spec 2.1, "The entity class must  
> not be final. No methods or persistent instance variables of the  
> entity class may be final. "
>
> The relevant part of the stack trace appears to be:
>> Caused by: java.lang.NoSuchMethodException: <unbound>=Class.create 
>> (Class);
>>        at java.beans.Statement.invoke(Statement.java:269)
>>        at <unknown class>.<unknown method>(Unknown Source)
>>        at com.sun.beans.ObjectHandler.eval(ObjectHandler.java:148)
>>        at com.sun.beans.ObjectHandler.startElement 
>> (ObjectHandler.java:250)
>>        at org.apache.xerces.parsers.AbstractSAXParser.startElement 
>> (Unknown
>> Source)
>>        at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement 
>> (Unknown
>
> which sounds like an issue with the xerces parser. Don't you hate  
> exceptions from parsers rather than error messages?
>
> Craig
>
> On Feb 10, 2007, at 8:08 PM, Kevin Sutter wrote:
>
>> Marc,
>> It took a while to reproduce, but I finally got the following...   
>> Does this
>> help?  Thanks for your help!
>>
>> Kevin
>>
>> Running
>> org.apache.openjpa.persistence.models.company.propertyaccess.TestProp 
>> ertyCompanyModel
>> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 0.0.0
>> 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the appropriate
>> value for your database (see the
>> documentation foravailable values).
>> 0  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "
>> org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby 10.2.2.0 -
>> (485682) ,Apache Derby
>> Embedded JDBC Driver 10.2.2.0 - (485682)).
>> 10  test  INFO   [main] openjpa.MetaData - Found 10 classes with  
>> metadata in
>> 0 milliseconds.
>> 20  test  INFO   [main] openjpa.MetaData - Found 10 classes with  
>> metadata in
>> 10 milliseconds.
>> 20  test  INFO   [main] openjpa.MetaData - Parsing class "
>> org.apache.openjpa.persistence.models.company.propertyaccess.Product" 
>> .
>> 20  test  INFO   [main] openjpa.MetaData - Parsing package "
>> org.apache.openjpa.persistence.models.company.propertyaccess.Product" 
>> .
>> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
>> org.apache.openjpa.persistence.models.company.propertyaccess.Company" 
>> .
>> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
>> org.apache.openjpa.persistence.models.company.propertyaccess.Address" 
>> .
>> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
>> org.apache.openjpa.persistence.models.company.propertyaccess.Employee 
>> ".
>> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
>> org.apache.openjpa.persistence.models.company.propertyaccess.Person".
>> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
>> org.apache.openjpa.persistence.models.company.propertyaccess.FullTime 
>> Employee
>> ".
>> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
>> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem 
>> ".
>> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
>> org.apache.openjpa.persistence.models.company.propertyaccess.ProductO 
>> rder".
>> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
>> org.apache.openjpa.persistence.models.company.propertyaccess.Customer 
>> ".
>> 70  test  INFO   [main] openjpa.MetaData - Parsing class "
>> org.apache.openjpa.persistence.models.company.propertyaccess.PartTime 
>> Employee
>> ".
>> 70  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
>> information for
>> schema name "null", table name "PRP_Address".
>> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
>> information for
>> schema name "null", table name "PRP_Company".
>> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
>> information for
>> schema name "null", table name "PRP_LineItem".
>> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
>> information for
>> schema name "null", table name "PRP_Person".
>> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
>> information for
>> schema name "null", table name "PRP_Product".
>> 110  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
>> information for
>> schema name "null", table name "PRP_ProductOrder".
>> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
>> information for
>> schema name "null", table name "PRP_ProductOrder_PRP_LineItem".
>> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
>> information for
>> schema name "null", table name "PRP_Product_PRP_Company".
>> 140  test  INFO   [main] openjpa.jdbc.Schema - Reading sequence  
>> information
>> for schema "null", sequence name "null".
>> 3856  test  INFO   [main] openjpa.MetaData - Parsing class "
>> org.apache.openjpa.persistence.models.company.propertyaccess.Company" 
>> .
>> 3856  test  INFO   [main] openjpa.MetaData - Parsing package "
>> org.apache.openjpa.persistence.models.company.propertyaccess.Company" 
>> .
>> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
>> org.apache.openjpa.persistence.models.company.propertyaccess.Address" 
>> .
>> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
>> org.apache.openjpa.persistence.models.company.propertyaccess.Employee 
>> ".
>> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
>> org.apache.openjpa.persistence.models.company.propertyaccess.Person".
>> 3876  test  INFO   [main] openjpa.MetaData - Parsing class "
>> org.apache.openjpa.persistence.models.company.propertyaccess.Product" 
>> .
>> 3876  test  INFO   [main] openjpa.MetaData - Parsing class "
>> org.apache.openjpa.persistence.models.company.propertyaccess.FullTime 
>> Employee
>> ".
>> 3936  test  INFO   [main] openjpa.MetaData - Parsing class "
>> org.apache.openjpa.persistence.models.company.propertyaccess.ProductO 
>> rder".
>> 3966  test  INFO   [main] openjpa.MetaData - Parsing class "
>> org.apache.openjpa.persistence.models.company.propertyaccess.Customer 
>> ".
>> 3976  test  INFO   [main] openjpa.MetaData - Parsing class "
>> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem 
>> ".
>> 4026  test  INFO   [main] openjpa.MetaData - Parsing class "
>> org.apache.openjpa.persistence.models.company.propertyaccess.PartTime 
>> Employee
>> ".
>> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed:  
>> 4.336 sec
>> <<< FAILURE!
>> testBasicQueries(
>> org.apache.openjpa.persistence.models.company.propertyaccess.TestProp 
>> ertyCompanyModel)
>> Time elapsed: 4.326 sec  <<< ERROR!
>> java.lang.IllegalStateException: java.lang.NoSuchMethodException:  
>> <unbound>=
>> Class.create(Class);
>>        at
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkM 
>> odel(
>> CompanyModelTest.java:194)
>>        at
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp(
>> CompanyModelTest.java:66)
>>        at junit.framework.TestCase.runBare(TestCase.java:125)
>>        at junit.framework.TestResult$1.protect(TestResult.java:106)
>>        at junit.framework.TestResult.runProtected(TestResult.java: 
>> 124)
>>        at junit.framework.TestResult.run(TestResult.java:109)
>>        at junit.framework.TestCase.run(TestCase.java:118)
>>        at junit.framework.TestSuite.runTest(TestSuite.java:208)
>>        at junit.framework.TestSuite.run(TestSuite.java:203)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke(
>> NativeMethodAccessorImpl.java:64)
>>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> DelegatingMethodAccessorImpl.java:43)
>>        at java.lang.reflect.Method.invoke(Method.java:615)
>>        at org.apache.maven.surefire.junit.JUnitTestSet.execute(
>> JUnitTestSet.java:210)
>>        at
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes 
>> tSet(
>> AbstractDirectoryTestSuite.java:135)
>>        at
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
>> AbstractDirectoryTestSuite.java:122)
>>        at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke(
>> NativeMethodAccessorImpl.java:64)
>>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> DelegatingMethodAccessorImpl.java:43)
>>        at java.lang.reflect.Method.invoke(Method.java:615)
>>        at
>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
>> SurefireBooter.java:225)
>>        at org.apache.maven.surefire.booter.SurefireBooter.main(
>> SurefireBooter.java:747)
>> Caused by: java.lang.NoSuchMethodException: <unbound>=Class.create 
>> (Class);
>>        at java.beans.Statement.invoke(Statement.java:269)
>>        at <unknown class>.<unknown method>(Unknown Source)
>>        at com.sun.beans.ObjectHandler.eval(ObjectHandler.java:148)
>>        at com.sun.beans.ObjectHandler.startElement 
>> (ObjectHandler.java:250)
>>        at org.apache.xerces.parsers.AbstractSAXParser.startElement 
>> (Unknown
>> Source)
>>        at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement 
>> (Unknown
>> Source)
>>        at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElemen 
>> t(Unknown
>> Source)
>>        at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl 
>> $FragmentContentDispatcher.dispatch(Unknown
>> Source)
>>        at
>> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument 
>> (Unknown
>> Source)
>>        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown  
>> Source)
>>        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown  
>> Source)
>>        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>>        at org.apache.xerces.parsers.AbstractSAXParser.parse 
>> (Unknown Source)
>>        at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
>>        at javax.xml.parsers.SAXParser.parse(Unknown Source)
>>        at java.beans.XMLDecoder.readObject(XMLDecoder.java:220)
>>        at
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkM 
>> odel(
>> CompanyModelTest.java:191)
>>        ... 22 more
>>
>>
>> On 2/10/07, Marc Prud'hommeaux <mp...@apache.org> wrote:
>>>
>>> Kevin-
>>>
>>> Weird. From the error message, it looks like there is some problem
>>> with deserializing the default model from the companies.xml file  
>>> from
>>> the XMLDecoder.
>>>
>>> I've put some extra debugging logic in the CompanyModelTest.java  
>>> that
>>> should throw a better error when the deserialization fails. Can you
>>> update and re-run the test and let us know if the stack trace  
>>> changes?
>>>
>>>
>>>
>>> On Feb 10, 2007, at 6:21 PM, Kevin Sutter wrote:
>>>
>>> > Hi,
>>> > After synching up with the latest changes in SVN, I am hitting an
>>> > intermittent problem while running the new tests in
>>> > openjpa-persistence-jdbc.  Every once in a while, I am getting
>>> > hundreds of
>>> > messsages like the following:
>>> >
>>> > Running
>>> >  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro 
>>> pe
>>> > rtyCompanyModel
>>> > 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 0.0.0
>>> > 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the appropriate
>>> > value for your database (see the
>>> > documentation foravailable values).
>>> > 10  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary  
>>> class "
>>> > org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby  
>>> 10.2.2.0 -
>>> > (485682) ,Apache Derby Embedded JDBC Driver 10.2.2.0 - (485682)).
>>> > 20  test  INFO   [main] openjpa.MetaData - Found 10 classes with
>>> > metadata in
>>> > 0 milliseconds.
>>> > :
>>> > :
>>> > 4046  test  INFO   [main] openjpa.MetaData - Parsing class "
>>> >  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.LineIte 
>>> m"
>>> > .
>>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
>>> > Continuing ...
>>> > java.lang.NullPointerException: target should not be null
>>> > Continuing ...
>>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
>>> > Continuing ...
>>> > java.lang.NullPointerException: target should not be null
>>> > Continuing ...
>>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
>>> > Continuing ...
>>> > java.lang.NullPointerException: target should not be null
>>> > Continuing ...
>>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
>>> > Continuing ...
>>> > java.lang.NullPointerException: target should not be null
>>> > Continuing ...
>>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
>>> > Continuing ...
>>> > :
>>> > :   <these type of messages continue -- several dozen repeats>
>>> > :
>>> > Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
>>> > 4.346 sec
>>> > <<< FAILURE!
>>> > testBasicQueries(
>>> >  
>>> org.apache.openjpa.persistence.models.company.propertyaccess.TestPro 
>>> pe
>>> > rtyCompanyModel)
>>> > Time elapsed: 4.336 sec  <<< FAILURE!
>>> > junit.framework.AssertionFailedError: expected:<2> but was:<0>
>>> >        at junit.framework.Assert.fail(Assert.java:47)
>>> >        at junit.framework.Assert.failNotEquals(Assert.java:282)
>>> >        at junit.framework.Assert.assertEquals(Assert.java:64)
>>> >        at junit.framework.Assert.assertEquals(Assert.java:201)
>>> >        at junit.framework.Assert.assertEquals(Assert.java:207)
>>> >        at
>>> >  
>>> org.apache.openjpa.persistence.models.company.CompanyModelTest.verif 
>>> yM
>>> > odel(
>>> > CompanyModelTest.java:211)
>>> >        at
>>> >  
>>> org.apache.openjpa.persistence.models.company.CompanyModelTest.check 
>>> Mo
>>> > del(
>>> > CompanyModelTest.java:195)
>>> >        at
>>> >  
>>> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp 
>>> (
>>> > CompanyModelTest.java:66)
>>> >        at junit.framework.TestCase.runBare(TestCase.java:125)
>>> >        at junit.framework.TestResult$1.protect(TestResult.java: 
>>> 106)
>>> >        at junit.framework.TestResult.runProtected 
>>> (TestResult.java:124)
>>> >        at junit.framework.TestResult.run(TestResult.java:109)
>>> >        at junit.framework.TestCase.run(TestCase.java:118)
>>> >        at junit.framework.TestSuite.runTest(TestSuite.java:208)
>>> >        at junit.framework.TestSuite.run(TestSuite.java:203)
>>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native  
>>> Method)
>>> >        at sun.reflect.NativeMethodAccessorImpl.invoke(
>>> > NativeMethodAccessorImpl.java:64)
>>> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>> > DelegatingMethodAccessorImpl.java:43)
>>> >        at java.lang.reflect.Method.invoke(Method.java:615)
>>> >        at org.apache.maven.surefire.junit.JUnitTestSet.execute(
>>> > JUnitTestSet.java:210)
>>> >        at
>>> >  
>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTe 
>>> st
>>> > Set(
>>> > AbstractDirectoryTestSuite.java:135)
>>> >        at
>>> >  
>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
>>> > AbstractDirectoryTestSuite.java:122)
>>> >        at org.apache.maven.surefire.Surefire.run(Surefire.java: 
>>> 129)
>>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native  
>>> Method)
>>> >        at sun.reflect.NativeMethodAccessorImpl.invoke(
>>> > NativeMethodAccessorImpl.java:64)
>>> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>>> > DelegatingMethodAccessorImpl.java:43)
>>> >        at java.lang.reflect.Method.invoke(Method.java:615)
>>> >        at
>>> >  
>>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
>>> > SurefireBooter.java:225)
>>> >        at org.apache.maven.surefire.booter.SurefireBooter.main(
>>> > SurefireBooter.java:747)
>>> >
>>> > They seem to most often happen when I do a complete top-down build
>>> > from the
>>> > openjpa directory (mvn clean && mvn install) and let it  
>>> traverse the
>>> > sub-projects.  This is from the command line (not Eclipse).
>>> >
>>> > I can immediately turn around and do a "mvn test" from the openjpa
>>> > directory
>>> > and everything tests out just fine.
>>> >
>>> > Any ideas on what is causing these type of errors?  I don't see
>>> > anywhere in
>>> > our code where we are producing these type of messages.  I'm not
>>> > sure if
>>> > it's related to one of our dependencies (serp?), or maybe it's
>>> > another IBM
>>> > JDK anomaly (haven't been able to reproduce with Sun yet, but  
>>> it is an
>>> > intermittent problem).
>>> >
>>> > Thanks,
>>> > Kevin
>>>
>>>
>
> 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: Strange, intermittent problem running the new models.company tests

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

I don't know if it's relevant, but persistent classes must not be  
final. It seems that the entities in the model.company packages are  
(all) final, which is wrong. From spec 2.1, "The entity class must  
not be final. No methods or persistent instance variables of the  
entity class may be final. "

The relevant part of the stack trace appears to be:
> Caused by: java.lang.NoSuchMethodException: <unbound>=Class.create 
> (Class);
>        at java.beans.Statement.invoke(Statement.java:269)
>        at <unknown class>.<unknown method>(Unknown Source)
>        at com.sun.beans.ObjectHandler.eval(ObjectHandler.java:148)
>        at com.sun.beans.ObjectHandler.startElement 
> (ObjectHandler.java:250)
>        at org.apache.xerces.parsers.AbstractSAXParser.startElement 
> (Unknown
> Source)
>        at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement 
> (Unknown

which sounds like an issue with the xerces parser. Don't you hate  
exceptions from parsers rather than error messages?

Craig

On Feb 10, 2007, at 8:08 PM, Kevin Sutter wrote:

> Marc,
> It took a while to reproduce, but I finally got the following...   
> Does this
> help?  Thanks for your help!
>
> Kevin
>
> Running
> org.apache.openjpa.persistence.models.company.propertyaccess.TestPrope 
> rtyCompanyModel
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 0.0.0
> 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the appropriate
> value for your database (see the
> documentation foravailable values).
> 0  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "
> org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby 10.2.2.0 -
> (485682) ,Apache Derby
> Embedded JDBC Driver 10.2.2.0 - (485682)).
> 10  test  INFO   [main] openjpa.MetaData - Found 10 classes with  
> metadata in
> 0 milliseconds.
> 20  test  INFO   [main] openjpa.MetaData - Found 10 classes with  
> metadata in
> 10 milliseconds.
> 20  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.Product".
> 20  test  INFO   [main] openjpa.MetaData - Parsing package "
> org.apache.openjpa.persistence.models.company.propertyaccess.Product".
> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.Company".
> 30  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.Address".
> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.Employee" 
> .
> 40  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.Person".
> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.FullTimeE 
> mployee
> ".
> 50  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem" 
> .
> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.ProductOr 
> der".
> 60  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.Customer" 
> .
> 70  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.PartTimeE 
> mployee
> ".
> 70  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
> information for
> schema name "null", table name "PRP_Address".
> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
> information for
> schema name "null", table name "PRP_Company".
> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
> information for
> schema name "null", table name "PRP_LineItem".
> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
> information for
> schema name "null", table name "PRP_Person".
> 80  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
> information for
> schema name "null", table name "PRP_Product".
> 110  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
> information for
> schema name "null", table name "PRP_ProductOrder".
> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
> information for
> schema name "null", table name "PRP_ProductOrder_PRP_LineItem".
> 120  test  INFO   [main] openjpa.jdbc.Schema - Reading table  
> information for
> schema name "null", table name "PRP_Product_PRP_Company".
> 140  test  INFO   [main] openjpa.jdbc.Schema - Reading sequence  
> information
> for schema "null", sequence name "null".
> 3856  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.Company".
> 3856  test  INFO   [main] openjpa.MetaData - Parsing package "
> org.apache.openjpa.persistence.models.company.propertyaccess.Company".
> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.Address".
> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.Employee" 
> .
> 3866  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.Person".
> 3876  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.Product".
> 3876  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.FullTimeE 
> mployee
> ".
> 3936  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.ProductOr 
> der".
> 3966  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.Customer" 
> .
> 3976  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem" 
> .
> 4026  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.PartTimeE 
> mployee
> ".
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed:  
> 4.336 sec
> <<< FAILURE!
> testBasicQueries(
> org.apache.openjpa.persistence.models.company.propertyaccess.TestPrope 
> rtyCompanyModel)
> Time elapsed: 4.326 sec  <<< ERROR!
> java.lang.IllegalStateException: java.lang.NoSuchMethodException:  
> <unbound>=
> Class.create(Class);
>        at
> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkMo 
> del(
> CompanyModelTest.java:194)
>        at
> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp(
> CompanyModelTest.java:66)
>        at junit.framework.TestCase.runBare(TestCase.java:125)
>        at junit.framework.TestResult$1.protect(TestResult.java:106)
>        at junit.framework.TestResult.runProtected(TestResult.java:124)
>        at junit.framework.TestResult.run(TestResult.java:109)
>        at junit.framework.TestCase.run(TestCase.java:118)
>        at junit.framework.TestSuite.runTest(TestSuite.java:208)
>        at junit.framework.TestSuite.run(TestSuite.java:203)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:64)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>        at java.lang.reflect.Method.invoke(Method.java:615)
>        at org.apache.maven.surefire.junit.JUnitTestSet.execute(
> JUnitTestSet.java:210)
>        at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTest 
> Set(
> AbstractDirectoryTestSuite.java:135)
>        at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
> AbstractDirectoryTestSuite.java:122)
>        at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:64)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>        at java.lang.reflect.Method.invoke(Method.java:615)
>        at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> SurefireBooter.java:225)
>        at org.apache.maven.surefire.booter.SurefireBooter.main(
> SurefireBooter.java:747)
> Caused by: java.lang.NoSuchMethodException: <unbound>=Class.create 
> (Class);
>        at java.beans.Statement.invoke(Statement.java:269)
>        at <unknown class>.<unknown method>(Unknown Source)
>        at com.sun.beans.ObjectHandler.eval(ObjectHandler.java:148)
>        at com.sun.beans.ObjectHandler.startElement 
> (ObjectHandler.java:250)
>        at org.apache.xerces.parsers.AbstractSAXParser.startElement 
> (Unknown
> Source)
>        at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement 
> (Unknown
> Source)
>        at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement 
> (Unknown
> Source)
>        at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl 
> $FragmentContentDispatcher.dispatch(Unknown
> Source)
>        at
> org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument 
> (Unknown
> Source)
>        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown  
> Source)
>        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown  
> Source)
>        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
>        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown  
> Source)
>        at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
>        at javax.xml.parsers.SAXParser.parse(Unknown Source)
>        at java.beans.XMLDecoder.readObject(XMLDecoder.java:220)
>        at
> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkMo 
> del(
> CompanyModelTest.java:191)
>        ... 22 more
>
>
> On 2/10/07, Marc Prud'hommeaux <mp...@apache.org> wrote:
>>
>> Kevin-
>>
>> Weird. From the error message, it looks like there is some problem
>> with deserializing the default model from the companies.xml file from
>> the XMLDecoder.
>>
>> I've put some extra debugging logic in the CompanyModelTest.java that
>> should throw a better error when the deserialization fails. Can you
>> update and re-run the test and let us know if the stack trace  
>> changes?
>>
>>
>>
>> On Feb 10, 2007, at 6:21 PM, Kevin Sutter wrote:
>>
>> > Hi,
>> > After synching up with the latest changes in SVN, I am hitting an
>> > intermittent problem while running the new tests in
>> > openjpa-persistence-jdbc.  Every once in a while, I am getting
>> > hundreds of
>> > messsages like the following:
>> >
>> > Running
>> >  
>> org.apache.openjpa.persistence.models.company.propertyaccess.TestProp 
>> e
>> > rtyCompanyModel
>> > 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 0.0.0
>> > 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the appropriate
>> > value for your database (see the
>> > documentation foravailable values).
>> > 10  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary  
>> class "
>> > org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby  
>> 10.2.2.0 -
>> > (485682) ,Apache Derby Embedded JDBC Driver 10.2.2.0 - (485682)).
>> > 20  test  INFO   [main] openjpa.MetaData - Found 10 classes with
>> > metadata in
>> > 0 milliseconds.
>> > :
>> > :
>> > 4046  test  INFO   [main] openjpa.MetaData - Parsing class "
>> >  
>> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem 
>> "
>> > .
>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
>> > Continuing ...
>> > java.lang.NullPointerException: target should not be null
>> > Continuing ...
>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
>> > Continuing ...
>> > java.lang.NullPointerException: target should not be null
>> > Continuing ...
>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
>> > Continuing ...
>> > java.lang.NullPointerException: target should not be null
>> > Continuing ...
>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
>> > Continuing ...
>> > java.lang.NullPointerException: target should not be null
>> > Continuing ...
>> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
>> > Continuing ...
>> > :
>> > :   <these type of messages continue -- several dozen repeats>
>> > :
>> > Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
>> > 4.346 sec
>> > <<< FAILURE!
>> > testBasicQueries(
>> >  
>> org.apache.openjpa.persistence.models.company.propertyaccess.TestProp 
>> e
>> > rtyCompanyModel)
>> > Time elapsed: 4.336 sec  <<< FAILURE!
>> > junit.framework.AssertionFailedError: expected:<2> but was:<0>
>> >        at junit.framework.Assert.fail(Assert.java:47)
>> >        at junit.framework.Assert.failNotEquals(Assert.java:282)
>> >        at junit.framework.Assert.assertEquals(Assert.java:64)
>> >        at junit.framework.Assert.assertEquals(Assert.java:201)
>> >        at junit.framework.Assert.assertEquals(Assert.java:207)
>> >        at
>> >  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.verify 
>> M
>> > odel(
>> > CompanyModelTest.java:211)
>> >        at
>> >  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkM 
>> o
>> > del(
>> > CompanyModelTest.java:195)
>> >        at
>> >  
>> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp(
>> > CompanyModelTest.java:66)
>> >        at junit.framework.TestCase.runBare(TestCase.java:125)
>> >        at junit.framework.TestResult$1.protect(TestResult.java:106)
>> >        at junit.framework.TestResult.runProtected 
>> (TestResult.java:124)
>> >        at junit.framework.TestResult.run(TestResult.java:109)
>> >        at junit.framework.TestCase.run(TestCase.java:118)
>> >        at junit.framework.TestSuite.runTest(TestSuite.java:208)
>> >        at junit.framework.TestSuite.run(TestSuite.java:203)
>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native  
>> Method)
>> >        at sun.reflect.NativeMethodAccessorImpl.invoke(
>> > NativeMethodAccessorImpl.java:64)
>> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> > DelegatingMethodAccessorImpl.java:43)
>> >        at java.lang.reflect.Method.invoke(Method.java:615)
>> >        at org.apache.maven.surefire.junit.JUnitTestSet.execute(
>> > JUnitTestSet.java:210)
>> >        at
>> >  
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTes 
>> t
>> > Set(
>> > AbstractDirectoryTestSuite.java:135)
>> >        at
>> > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
>> > AbstractDirectoryTestSuite.java:122)
>> >        at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native  
>> Method)
>> >        at sun.reflect.NativeMethodAccessorImpl.invoke(
>> > NativeMethodAccessorImpl.java:64)
>> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
>> > DelegatingMethodAccessorImpl.java:43)
>> >        at java.lang.reflect.Method.invoke(Method.java:615)
>> >        at
>> > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
>> > SurefireBooter.java:225)
>> >        at org.apache.maven.surefire.booter.SurefireBooter.main(
>> > SurefireBooter.java:747)
>> >
>> > They seem to most often happen when I do a complete top-down build
>> > from the
>> > openjpa directory (mvn clean && mvn install) and let it traverse  
>> the
>> > sub-projects.  This is from the command line (not Eclipse).
>> >
>> > I can immediately turn around and do a "mvn test" from the openjpa
>> > directory
>> > and everything tests out just fine.
>> >
>> > Any ideas on what is causing these type of errors?  I don't see
>> > anywhere in
>> > our code where we are producing these type of messages.  I'm not
>> > sure if
>> > it's related to one of our dependencies (serp?), or maybe it's
>> > another IBM
>> > JDK anomaly (haven't been able to reproduce with Sun yet, but it  
>> is an
>> > intermittent problem).
>> >
>> > Thanks,
>> > Kevin
>>
>>

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: Strange, intermittent problem running the new models.company tests

Posted by Kevin Sutter <kw...@gmail.com>.
Marc,
It took a while to reproduce, but I finally got the following...  Does this
help?  Thanks for your help!

Kevin

Running
org.apache.openjpa.persistence.models.company.propertyaccess.TestPropertyCompanyModel
0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 0.0.0
0  test  INFO   [main] 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.DBDictionaryconfiguration property to the appropriate
value for your database (see the
documentation foravailable values).
0  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "
org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby 10.2.2.0 -
(485682) ,Apache Derby
Embedded JDBC Driver 10.2.2.0 - (485682)).
10  test  INFO   [main] openjpa.MetaData - Found 10 classes with metadata in
0 milliseconds.
20  test  INFO   [main] openjpa.MetaData - Found 10 classes with metadata in
10 milliseconds.
20  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.Product".
20  test  INFO   [main] openjpa.MetaData - Parsing package "
org.apache.openjpa.persistence.models.company.propertyaccess.Product".
30  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.Company".
30  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.Address".
40  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.Employee".
40  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.Person".
50  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.FullTimeEmployee
".
50  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.LineItem".
60  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.ProductOrder".
60  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.Customer".
70  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.PartTimeEmployee
".
70  test  INFO   [main] openjpa.jdbc.Schema - Reading table information for
schema name "null", table name "PRP_Address".
80  test  INFO   [main] openjpa.jdbc.Schema - Reading table information for
schema name "null", table name "PRP_Company".
80  test  INFO   [main] openjpa.jdbc.Schema - Reading table information for
schema name "null", table name "PRP_LineItem".
80  test  INFO   [main] openjpa.jdbc.Schema - Reading table information for
schema name "null", table name "PRP_Person".
80  test  INFO   [main] openjpa.jdbc.Schema - Reading table information for
schema name "null", table name "PRP_Product".
110  test  INFO   [main] openjpa.jdbc.Schema - Reading table information for
schema name "null", table name "PRP_ProductOrder".
120  test  INFO   [main] openjpa.jdbc.Schema - Reading table information for
schema name "null", table name "PRP_ProductOrder_PRP_LineItem".
120  test  INFO   [main] openjpa.jdbc.Schema - Reading table information for
schema name "null", table name "PRP_Product_PRP_Company".
140  test  INFO   [main] openjpa.jdbc.Schema - Reading sequence information
for schema "null", sequence name "null".
3856  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.Company".
3856  test  INFO   [main] openjpa.MetaData - Parsing package "
org.apache.openjpa.persistence.models.company.propertyaccess.Company".
3866  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.Address".
3866  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.Employee".
3866  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.Person".
3876  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.Product".
3876  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.FullTimeEmployee
".
3936  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.ProductOrder".
3966  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.Customer".
3976  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.LineItem".
4026  test  INFO   [main] openjpa.MetaData - Parsing class "
org.apache.openjpa.persistence.models.company.propertyaccess.PartTimeEmployee
".
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.336 sec
<<< FAILURE!
testBasicQueries(
org.apache.openjpa.persistence.models.company.propertyaccess.TestPropertyCompanyModel)
Time elapsed: 4.326 sec  <<< ERROR!
java.lang.IllegalStateException: java.lang.NoSuchMethodException: <unbound>=
Class.create(Class);
        at
org.apache.openjpa.persistence.models.company.CompanyModelTest.checkModel(
CompanyModelTest.java:194)
        at
org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp(
CompanyModelTest.java:66)
        at junit.framework.TestCase.runBare(TestCase.java:125)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:118)
        at junit.framework.TestSuite.runTest(TestSuite.java:208)
        at junit.framework.TestSuite.run(TestSuite.java:203)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:64)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:615)
        at org.apache.maven.surefire.junit.JUnitTestSet.execute(
JUnitTestSet.java:210)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(
AbstractDirectoryTestSuite.java:135)
        at
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
AbstractDirectoryTestSuite.java:122)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
NativeMethodAccessorImpl.java:64)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:615)
        at
org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
SurefireBooter.java:225)
        at org.apache.maven.surefire.booter.SurefireBooter.main(
SurefireBooter.java:747)
Caused by: java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
        at java.beans.Statement.invoke(Statement.java:269)
        at <unknown class>.<unknown method>(Unknown Source)
        at com.sun.beans.ObjectHandler.eval(ObjectHandler.java:148)
        at com.sun.beans.ObjectHandler.startElement(ObjectHandler.java:250)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
Source)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
        at javax.xml.parsers.SAXParser.parse(Unknown Source)
        at java.beans.XMLDecoder.readObject(XMLDecoder.java:220)
        at
org.apache.openjpa.persistence.models.company.CompanyModelTest.checkModel(
CompanyModelTest.java:191)
        ... 22 more


On 2/10/07, Marc Prud'hommeaux <mp...@apache.org> wrote:
>
> Kevin-
>
> Weird. From the error message, it looks like there is some problem
> with deserializing the default model from the companies.xml file from
> the XMLDecoder.
>
> I've put some extra debugging logic in the CompanyModelTest.java that
> should throw a better error when the deserialization fails. Can you
> update and re-run the test and let us know if the stack trace changes?
>
>
>
> On Feb 10, 2007, at 6:21 PM, Kevin Sutter wrote:
>
> > Hi,
> > After synching up with the latest changes in SVN, I am hitting an
> > intermittent problem while running the new tests in
> > openjpa-persistence-jdbc.  Every once in a while, I am getting
> > hundreds of
> > messsages like the following:
> >
> > Running
> > org.apache.openjpa.persistence.models.company.propertyaccess.TestPrope
> > rtyCompanyModel
> > 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 0.0.0
> > 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the appropriate
> > value for your database (see the
> > documentation foravailable values).
> > 10  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "
> > org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby 10.2.2.0 -
> > (485682) ,Apache Derby Embedded JDBC Driver 10.2.2.0 - (485682)).
> > 20  test  INFO   [main] openjpa.MetaData - Found 10 classes with
> > metadata in
> > 0 milliseconds.
> > :
> > :
> > 4046  test  INFO   [main] openjpa.MetaData - Parsing class "
> > org.apache.openjpa.persistence.models.company.propertyaccess.LineItem"
> > .
> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> > Continuing ...
> > java.lang.NullPointerException: target should not be null
> > Continuing ...
> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> > Continuing ...
> > java.lang.NullPointerException: target should not be null
> > Continuing ...
> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> > Continuing ...
> > java.lang.NullPointerException: target should not be null
> > Continuing ...
> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> > Continuing ...
> > java.lang.NullPointerException: target should not be null
> > Continuing ...
> > java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> > Continuing ...
> > :
> > :   <these type of messages continue -- several dozen repeats>
> > :
> > Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:
> > 4.346 sec
> > <<< FAILURE!
> > testBasicQueries(
> > org.apache.openjpa.persistence.models.company.propertyaccess.TestPrope
> > rtyCompanyModel)
> > Time elapsed: 4.336 sec  <<< FAILURE!
> > junit.framework.AssertionFailedError: expected:<2> but was:<0>
> >        at junit.framework.Assert.fail(Assert.java:47)
> >        at junit.framework.Assert.failNotEquals(Assert.java:282)
> >        at junit.framework.Assert.assertEquals(Assert.java:64)
> >        at junit.framework.Assert.assertEquals(Assert.java:201)
> >        at junit.framework.Assert.assertEquals(Assert.java:207)
> >        at
> > org.apache.openjpa.persistence.models.company.CompanyModelTest.verifyM
> > odel(
> > CompanyModelTest.java:211)
> >        at
> > org.apache.openjpa.persistence.models.company.CompanyModelTest.checkMo
> > del(
> > CompanyModelTest.java:195)
> >        at
> > org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp(
> > CompanyModelTest.java:66)
> >        at junit.framework.TestCase.runBare(TestCase.java:125)
> >        at junit.framework.TestResult$1.protect(TestResult.java:106)
> >        at junit.framework.TestResult.runProtected(TestResult.java:124)
> >        at junit.framework.TestResult.run(TestResult.java:109)
> >        at junit.framework.TestCase.run(TestCase.java:118)
> >        at junit.framework.TestSuite.runTest(TestSuite.java:208)
> >        at junit.framework.TestSuite.run(TestSuite.java:203)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke(
> > NativeMethodAccessorImpl.java:64)
> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > DelegatingMethodAccessorImpl.java:43)
> >        at java.lang.reflect.Method.invoke(Method.java:615)
> >        at org.apache.maven.surefire.junit.JUnitTestSet.execute(
> > JUnitTestSet.java:210)
> >        at
> > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTest
> > Set(
> > AbstractDirectoryTestSuite.java:135)
> >        at
> > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
> > AbstractDirectoryTestSuite.java:122)
> >        at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >        at sun.reflect.NativeMethodAccessorImpl.invoke(
> > NativeMethodAccessorImpl.java:64)
> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> > DelegatingMethodAccessorImpl.java:43)
> >        at java.lang.reflect.Method.invoke(Method.java:615)
> >        at
> > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> > SurefireBooter.java:225)
> >        at org.apache.maven.surefire.booter.SurefireBooter.main(
> > SurefireBooter.java:747)
> >
> > They seem to most often happen when I do a complete top-down build
> > from the
> > openjpa directory (mvn clean && mvn install) and let it traverse the
> > sub-projects.  This is from the command line (not Eclipse).
> >
> > I can immediately turn around and do a "mvn test" from the openjpa
> > directory
> > and everything tests out just fine.
> >
> > Any ideas on what is causing these type of errors?  I don't see
> > anywhere in
> > our code where we are producing these type of messages.  I'm not
> > sure if
> > it's related to one of our dependencies (serp?), or maybe it's
> > another IBM
> > JDK anomaly (haven't been able to reproduce with Sun yet, but it is an
> > intermittent problem).
> >
> > Thanks,
> > Kevin
>
>

Re: Strange, intermittent problem running the new models.company tests

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

Weird. From the error message, it looks like there is some problem  
with deserializing the default model from the companies.xml file from  
the XMLDecoder.

I've put some extra debugging logic in the CompanyModelTest.java that  
should throw a better error when the deserialization fails. Can you  
update and re-run the test and let us know if the stack trace changes?



On Feb 10, 2007, at 6:21 PM, Kevin Sutter wrote:

> Hi,
> After synching up with the latest changes in SVN, I am hitting an
> intermittent problem while running the new tests in
> openjpa-persistence-jdbc.  Every once in a while, I am getting  
> hundreds of
> messsages like the following:
>
> Running
> org.apache.openjpa.persistence.models.company.propertyaccess.TestPrope 
> rtyCompanyModel
> 0  test  INFO   [main] openjpa.Runtime - Starting OpenJPA 0.0.0
> 0  test  INFO   [main] 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.DBDictionaryconfiguration property to the appropriate
> value for your database (see the
> documentation foravailable values).
> 10  test  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "
> org.apache.openjpa.jdbc.sql.DerbyDictionary" (Apache Derby 10.2.2.0 -
> (485682) ,Apache Derby Embedded JDBC Driver 10.2.2.0 - (485682)).
> 20  test  INFO   [main] openjpa.MetaData - Found 10 classes with  
> metadata in
> 0 milliseconds.
> :
> :
> 4046  test  INFO   [main] openjpa.MetaData - Parsing class "
> org.apache.openjpa.persistence.models.company.propertyaccess.LineItem" 
> .
> java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> Continuing ...
> java.lang.NullPointerException: target should not be null
> Continuing ...
> java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> Continuing ...
> java.lang.NullPointerException: target should not be null
> Continuing ...
> java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> Continuing ...
> java.lang.NullPointerException: target should not be null
> Continuing ...
> java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> Continuing ...
> java.lang.NullPointerException: target should not be null
> Continuing ...
> java.lang.NoSuchMethodException: <unbound>=Class.create(Class);
> Continuing ...
> :
> :   <these type of messages continue -- several dozen repeats>
> :
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed:  
> 4.346 sec
> <<< FAILURE!
> testBasicQueries(
> org.apache.openjpa.persistence.models.company.propertyaccess.TestPrope 
> rtyCompanyModel)
> Time elapsed: 4.336 sec  <<< FAILURE!
> junit.framework.AssertionFailedError: expected:<2> but was:<0>
>        at junit.framework.Assert.fail(Assert.java:47)
>        at junit.framework.Assert.failNotEquals(Assert.java:282)
>        at junit.framework.Assert.assertEquals(Assert.java:64)
>        at junit.framework.Assert.assertEquals(Assert.java:201)
>        at junit.framework.Assert.assertEquals(Assert.java:207)
>        at
> org.apache.openjpa.persistence.models.company.CompanyModelTest.verifyM 
> odel(
> CompanyModelTest.java:211)
>        at
> org.apache.openjpa.persistence.models.company.CompanyModelTest.checkMo 
> del(
> CompanyModelTest.java:195)
>        at
> org.apache.openjpa.persistence.models.company.CompanyModelTest.setUp(
> CompanyModelTest.java:66)
>        at junit.framework.TestCase.runBare(TestCase.java:125)
>        at junit.framework.TestResult$1.protect(TestResult.java:106)
>        at junit.framework.TestResult.runProtected(TestResult.java:124)
>        at junit.framework.TestResult.run(TestResult.java:109)
>        at junit.framework.TestCase.run(TestCase.java:118)
>        at junit.framework.TestSuite.runTest(TestSuite.java:208)
>        at junit.framework.TestSuite.run(TestSuite.java:203)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:64)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>        at java.lang.reflect.Method.invoke(Method.java:615)
>        at org.apache.maven.surefire.junit.JUnitTestSet.execute(
> JUnitTestSet.java:210)
>        at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTest 
> Set(
> AbstractDirectoryTestSuite.java:135)
>        at
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(
> AbstractDirectoryTestSuite.java:122)
>        at org.apache.maven.surefire.Surefire.run(Surefire.java:129)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(
> NativeMethodAccessorImpl.java:64)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>        at java.lang.reflect.Method.invoke(Method.java:615)
>        at
> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(
> SurefireBooter.java:225)
>        at org.apache.maven.surefire.booter.SurefireBooter.main(
> SurefireBooter.java:747)
>
> They seem to most often happen when I do a complete top-down build  
> from the
> openjpa directory (mvn clean && mvn install) and let it traverse the
> sub-projects.  This is from the command line (not Eclipse).
>
> I can immediately turn around and do a "mvn test" from the openjpa  
> directory
> and everything tests out just fine.
>
> Any ideas on what is causing these type of errors?  I don't see  
> anywhere in
> our code where we are producing these type of messages.  I'm not  
> sure if
> it's related to one of our dependencies (serp?), or maybe it's  
> another IBM
> JDK anomaly (haven't been able to reproduce with Sun yet, but it is an
> intermittent problem).
>
> Thanks,
> Kevin