NoClassDefFoundError, why?

Hello Javas,
My application is reporting the NoClassDefFoundError and I'd like to know how to solve this problem.
The scenario is: Application creates an object define in a class stored in "modulo.zip". The object's constructor creates another object based on a constructor's parameter value. This new object is define in another class stored in "modulo_x.zip". The NoClassDefFoundError occurs when the class defined in modulo_zip creates the object defined and stored in modulo_x.zip. So in runtime my application.jar can look for object's definitions in anywhere listed in -cp but what about one library looking for a definition in another which is stored in the same working directory?
How can I design this situation to work out.
Compilation has no problem because the objects all implement the same interface.
Any help?

Make sure there exists a .class file for that other class in modulo_x.zip. You have both the zip files in your classpath, right? While specifying the classpath, you need to give the entire path upto the zip file and not just upto the directory containing the zip file. So, you need to specify these two zip files explicitly in your classpath. Specifying just the directory containing these is not sufficient.

Similar Messages

  • Run "t3" protocol  wiith NoClassDefFoundError ,why?

    it's strange,
    i can run applet with "t3" protocol in eclipse,
    but i cannt run it in IE,
    (they all connect to a weblogic startup class)
    (this applet have signed.the webloigc.jar also have down)
    java.lang.NoClassDefFoundError: weblogic/rmi/internal/StubInfoIntf
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:431)
    at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:169)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Unknown Source)
    at weblogic.utils.classfile.utils.CodeGenerator.generateClass(CodeGenerator.java:71)
    at weblogic.rmi.internal.StubGenerator.getStubClass(StubGenerator.java:672)
    at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:712)
    at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:699)
    at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:76)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newRootNamingNodeStub(WLInitialContextFactoryDelegate.java:486)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newRemoteContext(WLInitialContextFactoryDelegate.java:449)
    at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:345)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:308)
    at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:234)
    at weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:135)
    at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
    at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.init(Unknown Source)
    at javax.naming.InitialContext.<init>(Unknown Source)
    at com.mycorp.monitor.applet.MonitorApplet.getMonitor(MonitorApplet.java:157)
    at com.mycorp.monitor.applet.MonitorApplet.init(MonitorApplet.java:63)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

    What version of TopLink and WLS are you using?
    Seems to be a classpath issue. Can you try putting the toplink.jar on the server classpath?

  • Why do I get a NoClassDefFoundError?

    When I try to run the HelloWorldApp I get the statement 'Exception in thread "main" java.lang.NoClassDefFoundError: HelloWorldApp/java'
    Why do I get this error, what does it mean, and how do I fix it?

    Firstly it looks like youre trying to run with .java appended which is wrong, you want
    java HelloWorldApp
    not
    java HelloWorldApp.java
    Secondly you may not have set up a classpath, for something this simple just:
    java -classpath . HelloWorldApp
    should be OK
    Searching the archive of the forums will give you a lot of advice on setting up claspath in more complex situations.

  • Why i get error msg when i run my program? (java.lang.NoClassDefFoundError)

    i have compile and run my program. First time the program can run. But after that when i run, come out error messege as below:
    java.lang.NoClassDefFoundError: FormPoster (wrong name: search/FormPoster)
    at java.lang.ClassLoader.defineClass0(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    Exception in thread "main"
    what can i do? thank very much

    Hello,
    i have compile and run my program. First time theprogram can run.
    But after that when i run, come out error messegeas below:
    java.lang.NoClassDefFoundError: FormPoster (wrongname: search/FormPoster)
    Check your FormPoster class: the classname has to be
    the same as
    the file name and the class should be stored in its
    correct directory
    (the sub directory structure should reflect the
    package name).
    kind regards,
    JosYou should also check your clsspath if you are using packages.

  • Why my servlet receives NoClassDefFoundError : javax/servlet/http/HttpSession

    I developed an application which has one servlet.
    The war context-root that has the servlet is 'workflowclient'.
    When invoking the servlet with URL "http://localhost/workflowclient/WfAgentManagerSRMIServlet, an exception with NoClassDefFoundException is raised.
    Why ?
    The fortune example operates well.
    Please let me know how to solve this problem.

    Hi,
    I would like to go through your code, if it isn't properietry, please send me the codes so that I can have a look and test at my end to provide you results.
    Thanks & Regards
    Ganesh .R
    Developer Technical Support
    Sun Microsystems
    http://www.sun.com/developers/support

  • Why my iasdeploy tool can not run? Always display NoClassDefFoundError?

    C:\>iasdeploy
    iasdeploy for iPlanet Application Server 6.5
    Exception in thread "main" java.lang.NoClassDefFoundError: 4/0\common\lib\servle
    t/jar;
    Can anyone help me? Thank you

    up

  • Weblogic 8.1SP2 throws noclassdeffounderror for ActionServlet

    Hi All,
              My application(struts based) works fine in weblogic7 and the same is deployed sucesfully in weblogic8.1 SP2 but on starting the weblogic server the following error is thrown
              ******************error starts here*******************
              <Jul 9, 2004 3:45:43 PM GMT+05:30> <Error> <HTTP> <BEA-101250> <[ServletContext(id=18734604,name=gsrs_admin,context-path
              =/gsrs_admin)]: Servlet class com.jpmorgan.grc.gsr.admin.AdminToolActionServlet for servlet admintool could not be loade
              d because a class on which it depends was not found in the classpath C:\bea8.2\weblogic81\server\bin\myserver\.wlnotdele
              te\gsrs\gsrs_admin.war;C:\bea8.2\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_gsrs_gsrs_admin\jarfiles
              \WEB-INF\lib\jstl31232.jar;C:\bea8.2\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_gsrs_gsrs_admin\jarf
              iles\WEB-INF\lib\standard31233.jar;C:\bea8.2\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_gsrs_gsrs_ad
              min\jarfiles\WEB-INF\lib\struts31234.jar.
              java.lang.NoClassDefFoundError: org/apache/struts/action/ActionServlet.>
              <Jul 9, 2004 3:45:43 PM GMT+05:30> <Error> <HTTP> <BEA-101216> <Servlet: "admintool" failed to preload on startup in Web
              application: "gsrs_admin".
              javax.servlet.ServletException: [HTTP:101250][ServletContext(id=18734604,name=gsrs_admin,context-path=/gsrs_admin)]: Ser
              vlet class com.jpmorgan.grc.gsr.admin.AdminToolActionServlet for servlet admintool could not be loaded because a class o
              n which it depends was not found in the classpath C:\bea8.2\weblogic81\server\bin\myserver\.wlnotdelete\gsrs\gsrs_admin.
              war;C:\bea8.2\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_gsrs_gsrs_admin\jarfiles\WEB-INF\lib\jstl31
              232.jar;C:\bea8.2\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_gsrs_gsrs_admin\jarfiles\WEB-INF\lib\st
              andard31233.jar;C:\bea8.2\weblogic81\server\bin\.\myserver\.wlnotdelete\extract\myserver_gsrs_gsrs_admin\jarfiles\WEB-IN
              F\lib\struts31234.jar.
              java.lang.NoClassDefFoundError: org/apache/struts/action/ActionServlet.
              at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:805)
              at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppServletContext.java:3252)
              at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3209)
              at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3195)
              at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3174)
              at weblogic.servlet.internal.HttpServer.preloadResources(HttpServer.java:688)
              at weblogic.servlet.internal.WebService.preloadResources(WebService.java:483)
              at weblogic.servlet.internal.ServletInitService.resume(ServletInitService.java:30)
              at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
              at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:964)
              at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:359)
              at weblogic.Server.main(Server.java:32)
              >
              ***************error ends here*********************
              any help is appreciated
              rgrds and thx
              gnana

    Hi All,
              <br>
              <br>
              My application was working fine on weblogic7. Recently i have installed weblogic8.1 SP4. We are using managed weblogic servers. I got noclassdeffounderror for a class on the deployment of the application or on the start one of the servers.
              <br>
              <br>
              <b>Strange thing is that the class it is complaining is there in the jar and the jar is there in the classpath which it displays along with the error.</b>
              <br>
              <br>
              I dont know why its not picking up that class. I verifed the classpath by setting it on command line and then tried to use that particular class and it was working.
              <br>
              <br>
              I also tried to put the particular class in web-inf/classes directory and to my surprise it is also not working. still it is giving the same error. Then I tried to put the jar in the web-inf/lib but even in this case also i got the same error.
              <br>
              <br>
              Is there something wrong in the setup/configuration of the server?? or is it anyway related to the environment(like xp,2000,environment variables etc) where the server is installed?? or is weblogic8.1 has some problem in picking classes form classpath or web-inf/classes/ for some particular cases??
              <br>
              <br>
              Anybody has any idea why weblogic8.1 is behaving this way??
              <br>

  • JSF 2.0 Beta1, simple example, doesn't work, why?

    I made a simple JSF 2.0 NetBeans (Web Application project) example. Only imported library jars are jsf-api.jar and jsf-impl.jar from mojarra-2.0.0-Beta1 release.
    These are files which I added:
    web.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
        http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
        <servlet>
            <servlet-name>Faces Servlet</servlet-name>
            <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
            <load-on-startup>1</load-on-startup>
        </servlet>
        <servlet-mapping>
            <servlet-name>Faces Servlet</servlet-name>
            <url-pattern>*.xhtml</url-pattern>
        </servlet-mapping>
    </web-app>
    test.xhtml (example from DZone JSF 2.0 RefCard):
    <html xmlns="http://www.w3.org/1999/xhtml"
           xmlns:f="http://java.sun.com/jsf/core"
           xmlns:h="http://java.sun.com/jsf/html"
           xmlns:ui="http://java.sun.com/jsf/facelets">
         <h:head></h:head>
         <h:body>
              <h:form>
                   <h:outputText value="test" />
              </h:form>
         </h:body>
    </html>And that's it. There is no faces-config.xml, as it is not needed. There are no managed beans. JSF and Facelets plugins are disabled.
    When I try to deploy, a get an exception:
    SEVERE: Exception sending context initialized event to listener instance of class com.sun.faces.config.ConfigureListener
    java.lang.NoClassDefFoundError: com/sun/facelets/tag/jsf/ComponentHandler
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1850)
         at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:890)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1354)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
         at com.sun.faces.util.Util.loadClass(Util.java:200)
         at com.sun.faces.config.processor.AbstractConfigProcessor.loadClass(AbstractConfigProcessor.java:308)
         at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processComponent(FaceletTaglibConfigProcessor.java:523)
         at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTags(FaceletTaglibConfigProcessor.java:358)
         at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.processTagLibrary(FaceletTaglibConfigProcessor.java:311)
         at com.sun.faces.config.processor.FaceletTaglibConfigProcessor.process(FaceletTaglibConfigProcessor.java:260)
         at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:312)
         at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:210)
         at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3934)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4429)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
         at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:630)
         at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:556)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:491)
         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1206)
         at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:314)
         at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
         at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
         at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
         at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
         at org.apache.catalina.core.StandardService.start(StandardService.java:516)
         at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
         at org.apache.catalina.startup.Catalina.start(Catalina.java:583)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
    Caused by: java.lang.ClassNotFoundException: com.sun.facelets.tag.jsf.ComponentHandler
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
         at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    ... 39 moreI tried NetBeans versions: 6.5.1, 6.7-RC3 and 200906261401 Build. Tried with latest Apache-Tomcat and JBoss. It's all the same.
    What is the problem? Why it seeks for a facelets com.sun.faces.config.ConfigureListener, from conventional standalone facelets library? Shouldn't it use facelets classes from JSF 2.0 library?
    I tried to add facelets-1.1.15.B1 jar into project, just to see what happens, and the same exception is thrown ...
    Please help!

    It's because somewhere on your classpath there is a facelet-taglib.xml that's referencing Facelet 1.1.x classes which aren't present.

  • "Missing port information" and NoClassDefFoundError

    I'm developing a Web Service using JWSPD1.2, and I'm having some problem in executing a client which accesses to the service I'm publishing.
    On Client side the error is:
    java.rmi.ServerException: Missing port information
    at com.sun.xml.rpc.StreamingSender._send
    On Server side (file $(JWSPD_HOME)/logs/launcher.server.log) I found out that the thrown exception is a NoClassDefFoundError.
    The class that is not found, however, is included in a library that I'm linking on the command line, so I can't understand why this exception is thrown...
    Has anyone of you been involved in a similar problem?
    Perhaps I have to link the library somewhere else, but I don't know where...
    Thanks in advance for your help!

    Hi ! I am getting the same error at the client side :
    java.rmi.ServerException: Missing port information
    at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingSender.java:370)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:231)
    at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvokerImpl.java:56)
    at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:281)
    at DIIClient.main(DIIClient.java:111)
    can u just tell me how the problem was solved and what were the jar files u had set in the classpath. Pls help me i am new to webservices. Thanx in advance

  • NoClassDefFoundError after upgrading to Weblogic 8.1 sp2 to sp4

    Hi ,
    I have stuck in a problem where my application is using jco.jar file for SAP integration to my java application.
    I have a java class "BAPI_IncentiveReport" in which it calls "addClientPool" that is in JCO class in jco.jar file but it is giving NoClassDefFoundError after i upgraded my Weblogic server 8.1 sp2 to sp4.
    I have jco.jar under /opt/mspd/domains/mspdapps/lib as well as  libjRFC11.jco,libjRFC12.jco and librfccm.so files there. I also tried by keeping them under my application WEB-INF/lib folder but it is giving me same error.
    package com.mindspeed.incentiverpt;
    import com.sap.mw.jco.*;
    import java.util.*;
    import java.io.*;
    import com.mindspeed.Configuration;
    public class BAPI_IncentiveReport
        private String rptId;
        private String aecode;
        private boolean submit= false;
        private static final String POOL_NAME=
            com.mindspeed.Configuration.get("sap_inckey");
    BAPI_IncentiveReport constructor comment.
    public BAPI_IncentiveReport() {
        super();
    BAPI_IncentiveReport constructor comment.
    public BAPI_IncentiveReport(String rptId, String aecode)
        super();
        this.aecode = aecode;
        this.rptId = rptId;
    public EmployeeAttr[] getAeCodeNames()
        boolean retval= false;
        JCO.Client client= null;
        EmployeeAttr[] empnames= null;
        Hashtable empallData= new Hashtable();
        Hashtable aecodeData= new Hashtable();
        try
               /* This is the point where it is giving NoClassDefFoundError.Till here every thing is executing------>*/
                 JCO.addClientPool(
                com.mindspeed.Configuration.get("sap_inckey"),
                Integer.parseInt(Configuration.get("sap_maxcon")),
                Configuration.get("sap_client"),
                Configuration.get("sap_incuser"),
                Configuration.get("sap_incpassword"),
                Configuration.get("sap_language"),
                Configuration.get("sap_host"),
                Configuration.get("sap_incsystemnumber"));
            String timeinterval= "99991231";
            IRepository repos=
                JCO.createRepository("ESSRepos", Configuration.get("sap_inckey"));
            client= JCO.getClient(Configuration.get("sap_inckey"));
            System.out.println("Sagar");
            System.out.println(rptId);
            System.out.println(aecode);
            IFunctionTemplate ftemplate= repos.getFunctionTemplate("ZRFC_GET_PID");
            JCO.Function function= new JCO.Function(ftemplate);
            JCO.ParameterList input= function.getImportParameterList();
            input.setValue(rptId, "RPT_ID");
            input.setValue(aecode, "AECODE");
            client.execute(function);
            JCO.ParameterList output= function.getExportParameterList();
            System.out.println(output);
            JCO.Table dirrpt= function.getTableParameterList().getTable("DIRRPT");
    . and more code
    The error it is giving is
    >
    <Apr 5, 2006 5:13:13 AM PDT> <Error> <HTTP> <BEA-101017> <[ServletContext(id=138
    06908,name=web,context-path=/web)] Root cause of ServletException.
    java.lang.NoClassDefFoundError
            at com.mindspeed.incentiverpt.BAPI_IncentiveReport.getAeCodeNames(BAPI_I
    ncentiveReport.java:112)
            at jsp_servlet._incentiverpt.__incrpthome._jspService(__incrpthome.java:
    193)
            at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
            at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run
    (ServletStubImpl.java:1006)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:419)
            at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:315)
            at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat
    cherImpl.java:322)
            at com.mindspeed.incentiverpt.Inc
    Please help me out.
    Thanks in advance
    Nirmal Shah

    I have the same problem - my data had better not be gone!  Why won't Apple address this problem?

  • Imported Library - NoClassDefFoundError

    Imported Library - NoClassDefFoundError
    Hi
    I created a shared library and imported it in my application using orion-application.xml
    <imported-shared-libraries>
    <import-shared-library name="amc.common" max-version="1.0"></import-shared-library>
    </imported-shared-libraries>
    When I run the application I get NoClassDefFoundError when accessing a class in the Shared library.
    I Know the Jar is Ok as the application works fine when I build the .jar into WEB-INF/lib
    When I check ClassLoader using system Mbean, I can see that the shared library is imported by my Web Application. So why it is failing to find the class ?
    What else need to be done in the application to load the classes that are in the shared library ?
    Aimey

    Hi,
    there is nothing specific that needs to be done on an application side. However, my best advise is to ask this question on the OC4J forum as I am not an expert in share libraries and known issues with it
    Frank

  • Error: java.lang.NoClassDefFoundError in execution

    Hi, I compile my code right but when I'm executing the code I get the following error:
    java.lang.NoClassDefFoundError: jahuwaldt/tools/NeuralNets/NeuronFactory
    This is my code:
    import jahuwaldt.tools.NeuralNets.*;
    public class Gene
    public FeedForwardNet OOLFFNet;
    public Gene(int newNumInput,int newNumOutput,int newNumHidden,int newNeuronHLayer)
      OOLFFNet = new FeedForwardNet(NumInput,NumOutput,NumHidden,NeuronHLayer, new BasicNeuronFactory() );This line that fails is the last one.
    In the directory of jahuwaldt/tools/NeuralNets I got the file NeuronFactory.class. So I don't know why the code compiles right but when it is in execution mode gives the error non class found, when the class is in the directory. Any help?. Thanks in advance

    Hi, thanks again. I'm stuck with this I have test several options but I still get the same error. These are some options that I have tried.
    java -classpath  C:\NeuralNet\jahuwaldt\tools\NeuralNets\NeuronFactory\*.class; sim.app.OOL.OOLWithUI
    java -classpath  C:\NeuralNet\jahuwaldt\tools\NeuralNets\NeuronFactory\NeuronFactory.class; sim.app.OOL.OOLWithUIWhere is the problem?, I think that they are the same that the example from the java help.
    java -classpath C:\java\MyClasses\myclasses.jar utility.myapp.Cool
    Thanks again.

  • Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/stream

    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 classpath?Please help.
    ===== error=========================================
    C:\abr\classes>java -classpath c:\abr\test.jar;C:\abr\jaxrpc-api.jar;C:\abr\jaxrpc-impl.jar;C:\abr\jaxrpc-spi.jar;c:\abr\classes\amazon.jar;C:\abr\mail.jar;C:\a
    br\saaj-api.jar;C:\abr\activation.jar;c:\abr\FastInfoset.jar;%classpath% Client
    [b]Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/stream/XMLS
    treamWriter
    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 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.sun.xml.rpc.client.StreamingSender._writeRequest(StreamingSender.
    java:672)
    at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.java:87)
    at amazon.AmazonSearchPort_Stub.authorSearchRequest(AmazonSearchPort_Stu
    b.java:988)
    at Client.main(Client.java:21)

    I'm assuming you're using JWSDP 1.6 as I see Fastinfoset.jar in your list. You are missing some jar files in your classpath there. The best way to know what you need is to look at the release notes for JWSDP 1.6. Since you're building a web serivce start with the table in there and lookup JAX-RPC. It'll show you what jar files are needed and what other libraries are needed. Now depending on what you're doing you don't really need all those.
    For sure you're missing jsr173_api.jar which is where I believe that class you need is located. This is in the JWSDP_1_6\sjsxp\lib directory. You will probably need the other jar thats in there too. Best bet is to follow the dependancy chart in the release notes.
    This should get you going.
    Ryan

  • Java.lang.NoClassDefFoundError: org/apache/commons/fileupload/DiskFileUploa

    i have a servlet for the upload of the files...I compile and it's ok, but in esecution i've this error:
    java.lang.NoClassDefFoundError: org/apache/commons/fileupload/DiskFileUpload
    Why? Any idea?
    The classpath it's ok...
    Thanx !

    Ah...I use package commons-fileupload-1.0.jar
    I hope in your answer...Thanx!

  • NoClassDefFoundError when passing HttpSession

    Hello All,
    I am getting a NoClassDefFoundError when I start my rmi server.
    I am pass an HttpSession as one of the variables of my rmi call.
    Everything worked fine until I added the HttpSession variable.
    Why do I get this exception ?
    Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/http/Ht
    tpSession
            at java.lang.Class.getDeclaredMethods0(Native Method)
            at java.lang.Class.privateGetDeclaredMethods(Class.java:2395)
            at java.lang.Class.privateGetPublicMethods(Class.java:2519)
            at java.lang.Class.getMethods(Class.java:1406)
            at sun.rmi.server.Util.getRemoteInterfaces(Util.java:221)
            at sun.rmi.server.Util.getRemoteInterfaces(Util.java:193)
            at sun.rmi.server.Util.createProxy(Util.java:126)
            at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:169)
            at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:293)
            at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:235)
            at java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:133)
            at java.rmi.server.UnicastRemoteObject.<init>(UnicastRemoteObject.java:119)
            at pE.PEg.<init>(PEgImpl.java:36)
            at pE.PEgServer.<init>(PEgServer.java:10)
            at pEngine.PEgServer.main(PEgServer.java:18)If I add server2_2.jar to my class path, then I get this exception:
    java.rmi.ServerError: Error occurred in server thread; nested exception is:
            java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionWhile were at it, let me ask this: My RMI implementation code has some data that it needs to pass to my servlet that is invoked by an third-party server. I due to the sensitive nature of the data, I don't want to stick it in a DB, but pass as session variables, thus I was passing in the session var. A better way to do this?
    Edited by: jimcsc on Aug 29, 2008 9:58 AM

    I am getting a NoClassDefFoundError when I start my rmi server.That will be because either the server or the Registry or the client doesn't have the class named in the exception in its CLASSPATH.
    I am pass an HttpSession as one of the variables of my rmi call.Are HttpSessions really serializable? This sounds like a very odd design.
    While were at it, let me ask this: My RMI implementation code has some data that it needs to pass to my servlet that is invoked by an third-party server. I due to the sensitive nature of the data, I don't want to stick it in a DB, but pass as session variables, thus I was passing in the session var.There's something wrong with that description. It seems to me that it is the servlet passing the HttpSession to your RMI server, not the other way around. Assuming the HttpSession implementation is serializable it should work but it's still an odd design. I would get the stuff that you actually need out of the HttpSession and pass that.

Maybe you are looking for

  • Select options in module pool

    Hi all, I have created a select options, for a screen field in a module pool. When the user enters more than one value in this field, the icon multiple selection options should turn green , as happens in selection screen field. Kindly help me regardi

  • What is the "Psition Tuner" tool and why it is can't be found under Help?

    Hello, I'm using ID CS4 ME (middle eastern version) under OSX 10.5.6 and in my tools I see and icon that called "Position Tuner). I searched in Help, no such term appears there. I don't understand why. anyone? thank you Shlomit

  • Customer Training videos

    I'm ready to begin the training for two of my recent customers. I notice that the customer training videos are old and fuzzy and have the old old BC admin interface. Are there other resources you can point me to?  These current videos would be confus

  • IPods not being recognised following Update to 8.1

    Hi - I've recently updated my (new) Notebook laptop to Windows 8.1. Since then, when I connect either my iPod or iPod Nano to the computer, neither device is recognised.  Although each will briefly light up and a sound is made to suggest connection,

  • Since updating to V5 firefox prints blank pages. other programs print properly.

    Since updating to FF v5 I get blank pages when printing. Other browsers and programs print properly. I get this when using a physical printer or printing to PDF. The print preview looks OK.