Cactus
  1. Cactus
  2. CACTUS-150

JDK 1.5 runtime incompatible with Cactus ServletTestRunner?

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 1.6.1
    • Fix Version/s: 1.7
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      jboss-3.2.5 on Windows XP Service Pack 2.

      Description

      I'm using jakarta-cactus-13-1.6.1, with all the appropriate library
      files in my WEB-INF\lib folder:
      junit-3.8.1.jar
      commons-logging-1.0.3.jar
      commons-httpclient-2.0.jar
      cactus-1.6.1.jar
      aspectjrt-1.1.1.jar
      nekohtml-0.7.4.jar
      cactus-ant-1.6.1.jar

      I am running jboss-3.2.5 on Windows XP Service Pack 2.
      If I compile my server code under JDK 1.4 or JDK 1.5, and start the
      server under the 1.4 JRE, I can use the ServletTestRunner to run a class
      which extends org.apache.cactus.ServletTestCase without a problem.
      But with the same exact server deployment, started under the 1.5 JRE, I
      receive the following error:
      java.lang.NoClassDefFoundError: org/apache/cactus/util/log/LogAspect
      at
      org.apache.cactus.server.runner.ServletTestRunner.doGet(ServletTestRunne
      r.java)

      Some additional things I've tried:
      I've tried putting the library files directly in the server lib
      directory, rather than in WEB-INF\lib.
      I've tried using the latest development release of cactus,
      jakarta-cactus-13-1.7dev20040815.zip.

      Neither made a difference - I receive the same error.

      I noticed an earlier mailing with the same symptoms in the archives
      (http://www.mail-archive.com/cactus-user%40jakarta.apache.org/msg05860.h
      tml).

        Issue Links

          Activity

          Hide
          Travis Gibson added a comment -

          I was having the same NoClassDef Exception with

          1.) JBoss 4.0.1RC2
          2.) JDK 1.5(5.0)

          I simply replaced the following jars in the JBoss lib:

          1.) cactus.jar
          2.) commons-httpclient.jar
          3.) commons-logging.jar
          4.) junit.jar
          5.) aspectjrt.jar

          with those that were included with Cactus-12-1.7 that were more current than those in JBoss 4.0.1.

          Doing that fixed the issue for me.

          --Travis

          Show
          Travis Gibson added a comment - I was having the same NoClassDef Exception with 1.) JBoss 4.0.1RC2 2.) JDK 1.5(5.0) I simply replaced the following jars in the JBoss lib: 1.) cactus.jar 2.) commons-httpclient.jar 3.) commons-logging.jar 4.) junit.jar 5.) aspectjrt.jar with those that were included with Cactus-12-1.7 that were more current than those in JBoss 4.0.1. Doing that fixed the issue for me. --Travis
          Hide
          Felipe Leme added a comment -

          Ari,

          I'm committing the changes and then closing the bug.
          The fix will be available only at 1.7, but hopefully we will generate some temporary releases before 1.7 is final (stay tunned at the mailing lists

          Show
          Felipe Leme added a comment - Ari, I'm committing the changes and then closing the bug. The fix will be available only at 1.7, but hopefully we will generate some temporary releases before 1.7 is final (stay tunned at the mailing lists
          Hide
          Ari Erin Miller added a comment -

          The new cactus jar file solves the problem I was seeing (this bug is fixed). I downloaded the new cactus jar file as specified, and then used that jar, the 1.2 aspectjrt library, and the jar files supplied with the 1.7 release of cactus, and didn't see any problems at all.

          Would it be possible to generate either a new 1.6 release with the aspectj version updated, or a new 1.7 release? While it would be preferable to just use the last stable release with the library updated, even having an official 1.7 build to use would be quite helpful.

          Thanks again for the prompt fix.

          Show
          Ari Erin Miller added a comment - The new cactus jar file solves the problem I was seeing (this bug is fixed). I downloaded the new cactus jar file as specified, and then used that jar, the 1.2 aspectjrt library, and the jar files supplied with the 1.7 release of cactus, and didn't see any problems at all. Would it be possible to generate either a new 1.6 release with the aspectj version updated, or a new 1.7 release? While it would be preferable to just use the last stable release with the library updated, even having an official 1.7 build to use would be quite helpful. Thanks again for the prompt fix.
          Hide
          Felipe Leme added a comment -

          I could kind of reproduce this issue (although I didn't get exactly the same error):

          1.compiled cactus from CVS using JDK 1.4
          2.ran the examples/servlet tests using JBoss 3.2.5 and JDK 1.5. It didn't work, due to exceptions on JBoss
          3.then I changed the dependency to AspectJ 1.2 and redid steps 1 and 2 - it worked this time.

          I also uploaded a new cactus jar to my website (http://www.apache.org/~felipeal/cactus/dist-13/) - could you please check it solves your problem?

          – Felipe

          Show
          Felipe Leme added a comment - I could kind of reproduce this issue (although I didn't get exactly the same error): 1.compiled cactus from CVS using JDK 1.4 2.ran the examples/servlet tests using JBoss 3.2.5 and JDK 1.5. It didn't work, due to exceptions on JBoss 3.then I changed the dependency to AspectJ 1.2 and redid steps 1 and 2 - it worked this time. I also uploaded a new cactus jar to my website ( http://www.apache.org/~felipeal/cactus/dist-13/ ) - could you please check it solves your problem? – Felipe
          Hide
          Felipe Leme added a comment -

          I will try to:

          • reproduce the bug
          • see if updating Aspectj fixes it
          • check if it is related to CACTUS-129
          Show
          Felipe Leme added a comment - I will try to: reproduce the bug see if updating Aspectj fixes it check if it is related to CACTUS-129

            People

            • Assignee:
              Felipe Leme
              Reporter:
              Ari Erin Miller
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development