Well, I think I found my problem.  I have a class that points to another class, 
which then points back to the original class like this:
      top level
          /\
      link  site
       /
   device
     /
  link

What would be the recommended way to have the "link" class mapped differently 
if it came from a "device" vs coming from the "top level" class?  for instance, 
maybe I just want the "ID" from the link if it's from a "device"
Kurt

From: [email protected]
To: [email protected]
Date: Wed, 23 Jun 2010 16:06:24 -0600
Subject: [castor-user] overusing introspection








I'm trying to use castor with Spring and a mapping file.  It seems like it's 
using a mapping file correctly, but it seems like it's trying to cast via 
introspection null classes - add infinitum.
I get the DEBUG message:
Get descriptor for: org.exolab.castor.mapping.MapItem found: 
org.exolab.castor.xml.introspectedxmlclassdescrip...@1af328; descriptor for 
class: org.exolab.castor.mapping.MapItem; xml name: null

It seems like it's trying to map a getter that is not in the mapping file.  Is 
there a way to force castor to ONLY map those items specifically in the mapping 
file.  Below is the application context I'm using.  Any help would be GREATLY 
appreciated.
Kurt

applicationcontext:
  <?xml 
version="1.0" encoding="UTF-8" ?> 

- <beans xmlns="http://www.springframework.org/schema/beans"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:oxm="http://www.springframework.org/schema/oxm"; 
xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
http://www.springframework.org/schema/context 
http://www.springframework.org/schema/context/spring-context-3.0.xsd 
http://www.springframework.org/schema/oxm 
http://www.springframework.org/schema/oxm/spring-oxm-1.5.xsd";>


- <bean id="mcmreadwriteparse" 
class="org.mitre.mandi.common.MCMReadParse">


  <property name="marshaller" 
ref="castorMarshaller" /> 

  <property name="unmarshaller" 
ref="castorUnMarshaller" /> 

  <property name="mandiFile" 
value="testxmlfiles/input/testmcmin.xml" /> 

  <property name="netconfFile" 
value="testxmlfiles/output/mcm_Output.xml" /> 
  </bean>

- <bean id="castorUnMarshaller" 
class="org.springframework.oxm.castor.CastorMarshaller">


  <property name="ignoreExtraElements" 
value="true" /> 

  <property name="ignoreExtraAttributes" value="true" /> 
  </bean>

- <bean id="castorMarshaller" 
class="org.springframework.oxm.castor.CastorMarshaller">


  <property name="mappingLocation" 
value="classpath:org/mitre/mandi/planner/resources/netconf-mapping.xml" /> 

  <property name="ignoreExtraElements" 
value="false" /> 

  <property name="ignoreExtraAttributes" value="false" /> 
  </bean>
  </beans>


                                          

Reply via email to