SAXBuilder jdom给出了例外

时间:2012-08-07 22:26:56

标签: java xml sax jdom

以下是代码:

Representation representation = representItem(exp.getItem(),MediaType.TEXT_XML);

            Document doc = new SAXBuilder().build(representation.getStream());
            XPath xpath = XPath.newInstance("/xnat:MRSession/xnat:scan/xnat:file");

当实例化SAXBuilder时,这会给我一个InvocationTargetException错误。

以前有人这样吗?似乎这应该有用。

2012-08-07 17:17:58,441 [http-8080-1] ERROR org.restlet.XNATVirtualHost.XNATApplication - Unhandled exception or error intercepted
java.lang.NoClassDefFoundError: org/jdom/input/SAXBuilder
    at org.nrg.xnat.restlet.actions.SessionCopy.<init>(SessionCopy.java:98)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

1 个答案:

答案 0 :(得分:1)

我会在这里说出来,虽然SAXBuilder可能在您的构建路径中,但它不在您的运行路径上。