J.B. is correct, you are missing ending tags on two of your field
elements, you have <field> instead of </field>

--Keith

> Rick Salsa wrote:
> 
> Hi,
> 
> I'm trying to deploy a mapping and keep getting an error on two
> certain fields. Here is the mapping for the class that I"m having
> problems with:
> 
>   <class name="ca.mb.fusiongroup.ftp.domain.Files" identity="id"
> key-generator="MAX">
>     <description>Files</description>
>     <cache-type type="none" />
>     <map-to table="files" xml="files" />
>     <field name="id" type="big-decimal">
>         <sql name="id" type="decimal" />
>     </field>
>     <field name="name" type="string">
>         <sql name="name" type="varchar" />
>     </field>
>     <field name="type" type="string">
>         <sql name="file_type" type="varchar" />
>     </field>
>     <field name="owner"
> type="com.opensymphony.module.user.provider.castor.entity.CastorUser">
>         <sql many-table="owner" many-key="file_id" name="owner_id" />
>     <field>
>     <field name="to"
> type="com.opensymphony.module.user.provider.castor.entity.CastorUser">
>         <sql name="send_to" type="decimal" />
>     <field>
>     <field name="file" type="stream" lazy="true">
>         <sql name="file" type="blob" dirty="ignore" />
>     </field>
>   </class>
> 
> The problem is the "owner" and "to" fields. I keep receiving this
> exception:
> 
> org.xml.sax.SAXException: unable to find FieldDescriptor for 'field'
> in ClassDescriptor of field
>         at org.exolab.castor.xml.UnmarshalHandler.startElement(Unknown
> Source)
>         at
> org.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:415)
>         at
> org.apache.xerces.impl.XMLNamespaceBinder.startElement(XMLNamespaceBinder.java:571)
>         at
> org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(XMLDTDValidator.java:756)
>         at
> 
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:752)
>         at
> 
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1453)
>         at
> 
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
>         at
> org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:524)
>         at
> org.apache.xerces.parsers.DTDConfiguration.parse(DTDConfiguration.java:580)
>         at
> org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:152)
>         at
> org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1169)
>         at org.exolab.castor.xml.Unmarshaller.unmarshal(Unknown
> Source)
>         at
> org.exolab.castor.mapping.Mapping.loadMappingInternal(Unknown Source)
>         at
> org.exolab.castor.mapping.Mapping.loadMappingInternal(Unknown Source)
>         at org.exolab.castor.mapping.Mapping.loadMapping(Unknown
> Source)
>         at
> org.exolab.castor.jdo.engine.DatabaseRegistry.loadDatabase(Unknown
> Source)
>         at org.exolab.castor.jdo.JDO.getDatabase(Unknown Source)
>         at
> 
>com.opensymphony.module.user.provider.castor.CastorDataProvider.getDatabase(CastorDataProvider.java:129)
>         at
> 
>com.opensymphony.module.user.provider.castor.CastorCredentialsProvider.list(CastorCredentialsProvider.java:149)
>         at
> com.opensymphony.module.user.UserManager.getEntities(UserManager.java:265)
>         at
> com.opensymphony.module.user.UserManager.getUsers(UserManager.java:120)
>         at _users__jsp._jspService(_users__jsp.java:48)
>         at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
>         at com.caucho.jsp.Page.subservice(Page.java:485)
>         at
> com.caucho.server.http.FilterChainPage.doFilter(FilterChainPage.java:182)
>         at
> com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(Unknown
> Source)
>         at
> com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(Unknown
> Source)
>         at
> com.caucho.server.http.FilterChainFilter.doFilter(FilterChainFilter.java:88)
>         at
> com.caucho.server.http.Invocation.service(Invocation.java:311)
>         at
> com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
>         at
> com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:221)
>         at
> com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
>         at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
>         at java.lang.Thread.run(Thread.java:496)
> 
> The weird thing is, I have mapped that class
> (com.opensymphony.module.user.provider.castor.entity.CastorUser) above
> in the same mapping file, and it works. I'm not too sure what the
> exception is telling me. What I'm trying to do, is that class, keeps a
> record of files and who owns them and who they are for. I'm trying to
> map the user's id in the the owner field and who it is for in the to
> field.  I've also tried just making those fields and int and
> java.math.BigDecimal fields with no luck. Same exception all the time.
> 
> Any ideas would be very helpful.
> 
> Thanks in advance,
> /rick

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to