Sitemap

Amicuk Programming Answers

Java.lang.NoClassDefFoundError: javax/xml/rpc/Service

-0001-11-30   Views:8

Advertisement

Hi, I have created client stubs for a webservice using axis wsdl2java tool. When I try calling these stubbed methods from JUnit tests, they are working fine but when I try to execute the jar (it is a swing) I get the following exception: Exception in

Hi,
I have created client stubs for a webservice using axis wsdl2java tool. When I try calling these stubbed methods from JUnit tests, they are working fine but when I try to execute the jar (it is a swing) I get the following exception:
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/rpc/Service
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(Unknown Source)
        at java.security.SecureClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.defineClass(Unknown Source)
        at java.net.URLClassLoader.access$100(Unknown Source)
        at java.net.URLClassLoader$1.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
        at com.Gudds.SeCURE.MainUI.<init>(MainUI.java:76)
        at com.Gudds.SeCURE.Main.Start(Main.java:62)
        at org.owasp.webscarab.WebScarab.main(WebScarab.java:34)I have put the jaxrpc.jar in the classpath and I suppose this jar has the java.xml.rpc.service class but I donot understand why it fails while executing the jar but works fine from the eclipse IDe. Plase help me.
Regrdas,
Kundan

The replay answer
Advertisement
1. Build jar file with MAINFEST.MF and Export of Eclipse , which has content:
suppose in folder:
c:\client.jar ( client of web service )
c:\contrib/lib/ axis apis
Main-Class: com.MainClassName
Class-Path: contrib\axis\jaxrpc.jar contrib\axis\activation.jar con
trib\axis\axis.jar contrib\axis\axis.jar contrib\axis\commons-disco
very.jar contrib\axis\wsdl4j.jar contrib\axis\saaj.jar contrib\axi
s\soap.jar contrib\axis\commons-logging.jar contrib\axis\log4j.jar
contrib\axis\mail.jar
2. build jar with ant: make sure the their are at least one blank between
values of Class-Path.
          <jar destfile="../Client/client.jar" >
               <fileset dir="${build.dir}"/>
          <manifest>
          <attribute name="Built-By" value="${user.name}"/>
               <attribute name="Main-Class" value="com.MainClass"/>
          <attribute name="Class-Path" value=" contrib\axis\jaxrpc.jar contrib\axis\activation.jar .. "/>
          </manifest>
          </jar>
3. If you haven't pack you class file in jar, create a bat to set CLASSPATH
exactly to all jars.
Hope this helps

Go to See the other 4 answers

Java.lang.NoClassDefFoundError: javax/xml/rpc/Service

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I have created client stubs for a webservice using axis wsdl2java tool. When I try calling these stubbed methods from JUnit tests, they are working fine but when I try to execute the jar (it is a swing) I get the following exception: Exception in[More]

Java.lang.NoClassDefFoundError: javax/xml/rpc/soap/SOAPFaultException

Category:DefaultRelease time:2015-10-11Views:130

I have created webservice client using jwsdp-2.0 + JDK 1.5 in Netbeans 4.1 IDE it works perfectly in the netbeans and also works at the command prompt but when i create a Jar file from the netbeans and run at the command prompt with following i have[More]

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/stream

Category:DefaultRelease time:2015-10-11Views:130

I am trying to develop a web service client for amazon webservice.but i am getting this error while running the app. Can anyone please help me. I have installed the JWSDP and but could not understand why i have to locate all the jar files in the clas[More]

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/soap/S

Category:DefaultRelease time:2015-10-11Views:130

Hi, I have created a class JaxmClient.java. When I compile the class with appropriate jar files assigned to -classpath it compiles successfully with no errors. But when I run the classe "java JaxmClient" it produces the following exception: Exce[More]

Jaxb with weblogic -- java.lang.NoClassDefFoundError: javax/xml/bind/MarshallableRootElement

Category:DefaultRelease time:2015-10-11Views:130

I am trying to use jaxb with Weblogic 6.1. I kept both the jaxb jar file in weblogic classpath in setEnv script. I am getting the following error, when I am trying to use jaxb java.lang.NoClassDefFoundError: javax/xml/bind/MarshallableRootElement I t[More]

XML error "java.lang.NoClassDefFoundError: javax/xml/bind/JAXBContext"

Category:DefaultRelease time:-0001-11-30Views:130

Hi Experts, We are developing a WebDynpro for java application in NWDI for XML File Uploading, we have followed the below given process for that 1) Created one XSD as per the client table structure. 2) Developed one java webserver for the XSD file us[More]

Error: NoClassDefFoundError: javax/xml/ws/Service on linux but not windows

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I have the following java app: package company.app; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class Main {     public static void main(String[] args) {[More]

Java.lang.NoClassDefFoundError: javax/mail/Service

Category:DefaultRelease time:-0001-11-30Views:130

Hi, Happy New Year Everyone! Sadly, it's not that happy for me right now, I'm trying to write a mail app using JavaMail, but I'm getting a NoClassDefFoundError when I run the program.... The program compiles fine, it only crashes when I run the progr[More]

NoClassDefFoundError: javax/xml/rpc/Stub

Category:DefaultRelease time:-0001-11-30Views:130

Hi, I have a problem running the example Hello JAX-RPC application that comes with the JWSDP-1.1. I can run the application ok using ant, but if I try to run the program from the command line without using ant, I get NoClassDefFoundError: javax/xml/r[More]

Java.lang.NoClassDefFoundError: javax/resource/ResourceException

Category:DefaultRelease time:-0001-11-30Views:130

Hi everybody,receive my sincere greeting,i have a slight problem right here.I am trying to test the Server API for Mobile Services i dowloaded from nokia forum.I have a J2SE program that sends an SMS to a mobile device.When i try to run the simple pr[More]

Error Deployer BEA-149205 java.lang.NoClassDefFoundError: javax/wsdl/

Category:DefaultRelease time:-0001-11-30Views:130

I have installed WebLogic 9.3 MP3 as a requirement for OTM6.0 and installed OTM with choosing WebLogic as App Server. After install steps, started the OTM services, but getting the following error: console.log.0 : INFO | 2009/07/07 21:19:18 | -------[More]

Hot
Hi experts I have to modify mb5b tranx prg . presently we are using date as selection criteria..but now onwards user wants G/L account along with date as selection criteria. I created one selec-option for field HKONT type hkont-bseg. Now in select qu [More]
Can I sync podcasts and ITunesU. from one computer to another that both have the same account.No.  Time Machine won't get your boot camp partition back.  There are excellent utilities that move entire hard drive contents among hard drives such as Sup [More]
Hi Friends, I am facing a serious problem in one of the select query. It is taking a lot of time to fetch data in Production Scenario. Here is the query:   SELECT * APPENDING CORRESPONDING FIELDS OF TABLE tbl_summary     FROM ztftelat LEFT JOIN ztfzb [More]
Hello guys, I'm writing to report a disparity between firefox and IE/Chrome when receiving RST-ACK. To mitigate SYN flood attack, one of the countermeasures of anti-ddos appliance is to reset the first 3-way handshake and expect a re-initiated new tc [More]
Hi, I run a lighttpd server at home. I just use it for working with some scripts, and sharing stuff with my friends. I have a dynamic IP address, so I use dyndns for getting a hostname. Today I noticed some strange entries in the lighttpd access log: [More]
Hey, I have a table: Name: Year: Eagle 2000 Tiger 2001 Eagle 2002 Lion 2006 Lion 1999 Fox 1991 Lion 1995 I need a query which will return in such order: Name: Year: Position: Eagle 2000 1 Eagle 2002 2 Fox 1991 1 Lion 1995 1 Lion 1999 2 Lion 2006 3 Ti [More]
HIi The following statements seems to be contradicting...........are they true ?? Elements of the superordinate container are not visible in subordinate containers Inner block can access the Outer Block steps. thanks kumar><i>Inner block can acce [More]
What are all the advantages ABAP Proxy has over an IDOC? When to go for an ABAP Proxy?Pete, <b>Proxy and Idoc:</b> IDOC : After recieving the strucutred data It processes it using a Function Module associated with it. If you have a standard Id [More]
In 10.1.2 we had a .jsp page as an attachment to the Human task workflow. We deployed it when we run from the BPEL console it says no page found error. We are trying to do the deployment in 10.1.3. Please could someone give me the steps for attaching [More]
I know that some mp3 players don't work with Windows Vista (or at least you have to update the firmware using a pc with XP). is zen vision:M (http://creative.com/products/product...24&product=433) designed for Vista? i need to buy a new mp3 player an [More]