1 Reply Latest reply on Jul 18, 2003 9:40 AM by Jerry Fowler

    odd, possibly classpath errors in clustered environment?

    Joel Riedesel Newbie

      3.2.1

      I'm having difficulty deploying my ear and running
      my EJBs in the 'all' server environment with clustering
      enabled on my beans. But not in the 'default' environment.

      In the 'all'/clustered environment I get errors such
      as 'NoSuchMethodError' when I know that the method really does exist and works in the 'default' configuration with exactly the same ear file.

      I'm not sure how to better focus this question but it feels like classpath related problems.

      In my ear I have my application referencing my common set of jars via the 'module' stanzas in the application.xml file. In the ejb jar file I have a manifest.mf that has all those same jar files speficied for its classpath. And in the war file I have the same manifest again and all the jar files directly in the WEB-INF directory. Is there anything wrong with that configuration?

      Other ideas?
      Joel

        • 1. Re: odd, possibly classpath errors in clustered environment?
          Jerry Fowler Newbie

          > 3.2.1
          >

          > In the 'all'/clustered environment I get errors such
          > as 'NoSuchMethodError' when I know that the method
          > really does exist and works in the 'default'
          > configuration with exactly the same ear file.
          >
          > I'm not sure how to better focus this question but it
          > feels like classpath related problems.

          Forgive me if this is too me-too-y, but perhaps I can add some info. I am having troubles with this in 'default' when *not* clustered.

          My failure occurs when I try to do something "interesting" with
          the SchedulableExample as found in

          default/deploy/scheduler-service.xml

          I can run the stock Scheduler as documented in

          http://jboss.sourceforge.net/doc-24/ch11s58.html#d0e9658

          however, if I do anything within the SchedulableExample.perform()
          method that creates a new object outside the scope of the pure Java jar,
          and then invoke a method on that object, I get NoSuchMethodError.

          e.g.,

          String x = new java.lang.String();
          int l = x.length();

          works, but

          import org.apache.commons.httpclient.*;

          ...

          HttpClient http = new HttpClient();
          http.setConnectionTimeout(2000);

          fails thus:

          10:03:41,140 ERROR [STDERR] java.lang.NoSuchMethodError: org.apache.commons.httpclient.HttpClient.setConnectionTimeout(I)V

          (Note, the http = new HttpClient() line works).

          Note also that SchedulableExample.perform() invokes
          org.jboss.logging.Logger.log(), so JBoss can handle its own code.

          With this and your question about classpath in mind, I ascertained that
          I had correctly included a declaration in my -service.xml,
          so this would *appear* not to be the problem.

          Thanks,
          Jerry
          (sorry if this turns out to be a re-post, I think my first one failed due to a session timeout)