JDOFatalInternalException using single field identity
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Apache Server configuration support > Apache JDO Project > JDOFatalInternalException using single field identity




Pages (2): [1] 2 »   Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    JDOFatalInternalException using single field identity  
Michael Watzek


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
06-30-05 10:45 PM

Hi Erik, Andy,

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.

The exception is thrown when a PC instance is made persistent. I cannot
find an error in the meta data. So, please have a look at the attached
files. I attached the Java file of the PC class and the meta data files.
Is there anything wrong?

Regards,
Michael

 testSingleFieldIdentityNotIntializedByte
(org.apache.jdo.tck.api.persistencec
apable.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:648
)
at org.jpox.metadata.ClassMetaData.populate(ClassMetaData.java:395)
at
org.jpox.metadata.MetaDataManager. initialiseMetaDataForClass(MetaDataManag
er
.java:948)
at
org.jpox.metadata.MetaDataManager. getParsedMetaDataForClass(MetaDataManage
r.
java:423)
at
org.jpox.metadata.MetaDataManager. getMetaDataForClassOrInterface(MetaDataM
an
ager.java:327)
at
org.jpox.metadata.MetaDataManager.getMetaDataForClass(MetaDataManager.java:2
85)
at org.jpox.state.StateManagerImpl.<init>(StateManagerImpl.java:558)
at
org.jpox.AbstractPersistenceManager. internalMakePersistent(AbstractPersisten

ceManager.java:973)
at
org.jpox.AbstractPersistenceManager. makePersistent(AbstractPersistenceManage

r.java:1010)
at
org.apache.jdo.tck.api.persistencecapable.PersistenceCapableTest.createPersi
stentInstances(PersistenceCapableTest.java:90)
at
org.apache.jdo.tck.api.persistencecapable.PersistenceCapableTest.localSetUp(
PersistenceCapableTest.java:43)
at org.apache.jdo.tck.JDO_Test.setUp(JDO_Test.java:178)
at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:194)
at
org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:128)
at
org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:106)

--
-------------------------------------------------------------------
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/
-------------------------------------------------------------------






[ Post a follow-up to this message ]



    Re: JDOFatalInternalException using single field identity  
Andy Jefferson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-01-05 10:46 PM

> 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






[ Post a follow-up to this message ]



    Re: JDOFatalInternalException using single field identity  
Michael Watzek


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-05-05 12:45 PM

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(o
rg.apache.jdo.tck.api.persistencecap
able.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(MetaDataManag
er
.java:965)
at
org.jpox.metadata.MetaDataManager. getParsedMetaDataForClass(MetaDataManage
r.
java:434)
at
org.jpox.metadata.MetaDataManager. getMetaDataForClassOrInterface(MetaDataM
an
ager.java:338)
at
org.jpox.metadata.MetaDataManager.getMetaDataForClass(MetaDataManager.java:2
96)
at org.jpox.state.StateManagerImpl.<init>(StateManagerImpl.java:559)
at
org.jpox.AbstractPersistenceManager. internalMakePersistent(AbstractPersisten

ceManager.java:975)
at
org.jpox.AbstractPersistenceManager. makePersistent(AbstractPersistenceManage

r.java:1012)
at
org.apache.jdo.tck.api.persistencecapable.AbstractPersistenceCapableTest.mak
 ePersistent(AbstractPersistenceCapableTe
st.java:21)
at
org.apache.jdo.tck.api.persistencecapable.NewObjectIdInstance.singleFieldIde
ntityInitialized(NewObjectIdInstance.java:101)
at
org.apache.jdo.tck.api.persistencecapable.NewObjectIdInstance.testSingleFiel
 dIdentityInitializedbyte(NewObjectIdInst
ance.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 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 tr
y
> 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/
-------------------------------------------------------------------






[ Post a follow-up to this message ]



    Re: JDOFatalInternalException using single field identity  
Andy Jefferson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-05-05 10:45 PM

> 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 sing
le
test, since things seem to have changed since I was last near it.

--
Andy
Java Persistent Objects - JPOX






[ Post a follow-up to this message ]



    Re: JDOFatalInternalException using single field identity  
Michael Watzek


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-05-05 10:45 PM

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

 
>
>
> OK. Please can you point me to instructions on how to run the TCK for a si
ngle
> 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/
-------------------------------------------------------------------






[ Post a follow-up to this message ]



    Re: JDOFatalInternalException using single field identity  
Andy Jefferson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-06-05 07:45 AM

> 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
" testSingleFieldIdentityInitializedIntege
r" ?


--
Andy
Java Persistent Objects - JPOX






[ Post a follow-up to this message ]



    Re: JDOFatalInternalException using single field identity  
Michael Watzek


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-06-05 12:45 PM

Hi Andy,
 
>
>
> Yes, but how do I run a single test ?
> I'm not interested in running a block of tests, just one of the failing on
es.
> For example, how do I run
> " testSingleFieldIdentityInitializedIntege
r" ?
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/
-------------------------------------------------------------------






[ Post a follow-up to this message ]



    Re: JDOFatalInternalException using single field identity  
Andy Jefferson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-06-05 12:45 PM

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






[ Post a follow-up to this message ]



    Re: JDOFatalInternalException using single field identity  
Michael Watzek


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-06-05 12:45 PM

Hi Andy,

> Hi Michael,
>
> 
>
>
> 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 a
nd
> 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.
 
>
>
> 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/
-------------------------------------------------------------------






[ Post a follow-up to this message ]



    Re: JDOFatalInternalException using single field identity  
Craig Russell


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
07-08-05 01:45 AM






[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 06:03 AM.      Post New Thread    Post A Reply      
Pages (2): [1] 2 »   Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register