wood burning stoves 2.0*
The moose likes Websphere and the fly likes NoClassDefFoundError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "NoClassDefFoundError" Watch "NoClassDefFoundError" New topic
Author

NoClassDefFoundError

riya s
Ranch Hand

Joined: Feb 28, 2003
Posts: 110
Can someone just tell me the meaning of this error...
My servlet (in classes folder )says package VioSys; because my bean is located in VioSys which is in classes\VioSys
My jsp files can access the bean but when I call the servlet from the jsp it does not find this Add_Ticket servlet.
Error in logs is:
[03.03.18 16:47:17:158 EST] 49ac959 WebGroup X Servlet Error-[Add_Ticket]: Failed to load servlet: java.lang.NoClassDefFoundError: Add_Ticket (wrong name: VioSys/Add_Ticket)
Graham Thorpe
Ranch Hand

Joined: Mar 25, 2002
Posts: 265
Hi shah
Can u tell me the how can i run the this client program.when i run this client program i facing this exception ...
javax.naming.ServiceUnavailableException: NULL returned when resolving initial r
eference=NameService
at com.ibm.ws.naming.util.WsnInitCtxFactory.getCosRootContext(WsnInitCtx
Factory.java:452)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCt
xFactory.java:337)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContext(WsnInitCtx
Factory.java:200)
at com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(W
snInitialContextFactory.java:80)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
65)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246
)
at javax.naming.InitialContext.init(InitialContext.java:222)
at javax.naming.InitialContext.<init>(InitialContext.java:198)
at ConverterClient.main(ConverterClient.java:29)
------------------------------
ConverterClient.java
import convert.*;
import javax.servlet.http.*;
import java.io.*;
import java.rmi.*;
import javax.rmi.*;
import java.util.*;
import javax.naming.*;
import javax.ejb.*;
import java.math.BigDecimal;

public class ConverterClient {
public static void main(String[] args) {



try {
System.out.println("Hi this is the Small");
//Hashtable h=new Hashtable();
Properties h =new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
h.put(Context.PROVIDER_URL,"iiop://localhost:900");

System.out.println("the h value is :"+h);

Context initial = new InitialContext(h);
System.out.println("********"+initial);
Object objref = initial.lookup("ConverterBean");
System.out.println("7777777"+objref);
ConverterHome home =(ConverterHome)PortableRemoteObject.narrow(objref,ConverterHome.class);
Converter currencyConverter = home.create();
BigDecimal param = new BigDecimal ("100.00");
BigDecimal amount =currencyConverter.dollarToYen(param);
System.out.println(amount);
amount = currencyConverter.yenToEuro(param);
System.out.println(amount);
System.exit(0);
} catch (Exception ex) {
System.err.println("Caught an unexpected exception!");
ex.printStackTrace();
}
}
}

pls help me shah if possible ...
I need some steps also for deployment for this WSAD5.0
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NoClassDefFoundError