Error on startup. Has anyone seen ContextNotInitialisedException?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Error on startup. Has anyone seen ContextNotInitialisedException?

joe carlson
Hello,

We've started to see an error when restarting tomcat and a failure to
launch the servlet. We suspect the issue is a network problem with the
database server but not totally sure.

The traceback that appears in the log files is this:

> SEVERE: Servlet.service() for servlet [ws-version] in context with
> path [/phytomine] threw exception
> org.intermine.web.context.ContextNotInitialisedException: Attempt to
> access InterMineContext before it has  been initialised
>         at
> org.intermine.web.context.InterMineContext.checkInit(InterMineContext.java:98)
>         at
> org.intermine.web.context.InterMineContext.getInterMineAPI(InterMineContext.java:107)
>         at
> org.intermine.webservice.server.VersionServlet.runService(VersionServlet.java:44)
>         at
> org.intermine.webservice.server.VersionServlet.doGet(VersionServlet.java:33)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
>         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
> org.intermine.web.filters.HeaderFilter.doFilter(HeaderFilter.java:50)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>         at
> org.intermine.webservice.server.filter.RequestSubClassFilter.doFilter(RequestSubClassFilter.java:46)
>         at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>         at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>         at
> org.intermine.web.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:139)
>         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:220)
>         at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
>         at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
>         at
> com.googlecode.psiprobe.Tomcat70AgentValve.invoke(Tomcat70AgentValve.java:38)
>         at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
>         at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
>         at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
>         at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
>         at
> org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:190)
>         at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
>         at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>         at
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>         at java.lang.Thread.run(Thread.java:745)
> Oct 02, 2017 8:27:36 PM org.apache.catalina.core.ApplicationDispatcher
> invoke
> WARNING: Servlet action is currently unavailable

Since tomcat marks the servlet as unavailable, we're not getting much
joy from the web app. What is weird is that I can see there are still
active connections from intermine to postgres. My attempt to set
breakpoints in the debugger have not been successful.

I've changed the db settings to point to an older mine on a different
server and things work perfectly.

I'm curious if anyone has seen this before.

Thanks,

Joe
_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Fwd: Error on startup. Has anyone seen ContextNotInitialisedException?

joe carlson
I think my problem has been partially identified.

Somehow, I ended up with 2 records in the userprofile database for the superuser account username. (There were also some duplicated usernames in other regular accounts, too.) When starting up, intermine objected to the fact that there were 2 records with the same account name and refused to initialize properly. The ContextNotInitialisedException was just one of the several stack traces.

I'm still trying to see how I ended up with multiple user account records with the same username. But this is another fight.

Joe


-------- Forwarded Message --------
Subject: Error on startup. Has anyone seen ContextNotInitialisedException?
Date: Tue, 3 Oct 2017 09:24:20 -0700
From: Joe Carlson [hidden email]
To: [hidden email]


Hello,

We've started to see an error when restarting tomcat and a failure to 
launch the servlet. We suspect the issue is a network problem with the 
database server but not totally sure.

The traceback that appears in the log files is this:

> SEVERE: Servlet.service() for servlet [ws-version] in context with 
> path [/phytomine] threw exception
> org.intermine.web.context.ContextNotInitialisedException: Attempt to 
> access InterMineContext before it has  been initialised
>         at 
> org.intermine.web.context.InterMineContext.checkInit(InterMineContext.java:98)
>         at 
> org.intermine.web.context.InterMineContext.getInterMineAPI(InterMineContext.java:107)
>         at 
> org.intermine.webservice.server.VersionServlet.runService(VersionServlet.java:44)
>         at 
> org.intermine.webservice.server.VersionServlet.doGet(VersionServlet.java:33)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
>         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 
> org.intermine.web.filters.HeaderFilter.doFilter(HeaderFilter.java:50)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>         at 
> org.intermine.webservice.server.filter.RequestSubClassFilter.doFilter(RequestSubClassFilter.java:46)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
>         at 
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
>         at 
> org.intermine.web.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:139)
>         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:220)
>         at 
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
>         at 
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
>         at 
> com.googlecode.psiprobe.Tomcat70AgentValve.invoke(Tomcat70AgentValve.java:38)
>         at 
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
>         at 
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
>         at 
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
>         at 
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
>         at 
> org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:190)
>         at 
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
>         at 
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
>         at 
> org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
>         at java.lang.Thread.run(Thread.java:745)
> Oct 02, 2017 8:27:36 PM org.apache.catalina.core.ApplicationDispatcher 
> invoke
> WARNING: Servlet action is currently unavailable

Since tomcat marks the servlet as unavailable, we're not getting much 
joy from the web app. What is weird is that I can see there are still 
active connections from intermine to postgres. My attempt to set 
breakpoints in the debugger have not been successful.

I've changed the db settings to point to an older mine on a different 
server and things work perfectly.

I'm curious if anyone has seen this before.

Thanks,

Joe



_______________________________________________
dev mailing list
[hidden email]
https://lists.intermine.org/mailman/listinfo/dev