• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Implementing the EJB3 Web Service

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am implementing EJB3 web service .
IDE is eclipse
Application Server is JBoss

Server side is doing properly ,when I am running my following client

public class Client {
public static void main(String[] args) throws Exception {
System.out.println("Starting Test Client");
URL url = new URL(
"http://localhost:8080/imaging/ImagingServiceBean?wsdl");
QName qname = new QName("http://ejb.iba.by/jaws",
"ImagingServiceService");

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

System.out.println("Obtaining reference to a proxy object");
ImagingService proxy = (ImagingService) remote
.getPort(ImagingService.class);
System.out.println("Accessed local proxy: " + proxy);

String string = "John";
System.out.println("Sending: " + string);

System.out.println("Receiving: " + proxy.echo("John"));
}
}



in the statement Service remote = factory.createService(url, qname);

i am getting follwing exception.........

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/discovery/tools/DiscoverSingleton
at org.apache.axis.components.logger.LogFactory$1.run(LogFactory.java:84)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.components.logger.LogFactory.getLogFactory(LogFactory.java:80)
at org.apache.axis.components.logger.LogFactory.<clinit>(LogFactory.java:72)
at org.apache.axis.handlers.BasicHandler.<clinit>(BasicHandler.java:81)
at org.apache.axis.client.Service.getAxisClient(Service.java:145)
at org.apache.axis.client.Service.<init>(Service.java:187)
at org.apache.axis.client.ServiceFactory.createService(ServiceFactory.java:233)
at by.iba.client.Client.main(Client.java:22)


How can I resolve this problem ?
Please help me in this
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

java.lang.NoClassDefFoundError: org/apache/commons/discovery/tools/DiscoverSingleton



Your client classpath is missing the jar file which contains this class. You will have to add that jar to the client classpath.
 
reply
    Bookmark Topic Watch Topic
  • New Topic