[jboss-user] [JBossWS] - java.lang.NoSuchMethodError: org.jboss.ejb3.stateless.Statel

sreeramrt3 do-not-reply at jboss.com
Wed Oct 15 14:28:31 EDT 2008


I have tried multiple ejb examples and I run into the same exception. The server is unable to invoke setWebServiceContext in the process chain. Please find attached my example. I am using all the libraries from client, server\lib, server\default\lib and server\lib\endorsed.


package webservice;

import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.jws.WebMethod;
import javax.jws.WebService;

@WebService(endpointInterface = "webservice.HelloRemote")
public class HelloBean {

	public String echo(String e) {
		return "Web Service Echo + " + e;

package webservice;

import java.rmi.Remote;

import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;

@SOAPBinding(style = Style.RPC)
public interface HelloRemote extends Remote {
	public String echo(String e);


package client;

import java.net.URL;

import javax.xml.namespace.QName;
import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceFactory;

import webservice.HelloRemote;

public class HelloBeanClient {
    public static void main(String[] args) throws Exception {
        System.out.println("Starting Test Client");
        URL wsdlUrl = new URL("" +
        QName qname = new QName("http://hello/", "HelloBeanService");

        System.out.println("Creating a service Using: \n\t" 
                                   + wsdlUrl + " \n\tand " + qname);
        ServiceFactory factory = ServiceFactory.newInstance();
        URL url = new URL("" +
        Service remote = factory.createService(wsdlUrl, qname);

        System.out.println("Obtaining reference to a proxy object");
        HelloRemote proxy = (HelloRemote) remote.getPort(HelloRemote.class);
        System.out.println("Accessed local proxy: " + proxy);
        String string = "John";
        System.out.println("Sending: " + string);
        System.out.println("Receiving: " + proxy.echo("John"));

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4182480#4182480

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4182480

More information about the jboss-user mailing list