[Winstone-devel] Some problems running on Winstone...
Status: Beta
Brought to you by:
rickknowles
From: Martin C. <mar...@gm...> - 2005-08-04 21:18:14
|
Hi Rick, I did run some tests today, and identified some minor problems: 1.- Here is the exact message printed while starting the webapp, running on IBM JVM 1.4.2: linux:/opt/winstone # [Winstone 2005/08/04 06:51:19] - XML Error (Line 4): cvc-elt.1: Cannot find the declaration of element 'web-app'. [Winstone 2005/08/04 06:51:23] - HTTP Listener started: port=3D80 [Winstone 2005/08/04 06:51:23] - Winstone Server v0.6.4 running: controlPort=3Ddisabled prefix=3D webroot=3D/opt/resin/webapps/sampleapp 2.- Error page for HTTP code 500: I have a centralized error handler, configured via web.xml following the servlet spec. It has worked fine on Resin2, Resin3, WebSphere, Orion/Oracle9i and Jetty, but did not work on Winstone, here is the stacktrace, please read my comments below: linux:/opt/winstone # [Winstone 2005/08/04 06:48:46] - Untrapped Error in S= ervle t java.lang.Throwable: Invalid path to resource: /WEB-INF/action/xxx/config.x= ml at dinamica.StringUtil.getResource(StringUtil.java:323) at dinamica.StringUtil.getResource(StringUtil.java:163) at dinamica.Controller.service(Controller.java:121) at javax.servlet.http.HttpServlet.service(HttpServlet.java:47) at winstone.RequestDispatcher.forward(RequestDispatcher.java:295) at winstone.RequestHandlerThread.processRequest(RequestHandlerThrea= d.jav a:232) at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150) at java.lang.Thread.run(Thread.java:534) javax.servlet.ServletException at dinamica.Controller.service(Controller.java:353) at javax.servlet.http.HttpServlet.service(HttpServlet.java:47) at winstone.RequestDispatcher.forward(RequestDispatcher.java:295) at winstone.RequestHandlerThread.processRequest(RequestHandlerThrea= d.jav a:232) at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150) at java.lang.Thread.run(Thread.java:534) [Winstone 2005/08/04 06:48:46] - Error using error page /action/error/gener= al fo r code 500 java.lang.Throwable: Invalid path to resource: /WEB-INF/action/xxx/config.x= ml at dinamica.StringUtil.getResource(StringUtil.java:323) at dinamica.StringUtil.getResource(StringUtil.java:163) at dinamica.Controller.service(Controller.java:121) at javax.servlet.http.HttpServlet.service(HttpServlet.java:47) at winstone.RequestDispatcher.forward(RequestDispatcher.java:295) at winstone.WinstoneResponse.sendError(WinstoneResponse.java:437) at winstone.WinstoneResponse.sendUntrappedError(WinstoneResponse.ja= va:55 6) at winstone.RequestHandlerThread.processRequest(RequestHandlerThrea= d.jav a:239) at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150) at java.lang.Thread.run(Thread.java:534) javax.servlet.ServletException at dinamica.Controller.service(Controller.java:353) at javax.servlet.http.HttpServlet.service(HttpServlet.java:47) at winstone.RequestDispatcher.forward(RequestDispatcher.java:295) Winstone reports "Untrapped Error in Servlet java.lang.Throwable:.." It's not that it was not trapped, the framework controller (the servlet is this case) trapped the exception with try-catch, and then throws a ServletException containing the original exception, by definition, the servlet container would print its own message unless there is an error-page directive in web.xml, as in my case. Later the stacktrace prints the following, the core of the problem: "[Winstone 2005/08/04 06:48:46] - Error using error page /action/error/general for code 500.." I think it says "I had some problem trying to pass control to the error page defined in web.xml", but I cannot figure out why? that would be my question. I think you mentioned something about request error processing being fixed in last snapshot? 3.- I tested Winstone on Linux using three commercial grade JVMs: Sun, IBM and Blackdown. All worked fine, except for the IBM parser/validation silly message. But while testing with open source JVMs, I got -sadly as expected- all kind of problems that inhibited Winstone from running. I am sure that all of this problems are inherent to the early stage of these JVMs, however I managed to run Resin 2 with all of them, and even Resin 3 with one of them, so that's why I am asking your opinion, because Winstone could not run with any of them. Here are the details, all tests with latest releases of each JVM and the GNU Classpath library: SableVM: Did not run, complains about system properties it does not support. Never mind. Cacao VM: Same as above. JamVM: Complained about JNDI, but this does not happens with Resin, so I wonder if there may be something we can do on Winstone code to override this problem. linux:/opt/winstone # [Winstone 2005/08/04 06:46:09] - Error binding object jdbc/dinamica to JNDI Context javax.naming.NoInitialContextException: Can't find property: java.naming.factory.initial at javax.naming.spi.NamingManager.getInitialContext (NamingManager.java:= 90) at javax.naming.InitialContext.getDefaultInitCtx (InitialContext.java:19= 2) at javax.naming.InitialContext.getURLOrDefaultInitCtx (InitialContext.java:227) at javax.naming.InitialContext.lookup (InitialContext.java:257) at winstone.jndi.WebAppJNDIManager.setup (WebAppJNDIManager.java:138) at winstone.WebAppConfiguration.<init> (WebAppConfiguration.java:626) at winstone.Launcher.initWebApp (Launcher.java:378) at winstone.Launcher.<init> (Launcher.java:143) at winstone.Launcher.main (Launcher.java:538) at java.lang.reflect.Method.invokeNative (Native Method) at java.lang.reflect.Method.invoke (Method.java:355) at jamvm.java.lang.JarLauncher.main (JarLauncher.java:50) Well, that's all, thanks for reading this long report. Regards, Martin Cordova --=20 Dinamica - Open source J2EE framework Free, easy and powerful http://www.martincordova.com |