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 |