• Bug
  • Status: Closed
  • 2 Major
  • Resolution: Fixed
  • DSO:L1
  • hhuynh
  • Reporter: gbevin
  • July 17, 2008
  • 0
  • Watchers: 0
  • October 20, 2008
  • July 17, 2008

Description

As per http://forums.terracotta.org/forums/posts/list/0/1237.page

Just executing this: JAVA_OPTS=”-Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol” dso-java.sh tutorial.HelloWorld

Results in:

2008-07-17 09:59:24,051 INFO - Terracotta 2.7.0-SNAPSHOT, as of 20080717-080730 (Revision 9274 by [email protected] from trunk) 2008-07-17 09:59:24,582 INFO - Configuration loaded from the file at ‘/Users/gbevin/Downloads/demos/helloworld/tc-config.xml’. java.lang.NullPointerException at com.tc.object.bytecode.hook.impl.ClassProcessorHelper.registerStandardLoaders(ClassProcessorHelper.java:467) at com.tc.object.bytecode.hook.impl.ClassProcessorHelper.init(ClassProcessorHelper.java:414) at com.tc.object.bytecode.hook.impl.ClassProcessorHelper.systemLoaderInitialized(ClassProcessorHelper.java:795) at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1382) at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1341) at java.net.URL.getURLStreamHandler(URL.java:1139) at java.net.URL.(URL.java:393) at java.net.URL.(URL.java:283) at java.net.URL.(URL.java:306) at sun.net.www.ParseUtil.fileToEncodedURL(ParseUtil.java:245) at sun.misc.Launcher.getFileURL(Launcher.java:400) at sun.misc.Launcher$ExtClassLoader.getExtURLs(Launcher.java:177) at sun.misc.Launcher$ExtClassLoader.(Launcher.java:149) at sun.misc.Launcher$ExtClassLoader$1.run(Launcher.java:133) at java.security.AccessController.doPrivileged(Native Method) at sun.misc.Launcher$ExtClassLoader.getExtClassLoader(Launcher.java:130) at sun.misc.Launcher.(Launcher.java:51) at sun.misc.Launcher.(Launcher.java:39) at java.lang.ClassLoader.initSystemClassLoader(ClassLoader.java:1359) at java.lang.ClassLoader.getSystemClassLoader(ClassLoader.java:1341) Error occurred during initialization of VM java.lang.AssertionError: already set Abort trap

Comments

Steve Harris 2008-07-17

on the 2.6 question, how much work is it. How dangerous is the change?

Geert Bevin 2008-07-17

Work is trivial, as far as I can see it’s not dangerous since it just adds another level of protection before initializing the TC client. Ie. it ensures that the system classloader actually has a values before using it for initialization. While is is bound to the actual bytecode of the ClassLoader class, but this was already the case before so I don’t expect any problems.

Fiona OShea 2008-09-24

From Alex: Here’s an (unresolved) case of same problem / same class with JavaRebel: http://www.zeroturnaround.com/forum/topic.php?id=97

As Tim mentioned on the forum post, there are issues with custom url stream handlers and terracotta. Geert made a fix for classloader initialization related to custom protocols here: http://jira.terracotta.org/jira/browse/CDV-810

which went into trunk on July 17th, so I think probably post-2.6 but should be in 2.7. It’s a long shot but might be worth trying with 2.7 to see whether they get the same error. Or can they create something simple that we can test with?

Hung Huynh 2008-10-20

tested with ~/builds/terracotta-trunk-nightly-rev10506/samples/pojo/chatter

works fine.

java.exe 1396 c:\jdk\hotspot1.6.0_07\bin\java.exe -Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol -Xbootclasspath/p:c:\terracotta\builds\terracotta-trunk-nightly-rev10506\lib\dso-boot\dso-boot-hotspot_win32_160_07.jar -Dtc.install-root=c:\terracotta\builds\terracotta-trunk-nightly-rev10506\ -Dtc.config=tc-config.xml -Djava.awt.Window.locationByPlatform=true -cp ./classes demo.chatter.Main