"ClassCastException" with assessors when upgrading to 1.8.6

36 views
Skip to first unread message

Sarah K

unread,
Nov 14, 2022, 2:58:37 PM11/14/22
to xnat_discussion
Hi,

I'm in the midst of updating from XNAT 1.8.0 to 1.8.6 and it is a bit of a disaster.
I think I've managed to scrape together all the plugin updates needed based on posts here - container service, ohif viewer, xsync. I haven't made any changes to any plugins that would affect assessor datatypes, but they all seem to be broken. The issue I'm facing is the same as the one in this post: https://groups.google.com/g/xnat_discussion/c/1i3K4HnV5xQ/m/HrCCu_oQAwAJ, except it's not only related to creating new assessors but accessing existing ones. When I access a subject page or experiment page that has assessors attached, I see an entry for the assessor in the list but no link to click e.g. "Freesurfer".

When I construct a URL with the assessor ID as the experiment ID, e.g.
https://xnat.site/data/experiments/XNAT_E123456_freesurfer_1234567890?format=xml, I am able to see a very minimal XML document with the datatype showing as "xnat:experimentData" but in this case for a Freesurfer there are no values shown.

When I construct a URL with the experiment ID and assessor ID, e.g.
https://xnat.site/data/experiments/XNAT_E123456/assessors/XNAT_E123456_freesurfer_1234567890?format=xml, I receive an error page with the following:
org.nrg.xdat.om.XnatExperimentdata cannot be cast to org.nrg.xdat.om.XnatImageassessordata

and the following appears in application.log:
ERROR org.restlet.XNATVirtualHost.XNATApplication - Unhandled exception or error intercepted
java.lang.ClassCastException: org.nrg.xdat.om.XnatExperimentdata cannot be cast to org.nrg.xdat.om.XnatImageassessordata

(Full stack trace provided at the end)

I'm using the most up-to-date releases of the relevant data type plugins and it doesn't appear that any updates for any of those have been released based on bitbucket downloads. Are there other updates that need to be incorporated for assessor data type compatibility for XNAT 1.8.6?

In case it's relevant I have also been getting the "can't log in after update to 1.8.6" error described in this post: https://groups.google.com/g/xnat_discussion/c/4DKqQABs_Ao/m/1PVNjU9vAAAJ

When I run the sql query described in that post it appears that all users were migrated correctly and it seems like users will be able to log in after re-setting their passwords, so this has not been a roadblock to upgrading- I don't think this is related to the data types issue but since it is another unclear migration-related issue I figured I would mention it here.

I do have a lot of other plugins installed so that makes things a bit tricky, and additionally I don't have a virtual machine or other system that can replicate this issue - the test system I have access to did not give any of these issues with an identical update. The system I'm having the migration issues on is running CentOS 7 and Tomcat 7.0.76.0.

Any assistance would be much appreciated as I'm quite stuck.


Full stack trace of assessor class cast error:

ERROR org.restlet.XNATVirtualHost.XNATApplication - Unhandled exception or error intercepted
java.lang.ClassCastException: org.nrg.xdat.om.XnatExperimentdata cannot be cast to org.nrg.xdat.om.XnatImageassessordata
        at org.nrg.xnat.restlet.resources.ExptAssessmentResource.<init>(ExptAssessmentResource.java:87)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.restlet.Finder.createTarget(Finder.java:181)
        at org.restlet.Finder.createTarget(Finder.java:226)
        at org.restlet.Finder.findTarget(Finder.java:240)
        at org.restlet.Finder.handle(Finder.java:329)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
        at com.noelios.restlet.application.ApplicationHelper.handle(ApplicationHelper.java:112)
        at org.restlet.Application.handle(Application.java:341)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Router.handle(Router.java:504)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at com.noelios.restlet.StatusFilter.doHandle(StatusFilter.java:130)
        at org.restlet.Filter.handle(Filter.java:195)
        at org.restlet.Filter.doHandle(Filter.java:150)
        at org.restlet.Filter.handle(Filter.java:195)
        at com.noelios.restlet.ChainHelper.handle(ChainHelper.java:124)
        at org.restlet.Component.handle(Component.java:673)
        at org.restlet.Server.handle(Server.java:331)
        at com.noelios.restlet.ServerHelper.handle(ServerHelper.java:68)
        at com.noelios.restlet.http.HttpServerHelper.handle(HttpServerHelper.java:147)
        at com.noelios.restlet.ext.servlet.ServerServlet.service(ServerServlet.java:881)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:239)
        at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:215)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.nrg.xnat.security.XnatInitCheckFilter.doFilterInternal(XnatInitCheckFilter.java:41)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.nrg.xnat.security.XnatExpiredPasswordFilter.doFilterInternal(XnatExpiredPasswordFilter.java:111)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.nrg.xnat.security.XnatBasicAuthenticationFilter.doFilterInternal(XnatBasicAuthenticationFilter.java:115)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:155)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:66)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:99)
        at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.security.web.access.channel.ChannelProcessingFilter.doFilter(ChannelProcessingFilter.java:157)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
        at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:347)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:263)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:110)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:498)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:962)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:445)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:637)
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)

Charlie Moore

unread,
Nov 14, 2022, 4:55:45 PM11/14/22
to xnat_discussion
Hi there,

If you go to Administer > Site Administration > Installed Plugins, do you see your plugins listed? I suspect you will find an empty list. If so, that's because as of XNAT 1.8.2, tomcat9 is required, not tomcat7 (https://wiki.xnat.org/documentation/getting-started-with-xnat/what-s-new-in-xnat/xnat-1-8-2-release-notes).

Thanks,
Charlie Moore

Sarah K

unread,
Nov 14, 2022, 5:33:37 PM11/14/22
to xnat_discussion
Hi Charlie,
Thanks for the response. I do see my plugins listed. I made the update to context.xml to enable support of Tomcat 7. I'm not seeing any indication in the Tomcat logs that there are issues on that end although that could be it.
Full disclosure, I'm working with an XNAT at Wash U and trying to work around the need to run Tomcat 8 via a Docker container.
-Sarah
Reply all
Reply to author
Forward
0 new messages