petermr / norma

Convert XML/SVG/PDF into normalised, sectioned, scholarly HTML
Apache License 2.0
2 stars 4 forks source link

Installing Eclipse in the VM breaks norma #22

Closed rossmounce closed 9 years ago

rossmounce commented 9 years ago

hang-on... I can't even run norma --version without error right now. I may have somehow broken my norma installation ?!?!

Ignore the below

Test from ClinicalTrialsDemo.java called runManyFiles() doesn't work as written. The runSingleFile() works well.

I suspect the -r true is probably the problem. Doesnt work without it though, either. Tried also running just -q examples/ and that didn't work either. The below is the syntax as written in the file, albeit passing it just 3 example ctree folders.

workshop@crunchbang:~/norma$ norma -q examples/http_www.trialsjournal.com_content_16_1_1 examples/http_www.trialsjournal.com_content_16_1_2 examples/http_www.trialsjournal.com_content_16_1_50 -r true -i fulltext.xml -o scholarly.html --transform src/main/resources/org/xmlcml/norma/pubstyle/bmc/xml2html.xsl
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/xmlcml/xml/XMLUtil : Unsupported major.minor version 51.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:643)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
    at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
    at org.xmlcml.cmine.args.DefaultArgProcessor.createArgumentOptions(DefaultArgProcessor.java:202)
    at org.xmlcml.cmine.args.DefaultArgProcessor.readArgumentOptions(DefaultArgProcessor.java:195)
    at org.xmlcml.cmine.args.DefaultArgProcessor.<init>(DefaultArgProcessor.java:169)
    at org.xmlcml.norma.NormaArgProcessor.<init>(NormaArgProcessor.java:67)
    at org.xmlcml.norma.NormaArgProcessor.<init>(NormaArgProcessor.java:81)
    at org.xmlcml.norma.Norma.run(Norma.java:22)
    at org.xmlcml.norma.Norma.main(Norma.java:18)
petermr commented 9 years ago

This message means that an older version of Java has been used (probably 1.5) instead of 1.7 - do you get this error in the VM?

rossmounce commented 9 years ago

Ahhhh.... that explains it.

I tried to install eclipse from the repos (in the VM) to speed things up.

That eclipse install probably buggered up my Java. Thanks. Issue solved

Note to self and others, don't install eclipse in the VM via:

sudo apt-get install eclipse