Bootstrap Classloader Utility

I am trying to write an application launching utility that will behave somewhat how the Apache Tomcat Server does only for a single application.
The bootstrap class will be passed a string representing the path to the desired application. The bootstrap will then configure a URLClassLoader that includes any resources (jars and/or classes) found in a common/lib and common/classes directory. A second URLClassLoader is constructed with the application's specific jars and/or classes (based upon the string that was passed in). The first (or "common") ClassLoader is to be the parent of the app specific ClassLoader.
A common interface is used for each application that the bootstrap class then instantiates like this:
Class appClass = appLoader.loadClass(<fully-qualified classname here>);
appClass.newInstance();
Where appLoder is the URLClassLoader that has the "common" ClassLoader as its parent.
This much works great! But, my concrete application class that gets instantiated tries to use a class from a third-party vendor. This third-party class is in a jar file that resided in the common/lib directory (and was successfully loaded by the "common" ClassLoader). But, I get a NoClassDefFoundError thrown from within my application class.
How can I get my application's class to use the ClassLoader that loaded it? I have tried to pick through the Tomcat code to see how they are doing things, but quickly get lost in the complexity of a multi-threaded, multi-app container.
Any thoughts/suggestions would be greatly appreciated.

First (and maybe this is part of my problem), I'm not subclassing URLClassLoader. I am using it as is. Let me give you more detail. This is what the body of my Bootstrap class's main method currently looks (I've simplified it some, but still has same problem) like:
public static void main(String[] args) {
  ClassLoader commonLoader = null;
  ClassLoader frameworkLoader = null;
  try {
    // prepare the common class loader
    File[] classDir = { new File(".", "common" + File.separator + "bin")};
    File[] jarDir = { new File(".", "common" + File.separator + "lib") };
    commonLoader = ClassLoaderFactory.createClassLoader(classDir, jarDir, null);
    // prepare the framework class loader
    classDir[0] = new File(".", "bin");
    jarDir[0] = new File(".", "lib");
    frameworkLoader =     ClassLoaderFactory.createClassLoader(classDir, jarDir, commonLoader);
  } catch (Throwable t) {
    t.printStackTrace();
    System.exit(1);
  try {
    Class startupClass = frameworkLoader.loadClass("com.jaf.JafAppImpl");
    startupClass.newInstance();
  } catch (ClassNotFoundException e) {
    e.printStackTrace();
  } catch (InstantiationException e) {
    e.printStackTrace();
  } catch (IllegalAccessException e) {
    e.printStackTrace();
}The ClassLoaderFactory simly iterates across the File arrays buiding up a collection of URLs which ultimately get passed into the constructor of a URLClassLoader (not a subclass of one) and returns it. Again, as I mentioned before, this is loosely based on what I saw happening in Apache's Tomcat Bootstrap class. The third-party class/jar is located in the common/lib directory that gets picked up in the common ClassLoader. I have verified that it successfully found the jar by attempting to instantiate one of the third-party classes directly in the same manner as my framework class (loadClass/new Instance) and it works fine. But, my problem is that when I try and use that third-party class in the constructor of my framework class, it can't find the class' definition (NoClassDefFoundError).
Two assumptions that I've been making:
1) That my framework class will continue to use the ClassLoader that loaded it for any subsequent classes that it needs.
2) That I didn't have to subclass URLClassLoader because I can pass in all of the URLs that I need (and another parent ClassLoader) and it will first look in its (the framework ClassLoader) available URLs and if it can't find the class there, it will look in its parent (the common ClassLoader) URLs.
I see that you have suggested passing in ClassLoader.getSystemClassLoader() as a parent. I wasn't sure exactly how this would help, but I did try passing the system ClassLoader into my common ClassLoader as its parent and that did not help matters. However, your subclass of URLClassLoader is how I thought URLClassLoader worked internally anyway.
Hope I've helped clear up what I'm trying to do. Thanks again for your input.

Similar Messages

  • Oracle.classloader.util.AnnotatedNoClassDefFoundError

    I am trying to access my webservice from my application module and when i run it standalone it is running fine, but when i create data control out of it and use it from my jsp page it is throwing me this error.
    Any suggestion how to get rid of this.
    JBO-29000: Unexpected exception caught: oracle.classloader.util.AnnotatedNoClassDefFoundError, msg= Missing class: webservices.types.com.siebel.xml.order_interface.Orders Dependent class: java.lang.reflect.Array Loader: jre.bootstrap Code-Source: unknown Configuration: jre bootstrap

    I solved the problem by deleting the soft link myglobalclasses in the Workspace directory to myclasses directory .
    However not sure why this problem occurred

  • Oracle.classloader.util.AnnotatedNoClassDefFoundError Web Service Proxy

    I have seen this issue being posted a couple of times, but I have not seen any solution yet...
    I created a dynamic web service proxy using JDeveloper's dynamic proxy generation feature. I got it to work in both j2se and j2ee. However, when I tried to migrate the code to jdev on a different machine, I got this error:
    oracle.classloader.util.AnnotatedNoClassDefFoundError:
    Missing class: com.raytheon.winsight.proxy.StructureListType
    Dependent class: java.lang.reflect.Array
    Loader: jre.bootstrap
    Code-Source: unknown
    Configuration: jre bootstrap
    And the weird thing is that it works when I run it as a j2se executable, but does not work when I try to run it in a servlet. Does anyone have any idea? Thanks!

    I believe so. I am running it in my jdev environment with its own jdk/jre.
    Another thing I have noticed is that in the jdev environment that is not working for me, every time I attempt to launch the ws proxy, I get the following error:
    "2007-05-31 09:43:01.406 WARNING Warning: cannot load wsm config file: com/raytheon/winsight/proxy/runtime/WSEnumSvcSoap_Stub.xml
    2007-05-31 09:43:02.516 WARNING Warning: cannot load wsm config file: com/raytheon/winsight/proxy/runtime/WSDataSvcSoap_Stub.xml"
    I looked into my original jdev project that is working in the j2ee environment, and could not locate those two xml files...

  • Oracle.classloader.util.AnnotatedNoClassDefFoundError: Missing Class

    I have j2ee web service consumer, when I run it in embeded oc4j env, I get -
    oracle.classloader.util.AnnotatedNoClassDefFoundError:
         Missing class: com.krisco.webservice.node.SimpleUINode
         Dependent class: java.lang.reflect.Array
         Loader: jre.bootstrap
         Code-Source: unknown
         Configuration: jre bootstrap
         at oracle.classloader.PolicyClassLoader.handleClassNotFound (PolicyClassLoader.java:2051) [C:/java/jdev10g_j2ee/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@12]     at oracle.classloader.PolicyClassLoader.internalLoadClass (PolicyClassLoader.java:1665) [C:/java/jdev10g_j2ee/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@12]
    This only happens when the called method returns an array of complex type.
    Amazingly, it works fine with a j2se consumer with the same service (in the same jdev project!)
    I don't understand, what I am missing here. Any help is appreciated.
    Thanks in advance.

    Eric,
    I have already tried what you are suggesting, to the extent that I seperate the Proxy and j2eeConsumer into separate projects and made sure that WEB-INF/lib contains the Proxy.jar.
    It fails only when the operation (method) returns an array of complex-type. It works fine with operations returning complex-types. The problem seems to be with de-serialization.
    I think it is a bug in the IDE generated code. The entire J2EE consumer worked earlier, I think that after installing a few IDE-patches the trouble started.
    Thanks,
    Kris.

  • JAXB 2.1 w/JDK 6 Error. bootstrap classloader issue.

    When I run one of my JUnit tests, I get this error:
    JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/usr/local/netbeans-6.0/java1/modules/ext/jaxws21/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader.
    So, I copy jaxb-api.jar into /usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/endorsed/jaxb-impl.jar
    Then I get this error:
    JAXB 2.0 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/usr/lib/jvm/java-6-sun-1.6.0.03/jre/lib/endorsed/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.1 API
    OS: Ubuntu 7.10
    JVM: Sun 1.6.0.03
    IDE: NetBeans 6.0
    How do I resolve?

    This seems to be the answer: https://jaxb.dev.java.net/guide/Migrating_JAXB_2_0_applications_to_JavaSE_6.html#Using_JAXB_2_1_with_JavaSE_6
    Place the 2.1 jaxb-api.jar into $JRE_HOME/lib/endorsed. This essentially makes your JRE to "JRE 6 + JAXB 2.1". This won't affect any other applications that use this JRE, and it's easy. On the other hand, in various scenarios you may not be able to alter the JRE.

  • JAXB 2.1 API loaded from the bootstrap classloader, but it needs 2.2 API

    I am trying to deploy a Java web service into a Tomcat 5.5.20 server. I have the web service packaged in a .war file in Tomcat's webapps directory, and I can see that the .war file gets extracted when I start Tomcat.
    However, I get the following error when I start Tomcat:
    Apr 22, 2012 5:16:31 AM com.sun.xml.ws.transport.http.servlet.WSServletContextLstener contextInitialized
    INFO: WSSERVLET12: JAX-WS context listener initializing
    Apr 22, 2012 5:16:31 AM com.sun.xml.ws.transport.http.servlet.WSServletContextLstener parseAdaptersAndCreateDelegate
    SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.LinkageError: JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/home/username/WebNMS/apache/tomcat/webapps/WebServices/WEB-INF/lib/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.6.0/docs/guide/standards/)
    java.lang.LinkageError: JAXB 2.1 API is being loaded from the bootstrap classloader, but this RI (from jar:file:/home/username/WebNMS/apache/tomcat/webapps/WebServices/WEB-INF/lib/jaxb-impl.jar!/com/sun/xml/bind/v2/model/impl/ModelBuilder.class) needs 2.2 API. Use the endorsed directory mechanism to place jaxb-api.jar in the bootstrap classloader. (See http://java.sun.com/j2se/1.6.0/docs/guide/standards/)
    at com.sun.xml.bind.v2.model.impl.ModelBuilder.(ModelBuilder.java:178)
    In the /home/username/WebNMS/apache/tomcat/webapps/WebServices/WEB-INF/lib directory is where all the jar files from JAX-WS 2.2.6 are, including jaxb-api.jar.
    I already added "-Djava.endorsed.dirs=/home/username/WebNMS/apache/tomcat/webapps/WebServices/WEB-INF/lib" to the command that starts the WebNMS process that starts Tomcat, but that didn't help.
    Also, I tried adding a symbolic link called "endorsed" in the /home/username/WebNMS/jre/lib directory that points to /home/username/WebNMS/apache/tomcat/webapps/WebServices/WEB-INF/lib, and that didn't help either.
    One interesting thing is that when I do a "find /home/username/WebNMS -name jaxb-api.jar", it only finds the one jaxb-api.jar in the /home/username/WebNMS/apache/tomcat/webapps/WebServices/WEB-INF/lib directory. There are no other jaxb-api.jar files. So I don't know why the error is saying that the JAXB 2.1 API is being loaded, when there's only the JAXB 2.2.6 API jar file. Unless it's finding something outside the /home/username/WebNMS dir, but that shouldn't happen considering I tried 2 different ways to set up the endorsed dir.
    Edited by: sljava on Apr 26, 2012 4:10 PM

    This seems to be the answer: https://jaxb.dev.java.net/guide/Migrating_JAXB_2_0_applications_to_JavaSE_6.html#Using_JAXB_2_1_with_JavaSE_6
    Place the 2.1 jaxb-api.jar into $JRE_HOME/lib/endorsed. This essentially makes your JRE to "JRE 6 + JAXB 2.1". This won't affect any other applications that use this JRE, and it's easy. On the other hand, in various scenarios you may not be able to alter the JRE.

  • Error oracle.classloader.util.AnnotatedNoClassDefFoundError when using fop?

    Hallo,
    i want to use fop in my project.
    Doing this i've got:
    XML-25017 ...
    oracle.classloader.util.AnnotatedNoClassDefFoundError:
    Missing class: org.apache.fop.apps.Driver
    Dependent class: oracle.xml.xsql.serializerse.XSQLFOPSerializer
    Loader: adf.oracle.domain:10.1.3.1
    Code-Source: /opt/jdev101310/lib/xsqlserializers.jar
    Configuration: /home/asmus/jdevhome101310/system/oracle.j2ee.10.1.3.39.84/embedded-oc4j/config/server.xml
    The missing class is available from the following locations:
    /opt/jdev101310/fop-0.20.5/fop.jar
    I don't know to which place i must put the fop.jar that the system is finding it. I test some things but nothing works.
    Any help is appreciated.

    Hi Reiasmus,
    Have you added the fop.jar as a library to your project (JPR) - double-click the jpr, choose libraries....
    I've forgotten to to this in the past myself...
    John

  • Oracle.classloader.util.AnnotatedClassNotFoundException

    I have an application built that runs great with the embedded OC4J in JDeveloper but when I deploy it to a stand alone OC4J the server startup cannot see any of my EJBs. I get the following error for every EJB class:
    2007-06-22 10:12:05.144 WARNING oracle.classloader.util.AnnotatedClassNotFoundException:
    Missing class: com.emulex.interop.ejb.InteropSessionFacadeLocal
    Dependent class: oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor
    Loader: oracle.persistence:1.0
    Code-Source: /C:/OracleAS/toplink/jlib/toplink-essentials.jar
    Configuration: <code-source> in /C:/OracleAS/j2ee/home/config/server.xml
    This load was initiated at InteropApplication.root:0.0.1 using the loadClass() method.
    I have researched this error, found several references to this exception, but I still cannot find a real solution to my issue. What puzzles me is that it works fine embedded in JDeveloper, but not in stand alone server deployed from JDeveloper. The versions I am using for both are 10.1.3.2.
    Thanks for your help,
    Mike

    Hi Steve,
    I have emailed my ear file to you. Just for information for this posting, here are my persistence.xml and application.xml entries:
    <b>persistence.xml</b>
    <?xml version="1.0" encoding="windows-1252" ?>
    <persistence xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
    version="1.0" xmlns="http://java.sun.com/xml/ns/persistence">
        <persistence-unit name="Model"/>
    </persistence>
    <b>application.xml</b>
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <application 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/application_5.xsd" version="5" xmlns="http://java.sun.com/xml/ns/javaee">
        <display-name>InteropApplication</display-name>
            <module>
                <web>
                    <web-uri>ViewArchive.war</web-uri>
                    <context-root>Interop</context-root>
                </web>
            </module>
    </application>

  • Oracle.classloader.util.AnnotatedNoClassDefFoundError issue

    I am trying to run iexpense homepage through my pc. For that I have moved the entiire AP folder from JAVA_TOP to myclasses and MDS folder from APPL_TOP/Ap
    to myprojects folder. After running through different problems which I have fixed I am stuck now. Getting following message. I just dont know what is wrong as everything seems correct to me. Any help will be greatly appreciated.
    oracle.apps.fnd.framework.OAException: oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.classloader.util.AnnotatedNoClassDefFoundError, msg=
         Missing class: oracle.apps.fun.comcomp.contactUs.webui.ContactUsUtility
         Dependent class: oracle.apps.ap.oie.framework.webui.OIEPageCO
         Loader: current-workspace-app.web.APPS_HTML:0.0.0
         Code-Source: /C:/OAF/jdevhome/jdev/myclasses/
         Configuration: <classpath> in C:\OAF\jdevhome\jdev\myhtml\OA_HTML
    The missing class is not available from any code-source or loader in the system.
         at oracle.apps.fnd.framework.OAException.wrapperException(Unknown Source)
         at oracle.apps.fnd.framework.OAException.wrapperException(Unknown Source)
         at OAErrorPage.jspService(_OAErrorPage.java:80)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)
         at com.evermind.server.http.ServletRequestDispatcher.access$100(ServletRequestDispatcher.java:51)
         at com.evermind.server.http.ServletRequestDispatcher$2.oc4jRun(ServletRequestDispatcher.java:193)
         at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:283)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)
         at com.evermind.server.http.EvermindPageContext.handlePageThrowable(EvermindPageContext.java:847)
         at com.evermind.server.http.EvermindPageContext.handlePageException(EvermindPageContext.java:813)
         at OA.jspService(_OA.java:115)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
         at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
         at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
         at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
         at java.lang.Thread.run(Thread.java:595)
    ## Detail 0 ##
    oracle.classloader.util.AnnotatedNoClassDefFoundError:
         Missing class: oracle.apps.fun.comcomp.contactUs.webui.ContactUsUtility
         Dependent class: oracle.apps.ap.oie.framework.webui.OIEPageCO
         Loader: current-workspace-app.web.APPS_HTML:0.0.0
         Code-Source: /C:/OAF/jdevhome/jdev/myclasses/
         Configuration: <classpath> in C:\OAF\jdevhome\jdev\myhtml\OA_HTML
    The missing class is not available from any code-source or loader in the system.
         at oracle.classloader.PolicyClassLoader.handleClassNotFound (PolicyClassLoader.java:2068) [C:/OAF/jdevbin/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@14916158]
         at oracle.classloader.PolicyClassLoader.internalLoadClass (PolicyClassLoader.java:1679) [C:/OAF/jdevbin/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@14916158]
         at oracle.classloader.PolicyClassLoader.loadClass (PolicyClassLoader.java:1635) [C:/OAF/jdevbin/j2ee/home/lib/pcl.jar (from system property                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi,
    please check that the class file is there in myClasses folder in client
    oracle.apps.fun.comcomp.contactUs.webui.ContactUsUtility.
    Between, why do you want to run the files from client.. why can't you test it from the application only.
    Thanks,
    Gaurav

  • Oracle.classloader.util.AnnotatedLinkageError Exception

    I am having the following error when we deployed the application on Oracle Application Server 10.1.3 on AIX.
    It works Ok on my local OC4J and I can run off my JDeveloper also. Please help me. I am in big trouble. Thanks a lot.
    Exception:
    oracle.classloader.util.AnnotatedLinkageError: (_usermangement/_SecUserProfile_jspx) jsr inlining encountered too many jsrs in method 1 (_jspService(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V) at pc=65535
    Invalid class: usermangement.SecUserProfile_jspx
    Loader: MYAPP.web.MYAPPVIEW.jsp1866886982:0.0.0
    Code-Source: /asw/oracle/OracleAS_1/j2ee/emarsdev/application-deployments/MYAPP/MYAPPVIEW/persistence/_pages/
    Configuration: *.jsp in /asw/oracle/OracleAS_1/j2ee/emarsdev/application-deployments/MYAPP/MYAPPVIEW/persistence/_pages
    Dependent class: oracle.jsp.runtimev2.JspPageInfo
    Loader: oc4j:10.1.3
    Code-Source: /asw/oracle/OracleAS_1/j2ee/home/lib/ojsp.jar
    Configuration: <code-source> in META-INF/boot.xml in /asw/oracle/OracleAS_1/j2ee/home/oc4j.jar

    Can you try out creating a client for your EJB by right clicking the EJB in the application navigator and choosing the option to create a sample client.
    Then see if running that client works better and compare the code that was generated to yours.

  • Invocation error: oracle.classloader.util.AnnotatedClassNotFoundException:

    Hi - I get following error while Invoking EJB; could someone please guide here?
    I'm running OAS 10.1.3
    oracle.oc4j.rmi.OracleRemoteException: Invocation error: oracle.classloader.util.AnnotatedClassNotFoundException:
         Missing class: com.profitlogic.businessrulemgr.facade.BusinessRuleMgrFacadeHome
         Dependent class: oracle.oc4j.rmi.ServerRmiMethodCache
         Loader: oc4j:10.1.3
         Code-Source: /C:/product/10.1.3/OracleAS_1/j2ee/home/lib/oc4j-internal.jar
         Configuration: <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_1\j2ee\home\oc4j.jar
    This load was initiated at c4p.root:0.0.0 using the Class.forName() method.
    The missing class is available from the following locations:
         1. Code-Source: /C:/product/10.1.3/OracleAS_1/j2ee/home/applications/BusinessRuleMgr/businessrulemgr_intf.jar (from manifest of /C:/product/10.1.3/OracleAS_1/j2ee/home/applications/BusinessRuleMgr/businessrulemgr.jar)
         This code-source is available in loader BusinessRuleMgr.root:0.0.0.
         2. Code-Source: /C:/product/10.1.3/OracleAS_1/j2ee/home/applications/BusinessRuleMgr/businessrulemgr.jar (from <ejb> in C:\product\10.1.3\OracleAS_1\j2ee\home\applications\BusinessRuleMgr)
         This code-source is available in loader BusinessRuleMgr.root:0.0.0.
         3. Code-Source: /C:/product/10.1.3/OracleAS_1/j2ee/home/applications/price/lib/businessrulemgr_intf.jar (from manifest of /C:/product/10.1.3/OracleAS_1/j2ee/home/applications/price/p4pgui/)
         This code-source is available in loader price.web.p4pgui:0.0.0.
    ; nested exception is:
         oracle.classloader.util.AnnotatedClassNotFoundException:
         Missing class: com.profitlogic.businessrulemgr.facade.BusinessRuleMgrFacadeHome
         Dependent class: oracle.oc4j.rmi.ServerRmiMethodCache
         Loader: oc4j:10.1.3
         Code-Source: /C:/product/10.1.3/OracleAS_1/j2ee/home/lib/oc4j-internal.jar
         Configuration: <code-source> in META-INF/boot.xml in C:\product\10.1.3\OracleAS_1\j2ee\home\oc4j.jar
    This load was initiated at c4p.root:0.0.0 using the Class.forName() method.
    The missing class is available from the following locations:
         1. Code-Source: /C:/product/10.1.3/OracleAS_1/j2ee/home/applications/BusinessRuleMgr/businessrulemgr_intf.jar (from manifest of /C:/product/10.1.3/OracleAS_1/j2ee/home/applications/BusinessRuleMgr/businessrulemgr.jar)
         This code-source is available in loader BusinessRuleMgr.root:0.0.0.
         2. Code-Source: /C:/product/10.1.3/OracleAS_1/j2ee/home/applications/BusinessRuleMgr/businessrulemgr.jar (from <ejb> in C:\product\10.1.3\OracleAS_1\j2ee\home\applications\BusinessRuleMgr)
         This code-source is available in loader BusinessRuleMgr.root:0.0.0.
         3. Code-Source: /C:/product/10.1.3/OracleAS_1/j2ee/home/applications/price/lib/businessrulemgr_intf.jar (from manifest of /C:/product/10.1.3/OracleAS_1/j2ee/home/applications/price/p4pgui/)
         This code-source is available in loader price.web.p4pgui:0.0.0.

    The JDeveloper 11 preview does not currently support deployment to OAS 10.1.3.
    Regards,
    Ric

  • @Entity annotation bring oracle.classloader.util.AnnotatedNoClassDefFoundEr

    Hi,
    I try to deploy an app with spring3+JPA2(hibernate3.5) on a 10.1.3.3 OC4J server.
    As soon as i ass a class with @javax.persistence.Entity annotation deployment fail with:
    oracle.classloader.util.AnnotatedNoClassDefFoundError : missing class WEB-INF.classes.my.package.MyClass (wrong name my.package.MyClass)
    where my.package.MyClass is the class with @Entity.
    How can i deploy such an application?
    Is there a way to shutdown oracle annotation parsing on OC4J?
    Thanks

    I have a same trouble.
    How do you solved this problem...
    please help me..
    Message was edited by:
    kim57uak

  • Debugging bootstrap classloader

    Hi all,
    I am running into a problem where there is conflicts in the class loading of javax.xml.* classes when running with JDK 1.4.2. (1.3.1 doesn't have this problem as those classes are not part of JDK before 1.4.2).
    We have jaxp.jar in the path looked up by our application class loader, and we are seeing classes are loaded twice (once by App CL and once by bootstrap CL).
    I saw somewhere that there is a flag that can be specified to prevent boostrap CL from loading certain classes, does anyone know the details?
    Thanks
    Victor

    Hi all,
    I am running into a problem where there is conflicts in the class loading of javax.xml.* classes when running with JDK 1.4.2. (1.3.1 doesn't have this problem as those classes are not part of JDK before 1.4.2).
    We have jaxp.jar in the path looked up by our application class loader, and we are seeing classes are loaded twice (once by App CL and once by bootstrap CL).
    I saw somewhere that there is a flag that can be specified to prevent boostrap CL from loading certain classes, does anyone know the details?
    Thanks
    Victor

  • ClassLoader in Web Container

    I am having some problems some code that loads a resource using:
    ClassLoader.getSystemClassLoader().getResource(resourceToFind);where resourceToFind is the resource name as a String type.
    This works fine in when running from a command line, but not when running in a web container such as Tomcat.
    I understand that Tomcat has a heirarchy of ClassLoaders, and I would guess, on the following diagram, that I am using the System ClassLoader. So this means it will search also using the Bootstrap ClassLoader also, but not downwards towards the Common or Shared etc ClassLoader.
                          Bootstrap
                              |
                           System
                              |
                           Common
                     Catalina   Shared
                           Webapp1  Webapp2 ...Is there any way I can get an enumeration or something of these generically. I would like this code to work in an app from the command line, but also in various app servers etc too.
    I have taken a look at the JDK 1.3 source code for the java.util.ResourceBundle class, as this does what I would like to do, but it uses a native method to get the class context.

    Thanks, although one of the problems I have is that it is in a static context, such as:
    private static ClassLoader getClassLoader() {
        return ClassLoader.getSystemClassLoader();
    }

  • Making class available to bootstrap loader?  interesting twist.......

    We're deploying our jar wrapped in an exe (created by exe4j). It's not an option to unwrap the jar, but I want to make a particular class available to the bootstrap loader. If you're not familiar with exe4j, you can pass arguments to the jvm, so I can pass an -Xbootclasspath argument, but I have no idea how that works when the class is in a package in a jar in an exe. I've tried to pass arguments like -Xbootclasspath/a:com.organization.project.package.MyClass and of course it didn't work. Note that what I'm doing is security policy related, and I'd really prefer not to have this class outside of the wrapped jar.
    Is what I want to do actually possible? If so, what am I doing wrong?

    Erm, sorry for being unclear :s
    I'm doing my best to explain myself, please excuse me for not being a native english speaker ;)
    About showing more code, I wouldn't know which part to show : several classes are involved already, each of them weighing a couple hundred lines. That's why I prefer explaining rather than dropping unrevealing code snippets. :-x
    If from this description you know what piece of code interests you, I'll post it asap. Until then, here goes a shorter explanation of the situation.
    My custom ClassLoader loads .class entries from jar files using the java.util.jar package. I define those classes using defineClass(String name, byte[] b, int off, int len). At the same time entries from the jar file get processed, I list the classes which could or couldn't be loaded. The second list being empty once the jar is processed proved me the classes are well-loaded.
    Then I seek through the list of loaded ones for classes implementing AIPlayer, Player or other interfaces. My problem is that the classes implementing AIPlayer (c in my previous example) can't get assigned to AIPlayer though they can get assigned to Player, Player being a super-interface of AIPlayer.
    Additionnal information are : Player and AIPlayer are loaded by the bootstrap ClassLoader, the bootstrap ClassLoader being the parent of my custom ClassLoader's instance at some degree (it is either the parent or the parent of the parent).
    My question is : why can not a class implementing AIPlayer (and thus, Player) be assigned to AIPlayer, though it can be assigned to Player ?
    I hope I was clearer here. Thanks for lending me your time.

Maybe you are looking for

  • Multithreading in ADF Fusion web app - experience and risks ?

    We plan to hire mulithreading in our ADF web app. That's what is otherwise poorly written. Some say it is a bad practice, because the "server does not manage application's thread". Has anyone already implemented this in some way, and what are the exp

  • Restore macbook pro with apple "Backup 3.1.2" software.

    Last month my 12 and 17 inch powerbook G4 were stolen. I did have backups on 2 external hard drives. One was a manual back up (drag/drop) and the other I used the apple "backup 3.1.2" software. I was trying to restore my new macbook pro from the appl

  • How do I accept the End User License Agreement?

    Using Adobe Reader on Safari OSX 10.9.2.  Get error message "Before proceeding you must first launch Adobe Acrobat and accept the End User License Agreement.

  • Unable to confirm order

    hi gurus I created production order of 5 nos for one material. Here 2 are scrap and 3 are yield. but when I am trying to do final confirmation. System saying that under delivery is not allowed.( We set that configuration to show error). ie system is

  • How to change the way VLC starts up

    I have installed VLC via pacman, I would simply like to change it so it runs all the time with vlc --control lirc For example I have changed it in thunar when I open video files, it's fine, but some programs call the binary itself automatically (like