On 3 Aug 2004 at 14:29, Jacek Laskowski wrote: > Are the problems only pertaining to Java itself (a CLASSPATH issue) or > do you think they're OpenEJB ones? Could you list them all?
This is a second attempt to reply .. there seems to be a 30k message limit at codehaus. ... o.k. .. here is an attempt to list the problems .. remember, I'm quite new at this .. .. quite near, but not there yet .. here is a log of my attempts to run openejb.jsp .. as detailed in http://www.openejb.org/tomcat-ejbrefs.html I have openejb-0.9.2 installed in %CATALINA_HOME%\webapps\openejb\ ... .... (name truncated) and openejb home in c:\openejb and my\app in c:\my\app note: I have used the binary download of open-0.9.2 since I'm new at building from CVS (where is that explained?). You advised that I use the CVS. ... For testing ejb .. and using this reference as starting point .. "Using java:comp/env lookups" .. http://www.openejb.org/tomcat-ejbrefs.html ... I created a fresh web app ... %CATALINA_HOME%\webapps\myapp\ then created in webapps\myapp\ .. the empty sub-directories myapp\WEB-INF myapp\WEB-INF\classes\ myapp\WEB-INF\lib\ Adding ejb-ref in your web.xml (in http://www.openejb.org/tomcat-ejbrefs.html) but at this stage .. no web.xml created in WEB-INF .. no classes in WEB- INF\classes\ Question: How do I create the web.xml?? Class content ?? Build reference in openejb site? <ejb-ref> <description> EJB Reference to the bean deployed to OpenEJB </description> <ejb-ref-name>ejb/hello</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <home>org.acme.HelloHome</home> <remote>org.acme.Hello</remote> </ejb-ref> Adding the Ejb in your server.xml (in http://www.openejb.org/tomcat-ejbrefs.html) This advice at openejb site is now out of date for Tomcat 5.0 as confirmed in an earlier posting from another openejb subscriber .. http://archive.openejb.codehaus.org/user/messages/151 and see main reference here .. http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html [QUOTE] Please note that for tomcat 5.x, unlike tomcat 4.x, it is NOT recommended to place <Context> elements directly in the server.xml file. Instead, put them in the META-INF/context.xml directory of your WAR file or the conf directory as described above. [/QUOTE] So .. guessing .. I tried putting the myapp.xml file as below into here .. %CATALINA_HOME%\conf\Catalina\localhost\myapp.xml _______________________________________________________ <Context path="/myapp" docBase="c:\my\app\" debug="0" reloadable="true"> <Ejb name="ejb/hello" ... snipped .. </ResourceParams> </Context> _______________________________________________________ Note that I am pointing to the test environment c:\my\app used for testing openejb.jsp (and earlier Hello World!). Shut down and restarted Tomcat. When I launch http://localhost:8080/myapp/ I can now see contents of c:\my\app directory .. which suggests that the "path" and "docBase" in context container are working. But .. if I now try to launch http://localhost:8080/myapp/openejb.jsp I get this HTTP Status 500 report _______________________________________________________ type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:372) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) root cause java.lang.reflect.UndeclaredThrowableException $Proxy13.create(Unknown Source) org.apache.jsp.openejb_jsp._jspService(openejb_jsp.java:61) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) note The full stack trace of the root cause is available in the Apache Tomcat/5.0.27 logs. ___________________________________________________________________ inspecting stdout.log I found this clue .. 03-Aug-2004 19:21:03 org.apache.catalina.startup.ContextConfig applicationConfig INFO: Missing application web.xml, using defaults only StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myapp] so "missing application web.xml" ??? _______________________________________________________________ and in localhost_log.2004-08-03.txt is this clue .. 2004-08-03 19:21:39 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception java.lang.reflect.UndeclaredThrowableException at $Proxy13.create(Unknown Source) at org.apache.jsp.openejb_jsp._jspService(openejb_jsp.java:61) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) _______________________________________________________________ I think I need help in creating the web.xml / etc. At least tomcat server points to c:\my\app .. but does not run the openejb.jsp placed there. To conclude:- Why can't I run http://localhost:8080/myapp/openejb.jsp ?? _______________________________________________________________ Throwing in a final question (at least in this posting) ... Why is there a growing number of newly created openejb directories appearing in %CATALINA_HOME% they are named openejb<number sequence about 18 digits> and inside each is a single jar named openejb_validatexxxx.jar the original *.war used to instal openejb has been removed. thanks dl
