VRML input broken

Found a bug? Post here.
Post Reply
User avatar
arsiamons
Posts: 6
Joined: Tue 12. Jan 2010, 03:36

VRML input broken

Post by arsiamons » Fri 15. Jan 2010, 18:32

Using the current sources from the SVN repository an exception is thrown if a *.wrl file is tried to load:

Code: Select all

SCHWERWIEGEND [ReaderVRML.setInput]: VRML 1 parsing failed, call ANTLR first!
java.lang.ClassNotFoundException: de.jreality.reader.vrml.VRMLV1Lexer
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:169)
	at de.jreality.reader.ReaderVRML.setInput(ReaderVRML.java:65)
	at de.jreality.reader.Readers.read(Readers.java:144)
	at de.jreality.reader.Readers.read(Readers.java:158)
	at de.jreality.reader.Readers.read(Readers.java:196)
	at de.jreality.plugin.content.ContentLoader.loadFile(ContentLoader.java:99)
	at de.jreality.plugin.content.ContentLoader.access$0(ContentLoader.java:92)
	at de.jreality.plugin.content.ContentLoader$ContentLoadAction.actionPerformed(ContentLoader.java:77)
Apparently the given class could not be found, that's why i use the classes from rev. 2143 with some merges from current revision to work against compilation errors - but that isn't the right way?
How can antlr be called properly?

User avatar
gunn
Posts: 323
Joined: Thu 14. Dec 2006, 09:56
Location: TU Berlin
Contact:

Re: VRML input broken

Post by gunn » Fri 15. Jan 2010, 19:26

The standard build target for jReality should generate the file VRMLV1Lexer.java from the source file vrml-v1.0.g. I just tested it myself; in eclipse I removed the files VRMLV1Parser.java and VRMLV1Lexer.java, and then selectedthe jReality build file in the Package Explorer, chose on right mouse Run As ...-> Ant Build, and chose the target "io". This then invoked antlr as desired and recreated the two .java files. I was able to run JRViewer and load a VRML1.0 file from the "File->Load Content" menu item. antlr.jar is included in the lib folder of the standard jReality source repository and is referenced as such in build.xml.
jReality core developer

User avatar
arsiamons
Posts: 6
Joined: Tue 12. Jan 2010, 03:36

Re: VRML input broken

Post by arsiamons » Fri 15. Jan 2010, 22:08

gunn wrote:The standard build target for jReality should generate the file VRMLV1Lexer.java from the source file vrml-v1.0.g. [...] selectedthe jReality build file in the Package Explorer, chose on right mouse Run As ...-> Ant Build, and chose the target "io". This then invoked antlr as desired and recreated the two .java files. I was able to run JRViewer and load a VRML1.0 file from the "File->Load Content" menu item. antlr.jar is included in the lib folder of the standard jReality source repository and is referenced as such in build.xml.
Thank you for the immediate help!
I have missed the ant-file at all. Maybe this and some things should be mentioned within the sources? :wink:

User avatar
gunn
Posts: 323
Joined: Thu 14. Dec 2006, 09:56
Location: TU Berlin
Contact:

Re: VRML input broken

Post by gunn » Sat 16. Jan 2010, 10:08

You're right, it should be mentioned. I took a quick look at the docs to see if I could find something, and only found a very old README file in that folder which gave instructions for manually generating the .java files, but obviously it should refer to the build.xml file and it should be at some upper level place so everyone sees it.
jReality core developer

Post Reply