NoClassDef error

I am trying to output a node name from an XML file using Xerces DOM, to a servlet. I keep getting the error I posted below. Can anyone assist??
This is my program:
import org.apache.xerces.parsers.DOMParser;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.Element;
import org.w3c.dom.Text;
import org.w3c.dom.html.HTMLDocument;
import org.apache.xerces.dom.DocumentImpl;
import org.apache.xml.serialize.OutputFormat;
import org.apache.xml.serialize.Serializer;
import org.apache.xml.serialize.SerializerFactory;
import org.apache.xml.serialize.XMLSerializer;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class DOM1 extends HttpServlet
     String xmlFile = "students.xml";
     DOMParser parser = new DOMParser();
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException{
     response.setContentType("text/html");
     PrintWriter out = response.getWriter();
     try{
     parser.parse(xmlFile);}
     catch (Exception e)
          {out.println(e.getMessage());}
     Document doc = parser.getDocument();
        out.println("<html><head><title>SampleDOM Servlet</title></head><body><h1> SAMPLE Servlet</h1>");
     out.println(doc.getFirstChild().getNodeName());
     out.println("</body></html>");
}This is the output:
Error: 500
Location: /servlet/DOM1
Internal Servlet Error:
java.lang.NoClassDefFoundError: org/apache/xerces/parsers/DOMParser
     at DOM1.(DOM1.java:31)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
     at java.lang.Class.newInstance0(Class.java:296)
     at java.lang.Class.newInstance(Class.java:249)
     at org.apache.tomcat.core.ServletWrapper.loadServlet(ServletWrapper.java:268)
     at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:289)
     at org.apache.tomcat.core.Handler.service(Handler.java:254)
     at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
     at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
     at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
     at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
     at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
     at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
     at java.lang.Thread.run(Thread.java:536)

Hi,
I am not sure where to put the JAR file...
I am using Tomcat and I compile using the following:
javac -classpath xalan.jar;xml-apis.jar;xercesImpl.jar;servlet.jar;. DOM1.javaIt compiles ok. If I try to run at the command line using:
java -cp xalan.jar;xml-apis.jar;xercesImpl.jar;servlet.jar;. DOM1I get : java.lang.NoSuchMethodError:main
Can you assist?

Similar Messages

  • Getting error when running program

    I have just installed the J2SE 5.0 JDk and NetBeans IDE 4.0. I am trying to teach myself java and am having trouble running a simple Welcome Java program. I get the following error:
    Exception in thread "main" java.lang.NoClassDefFoundError: Welcome
    Can someone tell me what I need to do to fix this?
    Thanks,
    Essylou

    I have tested it and the code it works, as long as you have named the class Welcome.java. When I try your code with Welco.java, it makes the same "noClassDef" error.
    I suggest for you to:
    1- remake your application
    2- name your class Welcome (Welcome.java)
    3- paste your code
    4- build it
    5- Execute it.
    If you get the error message, please let me know.

  • Making https: connection from java code loaded into Oracle 8i database

    A bit of a blast from the past, really, as 8i provides a JVM at 1.2.2.
    I need to provide an PL/SQL function which accesses a RESTful web service requiring https connection. Got the call working under 1.2 locally without much trouble using:
    static {
            System.setProperty("java.protocol.handler.pkgs",
                    "com.sun.net.ssl.internal.www.protocol");
            Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
        }The trick is to get the Oracle database to run the code internally. What libraries do I need where? I get an extremely unhelpful NoClassDefFoundError, without mention of the offending class.
    By doing loadjava with jcert.jar,. jnet.jar and jsse.jar (the libraries I'm using with the test program) I can get loadjava to accept and allegedly resolve the class.

    endasil wrote:
    malcolmmc wrote:
    Well, sadly look at the colour scheme.Yeah, sarcastic was I. The NoClassDef error seriously doesn't give a class name? I find it astonishing that any implementation would be that stupid.Seriously. The strange thing is that before I got to the NoClassDefFound I had a Initialization error (until I added a security rule for setting the Provider) and for that I got a full stack trace (in an obscure trace file, granted).

  • Problem in SNMP4J Installation

    Hello everyone,
    I'm working on developing an SNMPv3 based NMS software for a Licensed Band cellular Radio Backhaul, using SNMP4J. My major concern in this project is to do both, manager as well as the agent part.
    Being a beginner, I'm facing problem with the installation of the software itself.
    I downloaded snmp4j-agentx-1.3.1a , currently working on Windows XP platform and trying to execute them over the simple command prompt of Windows (Will be working over Eclipse IDE later).
    Since there was no online help available regarding the installation steps of this software, i tried n number of open forums which gave me the idea that certain .jar files were to be executed. However, no matter what i tried, all I got were Class Manifest errors. or, NoClassDef errors. This led to more confusion, resulting in multiple copies of the extracted snmp4j-agentx-1.3.1a folder at various locations. Also, is there a particular sequence in which these files are to be compiled/executed.
    I also made a simple test code that should make a PDU and send it successfully. Since i can't execute and check it, i 'm a bit doubtful about it too.
    // checking for a simple request pdu and sending it.
    import java.io.IOException;
    import java.util.List;
    import org.snmp4j.CommunityTarget;
    import org.snmp4j.scopedPDU;
    import org.snmp4j.Snmp;
    import org.snmp4j.event.ResponseEvent;
    import org.snmp4j.mp.SnmpConstants;
    import org.snmp4j.smi.Address;
    import org.snmp4j.smi.GenericAddress;
    import org.snmp4j.smi.OID;
    import org.snmp4j.smi.OctetString;
    import org.snmp4j.smi.VariableBinding;
    import org.snmp4j.transport.DefaultUdpTransportMapping;
    public class send
    public static void main(String[] args)
    //To setup a default SNMP session for UDP transport
    Address targetAddress = GenericAddress.parse("udp:127.0.0.1/161");
    TransportMapping transport = new DefaultUdpTransportMapping();
    snmp = new Snmp(transport);
    USM usm = new USM(SecurityProtocols.getInstance(),
    new OctetString(MPv3.createLocalEngineID()), 0);
    SecurityModels.getInstance().addSecurityModel(usm);
    transport.listen();
    // add user to the USM
    snmp.getUSM().addUser(new OctetString("MD5DES"),
    new UsmUser(new OctetString("MD5DES"),
    AuthMD5.ID,
    new OctetString("MD5DESUserAuthPassword"),
    PrivDES.ID,
    new OctetString("MD5DESUserPrivPassword")));
    // create the target
    UserTarget target = new UserTarget();
    target.setAddress(targetAddress);
    target.setRetries(1);
    target.setTimeout(5000);
    target.setVersion(SnmpConstants.version3);
    target.setSecurityLevel(SecurityLevel.AUTH_PRIV);
    target.setSecurityName(new OctetString("MD5DES"));
    // create the PDU
    PDU pdu = new ScopedPDU();
    pdu.add(new VariableBinding(new OID("1.3.6")));
    pdu.setType(PDU.GETNEXT);
    // send the PDU
    ResponseEvent response = snmp.send(pdu, target);
    if(response.getResponse()== NULL)
    System.out.println("Request Timed out!!!");
    exit();
    // extract the response PDU (could be null if timed out)
    PDU responsePDU = response.getResponse();
    // extract the address used by the agent to send the response:
    Address peerAddress = response.getPeerAddress();
    }

    Hi,
      Client copy is important when your adding Java Addin. The java stack will be on this client only.
    Can I perform client copy after J2EE installation?
    Yes you can.. create client just say 555 give this client in while adding java addin. It will create another instance. It might not be a problem. If possible, try to delete the java instance refer to the installation gude.
    If not, do I need to uninstall and start the installation from the scratch?
    In my view not required from scratch
    Also Please let me know the procedure for client copy?
    Go to Tcode scc4 to create client give the required details if possible all.
    Remember the client you created in the above transaction.
    Try to login system using the created client number and userid is SAP*
    and passwrd is "PASS".
    Go to tcode sccl there you have copy the data from which client. Try to give the profile which is mentioned in the installation guide..
    Regards,
    Daniel.. L A

  • Log4j Issue in RAD Test Environment

    Hi All,
    I dont know whether its there right forum or not. If not please guide me to the exact forum. Thanks for staying with this thread.
    I've configured an EJB application in RAD, when I tried to depoly the application with class loader for the application as "PARENT_FIRST", i was successfull in starting the application. But when i try the same with the classloader mode as "PARENT_LAST" i was unsuccessfull. I am getting the following exception.
    Exception Message:
    ===================
    [11/2/07 7:30:16:040 EDT] 3a9a0769 ServletInstan E SRVE0100E: Did not realize init() exception thrown by servlet action: javax.servlet.ServletException: org/apache/log4j/Layout
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:99)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
         at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
         at javax.servlet.GenericServlet.init(GenericServlet.java:258)
         at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:876)
         at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224)
         at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:542)
         at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1394)
         at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:299)
         at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:408)
         at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:212)
         at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:1019)
         at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
         at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
         at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:517)
         at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:808)
         at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
         at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:578)
         at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:311)
         at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:268)
         at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
         at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
         at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:152)
         at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
         at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
         at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:246)
         at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
         at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
         at java.lang.reflect.Method.invoke(Method.java:391)
         at com.ibm.ws.bootstrap.WSLauncher.run(WSLauncher.java:222)
         at java.lang.Thread.run(Thread.java:570)
    ---- Begin backtrace for Nested Throwables
    java.lang.NoClassDefFoundError: org/apache/log4j/Layout
         at java.lang.ClassLoader.findLoadedClass(Native Method)
         at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code))
         at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
         at com.ibm.ws.classloader.ReloadableClassLoader.loadClass(ReloadableClassLoader.java:83)
         at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code))
         at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
         at java.lang.Class.forName1(Native Method)
         at java.lang.Class.forName(Class.java(Compiled Code))
         at org.apache.log4j.helpers.Loader.loadClass(Loader.java:158)
         at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:309)
         at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:112)
         at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:632)
         at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:603)
         at org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:524)
         at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:408)
         at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:432)
         at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:456)
         at org.apache.log4j.LogManager.<clinit>(LogManager.java:145)
         at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:327)
         at com.mellon.eg0.iq.webapp.controller.AFCOLog4jPropertyConfigurator.init(AFCOLog4jPropertyConfigurator.java:60)
         at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)
         at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
         at javax.servlet.GenericServlet.init(GenericServlet.java:258)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:82)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
         at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
         at javax.servlet.GenericServlet.init(GenericServlet.java:258)
         at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:876)
         at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224)
         at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:542)
         at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1394)
         at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:299)
         at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:408)
         at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:212)
         at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:1019)
         at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
         at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
         at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:517)
         at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:808)
         at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
         at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:578)
         at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:311)
         at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:268)
         at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
         at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
         at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:152)
         at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
         at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
         at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:246)
         at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
         at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
         at java.lang.reflect.Method.invoke(Method.java:391)
         at com.ibm.ws.bootstrap.WSLauncher.run(WSLauncher.java:222)
         at java.lang.Thread.run(Thread.java:570)
    [11/2/07 7:30:16:056 EDT] 3a9a0769 WebGroup E SRVE0020E: [Servlet Error]-[action]: Failed to load servlet: java.lang.NoClassDefFoundError: org/apache/log4j/Layout
         at java.lang.ClassLoader.findLoadedClass(Native Method)
         at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code))
         at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
         at com.ibm.ws.classloader.ReloadableClassLoader.loadClass(ReloadableClassLoader.java:83)
         at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code))
         at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
         at java.lang.Class.forName1(Native Method)
         at java.lang.Class.forName(Class.java(Compiled Code))
         at org.apache.log4j.helpers.Loader.loadClass(Loader.java:158)
         at org.apache.log4j.helpers.OptionConverter.instantiateByClassName(OptionConverter.java:309)
         at org.apache.log4j.helpers.OptionConverter.instantiateByKey(OptionConverter.java:112)
         at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:632)
         at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:603)
         at org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:524)
         at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:408)
         at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:432)
         at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:456)
         at org.apache.log4j.LogManager.<clinit>(LogManager.java:145)
         at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:327)
         at com.mellon.eg0.iq.webapp.controller.AFCOLog4jPropertyConfigurator.init(AFCOLog4jPropertyConfigurator.java:60)
         at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1158)
         at org.apache.struts.action.ActionServlet.init(ActionServlet.java:473)
         at javax.servlet.GenericServlet.init(GenericServlet.java:258)
         at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doInit(StrictServletInstance.java:82)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._init(StrictLifecycleServlet.java:147)
         at com.ibm.ws.webcontainer.servlet.PreInitializedServletState.init(StrictLifecycleServlet.java:270)
         at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.init(StrictLifecycleServlet.java:113)
         at com.ibm.ws.webcontainer.servlet.ServletInstance.init(ServletInstance.java:189)
         at javax.servlet.GenericServlet.init(GenericServlet.java:258)
         at com.ibm.ws.webcontainer.webapp.WebAppServletManager.addServlet(WebAppServletManager.java:876)
         at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadServlet(WebAppServletManager.java:224)
         at com.ibm.ws.webcontainer.webapp.WebAppServletManager.loadAutoLoadServlets(WebAppServletManager.java:542)
         at com.ibm.ws.webcontainer.webapp.WebApp.loadServletManager(WebApp.java:1394)
         at com.ibm.ws.webcontainer.webapp.WebApp.init(WebApp.java:299)
         at com.ibm.ws.webcontainer.srt.WebGroup.loadWebApp(WebGroup.java:408)
         at com.ibm.ws.webcontainer.srt.WebGroup.init(WebGroup.java:212)
         at com.ibm.ws.webcontainer.WebContainer.addWebApplication(WebContainer.java:1019)
         at com.ibm.ws.runtime.component.WebContainerImpl.install(WebContainerImpl.java:136)
         at com.ibm.ws.runtime.component.WebContainerImpl.start(WebContainerImpl.java:356)
         at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:517)
         at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:808)
         at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
         at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:578)
         at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:311)
         at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:268)
         at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
         at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
         at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:152)
         at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
         at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
         at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:246)
         at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
         at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60)
         at java.lang.reflect.Method.invoke(Method.java:391)
         at com.ibm.ws.bootstrap.WSLauncher.run(WSLauncher.java:222)
         at java.lang.Thread.run(Thread.java:570)
    I'm struggling with this for the past 3 days, I have the log4j.jar in my WEB-INF\lib folder... and it is also there in the class path. But i dont know why it throws the NoClassDef error.
    Can anyone help me please.... :(
    Thanks,
    Mukesh.

    Hi,
    Probably lo4j configuration properties/xml is different in PROD than DEV/TEST...
    Have a look at this...
    http://www.javabeat.net/2008/07/baisc-steps-to-configure-log4j-using-xml-and-properties-file/
    Cheers,
    Vlad

  • MapViewer - addJDBCTheme

    Is there anything peculiar about the SQL string passed into addJDBCTheme in the MapViewer bean? Whatever SQL I try, the new theme does not get rendered. It seems to create the theme OK (it gets assigned a theme number) but it seems to always contain no data.
    Does anyone have an example of addJDBCTheme that works?
    Thanks

    We installed the mapvier.ear file in the $ORA_HOME/j2ee/geomarca/applications directory. We deployed the mapviewer.ear which caused the new installation of the mapviewer files.
    In the properties of the mapviewer application within the AS we added 3 library-files with their complete path: sdovis.jar, sdoutl.jar y outapi.jar (we did not add chartviewer.jar, because the manual does not indicate that, however the chartbuilder.jar file is in the directory).
    We checked the existence of JDK 1.4.2 and because we deployed the mapviewer.ear file all the jars in the lib directory are from the same mapviewer.ear. We are working however with the "old" version of AS (10 g, november 2004)
    After deploying the mapviewer.ear we encountered even more problems:
    - using the basema^p statement generates an error when executing a maprequest
    - leaving the basemap statement out of the request the same NoClassDef error appears which we had originally
    - function map.setBaseMapName("geomarca") does not work;
    - function map.addMarkerStyle("mkcircle", 3, "blue","red",null,null,null,"5");
    The strange thing is that other functionality does work!!
    Shoud we install AS all over again, perhaps the new version, or could we solve all this in an easier way?

  • A working application suddenly caused java.lang.NoClassDefFoundError

    I have a web application running on a resin server. Everything in my application worked fine at the beginning but suddenly I got java.lang.NoClassDefFoundError. I looked at the line number of the exception and found out that the classes causing java.lang.NoClassDefFoundError are always the ones that contain static collection of data. The samples of those classes are CityList class and CountryList class which has a HashMap of city IDs and the city name strings. I'm not sure why those classes suddenly become unavailable. The strange thing is that my application becomes normal again when I upload my classes to site. Please note that my webhoster set up the server so that every time I upload my file to their given directory, it's automatically copied to the resin server. I have no direct access to the resin server myself. After I re-upload my classes, everything seems ok for a few hours, then suddenly I get NoClassDefFoundError again.
    Anyone knows why? Please help. I have no idea why this is happening.

    I seem to have a similar problem. No fix...looking for a solution.
    I have a stand alone java application that will run for a long period of time. While running it calls a specific static method on a class. Everything is working fine (while executing the method in the class) and then, all of a sudden, I will get a noClassDef error.
    I am running this application with a number of JVMs, all using the same version of Java and they do not show this problem. I know that they are all calling the same class and method and they never have the problem. But, every now and then, it seems like there is some runtime condition that comes up where it is not able to load a class.
    The problem appears to be dynamic because I can restart the application (after the JVM crashes with the exception) and everything works fine, including the class and method that caused the problem. I start everything with scripts so there is no variation in classpath settings.
    I have seen a similar problem in a non-static class when one event happens and it goes to load a common class (that I know is in the classpath) and I get the noClassDef error.
    Could this be a threading issue in any way? No ideas, no fixes in sight. Any ideas or questions would be helpful.

  • Upgrading from 1.1.6 to 1.3

    Hi,
    I'm about to upgrade an applet from version 1.1 to 1.3. From what I've read in the forums, it seems that what I need to do to accomplish this is to download and install J2SE v 1.3 and then recompile my applet. Is this true? It sounds simple enough, but I know that getting the applet to compile will be half the battle since I'll be dealing with deprecated apis.
    Any tips on making this a smoother, easier process would be greatly appreciated.
    Thanks.

    I'll try running the applet w|o recompiling, but I want to clarify things.
    This applet is used by employees who access our company intranet. They install the 1.1.1 Plug-In as well as the Signed Certificate in order to run the applet on their machine. If they have any other Plug-In (say 1.3) installed on their machine, the applet doesn't work.
    The applet code is stored on a UNIX box. Java 1.1 and 1.2 are installed on that box but 1.1 is the active version. (The person who previously maintained the application installed 1.2 on the machine, but didn't set the applet to run under 1.2). If I make 1.2 the active version and run the applet, it doesn't work; I get a NoClassDef error. Recompiling under 1.2 produces about 80 errors mostly about not finding J* classes.
    This is why I'm trying to find out what is entailed in upgrading. I know we will need to deploy the new[er] version of the plug-in to our users when we upgrade so they "feel" the upgrade, but so far, I haven't had much luck.

  • Default CLASSPATH?

    I have been working with the J2EE tutorial and have had to set my classpath to point to the j2ee.jar file. No problems.
    However, when I went back to run some old java programs, I got the "NoClassDef" error. On a hunch, I unset the CLASSPATH, and it was able to execute the java programs in the current working directory.
    This leads me to believe there is a default classpath that will at the minimum search the CWD.
    I plan to add "." to my classpath, but I was wondering if anyone can explain the rules of classpath (ie what should be in it and what it defaults to.) There may be other things I need to add to the CLASSPATH.

    Maybe this will help.
    http://java.sun.com/j2se/1.4/docs/tooldocs/findingclasses.html
    If your system does not specify a system Classpath, java defaults to . (CWD). Also, you can use the -classpath option of javac and java commands.

  • Is MfE actualy a working application?

    Hi,
    I have new Nokia 97 32GB, latest firmware installed (v.22…..), latest MfE (v3) and I followed instructions from the web to set up a Live service (Hotmail) mail, contacts, calendar syncing via m.hotmail.com server (push service).
    I did everything possible, but my password is not accepted and every time seems like the profile doesn’t exist.
    Is there a solution to make thinks work?
    Regards,
    Matej
    p.s.: Oh yes, to set up a Live account (Hotmail) on iPhone took me less than a minute and it is working w/o any problem ... receiving mails, syncing contacts and calendars in a second...

    I seem to have a similar problem. No fix...looking for a solution.
    I have a stand alone java application that will run for a long period of time. While running it calls a specific static method on a class. Everything is working fine (while executing the method in the class) and then, all of a sudden, I will get a noClassDef error.
    I am running this application with a number of JVMs, all using the same version of Java and they do not show this problem. I know that they are all calling the same class and method and they never have the problem. But, every now and then, it seems like there is some runtime condition that comes up where it is not able to load a class.
    The problem appears to be dynamic because I can restart the application (after the JVM crashes with the exception) and everything works fine, including the class and method that caused the problem. I start everything with scripts so there is no variation in classpath settings.
    I have seen a similar problem in a non-static class when one event happens and it goes to load a common class (that I know is in the classpath) and I get the noClassDef error.
    Could this be a threading issue in any way? No ideas, no fixes in sight. Any ideas or questions would be helpful.

  • Classloader issue :: Noclassdef found error

    Hi,
    I wrote a dynamic class(Custom) based on a template which has refernces to two other classes (Class A,Class B). As everything happens at runtime, i have to create the custom class dynamically and the other two classes are generated from wsdl.
    while trying to load them using URLClassLoader i get errors. i am trying to do like this
    pseudo code:
    URLloader loader = path of the jar file which is created dynaclically and contains class A and B
    loader.loadclass( A & B) --> loaded succesfully and prints qualified name fo the class
    custompath = C:/somedir/com/tech/Custom.class (this class is dynamically compiled using javac tool)
    loader.loadclass(custom class) -- this is where it throws error saying "class A no class def found"
    the jar file and the custom class are different location and different package names.
    how to fix this? any help is appreciated

    this is the actual error
    Exception in thread "main" java.lang.NoClassDefFoundError: com.app.DAO.tns.ByServiceGetTop5OperationsRequest
         at java.lang.ClassLoader.defineClassImpl(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:258)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:589)
         at java.net.URLClassLoader.access$400(URLClassLoader.java:123)
         at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1034)
         at java.security.AccessController.doPrivileged(AccessController.java:279)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:491)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:631)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:623)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:597)
         at com.csc.velocity.GenerateTestcase.generateCustomDTOXLS(GenerateCode.java:325)
         at com.csc.velocity.GenerateTestcase.generateVelocityProperty(GenerateCode.java:164)
         at com.csc.velocity.GenerateTestcase.createTestcase(GenerateCode.java:67)
         at com.csc.velocity.GenerateCode.main(GenerateCode.java:35)
    Caused by: java.lang.ClassNotFoundException: com.app.DAO.tns.ByServiceGetTop5OperationsRequest
         at java.net.URLClassLoader.findClass(URLClassLoader.java:496)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:631)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:597)

  • Error while creating a RFC model for WD for Java

    Hi,
    While trying out the example(TutWD_FlightList_Init.zip) for model programming in the NDS,I got the following error when I try to create a model:
    Plugin Name     Web Dynpro Model Editor Services
    Plugin Id     com.sap.ide.webdynpro.service.modeleditor
    Class     com.sap.ide.webdynpro.modeleditor.wizards.model.creation.ModelDialog
    Method          nextPressed
    Message          Internal error - see detail information in exception trace
    Exception     org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NoClassDefFoundError)
    Can anybody help?Is there any place in NDS to see the detailed error message?
    thanx in advance,
    Bhupesh

    I modified the xml file as described in the forum.But the error persists.
    One interesting thing is:
    When I create model after restarting the NDS,I get the following error:
    org.eclipse.swt.SWTException: Failed to execute runnable <i>(java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'
    JCO.nativeInit(): Could not initialize dynamic link library librfc. Found version "620.0.1237" but required at least version "620.0.1374".)</i>
    I get the NoClassDef found error next time onwards,
    Where do I get the 620.0.1374 version of librfc?
    thanx.
    Bhupesh

  • Error while mapping a Java class for a Search Dialog Box component

    Hi,
    Scenario : There is PAR which I have developed for the sorting options for a Search Component set to be used in Km Search Iview.
                   I have copied this PAR from a similiar search functionality and customised the same.
    Problem: When I deploy the PAR and then map this class for the sort options while creating a New Search Dialog box :
    I get the following "Class not found error" ... Please can you let me know what could be the problem.
    Any help would be appreciated here as I have tried all the possibilities to solve the problem.
    Regards,
    Vaishali.

    I modified the xml file as described in the forum.But the error persists.
    One interesting thing is:
    When I create model after restarting the NDS,I get the following error:
    org.eclipse.swt.SWTException: Failed to execute runnable <i>(java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'
    JCO.nativeInit(): Could not initialize dynamic link library librfc. Found version "620.0.1237" but required at least version "620.0.1374".)</i>
    I get the NoClassDef found error next time onwards,
    Where do I get the 620.0.1374 version of librfc?
    thanx.
    Bhupesh

  • Error while Creating Java model

    Hi,
    Im creating a java model for EJB DC so as to import it in web dynpro DC...
    Now im writing a command bean in which Im using DTOs from EJB project. but it is not able to organize any imports for it..
    Also, it is giving error at line at CreateException !!!
    It is not able to organize any imports for it too!!!
    --> public UACommandBean() throws CreateException {
    try{
    InitialContext ctx = new InitialContext();
    userMasterHome = (UserAuthenticationLocalHome) ctx.lookup("localejbs/UserAuthenticationBean");
    userMaster = userMasterHome.create();
    }catch(Exception namingException){
    namingException.printStackTrace();
    What is going wrong? pls pls help.
    regards,
    Amey

    I modified the xml file as described in the forum.But the error persists.
    One interesting thing is:
    When I create model after restarting the NDS,I get the following error:
    org.eclipse.swt.SWTException: Failed to execute runnable <i>(java.lang.ExceptionInInitializerError: JCO.classInitialize(): Could not load middleware layer 'com.sap.mw.jco.rfc.MiddlewareRFC'
    JCO.nativeInit(): Could not initialize dynamic link library librfc. Found version "620.0.1237" but required at least version "620.0.1374".)</i>
    I get the NoClassDef found error next time onwards,
    Where do I get the 620.0.1374 version of librfc?
    thanx.
    Bhupesh

  • NoClassDefFound error wl9.2

    I am trying to deploy a war archive to a remote server running 9.2.
    I'm using the admin console to do this.
    When I start the application, I am getting the NoClassDef found error.
    I have tested this same war on my local instance running wl 10.0.3 and it is working fine.
    I have also checked the war file and it does contain the class file that is reportedly missing.
    Any ideas? Please help, thanks.

    A CDNF error would not occur if you simply had a JRE version mismatch.
    It would help to get more detail. What is the fully-qualified class name that isn't being found?

Maybe you are looking for

  • X100e Hanging and Freezing on Wireless

         There was a different thread addressing freezing and hanging when connected via ethernet; however, I have had ethernet disabled from the BIOS since day one of receiving my system but I found my system to be locking up extremely often particularl

  • Problem with preview PDF files on Windows 7 32bit

    Hello, in my office I have a problem with preview PDF files on my computers. The files are allright, but if I select a file and click on preview mode after ~ 10sec operation system write something "Preview this file is corrupt for PDF Preview Handler

  • Time Machine backups still on drive, no longer in Time Machine

    I have two computers backed up to the same drive, and I cannot backup Mac#2 because the backups of Mac#1 are taking up too much space. On Mac#1, I went into Time Machine and used the Delete Backup option on several of the oldest backups. I ran into o

  • My Iphone vibrates after upgrading to IO6 even with vibration off

    After upgradin my Iphon 4 to io6 it vibrates even with vibration turned off.  What gives?

  • Please help - broken 5900FX - RMA required

    Can you please help me - I need to rma my 5900fx td as it no longer works properly. I get vertical lines every other time or chequered patterns all over the screen. Can you advise. I've had the card for a couple of months. I've got the box and all th