4 Replies Latest reply on May 21, 2002 8:46 PM by jules

    Where to find documentation for JBOSS 3 and JETTY

    rgjawanda

      Hello,

      Please forgive me if this is a stupid question.
      I can't get anything deployed using JBOSS 3 RC2 and JETTY.

      Do the docs apply for using jetty with jboss 2.4.4?
      Or is it different.

      I will purchase docs or whatever. I just need to know which ones (I already purchased jboss 2 and the new CMP 2 stuff and it isn't in there).

      Thanks for your help.
      Ron

        • 1. Re: Where to find documentation for JBOSS 3 and JETTY

          I don't know where the docs are offhand - there should be a link somewhere on the site, but give me a little more information and I will try to help you get your app deployed.

          A log and stacktrace would be a great help - the error messages are usually pretty good.

          a 'jar tvf' of your ear,war etc would be useful and the contents of your web.xml.

          If it's not a ClassLoader problem, it's probably not going to be difficult.


          Jules

          • 2. Re: Where to find documentation for JBOSS 3 and JETTY
            rgjawanda


            I was able to deploy but get a classcastexception in my servlet.
            I am not sure how to get at my Home class
            Previous to this I used Tomcat and JBOSS 3RC2 (separated (not in the same JVM).

            My xml files are at the end. I tried to attach them but either the forums aren't working or my pc...


            here is a snippet from my server.log

            I am not sure if I am doing the PortableRemote... properly. The lookup works. The PortableRemoteObject doesn't.

            Object ref = jndiContext.lookup("tisfc955");

            tisfc955_Home home = (tisfc955_Home) PortableRemoteObject.narrow(ref, tisfc955_Home.class);




            2002-05-21 09:36:35,795 INFO [org.jboss.jetty.Jetty] Started SecurityHandler in WebApplicationContext[/jbaan,jar:njar:file:/C:/data/swi/jboss-3.0.0RC2/server/default/tmp/deploy/server/default/deploy/jbaan.ear/84.jbaan.ear^/jbaan.war!/]
            2002-05-21 09:36:35,795 INFO [org.jboss.jetty.Jetty] Started WebInfProtect
            2002-05-21 09:36:35,795 INFO [org.jboss.jetty.Jetty] Started FilterHandler in WebApplicationContext[/jbaan,jar:njar:file:/C:/data/swi/jboss-3.0.0RC2/server/default/tmp/deploy/server/default/deploy/jbaan.ear/84.jbaan.ear^/jbaan.war!/]
            2002-05-21 09:36:35,795 INFO [org.jboss.jetty.Jetty] Started ServletHandler in WebApplicationContext[/jbaan,jar:njar:file:/C:/data/swi/jboss-3.0.0RC2/server/default/tmp/deploy/server/default/deploy/jbaan.ear/84.jbaan.ear^/jbaan.war!/]
            2002-05-21 09:36:35,810 INFO [org.jboss.jetty.Jetty] JSP: init
            2002-05-21 09:36:35,904 INFO [org.jboss.jetty.Jetty] Servlet955: init
            2002-05-21 09:36:35,904 INFO [org.jboss.jetty.Jetty] ResourceHandler started in file:/C:/Documents and Settings/rjawanda/Local Settings/Temp/Jetty__8088___jbaan/webapp/
            2002-05-21 09:36:35,904 INFO [org.jboss.jetty.Jetty] Started ResourceHandler in WebApplicationContext[/jbaan,jar:njar:file:/C:/data/swi/jboss-3.0.0RC2/server/default/tmp/deploy/server/default/deploy/jbaan.ear/84.jbaan.ear^/jbaan.war!/]
            2002-05-21 09:36:35,904 INFO [org.jboss.jetty.Jetty] Started NotFoundHandler in WebApplicationContext[/jbaan,jar:njar:file:/C:/data/swi/jboss-3.0.0RC2/server/default/tmp/deploy/server/default/deploy/jbaan.ear/84.jbaan.ear^/jbaan.war!/]
            2002-05-21 09:36:35,904 INFO [org.jboss.jetty.Jetty] successfully deployed njar:file:/C:/data/swi/jboss-3.0.0RC2/server/default/tmp/deploy/server/default/deploy/jbaan.ear/84.jbaan.ear^/jbaan.war to /jbaan
            2002-05-21 09:36:35,904 DEBUG [org.jboss.deployment.MainDeployer] Final (start) deployment step successfully completed on package: jbaan.war
            2002-05-21 09:36:35,904 DEBUG [org.jboss.deployment.MainDeployer] Final (start) deployment step successfully completed on package: jbaan.ear
            2002-05-21 09:36:35,904 INFO [org.jboss.deployment.MainDeployer] Successfully completed deployment of package: file:/C:/data/swi/jboss-3.0.0RC2/server/default/deploy/jbaan.ear
            2002-05-21 09:36:50,920 ERROR [STDERR] java.lang.ClassCastException
            2002-05-21 09:36:50,920 ERROR [STDERR] at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
            2002-05-21 09:36:50,920 ERROR [STDERR] at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
            2002-05-21 09:36:50,920 ERROR [STDERR] at ca.husky.jbaan.Servlet955.processRequest(Unknown Source)
            2002-05-21 09:36:50,935 ERROR [STDERR] at ca.husky.jbaan.Servlet955.doGet(Unknown Source)
            2002-05-21 09:36:50,935 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
            2002-05-21 09:36:50,935 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            2002-05-21 09:36:50,935 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:326)
            2002-05-21 09:36:50,935 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:595)
            2002-05-21 09:36:50,935 ERROR [STDERR] at org.mortbay.http.HttpContext.handle(HttpContext.java:1357)
            2002-05-21 09:36:50,935 ERROR [STDERR] at org.mortbay.http.HttpContext.handle(HttpContext.java:1309)
            2002-05-21 09:36:50,935 ERROR [STDERR] at org.mortbay.http.HttpServer.service(HttpServer.java:744)
            2002-05-21 09:36:50,935 ERROR [STDERR] at org.jboss.jetty.Jetty.service(Jetty.java:527)
            2002-05-21 09:36:50,935 ERROR [STDERR] at org.mortbay.http.HttpConnection.service(HttpConnection.java:743)
            2002-05-21 09:36:50,935 ERROR [STDERR] at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:916)
            2002-05-21 09:36:50,935 ERROR [STDERR] at org.mortbay.http.HttpConnection.handle(HttpConnection.java:758)
            2002-05-21 09:36:50,935 ERROR [STDERR] at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:145)
            2002-05-21 09:36:50,935 ERROR [STDERR] at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:287)
            2002-05-21 09:36:50,935 ERROR [STDERR] at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:715)
            2002-05-21 09:36:50,935 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536)
            2002-05-21 09:37:07,576 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000
            2002-05-21 09:37:28,545 ERROR [STDERR] java.lang.ClassCastException
            2002-05-21 09:37:28,545 ERROR [STDERR] at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293)
            2002-05-21 09:37:28,545 ERROR [STDERR] at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
            2002-05-21 09:37:28,545 ERROR [STDERR] at ca.husky.jbaan.Servlet955.processRequest(Unknown Source)
            2002-05-21 09:37:28,560 ERROR [STDERR] at ca.husky.jbaan.Servlet955.doGet(Unknown Source)
            2002-05-21 09:37:28,560 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
            2002-05-21 09:37:28,560 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            2002-05-21 09:37:28,560 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:326)
            2002-05-21 09:37:28,560 ERROR [STDERR] at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:595)
            2002-05-21 09:37:28,560 ERROR [STDERR] at org.mortbay.http.HttpContext.handle(HttpContext.java:1357)
            2002-05-21 09:37:28,560 ERROR [STDERR] at org.mortbay.http.HttpContext.handle(HttpContext.java:1309)
            2002-05-21 09:37:28,560 ERROR [STDERR] at org.mortbay.http.HttpServer.service(HttpServer.java:744)
            2002-05-21 09:37:28,560 ERROR [STDERR] at org.jboss.jetty.Jetty.service(Jetty.java:527)
            2002-05-21 09:37:28,560 ERROR [STDERR] at org.mortbay.http.HttpConnection.service(HttpConnection.java:743)
            2002-05-21 09:37:28,560 ERROR [STDERR] at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:916)
            2002-05-21 09:37:28,560 ERROR [STDERR] at org.mortbay.http.HttpConnection.handle(HttpConnection.java:758)
            2002-05-21 09:37:28,560 ERROR [STDERR] at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:145)
            2002-05-21 09:37:28,560 ERROR [STDERR] at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:287)
            2002-05-21 09:37:28,560 ERROR [STDERR] at org.mortbay.util.ThreadPool$JobRunner.run(ThreadPool.java:715)
            2002-05-21 09:37:28,560 ERROR [STDERR] at java.lang.Thread.run(Thread.java:536)
            2002-05-21 09:41:19,216 DEBUG [org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy] Resized cache for bean tisfc955_Bean: old capacity = 1000000, new capacity = 50
            2002-05-21 09:44:37,576 DEBUG [org.jboss.resource.connectionmanager.IdleRemover] run: IdleRemover notifying pools, interval: 450000







            -WEB.XML----------------
            <?xml version="1.0" encoding="UTF-8"?>
            <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

            <web-app>

            <servlet-name>Servlet955</servlet-name>
            <servlet-class>ca.husky.jbaan.Servlet955</servlet-class>
            <load-on-startup>1</load-on-startup>

            <servlet-mapping>
            <servlet-name>Servlet955</servlet-name>
            <url-pattern>/Servlet955</url-pattern>
            </servlet-mapping>

            <session-config>
            <session-timeout>60</session-timeout>
            </session-config>

            <welcome-file-list>
            <welcome-file>home.jsp</welcome-file>
            <welcome-file>home.html</welcome-file>
            </welcome-file-list>

            <!-- ### EJB References (java:comp/env/ejb) -->
            <ejb-ref>
            <ejb-ref-name>tisfc955</ejb-ref-name>
            <ejb-ref-type>Entity</ejb-ref-type>
            ca.husky.jbaan.tisfc955_Home
            ca.husky.jbaan.tisfc955_Remote
            <ejb-link>tisfc955_Bean</ejb-link>
            </ejb-ref>
            </web-app>
            --------END WEB.XML-------------


            -------EBJ-JAR.XML-------------
            <?xml version="1.0"?>

            <!DOCTYPE ejb-jar PUBLIC
            "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN"
            "http://java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd">

            <ejb-jar>
            <display-name>jbaan</display-name>
            <enterprise-beans>


            Flat BOM with Levels
            <ejb-name>tisfc955_Bean</ejb-name>
            ca.husky.jbaan.tisfc955_Home
            ca.husky.jbaan.tisfc955_Remote
            <ejb-class>ca.husky.jbaan.tisfc955_Bean</ejb-class>
            <persistence-type>Bean</persistence-type>
            <prim-key-class>java.lang.Long</prim-key-class>
            False



            <assembly-descriptor>
            <container-transaction>

            <ejb-name>tisfc955_Bean</ejb-name>
            <method-name>*</method-name>

            <!-- <trans-attribute>Required</trans-attribute> -->
            <trans-attribute>Never</trans-attribute>
            </container-transaction>
            </assembly-descriptor>


            </enterprise-beans>

            </ejb-jar>

            -------END EJB-JAR.XML-------------
            -------JBOSS.XML-----------
            <?xml version="1.0" encoding="Cp1252"?>


            false
            <container-configurations />
            <resource-managers />
            <enterprise-beans>

            <ejb-name>tisfc955_Bean</ejb-name>
            <jndi-name>tisfc955</jndi-name>
            <configuration-name></configuration-name>

            </enterprise-beans>


            -------END JBOSS.XML







            • 3. Re: Where to find documentation for JBOSS 3 and JETTY
              rgjawanda

              Jules,
              Don't waste your time on me.
              I figured it out.
              I thought for a few minutes and then figured out that I shouldn't be doing a PortableRemoteObject (defeats the purpose).
              So I finally got it to work.
              As usual it was me.
              I now have a working system that gets data from BAAN (business system)/Oracle using RC2 and Jetty.
              I am preparing to use Axis to provide BAAN web services... In production.
              Thanks
              Ron

              • 4. Re: Where to find documentation for JBOSS 3 and JETTY

                Often just having to explain the problem to someone else crystallises it...


                Good luck,


                Jules