db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Bouschen <mbo.t...@spree.de>
Subject Re: svn commit: r382920 - in /db/jdo/trunk/tck20/src: conf/configurations.list orm/applicationidentity/org/apache/jdo/tck/pc/company/package-standard.orm orm/datastoreidentity/org/apache/jdo/tck/pc/company/package-standard.orm
Date Sat, 04 Mar 2006 20:17:58 GMT
Hi,

just FYI: after updating my workspace with this change adding 
<interface> metadata to the company orm file most of the tests result in 
a JDOException. The exception disappears when reverting the changes in 
company/package-standard.orm. Maybe the JPOX orm metadata parser does 
not yet accept the <interface> definition.

Here is the exception:

JDOUserException: One or more instances could not be made persistent
  at 
org.jpox.AbstractPersistenceManager.makePersistentAll(AbstractPersistenceManager.java:1217)
  ...
with a nested exception:
JDOException: Cannot read the JDO Meta-Data file "<input stream> 
java.lang.ClassCastException"
  at 
org.jpox.metadata.MetaDataParser.parseMetaDataStream(MetaDataParser.java:174)
  ...
with a nested exception:
java.lang.ClassCastException
  at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:691)
  ...

Regards Michael

>Author: clr
>Date: Fri Mar  3 12:08:34 2006
>New Revision: 382920
>
>URL: http://svn.apache.org/viewcvs?rev=382920&view=rev
>Log:
>JDO-296 Added new test for persistent interfaces with new mapping
>
>Modified:
>    db/jdo/trunk/tck20/src/conf/configurations.list
>    db/jdo/trunk/tck20/src/orm/applicationidentity/org/apache/jdo/tck/pc/company/package-standard.orm
>    db/jdo/trunk/tck20/src/orm/datastoreidentity/org/apache/jdo/tck/pc/company/package-standard.orm
>
>Modified: db/jdo/trunk/tck20/src/conf/configurations.list
>URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/src/conf/configurations.list?rev=382920&r1=382919&r2=382920&view=diff
>==============================================================================
>--- db/jdo/trunk/tck20/src/conf/configurations.list (original)
>+++ db/jdo/trunk/tck20/src/conf/configurations.list Fri Mar  3 12:08:34 2006
>@@ -17,6 +17,7 @@
>                  companyM-MRelationships.conf \
>                  companyAllRelationships.conf \
>                  companyPMClass.conf \
>+                 companyPMInterface.conf \
>                  inheritance1.conf \
>                  inheritance2.conf \
>                  inheritance3.conf \
>
>Modified: db/jdo/trunk/tck20/src/orm/applicationidentity/org/apache/jdo/tck/pc/company/package-standard.orm
>URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/src/orm/applicationidentity/org/apache/jdo/tck/pc/company/package-standard.orm?rev=382920&r1=382919&r2=382920&view=diff
>==============================================================================
>--- db/jdo/trunk/tck20/src/orm/applicationidentity/org/apache/jdo/tck/pc/company/package-standard.orm
(original)
>+++ db/jdo/trunk/tck20/src/orm/applicationidentity/org/apache/jdo/tck/pc/company/package-standard.orm
Fri Mar  3 12:08:34 2006
>@@ -162,5 +162,159 @@
>                 <element column="MEMBER"/>
>             </field>
>         </class>
>+
>+        <interface name="ICompany" table="companies">
>+            <property name="companyid" column="ID"/>
>+            <property name="name" column="NAME">
>+              <column name="NAME" sql-type="VARCHAR"/>
>+            </property>
>+            <property name="founded" column="FOUNDEDDATE"/>
>+            <property name="address">
>+                <embedded null-indicator-column="COUNTRY">
>+                    <property name="addrid" column="ADDRID"/>
>+                    <property name="street" column="STREET"/>
>+                    <property name="city" column="CITY"/>
>+                    <property name="state" column="STATE"/>
>+                    <property name="zipcode" column="ZIPCODE"/>
>+                    <property name="country" column="COUNTRY"/>
>+                </embedded>
>+            </property>
>+            <property name="departments" mapped-by="company"/>
>+        </interface>
>+
>+        <interface name="IDepartment" table="departments">
>+            <property name="deptid" column="ID"/>
>+            <property name="name" column="NAME"/>
>+            <property name="company" column="COMPANYID"/>
>+            <property name="employees" mapped-by="department"/>
>+            <property name="fundedEmps" mapped-by="fundingDept"/>
>+            <property name="employeeOfTheMonth" column="EMP_OF_THE_MONTH"/>
>+        </interface>
>+
>+        <interface name="IPartTimeEmployee">
>+            <inheritance strategy="superclass-table"/>
>+            <property name="wage" column="WAGE"/>
>+        </interface>
>+
>+        <interface name="IFullTimeEmployee">
>+            <inheritance strategy="superclass-table"/>
>+            <property name="salary" column="SALARY"/>
>+        </interface>
>+
>+        <interface name="IEmployee">
>+            <inheritance strategy="superclass-table"/>
>+            <property name="hiredate" column="HIREDATE"/>
>+            <property name="weeklyhours" column="WEEKLYHOURS"/>
>+            <property name="dentalInsurance" mapped-by="employee"/>
>+            <property name="medicalInsurance" mapped-by="employee"/>
>+            <property name="department" column="DEPARTMENT">
>+                        <foreign-key/>
>+            </property>
>+            <property name="fundingDept" column="FUNDINGDEPT">
>+                        <foreign-key/>
>+            </property>
>+            <property name="manager" column="MANAGER">
>+                        <foreign-key/>
>+            </property>
>+            <property name="mentor" column="MENTOR">
>+                        <foreign-key/>
>+            </property>
>+            <property name="protege" mapped-by="mentor"/>
>+            <property name="hradvisor" column="HRADVISOR">
>+                        <foreign-key/>
>+            </property>
>+            <property name="reviewedProjects" mapped-by="reviewers">
>+            </property>
>+            <property name="projects" mapped-by="members"/>
>+            <property name="team" mapped-by="manager"/>
>+            <property name="hradvisees" mapped-by="hradvisor"/>
>+        </interface>
>+
>+        <interface name="IPerson" table="persons">
>+            <inheritance strategy="new-table">
>+                <discriminator strategy="class-name" column="DISCRIMINATOR"
>+                    indexed="true"/>
>+            </inheritance>
>+            <property name="personid" column="PERSONID"/>
>+            <property name="firstname" column="FIRSTNAME"/>
>+            <property name="lastname" column="LASTNAME"/>
>+            <property name="middlename">
>+              <column name="MIDDLENAME" allows-null="true"/>
>+            </property>
>+            <property name="address">
>+                <embedded null-indicator-column="COUNTRY">
>+                    <property name="addrid">
>+                      <column name="ADDRID" allows-null="true"/>
>+                    </property>
>+                    <property name="street">
>+                      <column name="STREET" allows-null="true"/>
>+                    </property>
>+                    <property name="city">
>+                      <column name="CITY" allows-null="true"/>
>+                    </property>
>+                    <property name="state">
>+                      <column name="STATE" allows-null="true"/>
>+                    </property>
>+                    <property name="zipcode">
>+                      <column name="ZIPCODE" allows-null="true"/>
>+                    </property>
>+                    <property name="country">
>+                      <column name="COUNTRY" allows-null="true"/>
>+                    </property>
>+                </embedded>
>+            </property>
>+            <property name="phoneNumbers" table="employee_phoneno_type" >
>+                <join column="EMPID"/>
>+                <key column="TYPE"/>
>+                <value column="PHONENO"/>
>+            </property>
>+            <query name="packageORM">
>+                SELECT FROM org.apache.jdo.tck.pc.company.Person
>+                WHERE personid > 2
>+            </query>
>+        </interface>
>+
>+        <interface name="IInsurance" table="insuranceplans">
>+            <inheritance strategy="new-table">
>+                <discriminator strategy="class-name" column="DISCRIMINATOR">
>+                    <index name="INS_DISCRIMINATOR_INDEX" unique="false"/>
>+                </discriminator>
>+            </inheritance>
>+            <property name="insid" column="INSID"/>
>+            <property name="carrier" column="CARRIER"/>
>+            <property name="employee" column="EMPLOYEE">
>+                 <foreign-key/>
>+            </property>
>+        </interface>
>+
>+        <interface name="IDentalInsurance">
>+            <inheritance strategy="superclass-table"/>
>+            <property name="lifetimeOrthoBenefit" column="LIFETIME_ORTHO_BENEFIT"/>
>+        </interface>
>+
>+        <interface name="IMedicalInsurance">
>+            <inheritance strategy="superclass-table"/>
>+            <property name="planType" column="PLANTYPE"/>
>+        </interface>
>+
>+        <interface name="IProject" table="projects">
>+            <property name="projid" column="PROJID"/>
>+            <property name="name" column="NAME"/>
>+            <property name="budget">
>+               <column name="BUDGET" jdbc-type="DECIMAL" length="11" scale="2"/>
>+            </property>
>+            <property name="reviewers" table="project_reviewer">
>+                <join column="PROJID">
>+                    <foreign-key name="PR_PROJ_FK"/>
>+                </join>
>+                <element column="REVIEWER">
>+                    <foreign-key name="PR_REV_FK"/>
>+                </element>
>+            </property>
>+            <property name="members" table="project_member">
>+                <join column="PROJID"/>
>+                <element column="MEMBER"/>
>+            </property>
>+        </interface>
>     </package>
> </orm>
>
>Modified: db/jdo/trunk/tck20/src/orm/datastoreidentity/org/apache/jdo/tck/pc/company/package-standard.orm
>URL: http://svn.apache.org/viewcvs/db/jdo/trunk/tck20/src/orm/datastoreidentity/org/apache/jdo/tck/pc/company/package-standard.orm?rev=382920&r1=382919&r2=382920&view=diff
>==============================================================================
>--- db/jdo/trunk/tck20/src/orm/datastoreidentity/org/apache/jdo/tck/pc/company/package-standard.orm
(original)
>+++ db/jdo/trunk/tck20/src/orm/datastoreidentity/org/apache/jdo/tck/pc/company/package-standard.orm
Fri Mar  3 12:08:34 2006
>@@ -165,5 +165,165 @@
>                 <element column="MEMBER"/>
>             </field>
>         </class>
>+
>+        <interface name="ICompany" table="companies">
>+            <datastore-identity strategy="identity" column="DATASTORE_IDENTITY"/>
>+            <property name="companyid" column="ID"/>
>+            <property name="name" column="NAME">
>+              <column name="NAME" sql-type="VARCHAR"/>
>+            </property>
>+            <property name="founded" column="FOUNDEDDATE"/>
>+            <property name="address">
>+                <embedded null-indicator-column="COUNTRY">
>+                    <property name="addrid" column="ADDRID"/>
>+                    <property name="street" column="STREET"/>
>+                    <property name="city" column="CITY"/>
>+                    <property name="state" column="STATE"/>
>+                    <property name="zipcode" column="ZIPCODE"/>
>+                    <property name="country" column="COUNTRY"/>
>+                </embedded>
>+            </property>
>+            <property name="departments" mapped-by="company"/>
>+        </interface>
>+
>+        <interface name="IDepartment" table="departments">
>+            <datastore-identity strategy="identity" column="DATASTORE_IDENTITY"/>
>+            <property name="deptid" column="ID"/>
>+            <property name="name" column="NAME"/>
>+            <property name="company" column="COMPANYID"/>
>+            <property name="employees" mapped-by="department"/>
>+            <property name="fundedEmps" mapped-by="fundingDept"/>
>+            <property name="employeeOfTheMonth" column="EMP_OF_THE_MONTH"/>
>+        </interface>
>+
>+        <interface name="IPartTimeEmployee">
>+            <inheritance strategy="superclass-table"/>
>+            <property name="wage" column="WAGE"/>
>+        </interface>
>+
>+        <interface name="IFullTimeEmployee">
>+            <inheritance strategy="superclass-table"/>
>+            <property name="salary" column="SALARY"/>
>+        </interface>
>+
>+        <interface name="IEmployee">
>+            <inheritance strategy="superclass-table"/>
>+            <property name="hiredate" column="HIREDATE"/>
>+            <property name="weeklyhours" column="WEEKLYHOURS"/>
>+            <property name="dentalInsurance" mapped-by="employee"/>
>+            <property name="medicalInsurance" mapped-by="employee"/>
>+            <property name="department" column="DEPARTMENT">
>+                        <foreign-key/>
>+            </property>
>+            <property name="fundingDept" column="FUNDINGDEPT">
>+                        <foreign-key/>
>+            </property>
>+            <property name="manager" column="MANAGER">
>+                        <foreign-key/>
>+            </property>
>+            <property name="mentor" column="MENTOR">
>+                        <foreign-key/>
>+            </property>
>+            <property name="protege" mapped-by="mentor"/>
>+            <property name="hradvisor" column="HRADVISOR">
>+                        <foreign-key/>
>+            </property>
>+            <property name="reviewedProjects" mapped-by="reviewers">
>+            </property>
>+            <property name="projects" mapped-by="members"/>
>+            <property name="team" mapped-by="manager"/>
>+            <property name="hradvisees" mapped-by="hradvisor"/>
>+        </interface>
>+
>+        <interface name="IPerson" table="persons">
>+            <datastore-identity strategy="identity" column="DATASTORE_IDENTITY"/>
>+            <inheritance strategy="new-table">
>+                <discriminator strategy="class-name" column="DISCRIMINATOR"
>+                    indexed="true"/>
>+            </inheritance>
>+            <property name="personid" column="PERSONID"/>
>+            <property name="firstname" column="FIRSTNAME"/>
>+            <property name="lastname" column="LASTNAME"/>
>+            <property name="middlename">
>+              <column name="MIDDLENAME" allows-null="true"/>
>+            </property>
>+            <property name="address">
>+                <embedded null-indicator-column="COUNTRY">
>+                    <property name="addrid">
>+                      <column name="ADDRID" allows-null="true"/>
>+                    </property>
>+                    <property name="street">
>+                      <column name="STREET" allows-null="true"/>
>+                    </property>
>+                    <property name="city">
>+                      <column name="CITY" allows-null="true"/>
>+                    </property>
>+                    <property name="state">
>+                      <column name="STATE" allows-null="true"/>
>+                    </property>
>+                    <property name="zipcode">
>+                      <column name="ZIPCODE" allows-null="true"/>
>+                    </property>
>+                    <property name="country">
>+                      <column name="COUNTRY" allows-null="true"/>
>+                    </property>
>+                </embedded>
>+            </property>
>+            <property name="phoneNumbers" table="employee_phoneno_type" >
>+                <join column="EMPID"/>
>+                <key column="TYPE"/>
>+                <value column="PHONENO"/>
>+            </property>
>+            <query name="packageORM">
>+                SELECT FROM org.apache.jdo.tck.pc.company.Person
>+                WHERE personid > 2
>+            </query>
>+        </interface>
>+
>+        <interface name="IInsurance" table="insuranceplans">
>+            <datastore-identity strategy="identity" column="DATASTORE_IDENTITY"/>
>+            <inheritance strategy="new-table">
>+                <discriminator strategy="class-name" column="DISCRIMINATOR">
>+                    <index name="INS_DISCRIMINATOR_INDEX" unique="false"/>
>+                </discriminator>
>+            </inheritance>
>+            <property name="insid" column="INSID"/>
>+            <property name="carrier" column="CARRIER"/>
>+            <property name="employee" column="EMPLOYEE">
>+                 <foreign-key/>
>+            </property>
>+        </interface>
>+
>+        <interface name="IDentalInsurance">
>+            <inheritance strategy="superclass-table"/>
>+            <property name="lifetimeOrthoBenefit" column="LIFETIME_ORTHO_BENEFIT"/>
>+        </interface>
>+
>+        <interface name="IMedicalInsurance">
>+            <inheritance strategy="superclass-table"/>
>+            <property name="planType" column="PLANTYPE"/>
>+        </interface>
>+
>+        <interface name="IProject" table="projects">
>+            <datastore-identity strategy="identity" column="DATASTORE_IDENTITY"/>
>+            <property name="projid" column="PROJID"/>
>+            <property name="name" column="NAME"/>
>+            <property name="budget">
>+               <column name="BUDGET" jdbc-type="DECIMAL" length="11" scale="2"/>
>+            </property>
>+            <property name="reviewers" table="project_reviewer">
>+                <join column="PROJID">
>+                    <foreign-key name="PR_PROJ_FK"/>
>+                </join>
>+                <element column="REVIEWER">
>+                    <foreign-key name="PR_REV_FK"/>
>+                </element>
>+            </property>
>+            <property name="members" table="project_member">
>+                <join column="PROJID"/>
>+                <element column="MEMBER"/>
>+            </property>
>+        </interface>
>+
>     </package>
> </orm>
>
>  
>


-- 
Michael Bouschen		Tech@Spree Engineering GmbH
mailto:mbo.tech@spree.de	http://www.tech.spree.de/
Tel.:++49/30/235 520-33		Buelowstr. 66			
Fax.:++49/30/2175 2012		D-10783 Berlin			


Mime
View raw message