Getting the full Tomcat logs

Using Servoy to administrate the content of your website? Discuss all webrelated Servoy topics on this forum!

Getting the full Tomcat logs

Postby Foobrother » Thu Mar 12, 2009 1:11 pm

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
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: Getting the full Tomcat logs

Postby Foobrother » Fri Mar 13, 2009 1:54 pm

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:
server.zip
Unzip it under your "..\Servoy\application_server\" directory
(227.72 KiB) Downloaded 413 times


Then to try it call this url: http://localhost:8080/upTool/upForm.html
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: Getting the full Tomcat logs

Postby Foobrother » Fri Mar 13, 2009 4:47 pm

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)

Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: Getting the full Tomcat logs

Postby Foobrother » Tue Mar 17, 2009 6:22 pm

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:
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: Getting the full Tomcat logs

Postby ptalbot » Wed Mar 18, 2009 12:10 am

Foobrother wrote: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" ?
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1654
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC

Re: Getting the full Tomcat logs

Postby Foobrother » Wed Mar 18, 2009 10:43 am

ptalbot wrote: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 :(
Code: Select all
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)
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: Getting the full Tomcat logs

Postby Foobrother » Wed Mar 18, 2009 12:31 pm

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:
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: Getting the full Tomcat logs

Postby IT2Be » Wed Mar 18, 2009 1:06 pm

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.
Marcel J.G. Trapman (IT2BE)
SAN partner - Freelance Java and Servoy
Servoy Components - IT2BE Plug-ins and Beans for Servoy
ServoyForge - Open Source Components for Servoy
User avatar
IT2Be
Servoy Expert
 
Posts: 4766
Joined: Tue Oct 14, 2003 7:09 pm
Location: Germany

Re: Getting the full Tomcat logs

Postby Foobrother » Thu Mar 19, 2009 11:01 am

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:
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: Getting the full Tomcat logs

Postby Foobrother » Thu Mar 19, 2009 6:51 pm

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:
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm

Re: Getting the full Tomcat logs

Postby jcompagner » Thu Mar 19, 2009 10:38 pm

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.
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Getting the full Tomcat logs

Postby Foobrother » Fri Mar 20, 2009 10:47 am

Ok,

Thx for the details :)
Current configuration: Servoy 5.2.6 Build 1011, Java 6u24, PostgreSQL 8.3, Windows Server 2003

Servoy / Java Developer
http://www.assetguardian.com
User avatar
Foobrother
 
Posts: 530
Joined: Tue Jan 13, 2009 5:46 pm


Return to Web Development

Who is online

Users browsing this forum: No registered users and 10 guests