Reputation: 57
Here is the code:
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");
This gives me a InvocationTargetException error when SAXBuilder is instantiated.
Anyone have this before? Seems like this should work.
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)
Upvotes: 0
Views: 769
Reputation: 159754
I'm going to go out on a limb here and say that while SAXBuilder may be in your build path, it is not on your run path.
Upvotes: 1