Thread: [Sablevm-developer] Does SableVM exclude gnu.regex from its classpath?
Brought to you by:
egagnon
From: Roman K. <ro...@on...> - 2004-06-15 11:25:36
|
Hi list. I have come across a strange thing: While testing my application knowledge-tracking, I got an exception: java.lang.NoClassDefFoundError at java.lang.Class.initialize (Class.java:124) at java.util.regex.Pattern.Pattern (Pattern.java:88) at java.util.regex.Pattern.compile (Pattern.java:144) at java.util.regex.Pattern.compile (Pattern.java:126) at java.lang.String.replaceAll (String.java:1177) at com.knowledgetracking.nb.NBClass.learnFromText (NBClass.java:82) at com.knowledgetracking.nb.ClassificationScheme.learnFromText (ClassificationScheme.java:141) at com.knowledgetracking.nb.NBEngine.learn (NBEngine.java:75) at com.knowledgetracking.nb.NBEngine.learn (NBEngine.java:37) at com.knowledgetracking.cli.learn.invoke (learn.java:29) at com.knowledgetracking.cli.learn.invoke (learn.java:45) at java.lang.reflect.Method.invokeNative (Method.java) at java.lang.reflect.Method.invoke (Method.java:556) at bsh.Reflect.invokeOnMethod (Unknown Source) at bsh.Reflect.invokeStaticMethod (Unknown Source) at bsh.Reflect.invokeCompiledCommand (Unknown Source) at bsh.Name.invokeLocalMethod (Unknown Source) at bsh.Name.invokeMethod (Unknown Source) at bsh.BSHMethodInvocation.eval (Unknown Source) at bsh.BSHPrimaryExpression.eval (Unknown Source) at bsh.BSHPrimaryExpression.eval (Unknown Source) at bsh.Interpreter.eval (Unknown Source) at bsh.Interpreter.source (Unknown Source) at bsh.Interpreter.main (Unknown Source) at java.lang.VirtualMachine.invokeMain (VirtualMachine.java) at java.lang.VirtualMachine.main (VirtualMachine.java:92) looking at the code in java.util.regex.Pattern, it is clear that gnu.regex.RESyntax is not found. Strange thing is, that gnu.regex is in SableVM-Classpath and installed properly (I checked this). When I explicitly include the path to SableVM-Classpath in the java-sablevm call, then things work out right. The good thing is, with this hack, and with the small patch I submitted to Classpath-Bugreports for URLStreamHandler, my app seems to work fine with SableVM. And this is a good sign, since this includes quite some technologies, like JDBC (with MySQL driver), XML, Castor, and some of libcommons-*. Cheers, /Roman |
From: Etienne G. <gag...@uq...> - 2004-06-15 13:27:32
|
Roman Kennke wrote: > Hi list. > > I have come across a strange thing: While testing my application > knowledge-tracking, I got an exception: > > java.lang.NoClassDefFoundError ... > looking at the code in java.util.regex.Pattern, it is clear that > gnu.regex.RESyntax is not found. Strange thing is, that gnu.regex is in > SableVM-Classpath and installed properly (I checked this). When I > explicitly include the path to SableVM-Classpath in the java-sablevm call, > then things work out right. This is weird. Can you reproduce this with a minimal example you could share on this list? > The good thing is, with this hack, and with the small patch I submitted to > Classpath-Bugreports for URLStreamHandler, my app seems to work fine with > SableVM. And this is a good sign, since this includes quite some > technologies, like JDBC (with MySQL driver), XML, Castor, and some of > libcommons-*. This is great! We should make sure all this work gets into the next SableVM release. Etienne -- Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |
From: Roman K. <ro...@on...> - 2004-06-15 14:38:27
Attachments:
TestStrangeClasspath.java
|
Am Di, den 15.06.2004 schrieb Etienne Gagnon um 15:07: > Roman Kennke wrote: > > Hi list. > > > > I have come across a strange thing: While testing my application > > knowledge-tracking, I got an exception: > > > > java.lang.NoClassDefFoundError > ... > > looking at the code in java.util.regex.Pattern, it is clear that > > gnu.regex.RESyntax is not found. Strange thing is, that gnu.regex is in > > SableVM-Classpath and installed properly (I checked this). When I > > explicitly include the path to SableVM-Classpath in the java-sablevm call, > > then things work out right. > > This is weird. Can you reproduce this with a minimal example you could > share on this list? Here we go. Attached (i hope ;-> ) is a very simple example, which throws an exception when called this way: > $HOME/local/bin/sablevm TestStrangeClasspath when called this way: > $HOME/local/bin/sablevm -c $HOME/local/share/sablevm/sablevm-classpath:. TestStrangeClasspath everything works fine. Isn't this weird? I used SableVM and SableVM-Classpath from bugfree branch. /Roman |
From: Etienne G. <gag...@uq...> - 2004-06-18 05:48:20
|
Hi Roman, Thanks a lot for the example. It allowed me to actually find the source of the problem and fix it! :-) I have checked-in the fix in current sablevm & sablevm-classpath staging (revision 2759). I hope this helps. Etienne Roman Kennke wrote: > Here we go. Attached (i hope ;-> ) is a very simple example, which > throws an exception when called this way: > >>$HOME/local/bin/sablevm TestStrangeClasspath > > when called this way: > >>$HOME/local/bin/sablevm -c > > $HOME/local/share/sablevm/sablevm-classpath:. TestStrangeClasspath > > everything works fine. Isn't this weird? I used SableVM and > SableVM-Classpath from bugfree branch. -- Etienne M. Gagnon, Ph.D. http://www.info.uqam.ca/~egagnon/ SableVM: http://www.sablevm.org/ SableCC: http://www.sablecc.org/ |