-
1. Re: odd, possibly classpath errors in clustered environment?
jerryfowler Jul 18, 2003 9:40 AM (in response to jriedesel)> 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)