• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NoClassDefFoundError

 
Ranch Hand
Posts: 110
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
 
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic