From: Steve H. <st...@xh...> - 2009-08-29 09:02:04
|
I successfully installed and compiled xmlvm (checked out of svn today) on an Ubuntu Hardy machine with Sun Java 1.6 installed. I tried a simple conversion using a single class file that runs in the JVM without error. I used the command "xmlvm --in=Jim.class" and I got an error: 'Exception in thread "main" java.lang.reflect.InvocationTargetException'. Full output is reproduced below. I opened a bug report and attached the class file to it. Any help in getting this class file converted would be appreciated. $ xmlvm --in=../jim/Jim.class [08/29/09 01:51:58.821] DEBUG: Instantiated: org.xmlvm.proc.in.ClassInputProcess [08/29/09 01:51:58.822] DEBUG: Instantiated: org.xmlvm.proc.in.ClassInputProcess for "../jim/Jim.class" [08/29/09 01:51:58.822] DEBUG: Instantiated: org.xmlvm.proc.out.XmlvmOutputProcess [08/29/09 01:51:58.822] DEBUG: Adding preprocess org.xmlvm.proc.in.ClassInputProcess to process org.xmlvm.proc.out.XmlvmOutputProcess [08/29/09 01:51:58.822] DEBUG: ClassInputProcess.process(): ../jim/Jim.class Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.simontuffs.onejar.Boot.run(Boot.java:306) at com.simontuffs.onejar.Boot.main(Boot.java:159) Caused by: org.jdom.IllegalDataException: The data "x " is not legal for a JDOM attribute: 0x0 is not a legal XML character. at org.jdom.Attribute.setValue(Attribute.java:486) at org.jdom.Attribute.<init>(Attribute.java:229) at org.jdom.Attribute.<init>(Attribute.java:252) at org.jdom.Element.setAttribute(Element.java:1109) at org.xmlvm.proc.in.ClassInputProcess$BcelVisitor.addConstant(ClassInputProcess.java:317) at org.xmlvm.proc.in.ClassInputProcess$BcelVisitor.emitCPInstruction(ClassInputProcess.java:612) at org.xmlvm.proc.in.ClassInputProcess$BcelVisitor.visitCode(ClassInputProcess.java:485) at org.apache.bcel.classfile.Code.accept(Code.java:132) at org.apache.bcel.classfile.DescendingVisitor.visitCode(DescendingVisitor.java:174) at org.apache.bcel.classfile.Code.accept(Code.java:132) at org.apache.bcel.classfile.DescendingVisitor.visitMethod(DescendingVisitor.java:159) at org.apache.bcel.classfile.Method.accept(Method.java:102) at org.apache.bcel.classfile.DescendingVisitor.visitJavaClass(DescendingVisitor.java:103) at org.apache.bcel.classfile.JavaClass.accept(JavaClass.java:213) at org.apache.bcel.classfile.DescendingVisitor.visit(DescendingVisitor.java:88) at org.xmlvm.proc.in.ClassInputProcess.process(ClassInputProcess.java:96) at org.xmlvm.proc.XmlvmProcess.preprocess(XmlvmProcess.java:172) at org.xmlvm.proc.out.XmlvmOutputProcess.process(XmlvmOutputProcess.java:54) at org.xmlvm.proc.XmlvmProcessor.process(XmlvmProcessor.java:105) at org.xmlvm.proc.NewMain.main(NewMain.java:55) ... 6 more |
From: Arno P. <ar...@pu...> - 2009-08-29 18:52:17
|
can you please send me the original Jim.java file? Arno Steve Huntley wrote: > I successfully installed and compiled xmlvm (checked out of svn today) > on an Ubuntu Hardy machine with Sun Java 1.6 installed. I tried a simple > conversion using a single class file that runs in the JVM without error. > I used the command "xmlvm --in=Jim.class" and I got an error: 'Exception > in thread "main" java.lang.reflect.InvocationTargetException'. Full > output is reproduced below. I opened a bug report and attached the class > file to it. > > Any help in getting this class file converted would be appreciated. > > $ xmlvm --in=../jim/Jim.class > [08/29/09 01:51:58.821] DEBUG: Instantiated: > org.xmlvm.proc.in.ClassInputProcess > [08/29/09 01:51:58.822] DEBUG: Instantiated: > org.xmlvm.proc.in.ClassInputProcess for "../jim/Jim.class" > [08/29/09 01:51:58.822] DEBUG: Instantiated: > org.xmlvm.proc.out.XmlvmOutputProcess > [08/29/09 01:51:58.822] DEBUG: Adding preprocess > org.xmlvm.proc.in.ClassInputProcess to process > org.xmlvm.proc.out.XmlvmOutputProcess > [08/29/09 01:51:58.822] DEBUG: ClassInputProcess.process(): > ../jim/Jim.class > Exception in thread "main" java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > at java.lang.reflect.Method.invoke(Method.java:597) > at com.simontuffs.onejar.Boot.run(Boot.java:306) > at com.simontuffs.onejar.Boot.main(Boot.java:159) > Caused by: org.jdom.IllegalDataException: The data "x " is not > legal for a JDOM attribute: 0x0 is not a legal XML character. > at org.jdom.Attribute.setValue(Attribute.java:486) > at org.jdom.Attribute.<init>(Attribute.java:229) > at org.jdom.Attribute.<init>(Attribute.java:252) > at org.jdom.Element.setAttribute(Element.java:1109) > at > org.xmlvm.proc.in.ClassInputProcess$BcelVisitor.addConstant(ClassInputProcess.java:317) > > at > org.xmlvm.proc.in.ClassInputProcess$BcelVisitor.emitCPInstruction(ClassInputProcess.java:612) > > at > org.xmlvm.proc.in.ClassInputProcess$BcelVisitor.visitCode(ClassInputProcess.java:485) > > at org.apache.bcel.classfile.Code.accept(Code.java:132) > at > org.apache.bcel.classfile.DescendingVisitor.visitCode(DescendingVisitor.java:174) > > at org.apache.bcel.classfile.Code.accept(Code.java:132) > at > org.apache.bcel.classfile.DescendingVisitor.visitMethod(DescendingVisitor.java:159) > > at org.apache.bcel.classfile.Method.accept(Method.java:102) > at > org.apache.bcel.classfile.DescendingVisitor.visitJavaClass(DescendingVisitor.java:103) > > at org.apache.bcel.classfile.JavaClass.accept(JavaClass.java:213) > at > org.apache.bcel.classfile.DescendingVisitor.visit(DescendingVisitor.java:88) > > at org.xmlvm.proc.in.ClassInputProcess.process(ClassInputProcess.java:96) > at org.xmlvm.proc.XmlvmProcess.preprocess(XmlvmProcess.java:172) > at > org.xmlvm.proc.out.XmlvmOutputProcess.process(XmlvmOutputProcess.java:54) > at org.xmlvm.proc.XmlvmProcessor.process(XmlvmProcessor.java:105) > at org.xmlvm.proc.NewMain.main(NewMain.java:55) > ... 6 more > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users |
From: Stephen H. <ste...@al...> - 2009-08-29 21:01:44
|
There is no original Jim java file. I used the NestedVM compiler to cross-compile a C program to the Jim.class file. "Arno Puder" <ar...@pu...> wrote: > > can you please send me the original Jim.java file? > > Arno > > > Steve Huntley wrote: >> I successfully installed and compiled xmlvm (checked out of svn today) >> on an Ubuntu Hardy machine with Sun Java 1.6 installed. I tried a simple >> conversion using a single class file that runs in the JVM without error. >> I used the command "xmlvm --in=Jim.class" and I got an error: 'Exception >> in thread "main" java.lang.reflect.InvocationTargetException'. Full >> output is reproduced below. I opened a bug report and attached the class >> file to it. >> >> Any help in getting this class file converted would be appreciated. >> >> $ xmlvm --in=../jim/Jim.class >> [08/29/09 01:51:58.821] DEBUG: Instantiated: >> org.xmlvm.proc.in.ClassInputProcess >> [08/29/09 01:51:58.822] DEBUG: Instantiated: >> org.xmlvm.proc.in.ClassInputProcess for "../jim/Jim.class" >> [08/29/09 01:51:58.822] DEBUG: Instantiated: >> org.xmlvm.proc.out.XmlvmOutputProcess >> [08/29/09 01:51:58.822] DEBUG: Adding preprocess >> org.xmlvm.proc.in.ClassInputProcess to process >> org.xmlvm.proc.out.XmlvmOutputProcess >> [08/29/09 01:51:58.822] DEBUG: ClassInputProcess.process(): >> ../jim/Jim.class >> Exception in thread "main" java.lang.reflect.InvocationTargetException >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> >> at java.lang.reflect.Method.invoke(Method.java:597) >> at com.simontuffs.onejar.Boot.run(Boot.java:306) >> at com.simontuffs.onejar.Boot.main(Boot.java:159) >> Caused by: org.jdom.IllegalDataException: The data "x " is not >> legal for a JDOM attribute: 0x0 is not a legal XML character. >> at org.jdom.Attribute.setValue(Attribute.java:486) >> at org.jdom.Attribute.<init>(Attribute.java:229) >> at org.jdom.Attribute.<init>(Attribute.java:252) >> at org.jdom.Element.setAttribute(Element.java:1109) >> at >> org.xmlvm.proc.in.ClassInputProcess$BcelVisitor.addConstant(ClassInputProcess.java:317) >> >> at >> org.xmlvm.proc.in.ClassInputProcess$BcelVisitor.emitCPInstruction(ClassInputProcess.java:612) >> >> at >> org.xmlvm.proc.in.ClassInputProcess$BcelVisitor.visitCode(ClassInputProcess.java:485) >> >> at org.apache.bcel.classfile.Code.accept(Code.java:132) >> at >> org.apache.bcel.classfile.DescendingVisitor.visitCode(DescendingVisitor.java:174) >> >> at org.apache.bcel.classfile.Code.accept(Code.java:132) >> at >> org.apache.bcel.classfile.DescendingVisitor.visitMethod(DescendingVisitor.java:159) >> >> at org.apache.bcel.classfile.Method.accept(Method.java:102) >> at >> org.apache.bcel.classfile.DescendingVisitor.visitJavaClass(DescendingVisitor.java:103) >> >> at org.apache.bcel.classfile.JavaClass.accept(JavaClass.java:213) >> at >> org.apache.bcel.classfile.DescendingVisitor.visit(DescendingVisitor.java:88) >> >> at org.xmlvm.proc.in.ClassInputProcess.process(ClassInputProcess.java:96) >> at org.xmlvm.proc.XmlvmProcess.preprocess(XmlvmProcess.java:172) >> at >> org.xmlvm.proc.out.XmlvmOutputProcess.process(XmlvmOutputProcess.java:54) >> at org.xmlvm.proc.XmlvmProcessor.process(XmlvmProcessor.java:105) >> at org.xmlvm.proc.NewMain.main(NewMain.java:55) >> ... 6 more >> >> ------------------------------------------------------------------------------ >> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day >> trial. Simplify your report design, integration and deployment - >> and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> xmlvm-users mailing list >> xml...@li... >> https://lists.sourceforge.net/lists/listinfo/xmlvm-users > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users > |
From: Arno P. <ar...@pu...> - 2009-08-30 20:37:40
|
the class file you attached to your bug report contained a string with embedded binary data. That binary data was not properly escaped when converted to XMLVM. I just submitted a patch that should fix this problem. Two comments: - the class file you try to convert is HUGE. You need to run XMLVM with java -Xms32m -Xmx512m -jar dist/xmlvm.jar otherwise you will run out of heap memory. - you mentioned that this class file was generated from a C program. If you plan to use the Objective-C backend you might consider to use the original C file instead of going through XMLVM. After all, Objective-C is a strict superset of C. Arno Steve Huntley wrote: > I successfully installed and compiled xmlvm (checked out of svn today) > on an Ubuntu Hardy machine with Sun Java 1.6 installed. I tried a simple > conversion using a single class file that runs in the JVM without error. > I used the command "xmlvm --in=Jim.class" and I got an error: 'Exception > in thread "main" java.lang.reflect.InvocationTargetException'. Full > output is reproduced below. I opened a bug report and attached the class > file to it. > > Any help in getting this class file converted would be appreciated. > > $ xmlvm --in=../jim/Jim.class > [08/29/09 01:51:58.821] DEBUG: Instantiated: > org.xmlvm.proc.in.ClassInputProcess > [08/29/09 01:51:58.822] DEBUG: Instantiated: > org.xmlvm.proc.in.ClassInputProcess for "../jim/Jim.class" > [08/29/09 01:51:58.822] DEBUG: Instantiated: > org.xmlvm.proc.out.XmlvmOutputProcess > [08/29/09 01:51:58.822] DEBUG: Adding preprocess > org.xmlvm.proc.in.ClassInputProcess to process > org.xmlvm.proc.out.XmlvmOutputProcess > [08/29/09 01:51:58.822] DEBUG: ClassInputProcess.process(): > ../jim/Jim.class > Exception in thread "main" java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > at java.lang.reflect.Method.invoke(Method.java:597) > at com.simontuffs.onejar.Boot.run(Boot.java:306) > at com.simontuffs.onejar.Boot.main(Boot.java:159) > Caused by: org.jdom.IllegalDataException: The data "x " is not > legal for a JDOM attribute: 0x0 is not a legal XML character. > at org.jdom.Attribute.setValue(Attribute.java:486) > at org.jdom.Attribute.<init>(Attribute.java:229) > at org.jdom.Attribute.<init>(Attribute.java:252) > at org.jdom.Element.setAttribute(Element.java:1109) > at > org.xmlvm.proc.in.ClassInputProcess$BcelVisitor.addConstant(ClassInputProcess.java:317) > > at > org.xmlvm.proc.in.ClassInputProcess$BcelVisitor.emitCPInstruction(ClassInputProcess.java:612) > > at > org.xmlvm.proc.in.ClassInputProcess$BcelVisitor.visitCode(ClassInputProcess.java:485) > > at org.apache.bcel.classfile.Code.accept(Code.java:132) > at > org.apache.bcel.classfile.DescendingVisitor.visitCode(DescendingVisitor.java:174) > > at org.apache.bcel.classfile.Code.accept(Code.java:132) > at > org.apache.bcel.classfile.DescendingVisitor.visitMethod(DescendingVisitor.java:159) > > at org.apache.bcel.classfile.Method.accept(Method.java:102) > at > org.apache.bcel.classfile.DescendingVisitor.visitJavaClass(DescendingVisitor.java:103) > > at org.apache.bcel.classfile.JavaClass.accept(JavaClass.java:213) > at > org.apache.bcel.classfile.DescendingVisitor.visit(DescendingVisitor.java:88) > > at org.xmlvm.proc.in.ClassInputProcess.process(ClassInputProcess.java:96) > at org.xmlvm.proc.XmlvmProcess.preprocess(XmlvmProcess.java:172) > at > org.xmlvm.proc.out.XmlvmOutputProcess.process(XmlvmOutputProcess.java:54) > at org.xmlvm.proc.XmlvmProcessor.process(XmlvmProcessor.java:105) > at org.xmlvm.proc.NewMain.main(NewMain.java:55) > ... 6 more > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users |
From: Steve H. <st...@xh...> - 2009-08-31 04:00:53
|
Thanks very much for your response. I will try your suggestions. My ultimate destination is Javascript, so the Objective-C backend is not an issue. I think using NestedVM as a front end to XMLVM creates exciting possibilities for your software. It opens up a whole new class of code, namely almost any program that can be compiled with gcc, as inputs to XMLVM. --Steve H. Arno Puder wrote: > the class file you attached to your bug report contained a string with > embedded binary data. That binary data was not properly escaped when > converted to XMLVM. I just submitted a patch that should fix this problem. > > Two comments: > > - the class file you try to convert is HUGE. You need to run XMLVM with > java -Xms32m -Xmx512m -jar dist/xmlvm.jar > otherwise you will run out of heap memory. > - you mentioned that this class file was generated from a C program. > If you plan to use the Objective-C backend you might consider to use > the original C file instead of going through XMLVM. After all, > Objective-C is a strict superset of C. > > Arno > > |
From: Steve H. <st...@xh...> - 2009-09-01 05:55:10
|
I generated a Javascript file from a Java class file using XMLVM. When I tried to load the Javascript file into the Spidermonkey command-line Javascript interpreter, I got the following error: js> load('org_ibex_nestedvm_UnixRuntime.js'); org_ibex_nestedvm_UnixRuntime.js:4567: SyntaxError: syntax error: org_ibex_nestedvm_UnixRuntime.js:4567: __stack[__sp++] = (__objectref instanceof String[]) ? 1 : 0; org_ibex_nestedvm_UnixRuntime.js:4567: .....................................................^ Executed on an Ubuntu Hardy computer, with Spidermonkey version 1.7.0 installed from the standard package repository. The Javascript file, as well as the original java file and class file are attached to a bug report on sourceforge. |
From: Sascha H. <sa...@gm...> - 2009-09-14 12:41:35
|
Thanks you Steve for your bug report. I will take a look at it as soon as possible. // Sascha On Tue, Sep 1, 2009 at 7:54 AM, Steve Huntley <st...@xh...> wrote: > I generated a Javascript file from a Java class file using XMLVM. When I > tried to load the Javascript file into the Spidermonkey command-line > Javascript interpreter, I got the following error: > > js> load('org_ibex_nestedvm_UnixRuntime.js'); > org_ibex_nestedvm_UnixRuntime.js:4567: SyntaxError: syntax error: > org_ibex_nestedvm_UnixRuntime.js:4567: __stack[__sp++] = > (__objectref instanceof String[]) ? 1 : 0; > org_ibex_nestedvm_UnixRuntime.js:4567: > .....................................................^ > > Executed on an Ubuntu Hardy computer, with Spidermonkey version 1.7.0 > installed from the standard package repository. > > The Javascript file, as well as the original java file and class file are > attached to a bug report on sourceforge. > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > xmlvm-users mailing list > xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmlvm-users > |