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
Everytime I delete the media, when I re-sync it just appears again. I have some downloaded media that I want to permanently remove so that my children are not able to access it when we go to sharing after Christmas. Thanks!Thank you gbeast. I have tr [More]
I would like to use Date Picker on the OBIEE Dashboard. Is there any standard control/mechanism that I can put to use ?hi....can you explain it a little more??? i created 2 dashboards prompts. from 2 dummy collums i set CAST ( NULL AS DATE ) and CAST [More]
The rubber piece on the bottom of the trackpad has fallen out.  The left click is not working now.  I have looked through the Apple site to see if I can get a replacement, but can't find anything.  Where can I find a replacement part? Go to a local A [More]
hi there everyone i am so honored to share information with you guys... i have project with the following given information:: project BOQs Resources productivity. my approach at least "theoretically" with this project was as following: getting t [More]
My photoshop keeps crashing how can i stop this?Please read these and proceed accordingly: http://blogs.adobe.com/crawlspace/2012/07/photoshop-basic-troubleshooting-steps-to-fix-mos t-issues.html http://forums.adobe.com/docs/DOC-2325Read other 2 answ [More]
I have 4 double variables and I need to find the minimum of them all. I tried using the Math.min (x,y) statement but it only allows me to find the minimum of two numbers. Thanks,     public static void main(String [] args) {     double minimum = getM [More]
Hi all, Every night during the incremental db backups (and during the weekly full db backup) i get an alert for the "Agent resident memory utilization" level. I did find this similiar post but it didnt' help me out much (Agent memory utilization [More]
Hi, I am using SCOM 2012 and I have a requirement of SMS Alert. but the issue that I am facing here is I have a Single Virtual Box for SCOM 2012, and what ever I experienced from SCOM 2007 physical was I had to configure a Modem through the USB devic [More]
In CS5 the "Options" button is gone. I already know that features like floor and stuff are in the plug-in, but what about motion blur?I can't seem to find the control settings in Particle World that will prevent particles fading in as they are b [More]
HI Guys, I am just trying to use Pattern and Matcher classes for my requirement. My requirement is :- It should allow the numbers from 1-7 followed by a comma(,) again followed by the numbers from 1-7. For example:- 1,2,3,4,5 or 3,6,1 or 7,1,3 someth [More]