Datatype problems

57 views
Skip to first unread message

Ben Wagner

unread,
Jun 8, 2022, 11:23:30 PM6/8/22
to xnat_discussion
Hi All,
  I was using pyxnat to retrieve a lists of experiments, but I'm having problems which boil down to this rest call:


If I replace the datatype with another custom datatype, the request goes through.  No errors found in the logs. Diving further I'm not able to load this datatype in the web UI tabs or find it as an item under Browse->Data.  The element is listed and enabled under Admin->Datatypes.  Other datatypes in this plugin appear to be working.

Requesting experiment data/experiments/id gives expected data.  

Any suggestions?

Herrick, Rick

unread,
Jun 9, 2022, 3:04:38 PM6/9/22
to xnat_di...@googlegroups.com

Do you mean there are no errors in the logs when you get the 500 error? If so, I’d need the XSD for the data type to see if the same error occurs elsewhere and debug it if so, because there would be two problems there: whatever is causing the 500 error and the code where that error occurs not logging anything about it.

 

You may want to look at the Tomcat logs as well. For the most part we’ve stamped out error messages going to those logs, but there could still be some cases that write to them.

 

From: xnat_di...@googlegroups.com <xnat_di...@googlegroups.com> on behalf of Ben Wagner <thewa...@gmail.com>
Date: Wednesday, June 8, 2022 at 10:23 PM
To: xnat_discussion <xnat_di...@googlegroups.com>
Subject: [XNAT Discussion] Datatype problems

* External Email - Caution *

--
You received this message because you are subscribed to the Google Groups "xnat_discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/xnat_discussion/adec34b6-86f8-42ed-af90-64a5e87f35e7n%40googlegroups.com.

 


The materials in this message are private and may contain Protected Healthcare Information or other information of a sensitive nature. If you are not the intended recipient, be advised that any unauthorized use, disclosure, copying or the taking of any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error, please immediately notify the sender via telephone or return mail.

Herrick, Rick

unread,
Jun 9, 2022, 3:33:53 PM6/9/22
to xnat_di...@googlegroups.com

Another question is whether your data type is configured the same as other working data types. When you go to the Administer Data Types page, are all the checkboxes for the data type checked?

 

Also, try clicking on the data type on that page, which should pop up a dialog. See if anything looks weird there, especially compared to the other functioning data types from your plugin. You may also click the View XML action in that dialog, then copy and paste the XML into a file. Do that with both the problematic data type and one or two of the functioning data types and see if you can find any differences that might be significant.

Ben Wagner

unread,
Jun 9, 2022, 3:47:50 PM6/9/22
to xnat_discussion
Hi Rick,
  There are no errors in the logs when I get the 500 errors.  XNAT or TOMCAT.  The schema for this datatype has been in place for 9 years (or more).  It's just disappeared from listings.  I will send in a separate email.

  The datatype is configured like the other elements in the plugin.  Only differences are in singular, plural, and security fields.  All expected.

  It's a stumper to me.

Ben

Ben Wagner

unread,
Jun 10, 2022, 12:03:03 PM6/10/22
to xnat_discussion
Ok, this might be a related error...

[xnat@xnat logs]$ cat application.log
2022-06-10 10:59:49,536 [ajp-nio-198.215.54.40-8009-exec-10] ERROR org.restlet.XNATVirtualHost.XNATApplication - Unhandled exception or error intercepted
java.lang.NullPointerException: null
        at org.nrg.xnat.restlet.resources.search.SearchFieldListResource.getRepresentation(SearchFieldListResource.java:196)
        at org.restlet.resource.Resource.handleGet(Resource.java:464)
        at org.restlet.Finder.handle(Finder.java:353)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
<snip>

Herrick, Rick

unread,
Jun 16, 2022, 2:55:20 PM6/16/22
to xnat_di...@googlegroups.com

Look in your plugin jar for a file named ansir_networkReportdata_display.xml:

 

jar tf ansir-plugin.jar | grep ansir_networkReportdata_display

schemas/ansir/display/ansir_networkReportdata_display.xml

 

Or you can also try:

 

jar xf ansir-plugin.jar $(jar tf ansir-plugin.jar | grep '/display/’)

find schemas -type f -path "*/display/*" | xargs grep -E '<Displays .* schema-element="ansir:networkReportdata"'

 

If you have anything that defines a <Displays> element for that data type, you shouldn’t get a NPE there. I tested this by completely removing the generated display document for the data type (i.e. just the default version, nothing custom added) from the jar, which caused the exact error you have below. I added the display document back in and voila it worked fine.

Ben Wagner

unread,
Jun 20, 2022, 12:39:17 PM6/20/22
to xnat_discussion
Hi Rick,
  I'm a bit confused, but what I got was something about display documents.  This datatype is supposed to use the default generated one.  Copying over the generated one to src works, but why isn't the old default pattern holding?

Solution, but odd...
Ben

Reply all
Reply to author
Forward
0 new messages