Announcement Announcement Module
Collapse
No announcement yet.
ClassNotFoundException: com.thoughtworks.xstream.io.xml.CompactWriter Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • ClassNotFoundException: com.thoughtworks.xstream.io.xml.CompactWriter

    Hi,

    I'm trying to user the xstream library for xml marshalling in a REST controller running in an Equinox OSGi container. I get a ClassNotFoundException for com.thoughtworks.xstream.io.xml.CompactWriter. The bundle command for com.springsource.com.thoughtworks.xstream_1.3.1 shows me

    com.thoughtworks.xstream.io.xml; version="1.3.1"[exported]

    but the io.xml package is unwired in org.springframework.oxm_3.0.5.RELEASE, but all other packages are wired:

    com.thoughtworks.xstream.mapper; version="1.3.1"<com.springsource.com.thoughtworks. xstream_1.3.1 [154]>
    com.thoughtworks.xstream.io; version="1.3.1"<com.springsource.com.thoughtworks. xstream_1.3.1 [154]>
    com.thoughtworks.xstream.converters; version="1.3.1"<com.springsource.com.thoughtworks. xstream_1.3.1 [154]>
    com.thoughtworks.xstream; version="1.3.1"<com.springsource.com.thoughtworks. xstream_1.3.1 [154]>
    com.thoughtworks.xstream.io.xml; version="[1.2.2,2.0.0)"<unwired><optional>

    Could this be the cause for the exception? Is there a way to fix it?

    Thanks
    Daniel

    Exception:

    java.lang.ClassNotFoundException: com.thoughtworks.xstream.io.xml.CompactWriter
    at org.eclipse.osgi.internal.loader.BundleLoader.find ClassInternal(BundleLoader.java:506)
    at org.eclipse.osgi.internal.loader.BundleLoader.find Class(BundleLoader.java:422)
    at org.eclipse.osgi.internal.loader.BundleLoader.find Class(BundleLoader.java:410)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClass Loader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 02)
    at org.springframework.oxm.xstream.XStreamMarshaller. marshalWriter(XStreamMarshaller.java:445)
    at org.springframework.oxm.xstream.XStreamMarshaller. marshalOutputStream(XStreamMarshaller.java:427)
    at org.springframework.oxm.support.AbstractMarshaller .marshalStreamResult(AbstractMarshaller.java:267)
    at org.springframework.oxm.support.AbstractMarshaller .marshal(AbstractMarshaller.java:102)
    at org.springframework.http.converter.xml.Marshalling HttpMessageConverter.writeToResult(MarshallingHttp MessageConverter.java:131)
    at org.springframework.http.converter.xml.AbstractXml HttpMessageConverter.writeInternal(AbstractXmlHttp MessageConverter.java:66)
    at org.springframework.http.converter.AbstractHttpMes sageConverter.write(AbstractHttpMessageConverter.j ava:181)
    at org.springframework.web.servlet.mvc.annotation.Ann otationMethodHandlerAdapter$ServletHandlerMethodIn voker.writeWithMessageConverters(AnnotationMethodH andlerAdapter.java:975)
    at org.springframework.web.servlet.mvc.annotation.Ann otationMethodHandlerAdapter$ServletHandlerMethodIn voker.handleResponseBody(AnnotationMethodHandlerAd apter.java:933)
    at org.springframework.web.servlet.mvc.annotation.Ann otationMethodHandlerAdapter$ServletHandlerMethodIn voker.getModelAndView(AnnotationMethodHandlerAdapt er.java:882)
    at org.springframework.web.servlet.mvc.annotation.Ann otationMethodHandlerAdapter.invokeHandlerMethod(An notationMethodHandlerAdapter.java:428)
    at org.springframework.web.servlet.mvc.annotation.Ann otationMethodHandlerAdapter.handle(AnnotationMetho dHandlerAdapter.java:414)
    at org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:790)
    at org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:719)
    at org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:644)
    at org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:549)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:707)
    at javax.servlet.http.HttpServlet.service(HttpServlet .java:820)
    Last edited by CanD23; Jan 20th, 2011, 10:25 AM. Reason: add exception

  • #2
    java.lang.ClassNotFoundException: com.thoughtworks.xstream.io.xml.CompactWriter
    xstream jar is missing

    Comment


    • #3
      Thanks for you answer.

      The jar bundle is installed as you can see on the other xstream packages which are resolved to version 1.3.1. Only the xstream.io.xml package isn't resolved.

      Thanks
      Daniel

      Comment

      Working...
      X