No WebApplicationContext found: no ContextLoaderListener registered? Error

255 views
Skip to first unread message

Jithu M

unread,
Mar 16, 2015, 10:48:52 AM3/16/15
to xnat_di...@googlegroups.com

Hello,
   I was trying to setup XNAT in my Windows 7 PC. I strictly followed the guidelines provided in the documentation and installed the following softwares:
  1. Java JDK
    • JAVA_VERSION="1.7.0"

      OS_NAME="Windows"

      OS_VERSION="5.2"

      OS_ARCH="amd64"

      SOURCE=" .:7d45f621855a corba:f3d39b942095 deploy:480f5efee50a hotspot:0c7d7c067c46 hotspot/make/closed:037cf3213c83 hotspot/src/closed:09c539e02aa7 hotspot/test/closed:38f1b3e4d895 install:15846082f1ab jaxp:999eb9cbf840 jaxws:4d068ffb0b54 jdk:3778e2621fc9 jdk/make/closed:91dee7383855 jdk/src/closed:017b5cd1e0c1 jdk/test/closed:0fe9258a6fa8 langtools:059a87205fda pubs:4a7299c0b757 sponsors:5341648c3dc4"

      BUILD_TYPE=commercial

  2. Postgres Database (Latest Version: 9.4)

  3. Tomcat Server (Latest Version: 8)

  4. Finally built the xnat web application (Build properties, been attached as a file) and successfully deployed in the server. But when I am trying to run my xnat application I am receiving the following error: 

 
 
 
Log message is as follows:
 
 
16-Mar-2015 10:58:51.487 SEVERE [http-nio-8080-exec-10] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [xnat] in context with path [/xnat] threw exception
 java.lang.IllegalStateException: No WebApplicationContext found: no ContextLoaderListener registered?
 at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:159)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
 at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)
 at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086)
 at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659)
 at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)
 at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558)
 at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 at java.lang.Thread.run(Thread.java:745)


Please help to resolve this issue. Thank you.

 

build.properties

Tim Olsen

unread,
Mar 16, 2015, 10:59:58 AM3/16/15
to xnat_di...@googlegroups.com

This might be an issue with Tomcat 8.  From your build.properties, I suspect that is what you are using.

 

Rick has been working on our support for Tomcat8 (and Java8), but he is out of the office for a few days.  He can provide guidance on that when he gets back on Wednesday.  In the meantime, can you try running on Tomcat 6 or 7 and see if that makes a difference?

 

Tim

 

From: xnat_di...@googlegroups.com [mailto:xnat_di...@googlegroups.com] On Behalf Of Jithu M
Sent: Monday, March 16, 2015 5:21 AM
To: xnat_di...@googlegroups.com
Subject: [XNAT Discussion] No WebApplicationContext found: no ContextLoaderListener registered? Error

 

Hello,

   I was trying to setup XNAT in my Windows 7 PC. I strictly followed the guidelines provided in the documentation and installed the following softwares:

  1. Java JDK

o   JAVA_VERSION="1.7.0"

OS_NAME="Windows"

OS_VERSION="5.2"

OS_ARCH="amd64"

SOURCE=" .:7d45f621855a corba:f3d39b942095 deploy:480f5efee50a hotspot:0c7d7c067c46 hotspot/make/closed:037cf3213c83 hotspot/src/closed:09c539e02aa7 hotspot/test/closed:38f1b3e4d895 install:15846082f1ab jaxp:999eb9cbf840 jaxws:4d068ffb0b54 jdk:3778e2621fc9 jdk/make/closed:91dee7383855 jdk/src/closed:017b5cd1e0c1 jdk/test/closed:0fe9258a6fa8 langtools:059a87205fda pubs:4a7299c0b757 sponsors:5341648c3dc4"

BUILD_TYPE=commercial

2.     Postgres Database (Latest Version: 9.4)

3.     Tomcat Server (Latest Version: 8)

4.     Finally built the xnat web application (Build properties, been attached as a file) and successfully deployed in the server. But when I am trying to run my xnat application I am receiving the following error: 

--
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 post to this group, send email to xnat_di...@googlegroups.com.
Visit this group at http://groups.google.com/group/xnat_discussion.
For more options, visit https://groups.google.com/d/optout.

Rick Herrick

unread,
Mar 18, 2015, 5:03:32 PM3/18/15
to xnat_di...@googlegroups.com
Hey Jithu,

I suspect Tim is correct and that this is an issue with Tomcat 8. It's hard to tell what the specific error is from that error message, as it's really a symptom of something else. The reason there's no WebApplicationContext is because something failed during construction of the context. Whatever caused that failure is what you're really interested in. If you look in either the Tomcat logs located in C:/xnat/tomcat8/logs or in the XNAT logs in C:/xnat/tomcat8/webapps/xnat/logs, you'll most likely find a number of other error messages. Those will point to the specific cause of failure that prevented the application context from initializing.

Tomcat 8 supports newer versions of the Java servlet API than XNAT currently uses. It should be downward compatible, but certain operations, like finding files inside the web app folder structure, fail. We're working on modifying the XNAT code to work around this, but that will probably only be in our 1.7 release.

As Tim suggested, try rolling back to Tomcat 7 (http://tomcat.apache.org/download-70.cgi) and see if that resolves your issue. If not, you can post any interesting logs from the locations I mentioned above.

To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussion+unsubscribe@googlegroups.com.
To post to this group, send email to xnat_discussion@googlegroups.com.

Jithu M

unread,
Mar 20, 2015, 6:57:29 AM3/20/15
to xnat_di...@googlegroups.com
Hello,
    Thank you so much Rick and Tim for your timely support. The problem is with the tomcat server only and I just downgraded my server version to 7 and it's working seamlessly. I did not have much time to debug the earlier error case, since I need to complete something very urgently. 

It may be really helpful for the newbies, if you could provide a note about this tomcat server incompatibility as a part of the prerequisites provided in the step by step XNAT Installation procedure. Thank you so much.

Regards
Jithu Murugan

To unsubscribe from this group and stop receiving emails from it, send an email to xnat_discussi...@googlegroups.com.
To post to this group, send email to xnat_di...@googlegroups.com.

Herrick, Rick

unread,
Mar 20, 2015, 1:05:09 PM3/20/15
to xnat_di...@googlegroups.com
The installation prerequisites page mentions Tomcat 7 as a requirement , but I’ve added a note explicitly saying to avoid Tomcat 8 and also added a note to the installation procedure page as well. Thanks for the feedback!

-- 

Rick Herrick

Sr. Programmer/Analyst

Neuroinformatics Research Group

Washington University School of Medicine

(314) 740-5961



The material in this message is private and may contain Protected Healthcare Information (PHI). 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.
Reply all
Reply to author
Forward
0 new messages