Issue deploying static war on tomcat 7

Environment: Apache Tomcat Version 7.0.37, Nuxeo Platform 5.6, Windows 7

Hello,

I created a static war using the following command: nuxeoctl pack /tmp/nuxeo-war.zip

unzipped /tmp/nuxeo-war.zip under tomcat root directory.

added jdbc resource definition to globalnamingresources

Started my tomcat using catalina.bat start with JAVA_OPTS=-Xms512m -Xmx1024m -XX:MaxPermSize=512m -Dnuxeo.log.dir=logs

Tomcat tried to deploy and start the nuxeo app but failed with the error below. Has anyone ran into this issue or have any recommendation on how to solve this? Regards

org.apache.catalina.core.StandardContext listenerStart
SEVERE: Exception sending context initialized event to listener instance of class org.nuxeo.runtime.deployment.NuxeoStarter
java.lang.NullPointerException

at org.nuxeo.runtime.deployment.NuxeoStarter.findEnv(NuxeoStarter.java:151)
at org.nuxeo.runtime.deployment.NuxeoStarter.start(NuxeoStarter.java:106)
at org.nuxeo.runtime.deployment.NuxeoStarter.contextInitialized(NuxeoStarter.java:79)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4797)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5291)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1256)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:714)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:219)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:213)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:581)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
0 votes

1 answers

2502 views

ANSWER

Any issue ? I have got same problem.

Vincent B.

01/27/2014

Have you applied all hotfixes? Does your WAR contain a proper /WEB-INF/lib directory with JARs in it? It seems you installed the WAR incorrectly.
01/27/2014

sorry…i meant to update this.

So from what i've read so far, it looks like tomcat 7 is not supported yet for nuxeo. for example, see this: http://answers.nuxeo.com/questions/2425/is-tomcat-7-support-planned

So i tried tomcat 6 but i still was not able to deploy. I am still trying tho, i will update if i succeed.

However, what is definitely clear is that, deploying a static war is not as straight forward as described in http://doc.nuxeo.com/display/public/ADMINDOC/Creating+a+Nuxeo+Static+WAR

01/27/2014

@Florent…am not exactly sure what you mean. could you explain? what hotfixes are you referring to? In regards to installing the WAR incorrectly, i followed the steps in the guide referenced below with no deviation.. http://doc.nuxeo.com/display/public/ADMINDOC/Creating+a+Nuxeo+Static+WAR
01/27/2014

Tomcat 7 is supported since Nuxeo 5.7.2, see NXP-10071. I updated the issue you linked to.

Nuxeo receives hotfixes regularly, they can be installed from the Admin Center if you register your Nuxeo instance.

01/27/2014

I would like to deploy a static war on tomcat 7 server, Static War 5.7 and 5.8 not working on it so i'm trying to deploy 5.6 version. I have got no problems on tomcat 6 (except with virtual host, i don't succeed in deploying with VH) until i'm following http://doc.nuxeo.com/display/public/ADMINDOC/Creating+a+Nuxeo+Static+WAR
01/28/2014



We fixed the Tomcat 7 issues, please see NXP-13729.

0 votes