Hi,
I'm using OpenKM 6.3 on Tomcat 8.0.9 and a strange error costs me several hours of time until I noticed the reason.
If you want to run OpenKM in Tomcat 8.0.x you will get the following exception on startup:
The method
So if you plan to upgrade to a newer tomcat version, keep this in mind.
I'm using OpenKM 6.3 on Tomcat 8.0.9 and a strange error costs me several hours of time until I noticed the reason.
If you want to run OpenKM in Tomcat 8.0.x you will get the following exception on startup:
Code: Select all
Long story short. There was a change in the servlet API in tomcat.2014-09-12 15:28:55,986 [localhost-startStop-1] INFO com.openkm.servlet.RepositoryStartupServlet- *** Initialize property groups... ***
2014-09-12 15:28:55,990 [localhost-startStop-1] INFO com.openkm.util.FormUtils$LocalResolver- new LocalResolver(null)
2014-09-12 15:28:55,991 [localhost-startStop-1] ERROR org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/]- StandardWrapper.Throwable
java.lang.ExceptionInInitializerError
at com.openkm.servlet.RepositoryStartupServlet.init(RepositoryStartupServlet.java:110)
at javax.servlet.GenericServlet.init(GenericServlet.java:158)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1241)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1154)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1041)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4932)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5218)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:745)
Caused by: java.lang.NullPointerException
at java.io.File.<init>(File.java:277)
at com.openkm.util.FormUtils$LocalResolver.<init>(FormUtils.java:845)
at com.openkm.util.FormUtils.<clinit>(FormUtils.java:73)
... 14 more
The method
Code: Select all
does no longer allow passing a parameter without a leading "/". So you have to correct the OpenKM sources in the Config.java on line 578 and 582 to look like the following.String javax.servlet.ServletContext.getRealPath(String path)Code: Select all
Without a leading "/" the ServletContext will return null and then the whole OpenKM startup process fails.578: DTD_BASE = sc.getRealPath("/WEB-INF/classes/dtd");
582: LANG_PROFILES_BASE = sc.getRealPath("/WEB-INF/classes/lang-profiles");
So if you plan to upgrade to a newer tomcat version, keep this in mind.
Last edited by Catscratch on Mon Sep 15, 2014 2:55 pm, edited 3 times in total.
