harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivan Popov" <ivan.g.po...@gmail.com>
Subject Re: Harmony+Eclipse and Scrapbook Pages
Date Fri, 20 Apr 2007 15:10:25 GMT
Thanks, Mikhail, It might be useful, but I dont know how to specify
options for VM running Scrapbook code, it is started automatically.

But I was able to copy command line, launch it from command prompt,
attach with jdb and simulate the same process. I found out that
Harmony tries to load class ScrapbookMain1 second time after it was
successfully loaded and fails here with NoClassDefFoundError, which is
caught by debugger and reported to Eclipse in STEP event.

Below are details which shows difference between running this scenario
with Sun and Harmony VMs, and trace messages from Harmony classloader.
Anyone can explain why this happened?

Thanks.
Ivan

Running with Sun's VM (which works well with Eclipse Scrapbook):
---------------------------------------------------------------------------------------------------
Breakpoint hit: "thread=main",
org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain.nop(),
line=59 bci=0
main[1] where
  [1] org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain.nop
(ScrapbookMain.java:59)
  [2] sun.reflect.NativeMethodAccessorImpl.invoke0 (native method)
  [3] sun.reflect.NativeMethodAccessorImpl.invoke (null)
  [4] sun.reflect.DelegatingMethodAccessorImpl.invoke (null)
  [5] java.lang.reflect.Method.invoke (null)
  [6] org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain1.eval
(ScrapbookMain1.java:20)
  [7] sun.reflect.NativeMethodAccessorImpl.invoke0 (native method)
  [8] sun.reflect.NativeMethodAccessorImpl.invoke (null)
  [9] sun.reflect.DelegatingMethodAccessorImpl.invoke (null)
  [10] java.lang.reflect.Method.invoke (null)
  [11] org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain.evalLoop
(ScrapbookMain.java:54)
  [12] org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain.main
(ScrapbookMain.java:35)
main[1] step up
>
Step completed: "thread=main",
org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain1.eval(),
line=20 bci=20
main[1] where
  [1] org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain1.eval
(ScrapbookMain1.java:20)
  [2] sun.reflect.NativeMethodAccessorImpl.invoke0 (native method)
  [3] sun.reflect.NativeMethodAccessorImpl.invoke (null)
  [4] sun.reflect.DelegatingMethodAccessorImpl.invoke (null)
  [5] java.lang.reflect.Method.invoke (null)
  [6] org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain.evalLoop
(ScrapbookMain.java:54)
  [7] org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain.main
(ScrapbookMain.java:35)
---------------------------------------------------------------------------------------------------

Running the same with Harmony:
---------------------------------------------------------------------------------------------------
main[1] where
  [1] org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain.nop
(ScrapbookMain.java:59)
  [2] java.lang.reflect.VMReflection.invokeMethod (native method)
  [3] java.lang.reflect.Method.invoke (Method.java:381)
  [4] org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain1.eval
(ScrapbookMain1.java:20)
  [5] java.lang.reflect.VMReflection.invokeMethod (native method)
  [6] java.lang.reflect.Method.invoke (Method.java:381)
  [7] org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain.evalLoop
(ScrapbookMain.java:54)
  [8] org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain.main
(ScrapbookMain.java:35)
main[1] step up
>
Step completed: "thread=main",
java.lang.NoClassDefFoundError.<init>(), line=44 bci=0
main[1] where
  [1] java.lang.NoClassDefFoundError.<init> (NoClassDefFoundError.java:44)
  [2] java.lang.VMClassRegistry.loadBootstrapClass (native method)
  [3] java.lang.ClassLoader.loadClass (ClassLoader.java:546)
  [4] java.lang.ClassLoader.loadClass (ClassLoader.java:311)
  [5] org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain.evalLoop
(ScrapbookMain.java:52)
  [6] org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain.main
(ScrapbookMain.java:35)
main[1] locals
Method arguments:
detailMessage = "org/eclipse/jdt/internal/debug/ui/snippeteditor/ScrapbookMain1"
Local variables:
---------------------------------------------------------------------------------------------------

Messages from -Xtrace:classloader:
---------------------------------------------------------------------------------------------------
<...>
Defining class org/eclipse/jdt/internal/debug/ui/snippeteditor/ScrapbookMain1
with loader 0329A1C0
StartLoading class
org/eclipse/jdt/internal/debug/ui/snippeteditor/ScrapbookMain1 with
loader 0329A1C0
<...>
class org/eclipse/jdt/internal/debug/ui/snippeteditor/ScrapbookMain1 initialized
<... stepping ..>
StartLoading class java/lang/IllegalArgumentException with loader 0167E698
StartLoading class java/lang/InternalError with loader 0167E698
Loader (0167E698) find native function: java/lang/VMThreadManager.sleep(JI)I
StartLoading class [Ljava/security/ProtectionDomain; with loader 0167E698
Adding class loader 0329F9F0 (java/net/URLClassLoader@116BDBC4 :
java/net/URLClassLoader)
StartLoading class
org/eclipse/jdt/internal/debug/ui/snippeteditor/ScrapbookMain1 with
loader 0167E698
0167E698 016ABDB8 I
org/eclipse/jdt/internal/debug/ui/snippeteditor/ScrapbookMain1
Loader (0167E698) loading class:
org/eclipse/jdt/internal/debug/ui/snippeteditor/ScrapbookMain1...
StartLoading class java/lang/NoClassDefFoundError with loader 0167E698
<...>
---------------------------------------------------------------------------------------------------

Mime
View raw message