5 Replies Latest reply on Dec 29, 2001 3:16 PM by twhphan

    JBoss 3.0 - Jetty cannot find CachedRowSet

    l.g.

      JBoss 3.0 cannot find sun.jdbc.rowset.CachedRowSet. I put rowset.jar in /lib/ext and this worked for me with JBoss 2.4.4-Tomcat.
      This is error I got when I try to run my app:

      org.apache.jasper.JasperException: JASPER: Unable to compile class for JSPC:\TEMP\JettyContext17912.tmp\_0002fsearch_0002ejspsearch_jsp_0.java:160: Class sun.jdbc.rowset.CachedRowSet not found. sun.jdbc.rowset.CachedRowSet crs = (sun.jdbc.rowset.CachedRowSet)data.get("getRegionsList"); ^ C:\TEMP\JettyContext17912.tmp\_0002fsearch_0002ejspsearch_jsp_0.java:160: Class sun.jdbc.rowset.CachedRowSet not found. sun.jdbc.rowset.CachedRowSet crs = (sun.jdbc.rowset.CachedRowSet)data.get("getRegionsList"); ^ C:\TEMP\JettyContext17912.tmp\_0002fsearch_0002ejspsearch_jsp_0.java:190: Class sun.jdbc.rowset.CachedRowSet not found. crs = (sun.jdbc.rowset.CachedRowSet)data.get("getQualificationCode"); ^ C:\TEMP\JettyContext17912.tmp\_0002fsearch_0002ejspsearch_jsp_0.java:220: Class sun.jdbc.rowset.CachedRowSet not found. crs = (sun.jdbc.rowset.CachedRowSet)data.get("getUserRole"); ^ 4 errors

      Help? Anybody?
      TIA

        • 1. Re: JBoss 3.0 - Jetty cannot find CachedRowSet
          marc.fleury

          the binary ships with a silly requirement that you must list the jars in lib/ext in the main service.xml

          i have removed this from CVS so the next release won't have this and for now you can just update your jboss-service.xml in conf/default

          • 2. Re: JBoss 3.0 - Jetty cannot find CachedRowSet
            l.g.

            Thanks for answering!
            I added rowset.jar name to .jar list in both /conf/boot-server/jboss-service.xml
            and /conf/default/jboss-service.xml
            Still does not work...

            • 3. Re: JBoss 3.0 - Jetty cannot find CachedRowSet
              marc.fleury

              Oh then its another problem with the JSP setup and no it wasn't just the "lib/ext" thing from 2.4, you have something else different in your setup with JSP, probably you had it in the classpath and not just lib/ext.

              putting it in your classpath is not the most excellent solution but at least you won't waste your time

              • 4. Re: JBoss 3.0 - Jetty cannot find CachedRowSet
                marc.fleury

                oh I see you are using Jetty,

                the jetty compilation doesn't take the full classpath from the dynamic stuff in JBoss.

                I think it has been fixed in CVS already (jules retrieves the right classpath now) but in any case the next beta will fix these category of problem (class not seen from different stacks).

                In the mean time put it in your classpath

                • 5. Re: JBoss 3.0 - Jetty cannot find CachedRowSet
                  twhphan

                  Hi, I'm using JBoss Version: 3.0.0alpha(200112261348)

                  I'd like to start a RMI server within the JBoss/Jetty VM. My code below executes only in the web container. The RMI stubs are complied using ANT with before creating the WAR file

                  Aware that JBoss passes the classpath $JBOSS_DIST/tmp/deploy/Default/esb.ear/webxxxx/WEB-INF/classes/ to Jetty, so the stubs must be in the classpath.

                  I attached the error here. Note that it can find "esb.web.tag.ScheduledJobTag.doInitBody" and "esb.util.ScheduledJobUtils.start". It may find "esb.lib.schedule.ScheduledJobServiceImpl", as it knows that ScheduledJobServiceImpl needs a stub

                  My code (.../esb/util/ScheduledJobUtils.java)
                  =============================================
                  public static final String SCHEDULED_JOB_SERVICE_JNDI = "/ScheduledJobService";
                  ...
                  public static boolean start() {
                  ScheduledJobServiceImpl scheduledJobServiceImpl = null;
                  try {
                  scheduledJobServiceImpl = new ScheduledJobServiceImpl(); <- EXCEPTION OCCURS HERE
                  ic.bind(SCHEDULED_JOB_SERVICE_JNDI, scheduledJobServiceImpl);
                  ...

                  The error
                  =========
                  02:59:59,901 ERROR [Default] java.rmi.StubNotFoundException: Stub class not found: esb.lib.schedule.ScheduledJobServiceImpl_Stub; nested exception is:
                  java.lang.ClassNotFoundException: esb.lib.schedule.ScheduledJobServiceImpl_Stub
                  02:59:59,902 ERROR [Default] java.lang.ClassNotFoundException: esb.lib.schedule.ScheduledJobServiceImpl_Stub
                  02:59:59,902 ERROR [Default] at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
                  02:59:59,902 ERROR [Default] at java.security.AccessController.doPrivileged(Native Method)
                  02:59:59,902 ERROR [Default] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
                  02:59:59,903 ERROR [Default] at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
                  02:59:59,903 ERROR [Default] at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
                  02:59:59,903 ERROR [Default] at sun.rmi.server.RemoteProxy.loadClassFromClass(RemoteProxy.java:194)
                  02:59:59,903 ERROR [Default] at sun.rmi.server.RemoteProxy.getStub(RemoteProxy.java:96)
                  02:59:59,904 ERROR [Default] at sun.rmi.server.RemoteProxy.getStub(RemoteProxy.java:58)
                  02:59:59,904 ERROR [Default] at sun.rmi.server.UnicastServerRef.setSkeleton(UnicastServerRef.java:159)
                  02:59:59,904 ERROR [Default] at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:122)
                  02:59:59,905 ERROR [Default] at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:109)
                  02:59:59,905 ERROR [Default] at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:278)
                  02:59:59,905 ERROR [Default] at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:181)
                  02:59:59,905 ERROR [Default] at java.rmi.server.UnicastRemoteObject.(UnicastRemoteObject.java:78)
                  02:59:59,906 ERROR [Default] at java.rmi.server.UnicastRemoteObject.(UnicastRemoteObject.java:64)
                  02:59:59,906 ERROR [Default] at esb.lib.schedule.ScheduledJobServiceImpl.(Unknown Source)
                  02:59:59,906 ERROR [Default] at esb.util.ScheduledJobUtils.start(Unknown Source)
                  02:59:59,906 ERROR [Default] at esb.web.tag.ScheduledJobTag.doInitBody(Unknown Source)
                  02:59:59,907 ERROR [Default] at org.apache.jsp.scheduledJob$jsp._jspService(scheduledJob$jsp.java:124)

                  My WAR file contains:
                  WEB-INF/classes/esb/lib/schedule/ScheduledJobServiceImpl$MainLoop.class
                  WEB-INF/classes/esb/lib/schedule/ScheduledJobServiceImpl.class
                  WEB-INF/classes/esb/lib/schedule/ScheduledJobServiceImpl_Skel.class
                  WEB-INF/classes/esb/lib/schedule/ScheduledJobServiceImpl_Stub.class

                  I don't have any problem with the classpath for lib/ext, and ../WEB-INF/classes/, as long as <servlet-mapping />, and RMI are not used. Seems that the CLASSPATH doesn't propagate into a new scope

                  Note:
                  My code works in "JBoss 2.4 + Tomcat 4"
                  Addition Info about servlet-mapping: http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/ tried to add the classes in the system CLASSPATH, and pre-complie JSP files, but still doesn't work

                  Any idea, thanks