Sitemap

Amicuk Programming Answers

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

-0001-11-30   Views:10

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
I installed, succesfully, my exchange email and contacts, but for whatever reason, my calendar will not sync. The error that pops up says that my email address is not valid. Any ideas?I somehow managed to fix this myself.  I am new to Mac.  What I di [More]
I'm using DeveloperSuite 10g. I'm trying run the report from Forms but when I'm clicking on button to run report using RUN_REPORT_OBJECT I'm getting following error : Integration Error : SSL failure running another product. Can any one explain why I' [More]
Hi All, When creating a new entity object, I am facing a problem with database schema objects in the entity object wizard, database schema objects (check boxes for tables,synonyms...) are disabled. Actually I am using a synonym but I am not able to s [More]
hi there, i have a workflow in which a user can attach a RAW-document to the task. there he puts in a text. now i want to put that text in an email in the next step of the workflow. but how can i manage to get the text in my emal ??? reg, Martin<<&l [More]
Okay, from the start, Im a user of s820 , and today, apparently the phone wont turn on, it does not show any led charge light when i put on my cable , and i ve trie hard reset but it wont work, and is there any way i could do? i didnt run anything ex [More]
What is the best size for standard previews when working with a 27 inch iMac? screen size 2560 by 1440 Also would you go high quality preview or just low. Stepping back a little - here's my work flow Import Convert to DNG fast load previews render em [More]
I've installed the Netweaver Trial version and the SAPGUI provided on the DVD (ABAP Objects book). There is recommended to upgrade online to the latest SAPGUI version. Does anybody know the URL to upgrade? any help is apreciated. regards MichaelHi Mi [More]
So far from what I have read, I still need to use my start up disk, go to utilities then click on restore from time machine to restore my previous system? My grandson was "working"on his mindcraft game the other day and since then I cannot get m [More]
When I place a tif, eps, psd image in Illustrator CS3 it automatically embeds the image. How can I stop, I can't seem to find the option to stop.Check the 'Link' option at the bottom of the Place dialog box. And, in case you were not aware, you can c [More]
Hi Experts, Our user found there is no asset balance for 2009. Anyway, they run AJRW-AJAB-OB52 one by one to close 2008. OAAQOn the 1 /2 message there is a link to the asset area from Wiki, there you will found some documents how to do the fiscal yea [More]