db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michelle Caisse <Michelle.Cai...@Sun.COM>
Subject embedded element problem
Date Tue, 16 Aug 2005 20:20:38 GMT
Hi,

Does the metadata and schema below look okay?  I'm getting a 
NullPointerException.

<jdo>
<package name="org.apache.jdo.tck.pc.fieldtypes">
<class name="CollectionCollections" identity-type="application"
    
objectid-class="org.apache.jdo.tck.pc.fieldtypes.CollectionCollections$Oid">
...
<field name="CollectionOfObject1" >
<collection element-type="org.apache.jdo.tck.pc.fieldtypes.SimpleClass" 
embedded-element="true">
</collection>
</field>
...

<orm>
    <package name="org.apache.jdo.tck.pc.fieldtypes">
        <class name="CollectionCollections" table="COLLECTION_COLLECTIONS">
...
            <field name="CollectionOfObject1"
                   table="COLLECTION_OF_OBJECT1">
                <join column="IDENTIFIER"/>
                <element>
                  <embedded>
                    <field name="id" column="ID"/>
                    <field name="IntField" column="INTVAL"/>
                    <field name="StringField" column="STRINGVAL"/>
                  </embedded>
                </element>
            </field>
...
CREATE TABLE COLLECTION_OF_OBJECT1
(
    IDENTIFIER INTEGER REFERENCES COLLECTION_COLLECTIONS NOT NULL,
    ID BIGINT NOT NULL,
    INTVAL INTEGER NOT NULL,
    STRINGVAL VARCHAR(128) NOT NULL
);

 test(org.apache.jdo.tck.models.fieldtypes.TestCollectionCollections)java.lang.NullPointerException
    at 
org.jpox.metadata.EmbeddedMetaData.populate(EmbeddedMetaData.java:121)
    at 
org.jpox.metadata.AbstractElementMetaData.populate(AbstractElementMetaData.java:165)
    at org.jpox.metadata.ElementMetaData.populate(ElementMetaData.java:82)
    at org.jpox.metadata.FieldMetaData.populate(FieldMetaData.java:736)
    at org.jpox.metadata.ClassMetaData.populate(ClassMetaData.java:725)
    at 
org.jpox.metadata.MetaDataManager.populateClassesInFile(MetaDataManager.java:636)
    at 
org.jpox.metadata.MetaDataManager.getFileMetaDataForUrlContainingClass(MetaDataManager.java:1186)
    at 
org.jpox.metadata.MetaDataManager.getURLForPackageBasedMetaDataFileHoldingClass(MetaDataManager.java:1269)
    at 
org.jpox.metadata.MetaDataManager.getURLForPackageBasedMetaDataFileHoldingClass(MetaDataManager.java:1318)
    at 
org.jpox.metadata.MetaDataManager.getURLForPackageBasedMetaDataFileHoldingClass(MetaDataManager.java:1318)
    at 
org.jpox.metadata.MetaDataManager.getURLForPackageBasedMetaDataFileHoldingClass(MetaDataManager.java:1318)
    at 
org.jpox.metadata.MetaDataManager.getURLForPackageBasedMetaDataFileHoldingClass(MetaDataManager.java:1318)
    at 
org.jpox.metadata.MetaDataManager.getURLForPackageBasedMetaDataFileHoldingClass(MetaDataManager.java:1318)
    at 
org.jpox.metadata.MetaDataManager.getURLForPackageBasedMetaDataFileHoldingClass(MetaDataManager.java:1318)
    at 
org.jpox.metadata.MetaDataManager.getURLForPackageBasedMetaDataFileHoldingClass(MetaDataManager.java:1318)
    at 
org.jpox.metadata.MetaDataManager.loadMetaDataForClass(MetaDataManager.java:1147)
    at 
org.jpox.metadata.MetaDataManager.getMetaDataForClassOrInterface(MetaDataManager.java:387)
    at 
org.jpox.metadata.MetaDataManager.getMetaDataForClass(MetaDataManager.java:311)
    at 
org.jpox.AbstractPersistenceManager.hasMetaDataForPersistenceCapableClass(AbstractPersistenceManager.java:386)
    at 
org.jpox.AbstractPersistenceManager.assertPersistenceCapable(AbstractPersistenceManager.java:417)
    at 
org.jpox.AbstractPersistenceManager.internalMakePersistent(AbstractPersistenceManager.java:957)
    at 
org.jpox.AbstractPersistenceManager.makePersistent(AbstractPersistenceManager.java:1055)
    at 
org.apache.jdo.tck.models.fieldtypes.TestCollectionCollections.runTest(TestCollectionCollections.java:89)
    at 
org.apache.jdo.tck.models.fieldtypes.TestCollectionCollections.test(TestCollectionCollections.java:69)
    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:197)
    at 
org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:128)
    at 
org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:106)

-- Michelle

Mime
View raw message