You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jdo-dev@db.apache.org by Andy Jefferson <an...@jpox.org> on 2005/07/01 20:47:08 UTC

Re: JDOFatalInternalException using single field identity

> I have written a test case checking single field identity. For this
> purpose, I created new PC classes, new jdo files, new orm files, and I
> extended the schema for application identity. When I run the test case,
> I get a JDOFatalInternalException from JPOX (see below). Currently, I
> run build jpox-20050617.022105.jar.

I created a testcase doing the same thing :-
* abstract base class with concrete PC class
* specifying the details on JDO and ORM files
as you did and all worked fine. I'm using latest JPOX. Suggest that you try 
the latest build of JPOX (http://www.jpox.org/downloads/nightly/)

-- 
Andy
Java Persistent Objects - JPOX

Re: JDOFatalInternalException using single field identity

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

I think there is a misunderstanding, and we need to update the wiki  
page to be more clear.

We now have the ability to run a single test case in multiple  
combinations of:

database
identity type (application or datastore)
test case class

This is only slightly different from the former runtck.jdorisingle  
which no longer exists.

The new single test case runs all combinations of database, identity  
type, and test case classes. I think it's very useful and I don't  
miss the old jdorisingle at all. I know that when I had to run a new  
test case against both application and datastore identity it was kind  
of a pain. And now it's easy.

But we do need to document it better.

Craig

On Jul 6, 2005, at 2:10 AM, Michael Watzek wrote:

> Hi Andy,
>
>
>> Hi Michael,
>>
>>> I think, we do not support this case currently. You can run a single
>>> test class, but you cannot run a single test case if the test  
>>> class has
>>> several test cases like class "NewObjectIdInstance".
>>>
>> OK. I consider it a "must-have". We used to have "runsingle" or  
>> something. I see no Maven goal of this form now. When debugging  
>> issues it is essential to have that. People shouldn't have to run  
>> all cases for a particular class and then find the one they want  
>> in the log.
>>
> The former "runsingle" maven goal is equivalent to running a single  
> configuration having a single test case with a single identity  
> type. If you run class "NewObjectIdInstance" with the former  
> "runsingle" goal, then the same amount of test cases would have  
> been executed.
>
>
>>> Editting your project.properties file wrt entry  
>>> "jdo.tck.identitytypes",
>>> you can run class "NewObjectIdInstance" only for application  
>>> identity.
>>> On my system, this takes less than 10 seconds.
>>>
>> I'll give it a run *when* it's in SVN. Just not got time at the  
>> moment for applying patches etc before I can run it. When will it  
>> be in SVN ?
>>
> I'm still busy preparing a patch. I'll send it to jdo-dev today.  
> Probably, it will be commited by beginning of next week.
>
> Regards,
> Michael
>
>> PS. The latest nightly build you were using is not the latest. You  
>> need to look at :-
>> http://www.jpox.org/downloads/nightly
>> to get the very latest (SourceForge have changed their logon  
>> process so we can't automatically put our nightly build on their  
>> site at the moment).
>>
>
>
> -- 
> -------------------------------------------------------------------
> Michael Watzek                  Tech@Spree Engineering GmbH
> mailto:mwa.tech@spree.de        Buelowstr. 66
> Tel.:  ++49/30/235 520 36       10783 Berlin - Germany
> Fax.:  ++49/30/217 520 12       http://www.spree.de/
> -------------------------------------------------------------------
>

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: JDOFatalInternalException using single field identity

Posted by Michael Watzek <mw...@spree.de>.
Hi Andy,

> Hi Michael,
> 
> 
>>I think, we do not support this case currently. You can run a single
>>test class, but you cannot run a single test case if the test class has
>>several test cases like class "NewObjectIdInstance".
> 
> 
> OK. I consider it a "must-have". We used to have "runsingle" or something. I 
> see no Maven goal of this form now. When debugging issues it is essential to 
> have that. People shouldn't have to run all cases for a particular class and 
> then find the one they want in the log.
The former "runsingle" maven goal is equivalent to running a single 
configuration having a single test case with a single identity type. If 
you run class "NewObjectIdInstance" with the former "runsingle" goal, 
then the same amount of test cases would have been executed.

>>Editting your project.properties file wrt entry "jdo.tck.identitytypes",
>>you can run class "NewObjectIdInstance" only for application identity.
>>On my system, this takes less than 10 seconds.
> 
> 
> I'll give it a run *when* it's in SVN. Just not got time at the moment for 
> applying patches etc before I can run it. When will it be in SVN ?
I'm still busy preparing a patch. I'll send it to jdo-dev today. 
Probably, it will be commited by beginning of next week.

Regards,
Michael
> 
> 
> PS. The latest nightly build you were using is not the latest. You need to 
> look at :-
> http://www.jpox.org/downloads/nightly
> to get the very latest (SourceForge have changed their logon process so we 
> can't automatically put our nightly build on their site at the moment).
> 


-- 
-------------------------------------------------------------------
Michael Watzek                  Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de        Buelowstr. 66
Tel.:  ++49/30/235 520 36       10783 Berlin - Germany
Fax.:  ++49/30/217 520 12       http://www.spree.de/
-------------------------------------------------------------------

Re: JDOFatalInternalException using single field identity

Posted by Andy Jefferson <an...@jpox.org>.
Hi Michael,

> I think, we do not support this case currently. You can run a single
> test class, but you cannot run a single test case if the test class has
> several test cases like class "NewObjectIdInstance".

OK. I consider it a "must-have". We used to have "runsingle" or something. I 
see no Maven goal of this form now. When debugging issues it is essential to 
have that. People shouldn't have to run all cases for a particular class and 
then find the one they want in the log.

> Editting your project.properties file wrt entry "jdo.tck.identitytypes",
> you can run class "NewObjectIdInstance" only for application identity.
> On my system, this takes less than 10 seconds.

I'll give it a run *when* it's in SVN. Just not got time at the moment for 
applying patches etc before I can run it. When will it be in SVN ?


PS. The latest nightly build you were using is not the latest. You need to 
look at :-
http://www.jpox.org/downloads/nightly
to get the very latest (SourceForge have changed their logon process so we 
can't automatically put our nightly build on their site at the moment).

-- 
Andy
Java Persistent Objects - JPOX

Re: JDOFatalInternalException using single field identity

Posted by Michael Watzek <mw...@spree.de>.
Hi Andy,

>>This is a configuration file
>>executing only test cases of class "NewObjectIdInstance". You may adapt
>>the entry "jdo.tck.classes" as appropriate. Please copy this file to
>>".../tck20/conf", then execute in tck20:
> 
> 
> Yes, but how do I run a single test ? 
> I'm not interested in running a block of tests, just one of the failing ones. 
> For example, how do I run
> "testSingleFieldIdentityInitializedInteger" ?
I think, we do not support this case currently. You can run a single 
test class, but you cannot run a single test case if the test class has 
several test cases like class "NewObjectIdInstance".

Editting your project.properties file wrt entry "jdo.tck.identitytypes", 
you can run class "NewObjectIdInstance" only for application identity. 
On my system, this takes less than 10 seconds.

Regards,
Michael
-- 
-------------------------------------------------------------------
Michael Watzek                  Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de        Buelowstr. 66
Tel.:  ++49/30/235 520 36       10783 Berlin - Germany
Fax.:  ++49/30/217 520 12       http://www.spree.de/
-------------------------------------------------------------------

Re: JDOFatalInternalException using single field identity

Posted by Andy Jefferson <an...@jpox.org>.
> This is a configuration file
> executing only test cases of class "NewObjectIdInstance". You may adapt
> the entry "jdo.tck.classes" as appropriate. Please copy this file to
> ".../tck20/conf", then execute in tck20:

Yes, but how do I run a single test ? 
I'm not interested in running a block of tests, just one of the failing ones. 
For example, how do I run
"testSingleFieldIdentityInitializedInteger" ?


-- 
Andy
Java Persistent Objects - JPOX

Re: JDOFatalInternalException using single field identity

Posted by Michael Watzek <mw...@spree.de>.
Hi Andy,

I attached a file (sometests.conf). This is a configuration file 
executing only test cases of class "NewObjectIdInstance". You may adapt 
the entry "jdo.tck.classes" as appropriate. Please copy this file to 
".../tck20/conf", then execute in tck20:

maven -o -Djdo.tck.cfglist=sometests.conf runtck.jdori

This runs the test cases of class "NewObjectIdInstance" for application 
identity and datastore identity. The run using application identity 
fails with 17 errors. You can ignore the NPEs (6 errors) for now. They 
are thrown because the enhanced code passes "null" as arguments to 
constructors of SingleIdentity classes.

The remaining 11 errors indicate the problem which I'm interested in. I 
attached the log files of those runs for your convenience.

Regards,
Michael


>>I sent a patch (Assertion-A7-A8.patch) containg the test case
>>(NewObjectIdInstance.java) to jdo-dev today. I ran it with JPOX build
>>"20050628.022915". This seems to be the latest build available under
>>nightly builds. I still get the exception (see below).
>>
>>Please have a look at the test case and the meta data, if there is
>>something wrong.
> 
> 
> OK. Please can you point me to instructions on how to run the TCK for a single 
> test, since things seem to have changed since I was last near it.
> 


-- 
-------------------------------------------------------------------
Michael Watzek                  Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de        Buelowstr. 66
Tel.:  ++49/30/235 520 36       10783 Berlin - Germany
Fax.:  ++49/30/217 520 12       http://www.spree.de/
-------------------------------------------------------------------

Re: JDOFatalInternalException using single field identity

Posted by Andy Jefferson <an...@jpox.org>.
> I sent a patch (Assertion-A7-A8.patch) containg the test case
> (NewObjectIdInstance.java) to jdo-dev today. I ran it with JPOX build
> "20050628.022915". This seems to be the latest build available under
> nightly builds. I still get the exception (see below).
>
> Please have a look at the test case and the meta data, if there is
> something wrong.

OK. Please can you point me to instructions on how to run the TCK for a single 
test, since things seem to have changed since I was last near it.

-- 
Andy
Java Persistent Objects - JPOX

Re: JDOFatalInternalException using single field identity

Posted by Michael Watzek <mw...@spree.de>.
Hi Andy,

I sent a patch (Assertion-A7-A8.patch) containg the test case 
(NewObjectIdInstance.java) to jdo-dev today. I ran it with JPOX build 
"20050628.022915". This seems to be the latest build available under 
nightly builds. I still get the exception (see below).

Please have a look at the test case and the meta data, if there is 
something wrong.

Regards,
Michael

testSingleFieldIdentityInitializedbyte(org.apache.jdo.tck.api.persistencecapable.NewObjectIdInstance)
javax.jdo.JDOFatalInternalException: Cannot populate the field "id" of 
class 
"org.apache.jdo.tck.pc.singlefieldidentity.PCPointSingleFieldPrimitivebyte" 
since it is already populated.
	at org.jpox.metadata.FieldMetaData.mergeORMData(FieldMetaData.java:451)
	at org.jpox.metadata.ClassMetaData.mergeORMData(ClassMetaData.java:335)
	at 
org.jpox.metadata.MetaDataManager.addORMDataToClass(MetaDataManager.java:665)
	at org.jpox.metadata.ClassMetaData.populate(ClassMetaData.java:395)
	at 
org.jpox.metadata.MetaDataManager.initialiseMetaDataForClass(MetaDataManager.java:965)
	at 
org.jpox.metadata.MetaDataManager.getParsedMetaDataForClass(MetaDataManager.java:434)
	at 
org.jpox.metadata.MetaDataManager.getMetaDataForClassOrInterface(MetaDataManager.java:338)
	at 
org.jpox.metadata.MetaDataManager.getMetaDataForClass(MetaDataManager.java:296)
	at org.jpox.state.StateManagerImpl.<init>(StateManagerImpl.java:559)
	at 
org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:975)
	at 
org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:1012)
	at 
org.apache.jdo.tck.api.persistencecapable.AbstractPersistenceCapableTest.makePersistent(AbstractPersistenceCapableTest.java:21)
	at 
org.apache.jdo.tck.api.persistencecapable.NewObjectIdInstance.singleFieldIdentityInitialized(NewObjectIdInstance.java:101)
	at 
org.apache.jdo.tck.api.persistencecapable.NewObjectIdInstance.testSingleFieldIdentityInitializedbyte(NewObjectIdInstance.java:138)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:203)
	at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:128)
	at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:106)

>>I have written a test case checking single field identity. For this
>>purpose, I created new PC classes, new jdo files, new orm files, and I
>>extended the schema for application identity. When I run the test case,
>>I get a JDOFatalInternalException from JPOX (see below). Currently, I
>>run build jpox-20050617.022105.jar.
> 
> 
> I created a testcase doing the same thing :-
> * abstract base class with concrete PC class
> * specifying the details on JDO and ORM files
> as you did and all worked fine. I'm using latest JPOX. Suggest that you try 
> the latest build of JPOX (http://www.jpox.org/downloads/nightly/)
> 


-- 
-------------------------------------------------------------------
Michael Watzek                  Tech@Spree Engineering GmbH
mailto:mwa.tech@spree.de        Buelowstr. 66
Tel.:  ++49/30/235 520 36       10783 Berlin - Germany
Fax.:  ++49/30/217 520 12       http://www.spree.de/
-------------------------------------------------------------------