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
Im going to buy a TV-card to use with Arch, and wanted to know which one is the more Linux friendly. I used to have a card with the Philips saa7134 chip and worked flawlessly. Any suggestions ?What kind of card are you wanting to buy? There are cards [More]
Using Media Manager to convert movies to apple pro res,  How can I convert my existing media files  from quicktime movies into apple pro res 422 ? After they are converted will I have to re-point my fcp project to the converted files? Thank You for t [More]
Hey there! I was inspired by @AdobeAE 's recent tweet about color management to look further into the subject.  We've historically not bothered with it, but are keen to enter the color managed world! I started in Photoshop, doing tests with working s [More]
Hi all experts, I have a job in PIP for grabbing all files in a folder, moving them to archive folder,processing  them... It always run well, but I found a file couldn't be grabbed yesterday, and this file was still at the original folder. What's it [More]
I have Vista Ultimate and wonder if VSS 2005 is compatible with Dw CS3 to use for File Compate, source code control .I understand that VSS 6 is compatible, but it will not work with Vista and I have not been able to find Vista updates on the MS websi [More]
Before i go and spend the money on some new nike products, i want to be sure that the Apple iPod sensor will work in my iPod Video. Please let me know. thanks!No. Nano only.Read other 2 answers [More]
Started the transfer process from my old MacBook to a new MacBook pro using Migration assistant 12 hours ago. The screen says transferring your information. Moving about 270 GB using an Ethernet cable  directly connected. Is this normal?You can get a [More]
I was reading the article about installing the RAC. My conclussion , I can have till 127 instaces of a Oracle 10G database, working simultane. That is good really good and powerfull. My questions 1º). ¿Can I have , by example, 3 , or any other number [More]
My functions keys stopped working because I disabled their start up with the system but when I re anbled the entry it still refuses to start. What can I do to have it load with windows again? In more detail my TCrdMain.exe will not start even tough i [More]
Hi i've got a simple guessing game. Which the user has to guess the right number. A hint will be displayed if the users guess is cold, warm or hot. Each game has 8 rounds in which they have to guess 8 numbers, but each number they have 3 attempts to [More]