Viewer Publish issue with Tomcat 8.0.14

Post Reply
AustinDave
Posts: 3
Joined: 03 Nov 2014, 23:18

Essential Users:
I initially installed Tomcat 8.0.14 and deployed the Essential Viewer. The base viewer itself worked fine, but publishing data to the server resulted in a null pointer error in finding the cache manager, as seen in the stack trace from the localhost log below. I tried correcting the memory issues as recommended in other threads, but that didn't work. What did work was doing a base install of Tomcat 6.0.41 and deploying the viewer there. Everything worked fine at that point, no publish errors. This is on a Win7 x64 machine with Java 1.8.0_25.

Error in Protege:

Code: Select all

Essential Viewer ReportService encountered an internal error while receiving your repository snapshot. Contact your system administrator and check Essential Viewer server logs for errors, e.g. memory exceptions.
Error in log and by going to /reportService:

Code: Select all

	at java.io.FileInputStream.<init>(FileInputStream.java:130)
	at java.io.FileInputStream.<init>(FileInputStream.java:93)
	at com.enterprise_architecture.essential.report.EasReportService.getCacheManager(EasReportService.java:627)
	at com.enterprise_architecture.essential.report.EasReportService.doPost(EasReportService.java:227)
	at com.enterprise_architecture.essential.report.EasReportService.doGet(EasReportService.java:205)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	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:506)
	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:537)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1081)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:658)
	at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:277)
	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2403)
	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2392)
	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)
User avatar
neil.walsh
Posts: 444
Joined: 16 Feb 2009, 13:45
Contact:

Hi Dave,

We've also heard reports of issues with Tomcat 8. We're recommending (and using ourselves) Tomcat 7 which is stable and works well with Essential.

We're not sure at this point whether the bug is at ours or Tomcat's end. We'll look to resolve this for the next release.

Your error log will be useful in helping us resolve this.

Thanks

Neil
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Just a quick update on this issue.

We have replicated it, identified the problem and can confirm that this can be resolved by configuration of the web.xml file and essentialCache.xml

Jonathan
Essential Project Team
jdmumper
Posts: 1
Joined: 28 Jan 2015, 13:16

Jonathan -

I just encountered this issue on OS X (identical behavior.)

Can you share the changes you made to the web.xml and essentialCache.xml configurations to make things work on Tomcat 8.x when you verified the issue? Even if you just need someone to test them out, I'll be happy to assist.

Thanks,

--Jay
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Hi Jay,

The answer is to add a '/' to some configuration settings in web.xml as follows:
In the servlet definition for the EssentialReportService - (servlet-name = reportService), add the '/' to each of the param-values in the init-params to look like:

Code: Select all

<init-param>
			<param-name>outputReportFile</param-name>
			<param-value>/reportXML.xml</param-value>
		</init-param>
		<init-param>
			<param-name>cacheConfig</param-name>
			<param-value>/platform/essentialCache.xml</param-value>
		</init-param>
		<init-param>
			<param-name>uploadTempStore</param-name>
			<param-value>/platform/tmp</param-value>
		</init-param>
Also, we need to update the cache configuration in the platform/essentialCache.xml file as follows:
Similarly, adding the '/' prefix to all directories mentioned in the configuration so that they read as:

Code: Select all

<cachedirectories>
        <directory when="pre">/graph_images</directory>
        <directory when="post">/graph_images/uml</directory>
        <directory when="post">/graph_images/pageCache/application</directory>
    </cachedirectories>
Essential Project Team
Post Reply