You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Gregory Shimansky (JIRA)" <ji...@apache.org> on 2006/11/10 16:42:39 UTC

[jira] Assigned: (HARMONY-2143) [drlvm][jvmti] AddToBootstrapClassLoaderSearch() does not work

     [ http://issues.apache.org/jira/browse/HARMONY-2143?page=all ]

Gregory Shimansky reassigned HARMONY-2143:
------------------------------------------

    Assignee: Gregory Shimansky

> [drlvm][jvmti] AddToBootstrapClassLoaderSearch() does not work
> --------------------------------------------------------------
>
>                 Key: HARMONY-2143
>                 URL: http://issues.apache.org/jira/browse/HARMONY-2143
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Windows/ia32
>            Reporter: Ivan Popov
>         Assigned To: Gregory Shimansky
>         Attachments: AddClasspathTest.zip, H-2143_Fixed-AddToBootstrapClassLoaderSearch.patch
>
>
> We've found JVMTI problem in DRLVM build (r472773 + HARMONY-2120 + HARMONY-2123) while running Java profiler tests. With this problem it's impossible to use Eclipse TPTP profiler for Harmony+DRLVM JRE.
> The problem is that even if JVMTI agent adds class search path for additional classes using AddToBootstrapClassLoaderSearch(), these classes are not found by DRLVM and result in ClassNotFoundException.
> For example, in the attached test Java application loads class located in a separate directory (extdir), which is not included into regular classpath. If the application is started without agent, it fails to lload this class and ClassNotFoundException is thrown. However, if application is started with agent and path to this separate directory is passed to the agent options, then agent uses AddToBootstrapClassLoaderSearch() to add this durectory to class searching path, and this class should be successfully loaded. 
> Provided script run.bat demonstrates this by running application with agent and without agent. If you point to Sun or JRockit JRE, it will show expected result:
> > run.bat jrockit-jdk1.5.0_06-windows-ia32
> -----------------------------------------------------------
> 1. Run test without agent and expect ClassNotFoundException
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> BEA JRockit(R) (build R26.3.0-32-58710-1.5.0_06-20060308-2022-win-ia32, )
> HELLO.world
> class found: java.lang.Object
> class found: mytests.HelloWorld
> class NOT found: org.eclipse.tptp.martini.CGProxy
> java.lang.ClassNotFoundException: org.eclipse.tptp.martini.CGProxy
>         at java.lang.Class.forName(Ljava.lang.String;ZLjava.lang.ClassLoader;)Ljava.lang.Class;(Unknown Source)
>         at java.lang.Class.forName(Ljava.lang.String;I)Ljava.lang.Class;(Unknown Source)
>         at mytests.HelloWorld.testClass(HelloWorld.java:13)
>         at mytests.HelloWorld.main(HelloWorld.java:8)
> -----------------------------------------------------------
> 2. Run test with agent and expect no exception
> Agent_OnLoad: extdir
> java version "1.5.0_06"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
> BEA JRockit(R) (build R26.3.0-32-58710-1.5.0_06-20060308-2022-win-ia32, )
> HELLO.world
> class found: java.lang.Object
> class found: mytests.HelloWorld
> class found: org.eclipse.tptp.martini.CGProxy
> -----------------------------------------------------------
> Done.
> However, if you run this with DRLVM, it will throw ClassNotFoundException in both cases:
> > run.bat Y:\testing\jpda_profile\drlvm_20061109_1500_win_ia32_msvc_r_prof
> -----------------------------------------------------------
> 1. Run test without agent and expect ClassNotFoundException
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r472634, (Nov  9 2006), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> HELLO.world
> class found: java.lang.Object
> class found: mytests.HelloWorld
> class NOT found: org.eclipse.tptp.martini.CGProxy
> java.lang.ClassNotFoundException: org.eclipse.tptp.martini.CGProxy
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:625)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader$SystemClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at java.lang.Class.forName(Unknown Source)
>         at java.lang.Class.forName(Unknown Source)
>         at mytests.HelloWorld.testClass(HelloWorld.java)
>         at mytests.HelloWorld.main(HelloWorld.java:8)
> -----------------------------------------------------------
> 2. Run test with agent and expect no exception
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r472634, (Nov  9 2006), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Agent_OnLoad: extdir
> HELLO.world
> class found: java.lang.Object
> class found: mytests.HelloWorld
> class NOT found: org.eclipse.tptp.martini.CGProxy
> java.lang.ClassNotFoundException: org.eclipse.tptp.martini.CGProxy
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:625)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader$SystemClassLoader.loadClass(Unknown Source)
>         at java.lang.ClassLoader.loadClass(Unknown Source)
>         at java.lang.Class.forName(Unknown Source)
>         at java.lang.Class.forName(Unknown Source)
>         at mytests.HelloWorld.testClass(HelloWorld.java:13)
>         at mytests.HelloWorld.main(HelloWorld.java:8)
> -----------------------------------------------------------
> Done.
> To reproduce this problem unpack attached archive with the test and use run.bat:
>   run.bat <JAVA_HOME>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira