Announcement Announcement Module
Collapse
No announcement yet.
Marshaller Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Marshaller

    Hi, i have a probleme to run that example.

    Here is the error:

    Code:
    18:02:40,414 ERROR [ContextLoader] Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'marshal' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Cannot resolve reference to bean 'castorMarshaller' while setting bean property 'marshaller'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'castorMarshaller' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/exolab/castor/xml/XMLException
    Caused by: 
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'castorMarshaller' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/exolab/castor/xml/XMLException
    Caused by: 
    java.lang.NoClassDefFoundError: org/exolab/castor/xml/XMLException
    If I add the castor's jar, the error disapear. But why does i need castor, all necessary files aren't include in the spring-ws framework?

    Now, when i run my application with the castor's jar, i have this error:

    Code:
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'marshal' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Cannot resolve reference to bean 'castorMarshaller' while setting bean property 'marshaller'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'castorMarshaller' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/stream/util/XMLEventConsumer
    Caused by: 
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'castorMarshaller' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/stream/util/XMLEventConsumer
    Caused by: 
    java.lang.NoClassDefFoundError: javax/xml/stream/util/XMLEventConsumer
    Same question, why does I need other file than those included in the framework to run my application?

  • #2
    Originally posted by iMacXX View Post
    If I add the castor's jar, the error disapear. But why does i need castor, all necessary files aren't include in the spring-ws framework?
    Well, in that example, we are using Castor to do the marshalling:

    Code:
    <bean id="castorMarshaller" class="org.springframework.oxm.castor.CastorMarshaller"/>
    so that means that you have to include the castor jars. The CastorMarshaller is just a wrapper around the Castor functionality.

    Castor has a dependency on StAX (the streaming API for XML processing), so you need to add that as well (stax-api.jar), and perhaps also the implementation (stax.jar).




    Now, when i run my application with the castor's jar, i have this error:

    Code:
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'marshal' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Cannot resolve reference to bean 'castorMarshaller' while setting bean property 'marshaller'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'castorMarshaller' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/stream/util/XMLEventConsumer
    Caused by: 
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'castorMarshaller' defined in ServletContext resource [/WEB-INF/classes/applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: javax/xml/stream/util/XMLEventConsumer
    Caused by: 
    java.lang.NoClassDefFoundError: javax/xml/stream/util/XMLEventConsumer
    Same question, why does I need other file than those included in the framework to run my application?[/QUOTE]

    Comment

    Working...
    X