axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Karr, David" <>
Subject RE: java.lang.NoClassDefFoundError while using java2wsdl
Date Wed, 08 Aug 2007 00:27:54 GMT
I'm guessing the class name should be "myapp.StockQuoteService".  Also
make sure that your package structure matches your directory structure,
so you have a "myapp" directory that resides in the current directory,
and the "myapp" directory contains the "StockQuoteService.class" file.
This is just a simple example, but generally doing something like "-cp
." is odd. You probably don't want to run this from the root of your
class tree, you want to reference the class tree directory, but do it
somewhere else.


	From: shekhar bhat [] 
	Sent: Tuesday, August 07, 2007 5:17 PM
	Subject: Re: java.lang.NoClassDefFoundError while using

		I'm trying to create WSDL for the simple java program
		package myapp;
		import java.util.HashMap;
		public class StockQuoteService {
		    private HashMap map = new HashMap();
		    public double getPrice(String symbol) {
		        Double price = (Double) map.get(symbol);
		        if(price != null){
		            return price.doubleValue();
		        return 42.00;
		    public void update(String symbol, double price) {
		        map.put(symbol, new Double(price));
		I compiled it to generate the class file and tried
creating the WSDL file. I get the errors below. It works if the first
line (package myapp) is commented. with package, prefixing class name
with "myapp" also gives an error. 
		E:\Program Files\Apache Software
Foundation\axis2-1.2\samples\mytest>java2wsdl -
		cp . -cn StockQuoteService
		Using AXIS2_HOME:   E:\Program Files\Apache Software
		Using JAVA_HOME:    E:\Program Files\Java\jdk1.5.0_06
		Exception in thread "main"
java.lang.NoClassDefFoundError: StockQuoteService (wr
		ong name: myapp/StockQuoteService)
		        at java.lang.ClassLoader.defineClass1(Native
		Can some one tell what am I doing wrong? 

		Luggage? GPS? Comic books? 
		Check out fitting gifts for grads
_on_mail&p=graduation+gifts&cs=bz>  at Yahoo! Search.


	Yahoo! oneSearch: Finally, mobile search that gives answers
search?refer=1ONXIC> , not web links. 

View raw message