ClassNotFound: No ClassLoader found

I am writing a stateless session bean which I am testing on a JBoss server. This session bean contacts an Oracle database for data retrieval.
When running JBoss from a Windows 2000 machine, I was able to run my test client perfectly. I then wanted to test using the same version of JBoss running on an HP-UX machine. I set up JBoss's classpath to include the same JARs that the Win2K server was using. However, now when I try to create a new database connection I get the following error:
ClassNotFoundException : No ClassLoaders found for: oracle.jdbc.driver.OracleDriver
I have verified that the ojdbc14.jar file is in JBoss's classpath and that it exists. I have never seen this error and have no idea what it means.
Anyone have any ideas?

I set up JBoss's classpath to include
the same JARs that the Win2K server was using.Did you copy it to $JBOSS_HOME/server/default/lib, or are you trying to edit the JBoss startup shell scripts? Try putting the jar in that folder if you haven't already.
-Scott
http://www.swiftradius.com

Similar Messages

  • OIM API strange error

    Hi All
    I developed a sample code to output all users from OIM to Log file
    I tested it in my Dev env at work and it worked perfectly.
    Decided to develop it further and run it in Test env
    Got an error:
    <ERROR> <RJVM> <BEA-000503> < Incoming message header or abbreaviation processing failed
    java.io.InvalidClassException: thor.API.tcMetaDataSet; local class incompatible: stream classdesc serialVersionUID .............
    I know that its weblogic related but sure exactly what it means
    Tony

    I had a similar error: there was a different version of xlAPI.jar deployed on the application server from older components (OIMSpmlWS.ear, XIMDD.war). The reason of the conflict was that the classloader found the older version of the xlAPI.jar first.

  • Problems after update berkeley 4.1.7 NoSuchMethodError: setAllowCreate

    Hi
    I have an application in a oc4j container that uses berkeley db.
    I has updated the berkeley db version from 3.3.82 to 4.1.7 and the application returns the next error
    Caused by: java.lang.NoSuchMethodError: com.sleepycat.je.EnvironmentConfig.setAllowCreate
    I has revised that the berkeley jar is the correct and i has validated that the setallowcreate method exists
    Thanks a lot

    Hi,
    This indicates that the method does not exist in the jar that the classloader found the class in. You need to verify your classpath settings and see whether you are referring to a Berkeley DB Core (BDB) jar, rather than a Berkeley DB Java Edition (JE) jar. je-4.1.7.jar should come before any db.jar (db-M.N.P.jar) in the classpath.
    Using the same classpath setting as for the OC4J container, you can use Class.getProtectionDomain().getCodeSource().getLocation() to determine from which location the classloader loads the EnvironmentConfig class:
    import java.net.URL;
    import com.sleepycat.je.EnvironmentConfig;
    public class GetClassLocation {
         public static void main(String[] args) {
              URL classURL = EnvironmentConfig.class.getProtectionDomain().getCodeSource().getLocation();
              System.out.println(classURL);
    }The result should be a path which points to je-4.1.7.jar. If other jar is reported, you will need to include je-4.1.7.jar in the classpath before the reported one.
    Regards,
    Andrei

  • Creating new Date formatter

    I tried to write my own Date formatter (something like oracle.jbo.format.DefaultDateFormatter).
    It's name is or.jbo.format.DateFormatter. But when I started my JSP DataTags page, when my Date attribute should be rendered, I get ClassNotFoundException error:
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: java.lang.ClassNotFoundException, msg=or.jbo.format.DateFormatter void oracle.jbo.JboException.(java.lang.Throwable) java.lang.String oracle.jbo.server.AttributeDefImpl.getFormattedAttribute(oracle.jbo.AttributeList, oracle.jbo.LocaleContext) java.lang.String oracle.jdeveloper.html.HTMLFieldRendererImpl.getHTMLValue(oracle.jbo.Row, oracle.jbo.AttributeDef) java.lang.String oracle.jdeveloper.html.HTMLFieldRendererImpl.getHTMLValue(oracle.jbo.Row)
    But I am definitely sure my class (oracle.jbo.format.DefaultDateFormatter) IS in the classpath....
    So I am absolutely confused...
    This behavior were inside Oracle OC4J container.
    I tried run it inside Tomcat and there are not ClassNotFoundException.... So it is problem of OC4J??
    Thank you very much for any comments
    Jan Pechanec

    Thank you for your answer.
    I tried to put my class to client project (there is .class file inside classes directory - I'm sure). But there is the same problem.
    I tried following:
    Put inside DataTableComponent.jsp following lines:
    <%
    Class c = Class.forName("or.jbo.format.DateFormatter");
    %>
    And ClassLoader found my class "or.jbo.format.DateFormatter" (I saw value of variable 'c' in the watch.).
    But then (while rendering data table) there was the same excetion (JBO-29000: Unexpected exception caught: java.lang.ClassNotFoundException, msg=or.jbo.format.DateFormatter) - see above.
    I checked the name of class hundred times, and it is right ...
    I am still confused. Have you same idea, what's the problem?
    Thank you
    Jan Pechanec
    PS. I'm using JDev 9.0.2
    PS2. I haven't source code of oracle.jbo.server.AttributeDefImpl, co I can't debug it properly...

  • JAXB 1.0 Final: jaxb.properties not found when using custom classloader

    JDK 1.3.1 is being used.
    The scenario:
    1) jaxb jar files, jaxb generated files and application files loaded in default class loader works, however
    2) jaxb jar files, jaxb generated files and application files loaded in a custom class loader generate the following exception:
    javax.xml.bind.JAXBException: Unable to locate jaxb.properties for package XXX
    To demonstrate here are two sample applications: a Launcher app whose job it is to start apps and a sample App1 application who needs JAXB.
    If launch is placed into a jar file named launch.jar and App1 is placed into a jar file named app1.jar (with a JAXB generated package), and both jar files are placed in a directory containing all the JAXB 1.0 jar files (dom, sax, namespace, etc) and the system is started with the following:
    jre\bin\java -cp launch.jar; testLaunch.launch
    the exception occurs.
    By way of comparison, if App1 is started directly with the following:
    jre\bin\java -cp app1.jar;jax-qname.jar;jaxb-xjc.jar;jaxb-ri.jar;jaxb-libs.jar;jaxb-api.jar;dom.jar;sax.jar;jaxp-api.jar;xercesImpl.jar;namespace.jar;ant.jar;xalan.jar testApp.app1
    the exception does not occur.
    Any help would be greatly appreciated.
    package testLaunch;
    import java.net.*;
    import java.io.*;
    public class launch extends javax.swing.JFrame
        private static URLClassLoader app1ClassLoader_; 
        private static Class  app1EntryClass_ = null;
        private static final String app1MainClassName_ = "testApp.app1";
        private Object appObj_ = null;
         static public void main(String args[])
              try {
                System.out.println("Launch Main");               
                new launch();          
                  System.exit(0);
              catch (Throwable t) {
                   t.printStackTrace();
                   System.exit(1);
         public launch()
            if (app1ClassLoader_== null)
                loadAppClassLoader();
            try{
                if (app1EntryClass_ == null)
                    app1EntryClass_ = app1ClassLoader_.loadClass(app1MainClassName_);
                if (app1EntryClass_ == null)
                    System.out.println(app1MainClassName_ + " was not found");
                else
                    appObj_ = app1EntryClass_.newInstance();
            catch(ClassNotFoundException x){
                x.printStackTrace();
            catch(Exception x){
                x.printStackTrace();
        private static void loadAppClassLoader()
            String jarPath = jarPath = System.getProperty("user.dir");
            System.out.println("jar path is: " + jarPath);
            try{
                File jarfile1 = new File(jarPath+File.separator+"app1.jar");
                File jarfile2 = new File(jarPath+File.separator+"dom.jar");
                File jarfile3 = new File(jarPath+File.separator+"jaxp-api.jar");
                File jarfile4 = new File(jarPath+File.separator+"jaxb-api.jar");
                File jarfile5 = new File(jarPath+File.separator+"jaxb-xjc.jar");
                File jarfile6 = new File(jarPath+File.separator+"jaxb-ri.jar");
                File jarfile7 = new File(jarPath+File.separator+"jaxb-libs.jar");
                File jarfile8 = new File(jarPath+File.separator+"jax-qname.jar");
                File jarfile9 = new File(jarPath+File.separator+"sax.jar");
                File jarfile10 = new File(jarPath+File.separator+"xercesImpl.jar");
                File jarfile11 = new File(jarPath+File.separator+"namespace.jar");
                File jarfile12 = new File(jarPath+File.separator+"xalan.jar");
                File jarfile13 = new File(jarPath+File.separator+"ant.jar");
                if (!jarfile1.exists())
                    System.out.println("**ERROR " + jarfile1 + " does not exist!");
                app1ClassLoader_ = new URLClassLoader( new URL[]{jarfile1.toURL(),
                                                                jarfile2.toURL(),
                                                                jarfile3.toURL(),
                                                                jarfile4.toURL(),
                                                                jarfile5.toURL(),
                                                                jarfile6.toURL(),
                                                                jarfile7.toURL(),
                                                                jarfile8.toURL(),
                                                                jarfile9.toURL(),
                                                                jarfile10.toURL(),
                                                                jarfile11.toURL(),
                                                                jarfile12.toURL(),
                                                                jarfile13.toURL()} );
            catch(Exception x){
                x.printStackTrace();
                return;
    package testApp;
    import javax.xml.bind.*; // JAXB classes
    import myGeneratedJAXBFiles;
    public class app1 extends javax.swing.JFrame
         static public void main(String args[])
              try {
                System.out.println("App1 Main");               
                new app1();           
                  System.exit(0);
              catch (Throwable t) {
                   t.printStackTrace();
                   System.exit(1);
         public app1()
            try
                JAXBContext jc_ = JAXBContext.newInstance( "myGeneratedJAXBFiles" );
                System.out.println("Successfully loaded JAXB Context");          
            catch (JAXBException jbe)
                jbe.printStackTrace();

    I'm doing something very similar. In fact my launcher is also stored in launcher.jar. It will start any application on the classpath and load dependencies jars located in the specified directory.
    The first thing you must do is specify the classloader when constructing the jaxb context:
    JAXBContext jc = JAXBContext.newInstance(xmlPackage, getClass().getClassLoader());
    After this I was still raning into the "jaxb.properties not found" exception in some situations. Basically if the class using the jaxb files is located in the same jar as jaxb.properties everything worked fine. However if the class using the jaxb objects was located in a different jar it did not work.
    I had to add the following early in the execution of the application that load the plugins to get things working correctly:
    Thread.currentThread().setContextClassLoader(jarDirClassLoader);
    As far as I can tell JAXB using the Context class loader to find the jaxb.properties file.
    I'm using JAXB 1.1
    I hope this helps!

  • Login Module not found by ClassLoader

    I tried to add my own LoginModule to the login modules stack, but i get the following exception from the classloader when it is supposed to be used:
    Exception com.sap.engine.services.security.exceptions.BaseSecurityException: Cannot load a login module.
    Then i get an info about the Class Loader, but it seems that my archive is not there.
    i followed the steps from the document "JAAS Login Modules
    For SAP WebAS JAVA 6.40", but i am not sure how/where to define the jar-archive.
    What exactly has to be described under the config property "Security Provider->Properties->LoginModuleClassLoaders" ?
    Any help would be very kind!
    Marius

    Hi,
    I see that this is an old post but I just had the same problem and maybe it helps someone else who is facing the same problem too.
    I also found the error in the trace file stating that my custom login module class could not be loaded and I realized that my JAR-File was not contained in the SDA file as it should after Creating the archive although I added a reference in the provider.xml file.
    Everything was just as described under help.sap.com.
    My custom class is in a package called de.test.... so I browsed to the general Tab of the provider.xml and changed the provider from sap.com to de.test
    After exporting again the JAR was finally contained in the sda and after deployment to the j2ee and restart of the engine the class could finally be loaded!
    Note that when changing the vendor to de.test the name of the library also changes to de.test~MyLoginModuleClass or whatever the Class is called. This name has to be registered in the Config Toll (Global Server Config > services > security > LoginModuleClassLoaders)
    y
    You can check for the exact name of your deployed library in the Visual Admin by choosing Server > Libraries > YourLibraryDisplayName or Server > Services > Class Loader Viewer > Libraries)
    Hope this helps
    Cheers
    Marcel

  • ClassNotFound     found in Negative cache

    Hi ,
      I am unable to solve  " found in negative cache " exception.
    In visual admin -->log viewer  i am getting foll.. error
    can anyone help me to solve my problem
    thanks in advance
    Could not load class [Lcom.hp.om.nwoms.common.SpcDeviceMapping; with classloader com.sap.engine.services.deploy.server.ApplicationLoader@[email protected]/OMSCBEAR, will try ObjectStreamClass.forClass() instead.
    [EXCEPTION]
    java.lang.ClassNotFoundException: [Lcom.hp.om.nwoms.common.SpcDeviceMapping;Found in negative cache-- Loader Info -ClassLoader name: [hp.com/OMSCBEAR] Parent loader name: [Frame ClassLoader] References:   not registered! Resources:   E:\usr\sap\GRD\DVEBMGS00\j2ee\cluster\server0\apps\hp.com\OMSCBEAR\servlet_jsp\omscb\root\WEB-INF\lib\hp.comCMPOBJ.jar   E:\usr\sap\GRD\DVEBMGS00\j2ee\cluster\server0\apps\hp.com\OMSCBEAR\servlet_jsp\omscb\work   E:\usr\sap\GRD\DVEBMGS00\j2ee\cluster\server0\apps\hp.com\OMSCBEAR\servlet_jsp\omscb\root\WEB-INF\lib\hp.comMWSPROXYMWSPROXY_DEPLOY.jar   E:\usr\sap\GRD\DVEBMGS00\j2ee\cluster\server0\apps\hp.com\OMSCBEAR\servlet_jsp\omscb\root\WEB-INF\classes   E:\usr\sap\GRD\DVEBMGS00\j2ee\cluster\server0\apps\hp.com\OMSCBEAR\servlet_jsp\omscb\root\WEB-INF\lib\hp.comOBJMODEL~OBJMODEL_DEPLOY.jar   E:\usr\sap\GRD\DVEBMGS00\j2ee\cluster\server0\apps\hp.com\OMSCBEAR\src.zip Loading model: {parent,references,local}--
         at com.sap.engine.frame.core.load.ReferencedLoader.loadClass(ReferencedLoader.java:360)     at com.sap.jms.protocol.serialization.JMSInputStream.resolveClass(JMSInputStream.java:43)     at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)     at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)     at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1560)     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1271)     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)     at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1845)     at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1769)     at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1646)     at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)     at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)     at com.sap.jms.protocol.message.MessageRequest.readBody(MessageRequest.java:400)     at com.sap.jms.protocol.message.MessageRequest.getMessageBody(MessageRequest.java:903)     at com.sap.jms.client.message.ObjectMessage.getObject(ObjectMessage.java:114)     at com.hp.om.nwoms.event.EventReceiver.onMessage(EventReceiver.java:130)     at com.sap.jms.client.session.Session.run(Session.java:715)     at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)     at java.security.AccessController.doPrivileged(Native Method)     at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)     at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

    Hi Vishnuverdhan,
    Hava you added supporting JAR file.
    Thanks
    Arun

  • 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)

  • Properties file not found by classloader when using wlappc ant task

    I have encountered a problem with the WebLogic Ant task "wlappc". When this task compiles a webmodule that uses the struts 1.1 framework I get the below error. This struts based web module deploys and runs fine on BEA Weblogic 8.1 SP2 as an exploded EAR structure. But when I attempt to precompile all the J2EE modules the struts web module will not compile with wlappc. The project is strutured correctly in a split directory structure. The problem area seems to be that we are using the struts-el (struts-el.jar) classes which need the properties files located in the struts.jar. The classloader seems to space out when running via the wlappc ant task. I tried adjusting the classpath via the "classpath" wlappc ant task attribute - but no success. Has anyone had this or a similiar problem?
    Any suggestions would be greatly appreciated!
    Thanks in advance,
    Scott
    Error from ant task is as such:
    compile:
    [javac] Compiling 256 source files to C:\My Builds\WWL\build\wwlentityejb
    [javac] Compiling 4 source files to C:\My Builds\WWL\build\wwlsessejb
    [javac] Compiling 91 source files to C:\My Builds\WWL\build\wwlweb\WEB-INF\classes
    appc:
    [wlappc] [appc] Compiling EAR module 'wwltestweb'
    [wlappc] [JspcInvoker]Checking web app for compliance.
    [wlappc] <Jul 28, 2004 4:38:47 PM GMT-05:00> <Info> <HTTP> <BEA-101047> <[ComplianceChecker] Validating the servlet element with servlet-name named "JUnitEETestServlet".>
    [wlappc] <Jul 28, 2004 4:38:48 PM GMT-05:00> <Info> <HTTP> <BEA-101047> <[ComplianceChecker] Checking servlet-mapping for servlet name : "JUnitEETestServlet".>
    [wlappc] [appc] Compiling EAR module 'wwlweb'
    [wlappc] [JspcInvoker]Checking web app for compliance.
    [wlappc] <Jul 28, 2004 4:38:48 PM GMT-05:00> <Info> <HTTP> <BEA-101047> <[ComplianceChecker] Validating the servlet element with servlet-name named "wwlActionServlet".>
    [wlappc] <Jul 28, 2004 4:38:48 PM GMT-05:00> <Info> <HTTP> <BEA-101047> <[ComplianceChecker] Checking servlet-mapping for servlet name : "wwlActionServlet".>
    [wlappc] <Jul 28, 2004 4:38:48 PM GMT-05:00> <Info> <HTTP> <BEA-101047> <[ComplianceChecker] Checking filter-mapping with filter-name "I18NFilter".>
    [wlappc] <Jul 28, 2004 4:38:48 PM GMT-05:00> <Info> <HTTP> <BEA-101047> <[ComplianceChecker] Checking filter-mapping with filter-name "Security Filter".>
    [wlappc] [jspc] parsing /admin/jsps/menu.jsp:
    [wlappc] Jul 28, 2004 4:38:50 PM org.apache.struts.util.MessageResourcesFactory createFactory
    [wlappc] SEVERE: MessageResourcesFactory.createFactory
    [wlappc] java.lang.ClassNotFoundException: org.apache.struts.util.PropertyMessageResourcesFactory
    [wlappc] at java.net.URLClassLoader$1.run(URLClassLoader.java:198)
    [wlappc] at java.security.AccessController.doPrivileged(Native Method)
    [wlappc] at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
    [wlappc] at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    [wlappc] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:272)
    [wlappc] at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
    [wlappc] at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:207)
    [wlappc] at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResourcesFactory.java:192)
    [wlappc] at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:576)
    [wlappc] at org.apache.struts.util.RequestUtils.<clinit>(RequestUtils.java:134)
    [wlappc] at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResourcesFactory.java:192)
    [wlappc] at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:576)
    [wlappc] at org.apache.struts.taglib.html.BaseTag.<clinit>(BaseTag.java:94)
    [wlappc] at java.lang.Class.forName0(Native Method)
    [wlappc] at java.lang.Class.forName(Class.java:140)
    [wlappc] at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.class$(ELBaseTagBeanInfo.java:81)
    [wlappc] at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.getPropertyDescriptors(ELBaseTagBeanInfo.java:81)
    [wlappc] at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:436)
    [wlappc] at java.beans.Introspector.getBeanInfo(Introspector.java:372)
    [wlappc] at java.beans.Introspector.getBeanInfo(Introspector.java:207)
    [wlappc] at java.beans.Introspector.getBeanInfo(Introspector.java:193)
    [wlappc] at weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:1323)
    [wlappc] at weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:1261)
    [wlappc] at weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:292)
    [wlappc] at weblogic.servlet.jsp.TagLibHelper.loadTagLib(TagLibHelper.java:314)
    [wlappc] at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:145)
    [wlappc] at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:5015)
    [wlappc] at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4853)
    [wlappc] at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4699)
    [wlappc] at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2094)
    [wlappc] at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1880)
    [wlappc] at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1753)
    [wlappc] at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:963)
    [wlappc] at weblogic.servlet.jsp.JspParser.doit(JspParser.java:106)
    [wlappc] at weblogic.servlet.jsp.JspParser.parse(JspParser.java:230)
    [wlappc] at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:125)
    [wlappc] at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
    [wlappc] at weblogic.jspc.runJspc(jspc.java:550)
    [wlappc] at weblogic.jspc.runJspc(jspc.java:437)
    [wlappc] at weblogic.servlet.jsp.JspcInvoker.compile(JspcInvoker.java:163)
    [wlappc] at weblogic.appc.compileWAR(appc.java:859)
    [wlappc] at weblogic.appc.compileModules(appc.java:650)
    [wlappc] at weblogic.appc.compileEAR(appc.java:733)
    [wlappc] at weblogic.appc.compileInput(appc.java:458)
    [wlappc] at weblogic.appc.runBody(appc.java:184)
    [wlappc] at weblogic.utils.compiler.Tool.run(Tool.java:146)
    [wlappc] at weblogic.utils.compiler.Tool.run(Tool.java:103)
    [wlappc] at weblogic.appc.main(appc.java:1028)
    [wlappc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [wlappc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [wlappc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [wlappc] at java.lang.reflect.Method.invoke(Method.java:324)
    [wlappc] at weblogic.ant.taskdefs.j2ee.CompilerTask.invokeMain(CompilerTask.java:278)
    [wlappc] at weblogic.ant.taskdefs.j2ee.Appc.execute(Appc.java:179)
    [wlappc] at org.apache.tools.ant.Task.perform(Task.java:341)
    [wlappc] at org.apache.tools.ant.Target.execute(Target.java:309)
    [wlappc] at org.apache.tools.ant.Target.performTasks(Target.java:336)
    [wlappc] at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    [wlappc] at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
    [wlappc] at org.apache.tools.ant.Main.runBuild(Main.java:609)
    [wlappc] at org.apache.tools.ant.Main.start(Main.java:196)
    [wlappc] at org.apache.tools.ant.Main.main(Main.java:235)
    [wlappc] Jul 28, 2004 4:38:50 PM org.apache.struts.util.MessageResourcesFactory createFactory
    [wlappc] SEVERE: MessageResourcesFactory.createFactory
    [wlappc] java.lang.ExceptionInInitializerError
    [wlappc] at org.apache.struts.util.MessageResourcesFactory.createFactory(MessageResourcesFactory.java:192)
    [wlappc] at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:576)
    [wlappc] at org.apache.struts.taglib.html.BaseTag.<clinit>(BaseTag.java:94)
    [wlappc] at java.lang.Class.forName0(Native Method)
    [wlappc] at java.lang.Class.forName(Class.java:140)
    [wlappc] at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.class$(ELBaseTagBeanInfo.java:81)
    [wlappc] at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.getPropertyDescriptors(ELBaseTagBeanInfo.java:81)
    [wlappc] at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:436)
    [wlappc] at java.beans.Introspector.getBeanInfo(Introspector.java:372)
    [wlappc] at java.beans.Introspector.getBeanInfo(Introspector.java:207)
    [wlappc] at java.beans.Introspector.getBeanInfo(Introspector.java:193)
    [wlappc] at weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:1323)
    [wlappc] at weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:1261)
    [wlappc] at weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:292)
    [wlappc] at weblogic.servlet.jsp.TagLibHelper.loadTagLib(TagLibHelper.java:314)
    [wlappc] at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:145)
    [wlappc] at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:5015)
    [wlappc] at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4853)
    [wlappc] at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4699)
    [wlappc] at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2094)
    [wlappc] at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1880)
    [wlappc] at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1753)
    [wlappc] at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:963)
    [wlappc] at weblogic.servlet.jsp.JspParser.doit(JspParser.java:106)
    [wlappc] at weblogic.servlet.jsp.JspParser.parse(JspParser.java:230)
    [wlappc] at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:125)
    [wlappc] at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
    [wlappc] at weblogic.jspc.runJspc(jspc.java:550)
    [wlappc] at weblogic.jspc.runJspc(jspc.java:437)
    [wlappc] at weblogic.servlet.jsp.JspcInvoker.compile(JspcInvoker.java:163)
    [wlappc] at weblogic.appc.compileWAR(appc.java:859)
    [wlappc] at weblogic.appc.compileModules(appc.java:650)
    [wlappc] at weblogic.appc.compileEAR(appc.java:733)
    [wlappc] at weblogic.appc.compileInput(appc.java:458)
    [wlappc] at weblogic.appc.runBody(appc.java:184)
    [wlappc] at weblogic.utils.compiler.Tool.run(Tool.java:146)
    [wlappc] at weblogic.utils.compiler.Tool.run(Tool.java:103)
    [wlappc] at weblogic.appc.main(appc.java:1028)
    [wlappc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [wlappc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [wlappc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [wlappc] at java.lang.reflect.Method.invoke(Method.java:324)
    [wlappc] at weblogic.ant.taskdefs.j2ee.CompilerTask.invokeMain(CompilerTask.java:278)
    [wlappc] at weblogic.ant.taskdefs.j2ee.Appc.execute(Appc.java:179)
    [wlappc] at org.apache.tools.ant.Task.perform(Task.java:341)
    [wlappc] at org.apache.tools.ant.Target.execute(Target.java:309)
    [wlappc] at org.apache.tools.ant.Target.performTasks(Target.java:336)
    [wlappc] at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    [wlappc] at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
    [wlappc] at org.apache.tools.ant.Main.runBuild(Main.java:609)
    [wlappc] at org.apache.tools.ant.Main.start(Main.java:196)
    [wlappc] at org.apache.tools.ant.Main.main(Main.java:235)
    [wlappc] Caused by: java.lang.NullPointerException
    [wlappc] at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:577)
    [wlappc] at org.apache.struts.util.RequestUtils.<clinit>(RequestUtils.java:134)
    [wlappc] ... 52 more
    BUILD FAILED
    file:C:/My Sources/WWLEar/wwlear/build.xml:128: weblogic.utils.compiler.ToolFailureException: [J2EE:160119]Appc is unable to process the file 'C:\My Builds\WWL\build'. The following error occurred:
    java.lang.ExceptionInInitializerError
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:140)
    at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.class$(ELBaseTagBeanInfo.java:81)
    at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.getPropertyDescriptors(ELBaseTagBeanInfo.java:81)
    at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:436)
    at java.beans.Introspector.getBeanInfo(Introspector.java:372)
    at java.beans.Introspector.getBeanInfo(Introspector.java:207)
    at java.beans.Introspector.getBeanInfo(Introspector.java:193)
    at weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:1323)
    at weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:1261)
    at weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:292)
    at weblogic.servlet.jsp.TagLibHelper.loadTagLib(TagLibHelper.java:314)
    at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:145)
    at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:5015)
    at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4853)
    at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4699)
    at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2094)
    at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1880)
    at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1753)
    at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:963)
    at weblogic.servlet.jsp.JspParser.doit(JspParser.java:106)
    at weblogic.servlet.jsp.JspParser.parse(JspParser.java:230)
    at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:125)
    at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
    at weblogic.jspc.runJspc(jspc.java:550)
    at weblogic.jspc.runJspc(jspc.java:437)
    at weblogic.servlet.jsp.JspcInvoker.compile(JspcInvoker.java:163)
    at weblogic.appc.compileWAR(appc.java:859)
    at weblogic.appc.compileModules(appc.java:650)
    at weblogic.appc.compileEAR(appc.java:733)
    at weblogic.appc.compileInput(appc.java:458)
    at weblogic.appc.runBody(appc.java:184)
    at weblogic.utils.compiler.Tool.run(Tool.java:146)
    at weblogic.utils.compiler.Tool.run(Tool.java:103)
    at weblogic.appc.main(appc.java:1028)
    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:324)
    at weblogic.ant.taskdefs.j2ee.CompilerTask.invokeMain(CompilerTask.java:278)
    at weblogic.ant.taskdefs.j2ee.Appc.execute(Appc.java:179)
    at org.apache.tools.ant.Task.perform(Task.java:341)
    at org.apache.tools.ant.Target.execute(Target.java:309)
    at org.apache.tools.ant.Target.performTasks(Target.java:336)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1255)
    at org.apache.tools.ant.Main.runBuild(Main.java:609)
    at org.apache.tools.ant.Main.start(Main.java:196)
    at org.apache.tools.ant.Main.main(Main.java:235)
    Caused by: java.lang.NullPointerException
    at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:577)
    at org.apache.struts.taglib.html.BaseTag.<clinit>(BaseTag.java:94)
    ... 49 more
    - with nested exception:
    [java.lang.ExceptionInInitializerError]
    Total time: 42 seconds

    Hi Rob,
    I also gets this error when I deploy my application using struts 1.2.2 with struts-el.jar also.
    The error is thrown when the server comile the jsp's :
    <BEA-101047>[ServletContext(id=20164970,name=tracer,context-path=/tracer)] classfile up-to-date for JSP /webdatagrid/layouts/default/customize.jsp>
    ####<Sep 2, 2004 2:05:26 PM EDT> <Info> <HTTP> <nyeqshu2> <sit1tracerweb> <ExecuteThread: '3' for queue: 'weblogic.kernel.System'> <<WLS Kernel>> <>
    <BEA-101047> <[ServletContext(id=20164970,name=tracer,context-path=/tracer)] checking /webdatagrid/layouts/default/exceldownload.jsp:>
    ####<Sep 2, 2004 2:05:30 PM EDT> <Error> <Deployer> <nyeqshu2> <sit1tracerweb> <ExecuteThread: '3' for queue: 'weblogic.kernel.System'> <<WLS Kernel>>
    <>
    <BEA-149201> <Failed to complete the deployment task with ID 0 for the application tracer-webapp-application-uncontrolled.
    java.lang.NullPointerException
    at org.apache.struts.util.MessageResources.getMessageResources(MessageResources.java:577)
    at org.apache.struts.taglib.html.BaseTag.<clinit>(BaseTag.java:94)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:140)
    at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.class$(ELBaseTagBeanInfo.java:81)
    at org.apache.strutsel.taglib.html.ELBaseTagBeanInfo.getPropertyDescriptors(ELBaseTagBeanInfo.java:81)
    at java.beans.Introspector.getTargetPropertyInfo(Introspector.java:436)
    at java.beans.Introspector.getBeanInfo(Introspector.java:372)
    at java.beans.Introspector.getBeanInfo(Introspector.java:207)
    at java.beans.Introspector.getBeanInfo(Introspector.java:193)
    at weblogic.servlet.jsp.StandardTagLib.parseTagDD(StandardTagLib.java:1323)
    at weblogic.servlet.jsp.StandardTagLib.parseDD(StandardTagLib.java:1261)
    at weblogic.servlet.jsp.StandardTagLib.<init>(StandardTagLib.java:292)
    at weblogic.servlet.jsp.TagLibHelper.loadTagLib(TagLibHelper.java:314)
    at weblogic.servlet.jsp.JspLexer.loadTagLib(JspLexer.java:145)
    at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE_BODY(JspLexer.java:5015)
    at weblogic.servlet.jsp.JspLexer.mTAGLIB_DIRECTIVE(JspLexer.java:4853)
    at weblogic.servlet.jsp.JspLexer.mDIRECTIVE(JspLexer.java:4699)
    at weblogic.servlet.jsp.JspLexer.mSTANDARD_THING(JspLexer.java:2094)
    at weblogic.servlet.jsp.JspLexer.mTOKEN(JspLexer.java:1880)
    at weblogic.servlet.jsp.JspLexer.nextToken(JspLexer.java:1753)
    at weblogic.servlet.jsp.JspLexer.parse(JspLexer.java:963)
    at weblogic.servlet.jsp.JspParser.doit(JspParser.java:106)
    at weblogic.servlet.jsp.JspParser.parse(JspParser.java:230)
    at weblogic.servlet.jsp.Jsp2Java.outputs(Jsp2Java.java:125)
    at weblogic.utils.compiler.CodeGenerator.generate(CodeGenerator.java:258)
    at weblogic.servlet.jsp.Precompiler.compileOne(Precompiler.java:191)
    at weblogic.servlet.jsp.Precompiler.compile(Precompiler.java:71)
    at weblogic.servlet.jsp.Precompiler.compile(Precompiler.java:82)
    at weblogic.servlet.internal.WebAppServletContext.precompileJSPs(WebAppServletContext.java:4908)
    at weblogic.servlet.internal.WebAppServletContext.precompileJSPs(WebAppServletContext.java:4886)
    at weblogic.servlet.internal.WebAppServletContext.prepareFromDescriptors(WebAppServletContext.java:2342)
    at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:565)
    at weblogic.servlet.internal.WebAppServletContext.<init>(WebAppServletContext.java:493)
    at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:628)
    at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:626)
    at weblogic.j2ee.J2EEApplicationContainer.prepareWebModule(J2EEApplicationContainer.java:3011)
    at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1532)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1188)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1031)
    at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2602)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2552)
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2474)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    --------------- nested within: ------------------
    weblogic.management.ManagementException: - with nested exception:
    [java.lang.NullPointerException]
    at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2491)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    >
    ####<Sep 2, 2004 2:37:29 PM EDT> <Info> <Deployer> <nyeqshu2> <sit1tracerweb> <ExecuteThread: '2' for queue: 'weblogic.kernel.System'> <<WLS Kernel>>
    <>
    <BEA-149059> <Module tracer of application tracer-webapp-application-1_6_3_510 is transitioning from unprepared to prepared on server sit1tracerweb
    .>
    ####<Sep 2, 2004 2:37:39 PM EDT> <Debug> <HTTP> <nyeqshu2> <sit1tracerweb> <ExecuteThread: '2' for queue: 'weblogic.kernel.System'> <<WLS Kernel>> <>
    ####<Sep 2, 2004 2:37:39 PM EDT> <Debug> <HTTP> <nyeqshu2> <sit1tracerweb> <ExecuteThread: '2' for queue: 'weblogic.kernel.System'> <<WLS Kernel>> <>
    <BEA-101211> <tracer-webapp-application-1_6_3_510:tracer Precompiling JSPs at startup with JSP config [JspConfig: verbose=true,packagePrefix=jsp_servl
    et,-compiler=javac,compileFlags=,workingDir=./applications/tracer/WEB-INF/classes,pageCheckSeconds=5,superclass=weblogic.servlet.jsp.JspBase,keepgener
    ated=true,precompileContinue=false,compilerSupportsEncoding=true,encoding=null,defaultfilename=index.jsp,compilerclass=null,noTryBlocks=true,debugEnab
    led=false,printNulls=true,jspServlet=null].>
    I've looked at the source code ant it is actually using the current thread's classloader.
    The fact is that it works fine when deployed to tomcat 4.1.30, but it fails when deploying on our weblogic managed servers.
    Thanks
    Julien De Santis
    CGI Group

  • Difference in ClassNotFound and NoClassDefFound

    Hi. At work we have run into ClassNotFound and NoClassDefFound exceptions numerous times while setting up new environments (who hasn't?). However, nobody here seems to understand the different between the exceptions. The javadoc isn't much help.
    Here is part of the javadoc for the two:
    NoClassDefFoundException:
    "Thrown if the Java Virtual Machine or a ClassLoader instance tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found."
    ClassNotFoundException:
    "Thrown when an application tries to load in a class through its string name using:
    * The forName method in class Class.
    * The findSystemClass method in class ClassLoader .
    * The loadClass method in class ClassLoader.
    but no definition for the class with the specified name could be found."
    Could someone please educate us in the difference? When we get one type of exception, what should we look for as opposed to the other type? Thanks for your help :)
    Michael.

    I think it's like it saye. NoClassDefFound is when the JVM tries to follow up a reference to another class contained in the java code itself, and the required class isn't there. It almost always means that you've missed a library from the runtime class path which was there when you compiled, or your compilation is out of date and a class has been removed.
    ClassNotFoundException happens when you generate a class name at run time and try to load it explicitly, and it turns out not to be there.

  • Class not found error when jar in war file

    I am using Java Creator 2 and have a project. The required libraries have been added to the library manager and the "package" checkbox has been checked. This means they will be added to the deployment.
    After deployment, I check the war file and it contains the proper libraries. However, when I run it by using the "run main project" option from the menu there is ClassNotFound exception. The class that cannot be found is in one of the jars in the war file. As I said, I have checked this war file after deployment and it contains the jar.
    Only thing I can think of is that another classloader is being used. Incidentally, (I hope), the missing class file is related to hibernate. During the creation of the Hibernate session factory, it cannot find this file. But hibernate should have nothing to do with it. The fact is a class file cannot be found even though it is in a jar contained in the war file.
    Any ideas?

    Did you read the tutorial from Creator?
    David
    http://www.pricerunner.com/forum/viewtopic.php?t=1659

  • Writting a ClassLoader

    I'm trying to write a ClassLoader that, when trying to load a class, looks for it in a special directory if the normal way doesn't find it.
    I've overriden the findClass method to do the job. It is supposed that the findClass method will call it if the parent classloaders could not load the class.
    The I have write a wrapper to instantiate my ClassLoader and ask it to load the main class of any application, using reflection to get the main method.
    My problem is this: If the main class of the application is not found in the classpath, the findClass method is called and everything seems to work fine. But if the main class is in the classpath, and other classes are not, my findClass method is never called and I get a NoClassDefFound error.
    Does anyone know why the findClass method is not called? Why do I receive a NoClassDefFound error instead of a ClassNotFound exception?
    Any clue welcome!

    I wrote this somewhere once... some people seemed to find it helpful....
    Back to the original question. You want to "unload" a class or set of classes from the VM. Alright, first we have to understand how classes are identified in the VM. A classes "Primary Key" if you will, is its fully qualified name, here it come.... AND a reference to the class loader that loaded it.
    So how do we use this information to unload and load some "plugin". Well we know we need to make our own classloader. You can either make your own custom extension, or you can use something like the URL classloader. Next we need to construct this classloader with the current classloader as it's parent. The current classloader might be the bootstrap, or it might be something else (Java Web Start)... This makes using not yet loaded classes in the "normal" classpath possible because the parent will find them. Looking closely we see a problem... If the "plugin" is in the classpath then the parent will just load it. Yeah, it will, so don't put it in the classpath. That's what the URL part of the URLClassloader is for. After all this, we can reflectively load our "plugin" which is located off of the classpath, with our custom classloader.
    Now, on to reloading. When a classloader, or class gets GCed has no impact at all on these methods. There could be a gig of classes in memory. If they didn't get loaded by classloader reference I'm holding, I don't care. Here's the idea of the reload. You create a new classloader, and then reflectively invoke the methods and classes you needed all over again. This causes them to be read into the VM again, because their "Primary Key" is different. You need to remember this though, and make sure your using the right classloader to get these classes.
    This does work. I have implemented it. I have a piece of software which generates java source code, compiles it, then runs it by a reflective invokation so I can control it. When the user changes something, I re-generate, re-compile, and reload the classes and run the new ones.
    enjoy

  • ClassNotFound exception, when load own Customizer

    I have own BooleanCustomizer that implements DescriptorCustomizer, it's packed in the same jar as entity classes. It's registered in persistence.xml:
    <property
         name="toplink.descriptor.customizer.MyEntityClass"
         value="jpa.util.BooleanCustomizer"/>
    Customizer works fine out of container - JUnit tests from Eclipse and Swing app. But in JSF app running on Tomcat, I get exception:
    oracle.toplink.essentials.exceptions.EntityManagerSetupException Exception Description: ClassNotFound: [jpa.util.BooleanCustomizer]
    It looks similar as:
    class not found exception - where to put custom session customizer?
    Any solution ?

    Which version are you using? A change was made recently to TopLink essentials to correct a classloader issue on session customizers.
    Cheers,
    Guy

  • Classloading Issues

    Given 3 deployed ears within the same weblogic 8.1sp4 server instance we try to pass a result object from ear1 to ear3 via ear2 (ear2 is basically a "heavyweight" facade for ear1).
    -Ear1 -> Ear2 --> Ear3
    ear2 and ear3 only know the interface implemented by the result object, the object itself gets instantiated in ear1. While unmarshalling and remote classloading of the result object works flawlessly in ear2, passing it on to ear3 causes a ClassNotFound exception in ear3 since the implementing class cannot be found.
    Where should the implementing class be loaded from in ear3 or is passing remotely loaded classes over various nodes impossible?
    Thanks in advance
    /cp

    Amethastos Lorekeeper <> writes:
    Looks like a bug to me, although how we would fix it I'm not sure.
    andy
    Given 3 deployed ears within the same weblogic 8.1sp4 server instance we try to pass a result object from ear1 to ear3 via ear2 (ear2 is basically a "heavyweight" facade for ear1).
    -Ear1 -> Ear2 --> Ear3
    ear2 and ear3 only know the interface implemented by the result object, the object itself gets instantiated in ear1. While unmarshalling and remote classloading of the result object works flawlessly in ear2, passing it on to ear3 causes a ClassNotFound exception in ear3 since the implementing class cannot be found.
    Where should the implementing class be loaded from in ear3 or is passing remotely loaded classes over various nodes impossible?
    Thanks in advance
    /cp

  • Custom Login Module - ClassNotFound

    Hello all
    I developed a custom login module following the instructions I found here: http://help.sap.com/saphelp_nw04/helpdata/en/46/3ce9402f3f8031e10000000a1550b0/frameset.htm
    The general purpose of my module is to "filter" the username and look for (using the UMFactory) the corresponding uniqueUserID.
    The problem is that my LoginModule cannot be loaded due to "ClassNotFound" Error which I see in the defaultTrace.
    My steps were:
    1. Create my LoginModuleImplementation
    2. Create a Library as stated in the tutorial. Additionally I added some more references to the Library (Logging, webservices_lib) and successfully deplyed it to the J2EE-Server. I can see the file in one folder (...../j2ee/cluster/server0/bin/ext/MyModuleLib/MyModule.jar) so I think it's been correctly deployed.
    3. I configured its usage in the securtiy provider-UserManagementPolicies and with security provider-policy-ticket.
    4. I also ran the configtool to added it to the ClassLoader property there
    I double- no, fourth-checked everything and it's spelled correctly and exactly (case-sensitive) as in NWDS.
    So, do you have any idea please?
    By the way: Do you know where I can set the Severity-Level for the LoginModul-Stack, so I get more informational messages?
    Regards
    Michael

    Hi,
    The problem was solved by using the name customer.com~com.customer.portal.login.IPRuleLibrary for the library (so basically look at the name of your library folder under cluster\j2ee\serverx\bin\ext , not the name reported by visual admin).
    Also I was able to modify the properties of the login module runtime, which made me very happy
    Dagfinn

Maybe you are looking for

  • DownLoadServices

    I am trying to use isResourceCached method. But even though my jar file is cached it always returb me false. I tried using null and empty string as version which is 2nd parameter to this method. Any ideas? I did not understand how do I use "part" API

  • How to enter a date stamp using formscentral?

    I've been trying to enter a date stamp using formscentral but have no such luck. Whenever I enter one in using acrobat pro I get the error that I don't have sufficent privleges due to adobe keeping the integrety of the form...Anybody have any ideas?

  • Tabbed panels no longer showing up

    Hi folks, for quite some time I have used the widge Spry Tabbed Panels 2.0 in this page: www.arrowmark.co.nz/clients  and on this pagehttp://tatlerprime.co.nz/conference.html but the tabs no longer show up and all the content is laid out vertically d

  • Print To Video HDV dropping out

    When I try to print to video from the computer to a Sony HDV 1080i deck it goes and conforms all the video then I start the process and it works fine until a certain spot and will go to black then back on again etc. I've tried this a few times and at

  • How to bind the bean and textfield which is written in html tages?

    Hi, I am doing the add row functinality using javascript. i am able to add the rows .but how can i bind the bean variables to the html code written in jsf applivation for example newQuotCell1[0].innerHTML='<input type=text class=TextField name="name'