Skip to content

Castor XML 1.4.1 cannot handle attribute "location" #92

@SeabiscuitCZX

Description

@SeabiscuitCZX

Recently we would like to upgrade castor xml and castor core from version 1.1.2.1 to 1.4.1 for fixing CVE issue. but we get below exception. as per debug i found laster castor xml cannot handle location attribute. please help to check if it's issue. if not kindly give suggetion how to fix. you can find details in below.

java.lang.IllegalStateException: No Introspector defined in properties!
at org.exolab.castor.xml.util.resolvers.ByIntrospection.internalResolve(ByIntrospection.java:80)
at org.exolab.castor.xml.util.resolvers.AbstractResolverClassCommand.resolve(AbstractResolverClassCommand.java:50)
at org.exolab.castor.xml.util.resolvers.CastorXMLStrategy.getDescriptor(CastorXMLStrategy.java:134)
at org.exolab.castor.xml.util.resolvers.CastorXMLStrategy.resolveClass(CastorXMLStrategy.java:81)
at org.exolab.castor.xml.util.XMLClassDescriptorResolverImpl.resolve(XMLClassDescriptorResolverImpl.java:284)
at org.exolab.castor.xml.MarshalFramework.searchInheritance(MarshalFramework.java:499)
at org.exolab.castor.xml.StartElementProcessor.compute(StartElementProcessor.java:233)
at org.exolab.castor.xml.UnmarshalHandler.startElementProcessing(UnmarshalHandler.java:796)
at org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:723)
at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:694)
at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:589)

Data mapping file
`

<include href="com/test/BaseResponseVO-mapping.xml"/>

<class name="com.test.DetailsResponseVO"
		extends="com.test.BaseResponseVO"
		auto-complete="true">

	<map-to xml="response" />
	
	<field name="userId" type="java.lang.String">
		<bind-xml name="userId" node="element" location="data"/>
	</field>
    		
</class>

`

sample xml response:
<response> <data> <userId></userId> </data> </response>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions