JVMPI class load event problem

Hi
I'm trying to write a simple profiler using JVM Profiler Interface to
display classes loaded while running my application.
For this, I have registered callback to notify two events
JVMPI_EVENT_CLASS_LOAD and JVMPI_EVENT_CLASS_LOAD_HOOK.
Now the problem is that, for some system classes which are loaded
initialy(during JVM initialization) I'm not getting
JVMPI_EVENT_CLASS_LOAD_HOOK event. However JVMPI_EVENT_CLASS_LOAD gets
called for each of them. ( I want .._LOAD_HOOK for all classes)
I gone through some documents/links which says that
JVMPI_EVENT_CLASS_LOAD_HOOK will be sent only after
JVMPI_EVENT_JVM_INIT_DONE event is sent.
I want JVMPI_EVENT_CLASS_LOAD_HOOK event for all classes, even they
are loaded before JVM initialization is complete.
Is there any way to achieve this? Any work arround?
I'm using J2SDK 1.4.2.
Thanks in advance
Rohan

I want JVMPI_EVENT_CLASS_LOAD_HOOK event for allThe JVMPI api was always experimantal. It has now been superseded by the JVM TI work done for Tiger as part of JSR-163.
This article describes the new API and how to make the transition:
The JVMPI Transition to JVMTI
http://java.sun.com/developer/technicalArticles/Programming/jvmpitransition/
Is there any way to achieve this? Any work arround?When your monitoring agent gets control after JVMTI_EVENT_VM_INIT, use the GetLoadedClasses method to return all of the classes loaded up to that point.
If you also request notification for all subsequently loaded classes (via JVMTI_EVENT_CLASS_FILE_LOAD_HOOK) then after suspending the VM you should have information on all classes loaded since the genesis of the VM.
The HPROF profiling agent was converted to use the new class loading notification mechanism. Refer to the
I'm using J2SDK 1.4.2.I suggest you update your project to use the new APIs provided with JSRs 163 and 174.

Similar Messages

  • Cocoon2 weblogic (5.1 sp6) class loader security problem

    Hello folks,
    System:
    Cocoon: v2.0
    JDK: Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C),
    Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
    OS: NT4 SP5
    Servlet: v2.2
    AppServer: Weblogic 5.1 SP6
    Symptoms:
    I've updated our application from Cocoon 1.7.4 to Cocoon2. After I
    figured out what libraries I need on the Weblogic's classpath, I managed
    to envoke the MyServlet (MyServlet extends CocoonServlet). The technique
    I am using is the one I used with the Cocoon v1.7.4: extend Cocoon
    servlet and wrap the HttpServletRequest in MyRequest to provide the XML
    content. I changed the line <map:generators default="request"> in
    sitemap.xmap to specify the location of the source. Configuration files
    seem to be read correctly and the file
    <myWebAppContext>/WEB-INF/_tmp_war/org/apache/cocoon/www/sitemap_xmap.java
    is generated (but there is no class file generated)!
    I looked at the cocoon.log file and looks like a class loader security
    problem: the \WEB-INF\_tmp_war gets locked! Is there any workaround this
    problem? Any help is much appreciated!
    cocoon.log file generated:
    DEBUG 62 [cocoon  ] (ExecuteThread-11): Using configuration file:
    /cocoon.xconf
    INFO 62 [cocoon  ] (ExecuteThread-11): Reloading from:
    file:D:/Programs/cocoon-1.8.2/samples/cocoon.xconf
    DEBUG 93 [cocoon  ] (ExecuteThread-11): New Cocoon object.
    DEBUG 93 [cocoon  ] (ExecuteThread-11): Using parser:
    org.apache.cocoon.components.parser.JaxpParser
    DEBUG 109 [cocoon  ] (ExecuteThread-11): Creating Repository with
    this directory: D:\programs\cocoon-1.8.2\samples\WEB-INF\_tmp_war
    DEBUG 109 [cocoon  ] (ExecuteThread-11): Classpath =
    D:\Programs\cocoon-1.8.2\samples\WEB-INF\classes;D:\Programs\cocoon-1.8.2\samples\WEB-INF\lib\javac.jar;D:\avue\lib\servlet.jar;D:\avue\lib\jaxp.jar;D:\avue\lib\xerces.jar;D:\avue\lib\xalan.jar;D:\avue\lib\cocoon.jar;D:\avue\lib\avalonapi.jar;D:\avue\lib\logkit.jar;D:\avue\lib\maybeupload.jar;D:\avue\lib\jakarta-regexp-1.2.jar;D:\avue\lib\jstyle.jar;D:\avue\lib\javac.jar;D:\weblogic\lib\weblogic510sp6boot.jar;D:\weblogic\classes\boot;
    DEBUG 109 [cocoon  ] (ExecuteThread-11): Work directory =
    D:\Programs\cocoon-1.8.2\samples\WEB-INF\_tmp_war
    DEBUG 125 [cocoon  ] (Thread-0): ComponentFactory creating new
    instance of org.apache.cocoon.components.parser.JaxpParser.
    DEBUG 140 [cocoon  ] (Thread-0): ComponentFactory creating new
    instance of org.apache.cocoon.components.parser.JaxpParser.
    DEBUG 140 [cocoon  ] (Thread-0): ComponentFactory creating new
    instance of org.apache.cocoon.components.parser.JaxpParser.
    DEBUG 140 [cocoon  ] (Thread-0): ComponentFactory creating new
    instance of org.apache.cocoon.components.parser.JaxpParser.
    DEBUG 390 [cocoon  ] (ExecuteThread-11): Root configuration:
    cocoon
    DEBUG 390 [cocoon  ] (ExecuteThread-11): Configuration version:
    2.0
    DEBUG 390 [cocoon  ] (ExecuteThread-11): Setting up components...
    DEBUG 406 [cocoon  ] (ExecuteThread-11): Adding component
    (org.apache.cocoon.components.parser.Parser =
    org.apache.cocoon.components.parser.JaxpParser)
    DEBUG 406 [cocoon  ] (ExecuteThread-11): Adding component
    (org.apache.cocoon.components.language.generator.ProgramGenerator =
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl)
    DEBUG 406 [cocoon  ] (ExecuteThread-11): Adding component
    (org.apache.cocoon.components.url.URLFactory =
    org.apache.cocoon.components.url.URLFactoryImpl)
    DEBUG 406 [cocoon  ] (ExecuteThread-11): Adding component
    (org.apache.cocoon.components.saxconnector.SAXConnector =
    org.apache.cocoon.components.saxconnector.NullSAXConnector)
    DEBUG 422 [cocoon  ] (ExecuteThread-11): Adding component
    (org.apache.avalon.util.datasource.DataSourceComponentSelector =
    org.apache.cocoon.components.CocoonComponentSelector)
    DEBUG 422 [cocoon  ] (ExecuteThread-11): Adding component
    (org.apache.avalon.util.pool.PoolController =
    org.apache.cocoon.components.ComponentPoolController)
    DEBUG 422 [cocoon  ] (ExecuteThread-11): Adding component
    (org.apache.cocoon.components.language.programming.ProgrammingLanguageSelector
    = org.apache.cocoon.components.CocoonComponentSelector)
    DEBUG 422 [cocoon  ] (ExecuteThread-11): Adding component
    (org.apache.cocoon.components.language.markup.MarkupLanguageSelector =
    org.apache.cocoon.components.CocoonComponentSelector)
    DEBUG 422 [cocoon  ] (ExecuteThread-11): Adding component
    (org.apache.cocoon.components.store.Store =
    org.apache.cocoon.components.store.MemoryStore)
    DEBUG 422 [cocoon  ] (ExecuteThread-11): Adding component
    (org.apache.cocoon.components.classloader.ClassLoaderManager =
    org.apache.cocoon.components.classloader.ClassLoaderManagerImpl)
    DEBUG 422 [cocoon  ] (ExecuteThread-11): Setting up the sitemap.
    DEBUG 422 [cocoon  ] (ExecuteThread-11): Sitemap location =
    sitemap.xmap
    DEBUG 703 [cocoon  ] (ExecuteThread-11): ComponentFactory creating
    new instance of org.apache.cocoon.components.url.URLFactoryImpl.
    DEBUG 703 [cocoon  ] (ExecuteThread-11): Getting the URLFactories
    DEBUG 703 [cocoon  ] (ExecuteThread-11): for protocol:
    resource org.apache.cocoon.components.url.ResourceURLFactory
    DEBUG 718 [cocoon  ] (ExecuteThread-11): for protocol: context
    org.apache.cocoon.components.url.ContextURLFactory
    DEBUG 718 [cocoon  ] (ExecuteThread-11): Beginning sitemap
    regeneration
    DEBUG 718 [cocoon  ] (ExecuteThread-11): Making URL from
    file:/D:/Programs/cocoon-1.8.2/samples/sitemap.xmap
    DEBUG 718 [cocoon  ] (Thread-1): ComponentFactory creating new
    instance of
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.
    DEBUG 718 [cocoon  ] (Thread-1): Could not find ComponentHandler,
    attempting to create one for role:
    org.apache.cocoon.components.language.generator.ServerPagesSelector
    DEBUG 718 [cocoon  ] (Thread-1): ComponentFactory creating new
    instance of
    org.apache.cocoon.components.language.generator.GeneratorSelector.
    DEBUG 718 [cocoon  ] (Thread-1): ComponentFactory creating new
    instance of
    org.apache.cocoon.components.classloader.ClassLoaderManagerImpl.
    DEBUG 718 [cocoon  ] (Thread-1): CocoonComponentSelector setting
    up with root element:
    DEBUG 718 [cocoon  ] (Thread-1): ComponentFactory creating new
    instance of org.apache.cocoon.components.CocoonComponentSelector.
    DEBUG 718 [cocoon  ] (Thread-1): CocoonComponentSelector setting
    up with root element: markup-languages
    DEBUG 734 [cocoon  ] (Thread-1): Adding
    org.apache.cocoon.components.language.markup.xsp.XSPMarkupLanguage for
    xsp
    DEBUG 734 [cocoon  ] (Thread-1): Adding
    org.apache.cocoon.components.language.markup.sitemap.SitemapMarkupLanguage
    for sitemap
    DEBUG 734 [cocoon  ] (Thread-1): ComponentFactory creating new
    instance of org.apache.cocoon.components.CocoonComponentSelector.
    DEBUG 734 [cocoon  ] (Thread-1): CocoonComponentSelector setting
    up with root element: programming-languages
    DEBUG 750 [cocoon  ] (Thread-1): ComponentFactory creating new
    instance of
    org.apache.cocoon.components.language.programming.java.JavaLanguage.
    DEBUG 750 [cocoon  ] (Thread-1): Looking up
    org.apache.cocoon.components.classloader.ClassLoaderManager
    DEBUG 750 [cocoon  ] (Thread-1): Setting the parameters
    DEBUG 750 [cocoon  ] (Thread-1): Adding
    org.apache.cocoon.components.language.programming.java.JavaLanguage for
    java
    DEBUG 765 [cocoon  ] (Thread-1): The instance was not accessible,
    creating it now.
    DEBUG 765 [cocoon  ] (Thread-1): ComponentFactory creating new
    instance of
    org.apache.cocoon.components.language.markup.sitemap.SitemapMarkupLanguage.
    DEBUG 1718 [cocoon  ] (Thread-1): Making URL from
    jar:file:/D:/avue/lib/cocoon.jar!/org/apache/cocoon/components/language/markup/sitemap/java/sitemap.xsl
    DEBUG 1718 [cocoon  ] (Thread-1): Logicsheet
    Used:jar:file:/D:/avue/lib/cocoon.jar!/org/apache/cocoon/components/language/markup/sitemap/java/sitemap.xsl
    WARN 4109 [cocoon  ] (Thread-1): Could not load class for program
    'org\apache\cocoon\www\sitemap_xmap'
    java.security.AccessControlException: access denied
    (java.io.FilePermission
    \D:\Programs\cocoon-1.8.2\samples\WEB-INF\_tmp_war\- read)
    at
    java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
    at
    java.security.AccessController.checkPermission(AccessController.java:399)
    at
    java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
    at java.net.URLClassLoader$5.run(URLClassLoader.java:463)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.getPermissions(URLClassLoader.java:461)
    at
    java.security.SecureClassLoader.getProtectionDomain(SecureClassLoader.java:162)
    at
    java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
    at
    org.apache.cocoon.components.classloader.ClassLoaderManagerImpl.loadClass(ClassLoaderManagerImpl.java:58)
    at
    org.apache.cocoon.components.language.programming.java.JavaLanguage.loadProgram(JavaLanguage.java:121)
    at
    org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage.java:119)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:245)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:163)
    at org.apache.cocoon.sitemap.Handler.run(Handler.java:173)
    at java.lang.Thread.run(Thread.java:484)
    DEBUG 4109 [cocoon  ] (Thread-1): Language Exception
    org.apache.cocoon.components.language.LanguageException: Could not load
    class for program 'org\apache\cocoon\www\sitemap_xmap' due to a
    java.security.AccessControlException: access denied
    (java.io.FilePermission
    \D:\Programs\cocoon-1.8.2\samples\WEB-INF\_tmp_war\- read)
    at
    org.apache.cocoon.components.language.programming.java.JavaLanguage.loadProgram(JavaLanguage.java:124)
    at
    org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage.java:119)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:245)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:163)
    at org.apache.cocoon.sitemap.Handler.run(Handler.java:173)
    at java.lang.Thread.run(Thread.java:484)
    DEBUG 4109 [cocoon  ] (Thread-1): ComponentFactory decommissioning
    instance of
    org.apache.cocoon.components.language.markup.sitemap.SitemapMarkupLanguage.
    DEBUG 4109 [cocoon  ] (Thread-1): Can't load ServerPage
    org.apache.avalon.ComponentManagerException: Could not add component for
    class: org.apache.cocoon.www.sitemap_xmap
    at
    org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerator(GeneratorSelector.java:61)
    at
    org.apache.cocoon.components.language.generator.GeneratorSelector.select(GeneratorSelector.java:50)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.select(ProgramGeneratorImpl.java:263)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:172)
    at org.apache.cocoon.sitemap.Handler.run(Handler.java:173)
    at java.lang.Thread.run(Thread.java:484)
    DEBUG 4109 [cocoon  ] (Thread-1): ComponentFactory creating new
    instance of
    org.apache.cocoon.components.language.markup.sitemap.SitemapMarkupLanguage.
    DEBUG 4359 [cocoon  ] (Thread-1): Making URL from
    jar:file:/D:/avue/lib/cocoon.jar!/org/apache/cocoon/components/language/markup/sitemap/java/sitemap.xsl
    DEBUG 4359 [cocoon  ] (Thread-1): Logicsheet
    Used:jar:file:/D:/avue/lib/cocoon.jar!/org/apache/cocoon/components/language/markup/sitemap/java/sitemap.xsl
    WARN 6109 [cocoon  ] (Thread-1): Could not load class for program
    'org\apache\cocoon\www\sitemap_xmap'
    java.security.AccessControlException: access denied
    (java.io.FilePermission
    \D:\Programs\cocoon-1.8.2\samples\WEB-INF\_tmp_war\- read)
    at
    java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
    at
    java.security.AccessController.checkPermission(AccessController.java:399)
    at
    java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
    at java.net.URLClassLoader$5.run(URLClassLoader.java:463)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.getPermissions(URLClassLoader.java:461)
    at
    java.security.SecureClassLoader.getProtectionDomain(SecureClassLoader.java:162)
    at
    java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
    at
    org.apache.cocoon.components.classloader.ClassLoaderManagerImpl.loadClass(ClassLoaderManagerImpl.java:58)
    at
    org.apache.cocoon.components.language.programming.java.JavaLanguage.loadProgram(JavaLanguage.java:121)
    at
    org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage.java:119)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:245)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:210)
    at org.apache.cocoon.sitemap.Handler.run(Handler.java:173)
    at java.lang.Thread.run(Thread.java:484)
    DEBUG 6109 [cocoon  ] (Thread-1): Language Exception
    org.apache.cocoon.components.language.LanguageException: Could not load
    class for program 'org\apache\cocoon\www\sitemap_xmap' due to a
    java.security.AccessControlException: access denied
    (java.io.FilePermission
    \D:\Programs\cocoon-1.8.2\samples\WEB-INF\_tmp_war\- read)
    at
    org.apache.cocoon.components.language.programming.java.JavaLanguage.loadProgram(JavaLanguage.java:124)
    at
    org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage.java:119)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:245)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:210)
    at org.apache.cocoon.sitemap.Handler.run(Handler.java:173)
    at java.lang.Thread.run(Thread.java:484)
    DEBUG 6109 [cocoon  ] (Thread-1): ComponentFactory decommissioning
    instance of
    org.apache.cocoon.components.language.markup.sitemap.SitemapMarkupLanguage.
    ERROR 6109 [cocoon  ] (Thread-1): Error compiling sitemap
    org.apache.avalon.ComponentManagerException: Could not add component for
    class: org.apache.cocoon.www.sitemap_xmap
    at
    org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerator(GeneratorSelector.java:61)
    at
    org.apache.cocoon.components.language.generator.GeneratorSelector.select(GeneratorSelector.java:50)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.select(ProgramGeneratorImpl.java:263)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:219)
    at org.apache.cocoon.sitemap.Handler.run(Handler.java:173)
    at java.lang.Thread.run(Thread.java:484)
    DEBUG 6109 [cocoon  ] (ExecuteThread-11): Changing Cocoon
    context(sitemap.xmap) to prefix()
    DEBUG 6109 [cocoon  ] (ExecuteThread-11): from
    context(file:/D:/Programs/cocoon-1.8.2/samples/) and prefix()
    DEBUG 6109 [cocoon  ] (ExecuteThread-11): at URI
    DEBUG 6109 [cocoon  ] (ExecuteThread-11): New context is
    file:/D:/Programs/cocoon-1.8.2/samples/
    ERROR 6140 [cocoon  ] (ExecuteThread-11): Problem with servlet
    org.apache.cocoon.ProcessingException: The sitemap handler's sitemap is
    not available.
    at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:106)
    at org.apache.cocoon.Cocoon.process(Cocoon.java:218)
    at
    org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:417)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:123)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:761)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:708)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:252)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:346)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:246)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)
    INFO 6187 [cocoon  ] (ExecuteThread-11): '' Processed by Apache
    Cocoon 2.0a4 in 5.75 seconds.
    ================================================================
    Regards,
    Georgi

    Hello folks,
    System:
    Cocoon: v2.0
    JDK: Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0-C),
    Java HotSpot(TM) Client VM (build 1.3.0-C, mixed mode)
    OS: NT4 SP5
    Servlet: v2.2
    AppServer: Weblogic 5.1 SP6
    Symptoms:
    I've updated our application from Cocoon 1.7.4 to Cocoon2. After I
    figured out what libraries I need on the Weblogic's classpath, I managed
    to envoke the MyServlet (MyServlet extends CocoonServlet). The technique
    I am using is the one I used with the Cocoon v1.7.4: extend Cocoon
    servlet and wrap the HttpServletRequest in MyRequest to provide the XML
    content. I changed the line <map:generators default="request"> in
    sitemap.xmap to specify the location of the source. Configuration files
    seem to be read correctly and the file
    <myWebAppContext>/WEB-INF/_tmp_war/org/apache/cocoon/www/sitemap_xmap.java
    is generated (but there is no class file generated)!
    I looked at the cocoon.log file and looks like a class loader security
    problem: the \WEB-INF\_tmp_war gets locked! Is there any workaround this
    problem? Any help is much appreciated!
    cocoon.log file generated:
    DEBUG 62 [cocoon  ] (ExecuteThread-11): Using configuration file:
    /cocoon.xconf
    INFO 62 [cocoon  ] (ExecuteThread-11): Reloading from:
    file:D:/Programs/cocoon-1.8.2/samples/cocoon.xconf
    DEBUG 93 [cocoon  ] (ExecuteThread-11): New Cocoon object.
    DEBUG 93 [cocoon  ] (ExecuteThread-11): Using parser:
    org.apache.cocoon.components.parser.JaxpParser
    DEBUG 109 [cocoon  ] (ExecuteThread-11): Creating Repository with
    this directory: D:\programs\cocoon-1.8.2\samples\WEB-INF\_tmp_war
    DEBUG 109 [cocoon  ] (ExecuteThread-11): Classpath =
    D:\Programs\cocoon-1.8.2\samples\WEB-INF\classes;D:\Programs\cocoon-1.8.2\samples\WEB-INF\lib\javac.jar;D:\avue\lib\servlet.jar;D:\avue\lib\jaxp.jar;D:\avue\lib\xerces.jar;D:\avue\lib\xalan.jar;D:\avue\lib\cocoon.jar;D:\avue\lib\avalonapi.jar;D:\avue\lib\logkit.jar;D:\avue\lib\maybeupload.jar;D:\avue\lib\jakarta-regexp-1.2.jar;D:\avue\lib\jstyle.jar;D:\avue\lib\javac.jar;D:\weblogic\lib\weblogic510sp6boot.jar;D:\weblogic\classes\boot;
    DEBUG 109 [cocoon  ] (ExecuteThread-11): Work directory =
    D:\Programs\cocoon-1.8.2\samples\WEB-INF\_tmp_war
    DEBUG 125 [cocoon  ] (Thread-0): ComponentFactory creating new
    instance of org.apache.cocoon.components.parser.JaxpParser.
    DEBUG 140 [cocoon  ] (Thread-0): ComponentFactory creating new
    instance of org.apache.cocoon.components.parser.JaxpParser.
    DEBUG 140 [cocoon  ] (Thread-0): ComponentFactory creating new
    instance of org.apache.cocoon.components.parser.JaxpParser.
    DEBUG 140 [cocoon  ] (Thread-0): ComponentFactory creating new
    instance of org.apache.cocoon.components.parser.JaxpParser.
    DEBUG 390 [cocoon  ] (ExecuteThread-11): Root configuration:
    cocoon
    DEBUG 390 [cocoon  ] (ExecuteThread-11): Configuration version:
    2.0
    DEBUG 390 [cocoon  ] (ExecuteThread-11): Setting up components...
    DEBUG 406 [cocoon  ] (ExecuteThread-11): Adding component
    (org.apache.cocoon.components.parser.Parser =
    org.apache.cocoon.components.parser.JaxpParser)
    DEBUG 406 [cocoon  ] (ExecuteThread-11): Adding component
    (org.apache.cocoon.components.language.generator.ProgramGenerator =
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl)
    DEBUG 406 [cocoon  ] (ExecuteThread-11): Adding component
    (org.apache.cocoon.components.url.URLFactory =
    org.apache.cocoon.components.url.URLFactoryImpl)
    DEBUG 406 [cocoon  ] (ExecuteThread-11): Adding component
    (org.apache.cocoon.components.saxconnector.SAXConnector =
    org.apache.cocoon.components.saxconnector.NullSAXConnector)
    DEBUG 422 [cocoon  ] (ExecuteThread-11): Adding component
    (org.apache.avalon.util.datasource.DataSourceComponentSelector =
    org.apache.cocoon.components.CocoonComponentSelector)
    DEBUG 422 [cocoon  ] (ExecuteThread-11): Adding component
    (org.apache.avalon.util.pool.PoolController =
    org.apache.cocoon.components.ComponentPoolController)
    DEBUG 422 [cocoon  ] (ExecuteThread-11): Adding component
    (org.apache.cocoon.components.language.programming.ProgrammingLanguageSelector
    = org.apache.cocoon.components.CocoonComponentSelector)
    DEBUG 422 [cocoon  ] (ExecuteThread-11): Adding component
    (org.apache.cocoon.components.language.markup.MarkupLanguageSelector =
    org.apache.cocoon.components.CocoonComponentSelector)
    DEBUG 422 [cocoon  ] (ExecuteThread-11): Adding component
    (org.apache.cocoon.components.store.Store =
    org.apache.cocoon.components.store.MemoryStore)
    DEBUG 422 [cocoon  ] (ExecuteThread-11): Adding component
    (org.apache.cocoon.components.classloader.ClassLoaderManager =
    org.apache.cocoon.components.classloader.ClassLoaderManagerImpl)
    DEBUG 422 [cocoon  ] (ExecuteThread-11): Setting up the sitemap.
    DEBUG 422 [cocoon  ] (ExecuteThread-11): Sitemap location =
    sitemap.xmap
    DEBUG 703 [cocoon  ] (ExecuteThread-11): ComponentFactory creating
    new instance of org.apache.cocoon.components.url.URLFactoryImpl.
    DEBUG 703 [cocoon  ] (ExecuteThread-11): Getting the URLFactories
    DEBUG 703 [cocoon  ] (ExecuteThread-11): for protocol:
    resource org.apache.cocoon.components.url.ResourceURLFactory
    DEBUG 718 [cocoon  ] (ExecuteThread-11): for protocol: context
    org.apache.cocoon.components.url.ContextURLFactory
    DEBUG 718 [cocoon  ] (ExecuteThread-11): Beginning sitemap
    regeneration
    DEBUG 718 [cocoon  ] (ExecuteThread-11): Making URL from
    file:/D:/Programs/cocoon-1.8.2/samples/sitemap.xmap
    DEBUG 718 [cocoon  ] (Thread-1): ComponentFactory creating new
    instance of
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.
    DEBUG 718 [cocoon  ] (Thread-1): Could not find ComponentHandler,
    attempting to create one for role:
    org.apache.cocoon.components.language.generator.ServerPagesSelector
    DEBUG 718 [cocoon  ] (Thread-1): ComponentFactory creating new
    instance of
    org.apache.cocoon.components.language.generator.GeneratorSelector.
    DEBUG 718 [cocoon  ] (Thread-1): ComponentFactory creating new
    instance of
    org.apache.cocoon.components.classloader.ClassLoaderManagerImpl.
    DEBUG 718 [cocoon  ] (Thread-1): CocoonComponentSelector setting
    up with root element:
    DEBUG 718 [cocoon  ] (Thread-1): ComponentFactory creating new
    instance of org.apache.cocoon.components.CocoonComponentSelector.
    DEBUG 718 [cocoon  ] (Thread-1): CocoonComponentSelector setting
    up with root element: markup-languages
    DEBUG 734 [cocoon  ] (Thread-1): Adding
    org.apache.cocoon.components.language.markup.xsp.XSPMarkupLanguage for
    xsp
    DEBUG 734 [cocoon  ] (Thread-1): Adding
    org.apache.cocoon.components.language.markup.sitemap.SitemapMarkupLanguage
    for sitemap
    DEBUG 734 [cocoon  ] (Thread-1): ComponentFactory creating new
    instance of org.apache.cocoon.components.CocoonComponentSelector.
    DEBUG 734 [cocoon  ] (Thread-1): CocoonComponentSelector setting
    up with root element: programming-languages
    DEBUG 750 [cocoon  ] (Thread-1): ComponentFactory creating new
    instance of
    org.apache.cocoon.components.language.programming.java.JavaLanguage.
    DEBUG 750 [cocoon  ] (Thread-1): Looking up
    org.apache.cocoon.components.classloader.ClassLoaderManager
    DEBUG 750 [cocoon  ] (Thread-1): Setting the parameters
    DEBUG 750 [cocoon  ] (Thread-1): Adding
    org.apache.cocoon.components.language.programming.java.JavaLanguage for
    java
    DEBUG 765 [cocoon  ] (Thread-1): The instance was not accessible,
    creating it now.
    DEBUG 765 [cocoon  ] (Thread-1): ComponentFactory creating new
    instance of
    org.apache.cocoon.components.language.markup.sitemap.SitemapMarkupLanguage.
    DEBUG 1718 [cocoon  ] (Thread-1): Making URL from
    jar:file:/D:/avue/lib/cocoon.jar!/org/apache/cocoon/components/language/markup/sitemap/java/sitemap.xsl
    DEBUG 1718 [cocoon  ] (Thread-1): Logicsheet
    Used:jar:file:/D:/avue/lib/cocoon.jar!/org/apache/cocoon/components/language/markup/sitemap/java/sitemap.xsl
    WARN 4109 [cocoon  ] (Thread-1): Could not load class for program
    'org\apache\cocoon\www\sitemap_xmap'
    java.security.AccessControlException: access denied
    (java.io.FilePermission
    \D:\Programs\cocoon-1.8.2\samples\WEB-INF\_tmp_war\- read)
    at
    java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
    at
    java.security.AccessController.checkPermission(AccessController.java:399)
    at
    java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
    at java.net.URLClassLoader$5.run(URLClassLoader.java:463)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.getPermissions(URLClassLoader.java:461)
    at
    java.security.SecureClassLoader.getProtectionDomain(SecureClassLoader.java:162)
    at
    java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
    at
    org.apache.cocoon.components.classloader.ClassLoaderManagerImpl.loadClass(ClassLoaderManagerImpl.java:58)
    at
    org.apache.cocoon.components.language.programming.java.JavaLanguage.loadProgram(JavaLanguage.java:121)
    at
    org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage.java:119)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:245)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:163)
    at org.apache.cocoon.sitemap.Handler.run(Handler.java:173)
    at java.lang.Thread.run(Thread.java:484)
    DEBUG 4109 [cocoon  ] (Thread-1): Language Exception
    org.apache.cocoon.components.language.LanguageException: Could not load
    class for program 'org\apache\cocoon\www\sitemap_xmap' due to a
    java.security.AccessControlException: access denied
    (java.io.FilePermission
    \D:\Programs\cocoon-1.8.2\samples\WEB-INF\_tmp_war\- read)
    at
    org.apache.cocoon.components.language.programming.java.JavaLanguage.loadProgram(JavaLanguage.java:124)
    at
    org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage.java:119)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:245)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:163)
    at org.apache.cocoon.sitemap.Handler.run(Handler.java:173)
    at java.lang.Thread.run(Thread.java:484)
    DEBUG 4109 [cocoon  ] (Thread-1): ComponentFactory decommissioning
    instance of
    org.apache.cocoon.components.language.markup.sitemap.SitemapMarkupLanguage.
    DEBUG 4109 [cocoon  ] (Thread-1): Can't load ServerPage
    org.apache.avalon.ComponentManagerException: Could not add component for
    class: org.apache.cocoon.www.sitemap_xmap
    at
    org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerator(GeneratorSelector.java:61)
    at
    org.apache.cocoon.components.language.generator.GeneratorSelector.select(GeneratorSelector.java:50)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.select(ProgramGeneratorImpl.java:263)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:172)
    at org.apache.cocoon.sitemap.Handler.run(Handler.java:173)
    at java.lang.Thread.run(Thread.java:484)
    DEBUG 4109 [cocoon  ] (Thread-1): ComponentFactory creating new
    instance of
    org.apache.cocoon.components.language.markup.sitemap.SitemapMarkupLanguage.
    DEBUG 4359 [cocoon  ] (Thread-1): Making URL from
    jar:file:/D:/avue/lib/cocoon.jar!/org/apache/cocoon/components/language/markup/sitemap/java/sitemap.xsl
    DEBUG 4359 [cocoon  ] (Thread-1): Logicsheet
    Used:jar:file:/D:/avue/lib/cocoon.jar!/org/apache/cocoon/components/language/markup/sitemap/java/sitemap.xsl
    WARN 6109 [cocoon  ] (Thread-1): Could not load class for program
    'org\apache\cocoon\www\sitemap_xmap'
    java.security.AccessControlException: access denied
    (java.io.FilePermission
    \D:\Programs\cocoon-1.8.2\samples\WEB-INF\_tmp_war\- read)
    at
    java.security.AccessControlContext.checkPermission(AccessControlContext.java:272)
    at
    java.security.AccessController.checkPermission(AccessController.java:399)
    at
    java.lang.SecurityManager.checkPermission(SecurityManager.java:545)
    at java.net.URLClassLoader$5.run(URLClassLoader.java:463)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.getPermissions(URLClassLoader.java:461)
    at
    java.security.SecureClassLoader.getProtectionDomain(SecureClassLoader.java:162)
    at
    java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
    at
    org.apache.cocoon.components.classloader.ClassLoaderManagerImpl.loadClass(ClassLoaderManagerImpl.java:58)
    at
    org.apache.cocoon.components.language.programming.java.JavaLanguage.loadProgram(JavaLanguage.java:121)
    at
    org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage.java:119)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:245)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:210)
    at org.apache.cocoon.sitemap.Handler.run(Handler.java:173)
    at java.lang.Thread.run(Thread.java:484)
    DEBUG 6109 [cocoon  ] (Thread-1): Language Exception
    org.apache.cocoon.components.language.LanguageException: Could not load
    class for program 'org\apache\cocoon\www\sitemap_xmap' due to a
    java.security.AccessControlException: access denied
    (java.io.FilePermission
    \D:\Programs\cocoon-1.8.2\samples\WEB-INF\_tmp_war\- read)
    at
    org.apache.cocoon.components.language.programming.java.JavaLanguage.loadProgram(JavaLanguage.java:124)
    at
    org.apache.cocoon.components.language.programming.CompiledProgrammingLanguage.load(CompiledProgrammingLanguage.java:119)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.generateResource(ProgramGeneratorImpl.java:245)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:210)
    at org.apache.cocoon.sitemap.Handler.run(Handler.java:173)
    at java.lang.Thread.run(Thread.java:484)
    DEBUG 6109 [cocoon  ] (Thread-1): ComponentFactory decommissioning
    instance of
    org.apache.cocoon.components.language.markup.sitemap.SitemapMarkupLanguage.
    ERROR 6109 [cocoon  ] (Thread-1): Error compiling sitemap
    org.apache.avalon.ComponentManagerException: Could not add component for
    class: org.apache.cocoon.www.sitemap_xmap
    at
    org.apache.cocoon.components.language.generator.GeneratorSelector.addGenerator(GeneratorSelector.java:61)
    at
    org.apache.cocoon.components.language.generator.GeneratorSelector.select(GeneratorSelector.java:50)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.select(ProgramGeneratorImpl.java:263)
    at
    org.apache.cocoon.components.language.generator.ProgramGeneratorImpl.load(ProgramGeneratorImpl.java:219)
    at org.apache.cocoon.sitemap.Handler.run(Handler.java:173)
    at java.lang.Thread.run(Thread.java:484)
    DEBUG 6109 [cocoon  ] (ExecuteThread-11): Changing Cocoon
    context(sitemap.xmap) to prefix()
    DEBUG 6109 [cocoon  ] (ExecuteThread-11): from
    context(file:/D:/Programs/cocoon-1.8.2/samples/) and prefix()
    DEBUG 6109 [cocoon  ] (ExecuteThread-11): at URI
    DEBUG 6109 [cocoon  ] (ExecuteThread-11): New context is
    file:/D:/Programs/cocoon-1.8.2/samples/
    ERROR 6140 [cocoon  ] (ExecuteThread-11): Problem with servlet
    org.apache.cocoon.ProcessingException: The sitemap handler's sitemap is
    not available.
    at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:106)
    at org.apache.cocoon.Cocoon.process(Cocoon.java:218)
    at
    org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:417)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:123)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:761)
    at
    weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImpl.java:708)
    at
    weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContextManager.java:252)
    at
    weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:346)
    at
    weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:246)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)
    INFO 6187 [cocoon  ] (ExecuteThread-11): '' Processed by Apache
    Cocoon 2.0a4 in 5.75 seconds.
    ================================================================
    Regards,
    Georgi

  • Dynamic class loading. *Problem*

    Hi.
    This is a strange one:
    I'm compiling a java file dynamically and i try to load it using the current class loader. The usual way to do so is- this.getClass().getClassLoader() etc.
    Now the strange part: the class loader is looking for the class file only in the class-path in which the java application was first run. There is no way to tell it to look in other directories, including the user current directory!
    Changing the System properties of class path and library path do not help. The loader just remembers the initial class path and looks only there. It can't be told to look anywhere else!
    Anyone has any idea how to make it look elsewhere ???? is it possible ???
    Thanks!
    Gil

    2. i need to load the class to the same JVM (i.e. to
    the same environment) of the current running
    aplication, so that when the loaded class is run, it
    would be able to invoke methods on it!!!
    ClassLoader(s) do this. Try the URLClassLoader.
    (I was talking about relatively esoteric "security"
    issues when I mentioned the stuff about Class objects
    "scope".) You might use the URLClassLoader kind of
    like this.
    Pseudo-code follows:
    // setup the class loader
    URL[] urls = new URL[1];
    urls[0] = new URL("/path/to/dynamic/classes");
    URLClassLoader ucl = new URLClassLoader(urls);
    // load a class & use make an object with the default constructor
    Object tmp = ucl.loadClass("dynamic.class.name").newInstance();
    // Cast the object to a know interface so that you can use it.
    // This may be used to further determine which interface to cast
    // the class to. Or it may simply be the interface to which all
    // dynamic classes have to conform in your program.
    InterfaceImplementedByDynamicClass loadedObj =
        (InterfaceImplementedByDynamicClass)tmp;It's really not as hard as it sounds, just write a little test of
    this and you will see how it works.

  • Problem in Class Loading

    I am using Sun implementation of JAXB(jaxb-api.jar) for java-to-xml binding in my web application deployed in the latest version of oracle app server(10g release 3). The web server is loading Oracle implementation of JAXB from the shared archive xml.jar. To direct the web server to load application specific JAXB classes, I have used the property(<web-app-class-loader search-local-classes-first="true" include-war-manifest-class-path="false" />) in the deployment description - orion.xml file. But it does not solve the problem!
    Thanks & regards

    Hi,
    Refer to this link on OC4J's Classloading Framework... http://download-east.oracle.com/docs/cd/B25221_04/web.1013/b14433/classload.htm#sthref58 there are a couple of options you may be able to employ, including overriding the shared library - there is an example of doing this with the Oracle XML parser and Xerces.
    I'm guessing you're on the right track, but you may want to try include-war-manifest-class-path="true". Also, are you sure that you've got your deployment descriptor file defined correctly? Its normally called orion-application.xml, and that particular element isn't defined in the documentation (http://download-east.oracle.com/docs/cd/B25221_04/web.1013/b14433/descriptors.htm#sthref337). You could always try configuring it through the administration console.

  • Application Class Loader problem calling virtual function

    Hello everyone
    I have run in to very strange behavior of JVM
    I have created a class loader which allows my to load classes from
    jar file, regardless that URLClassLoader supplies this functionality.
    I am using this class loader to load some classes and call their virtual functions. The class diagram looks like that:
    public interface I {
       public void init();
    public class AAA implements
       public void init(){
    public class BBB extends AAA{
       public void init(){
          //here comes implementation
    }Interface I and class AAA are loaded with System Class loader and Class BBB is loaded using my class loader from jar file.
    ByteStreamClassLoader  classLoader =  new ByteStreamClassLoader  ();
    Class cl = classLoader. loadClass(�com.product.BBB�,true);
    I myInterface = cl.newInstance();
    myInterface.init();The problem is that from some unknown reason java class AAA.init() instead of BBB.init().
    Can somebody help me what am I doing wrong?
    Class Loader code attached below
      public class ByteStreamClassLoader   extends ClassLoader {
        protected HashMap m_cache = new HashMap();
        public void clearCashe() {
          m_cache = new HashMap();
        private String definePackage(String className) {
          StringBuilder strB = new StringBuilder();
          //Class name must be removed from the URI in order to define a package
          String[] packageArray = className.split("\\.");
          for (int i = 0; i < packageArray.length - 1; i++) {
            strB.append(packageArray).append(".");
    String packageName = strB.toString();
    packageName = packageName.substring(0, packageName.length() - 1);
    if (getPackage(packageName) == null) {
    m_logger.log(Level.FINEST, "Defining package '" + packageName + "'");
    definePackage(packageName, null, null, null, null, null, null, null);
    return packageName;
    public synchronized Class loadClass(String name, boolean resolve) throws
    ClassNotFoundException {
    name = name.replaceAll("/", ".").replaceAll(".class", "");
    //Try to locate the Class in cashe
    Class c = (Class) m_cache.get(name);
    //Try to locate the Class in the System Class Loader
    if (c == null) {
    try {
    c = ClassLoader.getSystemClassLoader().loadClass(name);
    catch (Exception ex) {}
    else {
    m_logger.log(Level.FINEST, "Class '" + name + "' found in cache");
    //Load the class from byte array
    if (c == null) {
    String resourceName = name;
    if (!resourceName.endsWith(".class")) {
    resourceName = resourceName.concat(".class");
    //Retrieve class byte representation
    if (resourceName.indexOf(".") != -1) {
    resourceName =
    resourceName.replaceAll("\\.", "/").replaceAll("/class", ".class");
    //Use the ByteStreamClassLoader to load the class from byte array
    byte[] classByteArray = null;
    try {
    classByteArray = getResourceBytes(resourceName);
    catch (IOException ex1) {
    throw new ClassNotFoundException(
    "Could not load class data." + ex1.getMessage());
    m_logger.log(
    Level.FINEST, "Loading class '" +
    name + "' Byte Length: " + classByteArray.length);
    String p = definePackage(name);
    c = defineClass(
    name,
    classByteArray,
    0,
    classByteArray.length,
    ByteStreamClassLoader.class.getProtectionDomain());
    m_cache.put(name, c);
    if (resolve) {
    resolveClass(c);
    return c;

    Hello everyone
    I have run in to very strange behavior of JVM
    I have created a class loader which allows my to load classes from
    jar file, regardless that URLClassLoader supplies this functionality.
    I am using this class loader to load some classes and call their virtual functions. The class diagram looks like that:
    public interface I {
       public void init();
    public class AAA implements
       public void init(){
    public class BBB extends AAA{
       public void init(){
          //here comes implementation
    }Interface I and class AAA are loaded with System Class loader and Class BBB is loaded using my class loader from jar file.
    ByteStreamClassLoader  classLoader =  new ByteStreamClassLoader  ();
    Class cl = classLoader. loadClass(�com.product.BBB�,true);
    I myInterface = cl.newInstance();
    myInterface.init();The problem is that from some unknown reason java class AAA.init() instead of BBB.init().
    Can somebody help me what am I doing wrong?
    Class Loader code attached below
      public class ByteStreamClassLoader   extends ClassLoader {
        protected HashMap m_cache = new HashMap();
        public void clearCashe() {
          m_cache = new HashMap();
        private String definePackage(String className) {
          StringBuilder strB = new StringBuilder();
          //Class name must be removed from the URI in order to define a package
          String[] packageArray = className.split("\\.");
          for (int i = 0; i < packageArray.length - 1; i++) {
            strB.append(packageArray).append(".");
    String packageName = strB.toString();
    packageName = packageName.substring(0, packageName.length() - 1);
    if (getPackage(packageName) == null) {
    m_logger.log(Level.FINEST, "Defining package '" + packageName + "'");
    definePackage(packageName, null, null, null, null, null, null, null);
    return packageName;
    public synchronized Class loadClass(String name, boolean resolve) throws
    ClassNotFoundException {
    name = name.replaceAll("/", ".").replaceAll(".class", "");
    //Try to locate the Class in cashe
    Class c = (Class) m_cache.get(name);
    //Try to locate the Class in the System Class Loader
    if (c == null) {
    try {
    c = ClassLoader.getSystemClassLoader().loadClass(name);
    catch (Exception ex) {}
    else {
    m_logger.log(Level.FINEST, "Class '" + name + "' found in cache");
    //Load the class from byte array
    if (c == null) {
    String resourceName = name;
    if (!resourceName.endsWith(".class")) {
    resourceName = resourceName.concat(".class");
    //Retrieve class byte representation
    if (resourceName.indexOf(".") != -1) {
    resourceName =
    resourceName.replaceAll("\\.", "/").replaceAll("/class", ".class");
    //Use the ByteStreamClassLoader to load the class from byte array
    byte[] classByteArray = null;
    try {
    classByteArray = getResourceBytes(resourceName);
    catch (IOException ex1) {
    throw new ClassNotFoundException(
    "Could not load class data." + ex1.getMessage());
    m_logger.log(
    Level.FINEST, "Loading class '" +
    name + "' Byte Length: " + classByteArray.length);
    String p = definePackage(name);
    c = defineClass(
    name,
    classByteArray,
    0,
    classByteArray.length,
    ByteStreamClassLoader.class.getProtectionDomain());
    m_cache.put(name, c);
    if (resolve) {
    resolveClass(c);
    return c;

  • Plz help me out with class loader problem

    hai forum members,
    I have a code which loads class files from local disk.
    It works fine with some classes ,
    But i get this exception when i am selecting certain other class files
    I am using jdeveloper.
    Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: Filter (wrong name: project1/Filter)
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at com.jutframe.JavaUnitTester.selectClass_actionPerformed(JavaUnitTester.java:449)
         at com.jutframe.JavaUnitTester$7.actionPerformed(JavaUnitTester.java:338)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1766)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
                        JFileChooser jfilechooser=new JFileChooser();
                        Filterclass filter=new Filterclass();
                        //Set selection mode for file chooser
                        jfilechooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
                        //set file filter
                        jfilechooser.setFileFilter(filter);
                        int returnVal = jfilechooser.showOpenDialog(this);
                        if(returnVal == JFileChooser.APPROVE_OPTION)
                            try
                                    String str = jfilechooser.getSelectedFile().getName();
                                    String parent=jfilechooser.getSelectedFile().getParent();
                                     // Create a File object on the root of the directory containing the class file
                                     File file = new File(parent);
                                     // Convert File to a URL
                                     URL url = file.toURL();         
                                     URL[] urls = new URL[]{url};
                                     // Create a new class loader with the directory
                                     ClassLoader cl = new URLClassLoader(urls);
                                     StringTokenizer st = new StringTokenizer(str,".");
                                     String s = st.nextToken ();
                                     Class c = cl.loadClass(s);  //ERROR IS SHOWN IN THIS PARTICULAR LINE
                                     Object instance=c.newInstance();
    --------------------------------------------please help me trace my mistake.
    thank you all.

    i think the problem that i have set a particular class path for my class files and my application loads files from that alone.
    So plz tell me if theres any way to access the class path of a particular file dynamically?
    regards

  • Dynamic class loading problem using unknown JAR archive and directory names

    I read the following article, which enlightened me a lot:
    Ted Neward: Understanding Class.forName().
    However, it took me some while to understand that my problem is the other way around:
    I know the name of the class, I know the name of the method,
    but my program/JVM does not know where to load the classes from.
    Shortly, my problem is that the server engine that I am writing
    uses two different versions of the same library.
    So I am trying out the following solution:
    My program is named TestClassPathMain.java
    Assume the two libraries are named JAR1.jar and JAR2.jar
    and the class/instance method that should
    be exposed to TestClassPathMain.java by them is named
    TestClass1.testMethod().
    As long as I was depending on just one library,
    I put JAR1.jar in the classpath before starting java,
    and I was happy for a while.
    At the moment I got the need to use another version of
    TestClass1.testMethod() packaged in JAR2.jar,
    a call would always access JAR1.jar's
    TestClass1.testMethod().
    I then decided to remove JAR1.jar from the classpath,
    and programmatically define two separate ClassLoaders, one for use
    with JAR1.jar and the other for use with JAR2.jar.
    However, the problem is only partly solved.
    Please refer to the enclosed code for details.
    (The code in the JAR1.jar/JAR2.jar is extremely simple,
    it just tells (by hardcoding) the name of the jar it is packaged in
    and instantiates another class packaged in the same jar using
    the "new" operator and calls a method on it. I don't enclose it.)
    The TestClassPathMain.java/UC1.java/UC2.java code suite was
    successfully compiled with an arbitrary of JAR1 or JAR2 in the classpath,
    however removed from the classpath at runtime.
    (I know that this could have been done (more elegantly...?) by producing an Interface,
    but I think the main problem principle is still untouched by this potential lack of elegancy(?))
    1) This problem should not be unknown to you experts out there,
    how is it generally and/or most elegantly solved?
    The "*** UC2: Variant 2" is the solution I would like best, had it only worked.
    2) And why arent "*** UC2: Variant 2" and
    "*** static UC2: Variant 2" working,
    while "*** Main: Variant 2" is?
    3) And a mal-apropos:
    Why can't I catch the NoClassDefFoundError?
    The output:
    *** Main: Variant 1 JAR 1 ***:
    Entering TestClass1.testMethod() packaged in JAR1.jar
    About to instantiate TestClass2 with the new operator
    About to call TestClass2.testMethod()
    Entering TestClass2.testMethod() packaged in JAR1.jar
    *** Main: Variant 1 JAR 2 ***:
    Entering TestClass1.testMethod() packaged in JAR2.jar
    About to instantiate TestClass2 with the new operator
    About to call TestClass2.testMethod()
    Entering TestClass2.testMethod() packaged in JAR2.jar
    *** Main: Variant 2 JAR 1 ***:
    Entering TestClass1.testMethod() packaged in JAR1.jar
    About to instantiate TestClass2 with the new operator
    About to call TestClass2.testMethod()
    Entering TestClass2.testMethod() packaged in JAR1.jar
    *** Main: Variant 2 JAR 2 ***:
    Entering TestClass1.testMethod() packaged in JAR2.jar
    About to instantiate TestClass2 with the new operator
    About to call TestClass2.testMethod()
    Entering TestClass2.testMethod() packaged in JAR2.jar
    *** UC1: Variant 1 JAR 1 ***:
    Entering TestClass1.testMethod() packaged in JAR1.jar
    About to instantiate TestClass2 with the new operator
    About to call TestClass2.testMethod()
    Entering TestClass2.testMethod() packaged in JAR1.jar
    *** UC1: Variant 1 JAR 2 ***:
    Entering TestClass1.testMethod() packaged in JAR2.jar
    About to instantiate TestClass2 with the new operator
    About to call TestClass2.testMethod()
    Entering TestClass2.testMethod() packaged in JAR2.jar
    *** static UC2: Variant 2 JAR 1 ***:
    Exception in thread "main" java.lang.NoClassDefFoundError: TestClass1
            at UC2.runFromJarVariant2_static(UC2.java:56)
            at TestClassPathMain.main(TestClassPathMain.java:52)
    TestClassPathMain.java
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.URLClassLoader;
    public class TestClassPathMain {
        public static void main(final String args[]) throws MalformedURLException, ClassNotFoundException, InstantiationException, SecurityException, NoSuchMethodException, IllegalArgumentException, IllegalAccessException, InvocationTargetException {
                // Commented out because I cannot catch the NoClassDefFoundError.
                // Why?
                try {
                    final TestClass1 testClass1 = new TestClass1();
                    System.out.println(
                        "\nThe class TestClass1 is of some unexplicable reason available." +
                        "\nFor the purpose of the test, it shouldn't have been!" +
                        "\nExiting");
                    System.exit(1);
                } catch (NoClassDefFoundError e) {
                    System.out.println("\nPositively confirmed that the class TestClass1 is not available:\n" + e);
                    System.out.println("\n\nREADY FOR THE TEST: ...");
                // Works fine
                System.out.println("\n*** Main: Variant 1 JAR 1 ***:");
                runFromJarVariant1("file:/W:/java/eclipse/workspaces/simped_test/CP1/JAR1.jar");
                System.out.println("\n*** Main: Variant 1 JAR 2 ***:");
                runFromJarVariant1("file:/W:/java/eclipse/workspaces/simped_test/CP2/JAR2.jar");
                // Works fine
                System.out.println("\n*** Main: Variant 2 JAR 1 ***:");
                runFromJarVariant1("file:/W:/java/eclipse/workspaces/simped_test/CP1/JAR1.jar");
                System.out.println("\n*** Main: Variant 2 JAR 2 ***:");
                runFromJarVariant1("file:/W:/java/eclipse/workspaces/simped_test/CP2/JAR2.jar");
                // Works fine
                final UC1 uc1 = new UC1();
                System.out.println("\n*** UC1: Variant 1 JAR 1 ***:");
                uc1.runFromJarVariant1("file:/W:/java/eclipse/workspaces/simped_test/CP1/JAR1.jar");
                System.out.println("\n*** UC1: Variant 1 JAR 2 ***:");
                uc1.runFromJarVariant1("file:/W:/java/eclipse/workspaces/simped_test/CP2/JAR2.jar");
                // Crashes
                System.out.println("\n*** static UC2: Variant 2 JAR 1 ***:");
                UC2.runFromJarVariant2_static("file:/W:/java/eclipse/workspaces/simped_test/CP1/JAR1.jar");
                System.out.println("\n*** static UC2: Variant 2 JAR 2 ***:");
                UC2.runFromJarVariant2_static("file:/W:/java/eclipse/workspaces/simped_test/CP2/JAR2.jar");
                // Crashes
                final UC2 uc2 = new UC2();
                System.out.println("\n*** UC2: Variant 2 JAR 1 ***:");
                uc2.runFromJarVariant2("file:/W:/java/eclipse/workspaces/simped_test/CP1/JAR1.jar");
                System.out.println("\n*** UC2: Variant 2 JAR 2 ***:");
                uc2.runFromJarVariant2("file:/W:/java/eclipse/workspaces/simped_test/CP2/JAR2.jar");
        private static void runFromJarVariant1(final String jarFileURL)
            throws MalformedURLException,
                   ClassNotFoundException,
                   InstantiationException,
                   IllegalArgumentException,
                   IllegalAccessException,
                   InvocationTargetException,
                   SecurityException,
                   NoSuchMethodException {
            final URL url = new URL(jarFileURL);
            final URLClassLoader cl =
                new URLClassLoader(new URL[]{url},
                                   Thread.currentThread().getContextClassLoader());
            final Class clazz = cl.loadClass("TestClass1");
            final Object testClass1 = clazz.newInstance();
            final Method testMethod1 = clazz.getMethod("testMethod", null);
            testMethod1.invoke(testClass1, null);
        private static void runFromJarVariant2(final String jarFileURL)
            throws MalformedURLException,
                   ClassNotFoundException,
                   InstantiationException,
                   IllegalArgumentException,
                   IllegalAccessException,
                   InvocationTargetException,
                   SecurityException,
                   NoSuchMethodException {
            final URL url = new URL(jarFileURL);
            final URLClassLoader cl =
                new URLClassLoader(new URL[]{url},
                                   Thread.currentThread().getContextClassLoader());
            final Class clazz = cl.loadClass("TestClass1");
            final TestClass1 testClass1 = new TestClass1();
            testClass1.testMethod();
    UC1.java
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.URLClassLoader;
    public class UC1 {
        public void runFromJarVariant1(final String jarFileURL)
            throws MalformedURLException,
                   ClassNotFoundException,
                   InstantiationException,
                   IllegalArgumentException,
                   IllegalAccessException,
                   InvocationTargetException,
                   SecurityException,
                   NoSuchMethodException {
            final URL url = new URL(jarFileURL);
            final URLClassLoader cl =
                new URLClassLoader(new URL[]{url},
                                   Thread.currentThread().getContextClassLoader());
            final Class clazz = cl.loadClass("TestClass1");
            final Object testClass1 = clazz.newInstance();
            final Method testMethod1 = clazz.getMethod("testMethod", null);
            testMethod1.invoke(testClass1, null);
    UC2.java
    import java.lang.reflect.InvocationTargetException;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.net.URLClassLoader;
    public class UC2 {
        public void runFromJarVariant2(final String jarFileURL)
        throws MalformedURLException,
               ClassNotFoundException,
               InstantiationException,
               IllegalArgumentException,
               IllegalAccessException,
               InvocationTargetException,
               SecurityException,
               NoSuchMethodException {
            final URL url = new URL(jarFileURL);
            final URLClassLoader cl =
                new URLClassLoader(new URL[]{url},
                                   Thread.currentThread().getContextClassLoader());
            final Class clazz = cl.loadClass("TestClass1");
            final TestClass1 testClass1 = new TestClass1();
            testClass1.testMethod();
         * Identic to the "runFromJarVariant2" method,
         * except that it is static
        public static void runFromJarVariant2_static(final String jarFileURL)
        throws MalformedURLException,
               ClassNotFoundException,
               InstantiationException,
               IllegalArgumentException,
               IllegalAccessException,
               InvocationTargetException,
               SecurityException,
               NoSuchMethodException {
            final URL url = new URL(jarFileURL);
            final URLClassLoader cl =
                new URLClassLoader(new URL[]{url},
                                   Thread.currentThread().getContextClassLoader());
            final Class clazz = cl.loadClass("TestClass1");
            final TestClass1 testClass1 = new TestClass1();
            testClass1.testMethod();
    }

    2. i need to load the class to the same JVM (i.e. to
    the same environment) of the current running
    aplication, so that when the loaded class is run, it
    would be able to invoke methods on it!!!
    ClassLoader(s) do this. Try the URLClassLoader.
    (I was talking about relatively esoteric "security"
    issues when I mentioned the stuff about Class objects
    "scope".) You might use the URLClassLoader kind of
    like this.
    Pseudo-code follows:
    // setup the class loader
    URL[] urls = new URL[1];
    urls[0] = new URL("/path/to/dynamic/classes");
    URLClassLoader ucl = new URLClassLoader(urls);
    // load a class & use make an object with the default constructor
    Object tmp = ucl.loadClass("dynamic.class.name").newInstance();
    // Cast the object to a know interface so that you can use it.
    // This may be used to further determine which interface to cast
    // the class to. Or it may simply be the interface to which all
    // dynamic classes have to conform in your program.
    InterfaceImplementedByDynamicClass loadedObj =
        (InterfaceImplementedByDynamicClass)tmp;It's really not as hard as it sounds, just write a little test of
    this and you will see how it works.

  • Problem loading modified classes from CLASSPATH using system class loader

    Hi,
    I am facing problem to load the modified classes from CLASSPATH.
    I have set my CLASSPATH to a directory whose classes will be modified frequently. After the server(web/app) is started, the system class loader, using which am trying to load the classes from the directory where the CLASSPATH is set, am not able to load the modified files without the server restart.
    Do I need to have a custom class loader to fix this.
    Please help me.
    Thanks,
    Sureddy

    Do I need to have a custom class loader to fix this.Yes.

  • Help Needed on a similar but not same class loader problem

    Hi,
    Please help...
    There is a ClassLoader called MyLoader that overrides default findClass() method to decrypt already encrypted class files available in a separate jar file.
    MyClass also contains a public static method launchMe() method that starts off with a call similar to loadClass("ApplicationMainClass");
    The MyLoader class is also encrypted
    I modified the default launcher (c) code to:
    First find the encrypted MyLoader file then decrypt it and create a byte array.
    The byte array, along with the system class loader and other required arguments, is passed to DefineClass native method (defined in jvm.dll)
    Note: The system class loader class has been instantiated using static method ClassLoader.getSystemClassLoader() through Java's invocation API.
    The DefineClass succeeds and I'm able to instantiate MyLoader and later call launchMe() to start application.
    Now i come to the problem:
    I'm not able to use any class other that those in rt.jar (i.e.standard classes) in MyLoader class. I end up with a runtime error ClassDefNotFoundError while trying to load any third party jar.
    The classes i need are present in class path and also in the local jre's ext that i use to launch my app.
    Although i can avoid using third party jar in MyLoader but if there is any way...
    Piyush

    make sure that third party jar resides in your library.....
    or else put rt.jar and external jars under same folder
    this is matter of path.... no else than this.......
    cheers
    Rajesh42

  • Refresh event problem, when using anything other than on-load

    I am attempting to create a series of sequential xml loads, without any user interaction.
    I.E. xml1 contains the location of xml2, and xml2 contains the location of xml3, so the next must wait until the prior xml has been loaded.
    It is impractical to use dropdown lists or refresh buttons to update these - (they should all happen behind the scenes as they are just loading selections that change depending on the user privileges).
    While my desired refresh-event is the when-value-becomes, I have tested when-value-changes, and found the same problem.
    When I set these to automatically chain through (xml1 is set to refresh-on-load, xml2 is set to load by a trigger cell that equals "load" if there are values loaded from xml1, and so on) - the conditional refresh events do not fire.
    When I use a manual refresh button, they load without a problem, and when I use a dropdown list to test the on-change or value-equals logic, this loads correctly too. So the problem is specifically during the intial load-up point, and is reproducable in any new xcelsius project I create.
    To state the problem precisely, during the initial loading phase of xcelsius, the logic behind when-value-changes and when-value-equals load events does not seem to execute - however after the initial load, they fire correctly based off user input.
    Is there any workaround or solution? If any clarification is needed, let me know where.

    May not be your exact issue, but something similar -
    Only a problem w/SP3 - I used dynamic visibility to hide two connection refresh buttons that were loading data after components finished. They stopped working until I turned the dynamic visibility off and just hid them behind other layers. Confirmed by revealing them after load and the triggers ran appropriately. May not be the issue (since you didn't mention visibility), but worth a try.

  • Problem with dynamic class loading

    Hi,
    We have a class file in an external jar(outside ear) and access it in an ear using classloader.loadClass method. But if the class file is changed in jar, it gets hotdeployed in jboss but code which calls this class still refers to the old code.
    Class getClassByName(String className) throws ClassNotFoundException {
    Class theClass = null;
    try {
    theClass = Thread.currentThread().getContextClassLoader().loadClass(className);
    } catch (ClassNotFoundException e) {
    theClass = getClass().getClassLoader().loadClass(className);
    return theClass;
    When I looked into api I came to know that loadClass actually loads the class if it is not already exists. Can any one help me in writing thecustom class loader which loads the class everytime instead of checking previous instance before loading......
    Thanks,
    Kruthika

    You probably have to get rid of the class loader that loads the original version and start with a new class loader.

  • Problem lies some where JVM Class Loader

    I suspect that the jar files are in the JPI cache. During applet initialization, the various classes start loading. Then, because of the page trasition,
    the applet gets shutdown by the Java Plug In. Because it doesn't terminate quickly enough, the JPI starts killing threads (java.lang.ThreadDeath).
    The classloader seems to be ungraceful in handling that situation. This seems to leave the classloader's internal state in an inconsitent state.
    Therefore, until the JVM is restarted, the class loading fails.
    Thanks and Regards
    Manoja

    I suspect that the jar files are in the JPI cache. During applet initialization, the various classes start loading. Then, because of the page trasition,
    the applet gets shutdown by the Java Plug In. Because it doesn't terminate quickly enough, the JPI starts killing threads (java.lang.ThreadDeath).
    The classloader seems to be ungraceful in handling that situation. This seems to leave the classloader's internal state in an inconsitent state.
    Therefore, until the JVM is restarted, the class loading fails.
    Thanks and Regards
    Manoja

  • How can I get a dynamic list of Classes Loaded

    I assume this may need to use some sort of reflection. Does
    anyone have code or ideas where I can:
    a) I can get a list of all Classes loaded and their
    properties. This would probably be all instances of Class
    b) A list of all
    global instance variables. (This may not even be possible. I
    know it can be done in other languages)
    I assume this may need to use some sort of reflection.
    Thank you

    Adobe Newsbot hopes that the following resources helps you.
    NewsBot is experimental and any feedback (reply to this post) on
    its utility will be appreciated:
    mx.controls.List (Flex 3):
    If the data is incorrect, you can call the preventDefault()
    method to stop Flex from passing the new data back to the list
    control and from closing the
    Link:
    http://livedocs.adobe.com/flex/3/langref/mx/controls/List.html
    Displaying icons in a Flex List control at Flex Examples:
    http://blog.flexexamples.com/2007/08/17/displaying-icons-in-a-flex-list-control/
    --> <mx:Application xmlns:mx=&quot;
    http://www.adobe.com/2006/mxml&quot;
    Link:
    http://blog.flexexamples.com/2007/08/17/displaying-icons-in-a-flex-list-control/
    Populate the list -- Flex 2.01:
    You populate a list-based form control with the
    <mx:dataProvider> child tag. The <mx:dataProvider> tag
    lets you specify list items in several ways.
    Link:
    http://livedocs.adobe.com/flex/201/html/tutorial_controls_019_4.html
    Smooth Scroll for Horizontal List - Flex India Community |
    Google:
    I have created image gallery with Horizontal List[Flex 2.0].
    Just as below ref site. My Problem is i need a smooth scroll for
    Horizontal List. where images
    Link:
    http://groups.google.com/group/flex_india/browse_thread/thread/a12441143b98d32c?hide_quote s=no
    Creating a List control -- Flex 2.01:
    The following example code adds a handler for a change event
    to the List control. Flex broadcasts a mx.ListEvent.CHANGE event
    when the value of the control
    Link:
    http://livedocs.adobe.com/flex/201/html/dpcontrols_062_03.html
    Disclaimer: This response is generated automatically by the
    Adobe NewsBot based on Adobe
    Community
    Engine.

  • FCPX hangs on loading event in boot up, but when it does boot it runs very slowly.

    I'm having a problem with FCP 10.0.9
    When I try to open the program it gets hung up on the opening logo at loading event. I get a message that FCP is not responding in the force quit menu,  but after around 6 hours FCPX opens up, but runs very slowly. I can see all of my projects and everything appears to be intact.
    I'd like for FCPX to run smoothly again so I am looking for advice on how to fix it.
    Here is some pertinent information.
    I'm working on an 2.93 GHz intel core 7 iMac / 16GB memory / ATI Radeon HD 5750 1024 MB / OS 10.7.5
    Everything is on an external 12tb Raid drive that has 5.7 TB free and is connected via Firewire 800.
    The footage has been going into FCP is Arri Alexa footage that has been transcoded using Devinci resolve and proxies were created for all the footage within fcp.
    My event folder is around 600 gb and the transcoded footage that has been imported into FCP is around 6TB
    I've been working for about 3 weeks and have everything broken into 4 projects within one event and everything was working smoothly until yesterday.
    I have no compound clips, but all of my imported footage has been synced, multicam-ed and organized by keyword collections.
    I've tried loading the even backup to no avail (and foolishly I did not have backups stored anywhere else)
    I've tried trashing preferences.
    I've tried reinstalling the program.
    I've tried hiding events and projects with Event Manager X.
    I've tried running diagnostics using the digital rebellion pro maintenance tools Corrupt Clip Finder, Project repair, and Quick Fix but everything came back clean.
    One person at Apple technical support suggested I move the footage out of my event folder In pieces to see if there was a corrupt clip. First I removed the proxies and then the original media and then everything else (including all render data) until the only thing in the even folder was the event itself, but still FCP hung up on boot up.
    Another apple technical support person suggested I should have optimized my media (which I did not do) but after getting FCP to boot up I let it optimize all my media overnight and this has not had any significant effect.
    My console displays lots of error messages end with "Too many SQL Variables"
    Another error message I am getting in console is: 
    Class CMIOGraphService is implemented in both /System/Library/Frameworks/CoreMediaIO.framework/Versions/A/CoreMediaIO and /Applications/Final Cut Pro.app/Contents/Frameworks/CoreMediaLion/CoreMediaIO.framework/Versions/Curren t/CoreMediaIO. One of the two will be used. Which one is undefined.
    When I hide the event but keep the projects in their proper place FCP boots up quickly and my projects are all there but none of the footage appears since it is all within my event.
    One thing I am reluctant to try but may end up doing if I cannot find the correct answer from this internet community is Export and XML and use Xto7 to try to open it up in FCP7 and finish the project there. This feels like something that is going to cause me problems down the road, but I'm unsure.
    As is almost always the case, I'm under an impossibly tight deadline so any advice would be much appreciated.
    Thanks!
    Brody

    Quite the same problem here: FCP X (10.0.9) crashed while quitting, now it's always hanging up (opening logo freezes while displaying "loading .... event"). The Console says: "SQLite error code:1, 'too many SQL variables'".
    The difference maybe is that my event isn't that big. 350 GB, including the original and transcoded media. The fcpevent file itself is about 340 MB. Unfortunately (my fault!) I didn't backup any of the .fcpevent files.
    Is there any possibility to repair the .fcpevent file? I tested the repair tool by digital rebellion, but still no success. Are there any other ideas?
    Thanks!
    Ronja

  • MBean calling ejb class loading issue

    Hi,
    I would like to have an mbean call an ejb. I have come against a (predictable!!)
    class loading problem. The EJB Home cant be bundled with the mbean because the
    mbean class loader would load the interface, preventing ejb reload( Thats what
    the error msg indicates) and the ejb doesnt get deployed.
    I have moved to an mlet based scheme (beacuse an mlet is a class loader) to
    load the mbeans, but now I have the problem that when the mbean looks up the
    home in jndi the cast fails ie the jndi object has an interface class loaded by
    the ejb class loader but the mlet has its own loaded home interface. These class
    loaders appear to be sibblings - but I havnt printed out the trees.
    This is WLS 702 which seems to be JMX 1.1. Has anyone got a way around this?
    Have I invented a problem that doesnt exist? I cant go to WLS8.
    My current way forward is to have the mbean find the class loader that loaded
    the interface class (jndi object) and then have the mbean use that class loader
    to load its copy of the interface class. Seems a bit complex. Im sure I missed
    something obvious.
    Thanks
    Pete Marshall

    Pete,
    could you explain better your thoughts...
    I'm interested to hear them.
    regards,
    Pedro Salazar.
    Pete Marshall wrote:
    Must think before typing..
    If I have the ejb register a listener on the mbean and have the mbean emit an
    event the detyped notification from the mbean will break the link between the
    mbean class loader and the ejb loader. I think ;-) Ill try it.
    Pete
    "Pete Marshall" <[email protected]> wrote:
    Hi,
    I would like to have an mbean call an ejb. I have come against a (predictable!!)
    class loading problem. The EJB Home cant be bundled with the mbean because
    the
    mbean class loader would load the interface, preventing ejb reload( Thats
    what
    the error msg indicates) and the ejb doesnt get deployed.
    I have moved to an mlet based scheme (beacuse an mlet is a class loader)
    to
    load the mbeans, but now I have the problem that when the mbean looks
    up the
    home in jndi the cast fails ie the jndi object has an interface class
    loaded by
    the ejb class loader but the mlet has its own loaded home interface.
    These class
    loaders appear to be sibblings - but I havnt printed out the trees.
    This is WLS 702 which seems to be JMX 1.1. Has anyone got a way around
    this?
    Have I invented a problem that doesnt exist? I cant go to WLS8.
    My current way forward is to have the mbean find the class loader that
    loaded
    the interface class (jndi object) and then have the mbean use that class
    loader
    to load its copy of the interface class. Seems a bit complex. Im sure
    I missed
    something obvious.
    Thanks
    Pete Marshall

Maybe you are looking for