Announcement Announcement Module
No announcement yet.
org.springframework.oxm.jaxb.JaxbSystemException: class x nor any of its super class Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • org.springframework.oxm.jaxb.JaxbSystemException: class x nor any of its super class

    I'm using jaxb2,This is my spring context file

    <ctx:component-scan base-package="my package name"/>
        <bean id="template" class="">
            <property name="marshaller" ref="marshaller"/>
            <property name="unmarshaller" ref="marshaller"/>
        <bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
            <property name="contextPath">
                <value>my package name</value>
            <property name="marshallerProperties">
                    <entry key="com.sun.xml.bind.xmlDeclaration">
                        <value type="boolean">false</value>
                    <entry key="com.sun.xml.bind.namespacePrefixMapper"
        <bean id="namespacePrefixMapper" class="prefix mapper package name"/>
    I wrote a standalone java class,main method with code as shown below

    ClassPathXmlApplicationContext context=new ClassPathXmlApplicationContext("spring-ws.xml");
    		WebServiceTemplate template=(WebServiceTemplate)context.getBean("template");
    		FCUBSREQENV fcubsreqenv=new FCUBSREQENV();
    		String url="Endpoint";
    		FCUBSRESENV fcubsresenv = (FCUBSRESENV) template.marshalSendAndReceive(url,fcubsreqenv);

    My context path property has a package name where all my jaxb generated classes using xjc compiler are present. Spring context got created successfully.but when I try to run the standalone program I end up with "org.springframework.oxm.jaxb.JaxbSystemException: class FCUBSRESENV nor any of its super class is known to this context" Request you to let me know, Incase if I'm missing something.