Getting the full Tomcat logs

Hi everybody,

I’m trying to develop a Servlet. I use Servoy’s Tomcat to run it.
But I can’t find the “root cause” and/or “caused by” parts of the logs.

Where can I get it?

Cheers

In order to fix my servlet I’ve installed the last version on my computer. Now it’s fixed and works.

Unfortunately when I deploy it and try to use it under Servoy’s Tomcat I still get the same error :(

Here are the files:
[attachment=0]server.zip[/attachment]

Then to try it call this url: http://localhost:8080/upTool/upForm.html

server.zip (228 KB)

There is definitely a problem with Servoy’s Tomcat configuration.
I’ve tried an example found on the web: http://www.telio.be/blog/wp-content/upl … ad-1.0.war
It is working perfectly on the normal Tomcat but crash on Servoy’s one :(
Always the same error:

org.apache.jasper.JasperException: An exception occurred processing JSP page /upload.jsp at line 43

40:
41: List items = null;
42: try {
43: items = upload.parseRequest(request);
44: } catch (FileUploadException e) {
45: e.printStackTrace();
46: }

Stacktrace:
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:524)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

I found something interesting.

It works well when Tomcat is launched via Developer, but when it is launched via the Servoy Application Server service, it’s crashing :roll:

Foobrother:
I found something interesting.

It works well when Tomcat is launched via Developer, but when it is launched via the Servoy Application Server service, it’s crashing :roll:

Does it works from the command line “servoy_server.bat” or “servoy_server.bash” ?

ptalbot:
Does it works from the command line “servoy_server.bat” or “servoy_server.bash” ?

Thanks for the tip! Now I get a bit more details about the error but not that much :(

SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: org.apache.commons.fileupload.servlet.ServletFileUpload.parseRequest(Lorg/apache/commons/fileupload/RequestContext;)Ljava/util/List;
        at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:581)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Unknown Source)

I think I’ve found why I get this error!

I use 2 jar in my application that I’ve put into the lib folder into “Servoy\application_server\server\lib”
But I have seen that in the lib folder into “Servoy\application_server\lib” there was an older version of one of the jar (commons-fileupload-1.0.jar vs commons-fileupload-1.2.1.jar).
So I have deleted this old jar and moved the new one in this last folder.

Now it’s working!
But I don’t really understand where we need to put our libraries. In “Servoy\application_server\server\lib” or “Servoy\application_server\lib” ??? :roll:

Depends.

If your servlet is created as a non-servoy component it has to go in application_server/server/lib
if your servlet is created from a servoy plugin you can put the libraries in the plugins folder and create a proper jnlp file.

Ok,

In my case, it is an independent servlet. But as Servoy already used commons-fileupload-1.0.jar I had to overwrite it with the new version (commons-fileupload-1.2.1.jar) in “Servoy\application_server\lib” otherwise you can’t use the new version with the old one in Servoy’s lib directory?! :roll:

Woooooww!

I just discovered something very annoying! :evil:

Servoy Admin page needs the old version (commons-fileupload-1.0.jar). Otherwise I get an error :(
And my application needs the new version (commons-fileupload-1.2.1.jar).

I would have expected that the new version would provide what is needed by old programs?!
Apparently Servoy development team used deprecated methods?! :roll:

those kind of big upgrades (1.0 → 1.1 → 1.2) are not backwards compatible most of the time for such libs
that backwards compatibility is only done by the really big api’s like the jdk itself.

Ok,

Thx for the details :)