Peter Gerstbach wrote:
Hi,
I've generated with Axis-1.1 stubs for the Google-webservice and built a working client. Then I've built an EJB session bean in JBoss were I call the google-webservice. I use the same (copy-paste) methods in the bean as in the axis-client but every time I invoke the bean-method from an ejb client there is a NoSuchMethodError. The bean is working, because I'm able to invoke other methods without problems.
The exception always occured at this line:
GoogleSearchService service = new GoogleSearchServiceLocator(); -> GoogleSearchPort port = service.getGoogleSearchPort();
I use jboss-3.2.6 and axis-1.1. This ist the stack-trace in detail:
java.rmi.ServerException: RemoteException occurred in server thread;
nested exception is:
java.rmi.ServerError: Unexpected Error:; nested exception is:
java.lang.NoSuchMethodError:
org.apache.axis.description.TypeDesc.<init>(Ljava/lang/Class;Z)V
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:292)
I've not (yet) tried to deploy a webservice under jboss (apart from migrating a legacy webapp to it), but over the last few weeks I've been hitting the same problem with various other jboss components. Every time it's been down to which classloader the components are located.
I've found the following link on the jboss site helpful: http://www.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration
It may be a case that your webservice classes are either hidden away within a different class loader than your session bean, or are deployed after it. (I've hit that problem recently as well).
One way around it may be to place your webservice's classes in the same jar as the session bean. As the EJB's tend to be visible to webapps, the app (& if I remember correctly jboss deploys webservices in their own webapp), it will also still access them.
I'm just thinking of the top of my head at the moment, but would probably be hitting this problem sometime over the next couple of weeks myself, so it would be interesting to hear other peoples ideas on this one.
Peter
Does anybody know what the problem might be? Are there some libraries missing? I put them all in jboss-lib dir, but the error is the same.
regards, Peter Gerstbach