CreateUserSession exception

15 views
Skip to first unread message

Ginsburg, Daniel

unread,
Apr 14, 2010, 3:58:51 PM4/14/10
to xnat_di...@googlegroups.com
Hi All,

I am new to XNAT and just learning my way around so I apologize in advance
for the "newbie" question. Anyway, I am trying to use the REST API tools
(downloaded from http://nrg.wustl.edu/1.4/xnat_tools.zip) to interface with
a test XNAT server I have just setup.

I am having a problem with 'CreateUserSession' which is giving the following
error:

$ CreateUserSession -host http://localhost:8080/xnat/ -u admin -p admin
ERROR CODE 32: Web Service Exception @ http://localhost:8080/xnat/
java.lang.reflect.InvocationTargetException.
...
Error written to error.log is:

Wed Apr 14 12:57:55 PDT 2010 admin@http://localhost:8080/xnat/:AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.lang.reflect.InvocationTargetException
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:fnndsc-mosix1

java.lang.reflect.InvocationTargetException
at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:2
22)
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:12
9)
at
org.apache.axis.encoding.DeserializationContext.endElement(DeserializationCo
ntext.java:1087)
at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown
Source)
at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown
Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(SAXParser.java:395)
at
org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext
.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at
org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChe
cker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at WSTool.createServiceSession(WSTool.java:604)
at CreateUserSession.process(CreateUserSession.java:47)
at WSTool.perform(WSTool.java:128)
at CreateUserSession.main(CreateUserSession.java:37)

Does anyone know the cause of this error?

Thanks.

--
Dan Ginsburg / email: daniel....@childrens.harvard.edu
Principal Software Architect
Fetal-Neonatal Neuroimaging and Development Science Center
Children's Hospital Boston
300 Longwood Avenue
Boston, MA 02115
Phone: 857-218-5140

Timothy Olsen

unread,
Apr 14, 2010, 5:06:34 PM4/14/10
to xnat_di...@googlegroups.com
Dan,

What are you attempting to do with the REST api? Generally, you don't need to use the CreateUserSession. You should be able to do everything you need with the XNATRestClient (or just Curl).

To create a new user session, do a POST to HOST/REST/JSESSION. This will open a session on the server and return the JSESSIONID.

Review the docuementation here: http://nrg.wikispaces.com/XNAT+REST+Session+Managment

Tim

Hi All,

Thanks.

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To post to this group, send email to xnat_di...@googlegroups.com.
To unsubscribe from this group, send email to xnat_discussi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/xnat_discussion?hl=en.

Ginsburg, Daniel

unread,
Apr 14, 2010, 8:29:05 PM4/14/10
to xnat_di...@googlegroups.com
Hi Tim,

I seem to have the same problem using user session with XNATRestClient. For example, if I do:

$ XNATRestClient -host http://localhost:8080/xnat -u admin -p admin -m POST -remote "/REST/JSESSION"

I get back something like:
E3B79B074C1EC1DD693A5B180884C2C8

So then I try:

$ XNATRestClient -host http://localhost:8080/xnat -user_session E3B79B074C1EC1DD693A5B180884C2C8 -m GET -remote "/REST/projects/"


ERROR CODE 32: Web Service Exception @ http://localhost:8080/xnat/
java.lang.reflect.InvocationTargetException.

Error logged in /net/osx1927/chb/users/ginsburg/Downloads/xnat_tools/error.log

The error is the same as I posted. If I issue that same command with -u/-p, it works, so it's something with user_session. I am trying to get some scripts working that someone else wrote to upload our data sets to XNAT and it makes heavy use of -user_session.

Thanks for any help you can provide.

-- Dan

Timothy Olsen

unread,
Apr 15, 2010, 3:03:31 PM4/15/10
to xnat_di...@googlegroups.com
Dan,

I'm unable to reproduce this on a fresh 1.4 or central.xnat.org.

I think the your executables may be out of date. Can you try the ones at http://nrg.wustl.edu/1.4/xnat_tools.zip?

Thanks

Ginsburg, Daniel

unread,
Apr 15, 2010, 5:03:24 PM4/15/10
to xnat_di...@googlegroups.com
Hi Tim,

Thanks for attempting to debug it. I guess it is something I have configured incorrectly on my xnat instance. I was using that version of the tools that you posted. I can create the session on central.xnat.org, but not on my own server. I wonder if it is not related to that same permissions problem that was found on Ubuntu 9.10 in 03catalina.policy? That is just a wild guess. If anyone has any other ideas, let me know. For now, I am getting around it by using -u/-p in each of the commands.

Thanks for your help.

-- Dan

Reply all
Reply to author
Forward
0 new messages