I'm getting the following error from my mapping file:
/jdk/bin/java -cp
/castor/build/classes:WEB-INF/lib/activation.jar:WEB-INF/lib/gnu-regexp-1.0.8.jar:WEB-INF/lib/jetty.jar:WEB-INF/lib/jetty.servlet.jar:WEB-INF/lib/jile.jar:WEB-INF/lib/junit-3.7.jar:WEB-INF/lib/jwaaDemo.jar:WEB-INF/lib/jwaa.jar:WEB-INF/lib/mail.jar:WEB-INF/lib/mm.mysql-2.0.8-bin.jar:WEB-INF/lib/mybank.jar:WEB-INF/lib/velocity-dep-1.3-dev.jar:WEB-INF/lib/xalan.jar:WEB-INF/lib/xerces.jar:WEB-INF/lib/xml.jar:WEB-INF/lib/xsltc.jar:classes
edu.virtualschool.jile.core.InitializeDBMS /jile xsl/config.xsl
xml/config.xml
org.exolab.castor.mapping.MappingException: Could not find the class
edu.virtualschool.jile.model.Person.ID
at
org.exolab.castor.mapping.loader.MappingLoader.createFieldDesc(MappingLoader.java:583)
at
org.exolab.castor.xml.XMLMappingLoader.createFieldDesc(XMLMappingLoader.java:260)
at
org.exolab.castor.mapping.loader.MappingLoader.createFieldDescs(MappingLoader.java:519)
at
org.exolab.castor.mapping.loader.MappingLoader.createDescriptor(MappingLoader.java:343)
at
org.exolab.castor.xml.XMLMappingLoader.createDescriptor(XMLMappingLoader.java:157)
at
org.exolab.castor.mapping.loader.MappingLoader.loadMapping(MappingLoader.java:212)
at org.exolab.castor.mapping.Mapping.getResolver(Mapping.java:278)
at org.exolab.castor.mapping.Mapping.getResolver(Mapping.java:234)
at org.exolab.castor.xml.Unmarshaller.setMapping(Unmarshaller.java:224)
at org.exolab.castor.xml.Unmarshaller.<init>(Unmarshaller.java:158)
at
edu.virtualschool.jile.core.InitializeDBMS.importPerson(InitializeDBMS.java:41)
at
edu.virtualschool.jile.core.InitializeDBMS.main(InitializeDBMS.java:28)
I'm guessing this is because ID is defined as an inner class of
Person, like this:
package edu.virtualschool.jile.model;
public class Person extends edu.virtualschool.jwaa.AbstractAccount
{
public ID id;
public Identifier ident;
public Pass pass;
public Name name;
public Street street;
public City city;
public USState state;
public Country country;
public Zipcode zipcode;
public Phone phone;
public Email email;
public Url url;
public static class ID extends dom.mybank.field.AbstractID
{
}
}
The other types (Identifier, etc) are defined as external classes and
are apparently ok.
Here's the mapping file (I'm very new at this so much of this file is
guesswork).
<mapping>
<class name="edu.virtualschool.jile.model.Person">
<map-to xml="person"/>
<field name="pass" required="true"
type="edu.virtualschool.field.Pass">
<bind-xml name="pass" node="element"/>
</field>
<field name="name" required="true"
type="edu.virtualschool.field.Name">
<bind-xml name="name" node="element"/>
</field>
<field name="street" required="true"
type="edu.virtualschool.field.Street">
<bind-xml name="street" node="element"/>
</field>
<field name="city" required="true"
type="edu.virtualschool.field.City">
<bind-xml name="city" node="element"/>
</field>
<field name="state" required="true"
type="edu.virtualschool.field.USState">
<bind-xml name="state" node="element"/>
</field>
<field name="country" required="true"
type="edu.virtualschool.field.Country">
<bind-xml name="country" node="element"/>
</field>
<field name="zipcode" required="true"
type="edu.virtualschool.field.Zipcode">
<bind-xml name="zipcode" node="element"/>
</field>
<field name="phone" required="true"
type="edu.virtualschool.field.Phone">
<bind-xml name="phone" node="element"/>
</field>
<field name="email" required="true"
type="edu.virtualschool.field.Email">
<bind-xml name="email" node="element"/>
</field>
<field name="url" required="true"
type="edu.virtualschool.field.Url">
<bind-xml name="url" node="element"/>
</field>
<field name="ident" required="true"
type="edu.virtualschool.field.Identifier">
<bind-xml name="ident" node="attribute"/>
</field>
<field name="id" required="true" direct="true"
type="edu.virtualschool.jile.model.Person.ID" >
<bind-xml name="foo-like" node="attribute"/>
</field>
</class>
</mapping>
--
Brad Cox, PhD; [EMAIL PROTECTED] 703 361 4751
o For industrial age goods there were checks and credit cards.
For everything else there is http://virtualschool.edu/mybank
o Java Interactive Learning Environment http://virtualschool.edu/jile
o Java Web Application Architecture: http://virtualschool.edu/jwaa
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev