clarinsi / jos2ud

1 stars 0 forks source link

Error while running makefile: Could not find or load main class net.sf.saxon.Transform #12

Closed kajad closed 3 years ago

kajad commented 3 years ago

In all my Linux-running machines, running the make ssj command returns the following error related to Java:

  inflating: ssj500k-en.TEI/ssj500k.back.xml
#java -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl net.sf.saxon.Transform -xi -xsl:bin/tei2conllu.xsl Origin/ssj500k.all.xml > Origin/ssj500k-en.tbl
java -Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl net.sf.saxon.Transform -xi -xsl:bin/tei2conllu.xsl Origin/ssj500k-en.TEI/ssj500k-en.xml > Origin/ssj500k-en.tbl
Error: Could not find or load main class net.sf.saxon.Transform
Makefile:99: recipe for target 'format-ssj' failed
make: *** [format-ssj] Error 1

Any idea how to overcome this, @TomazErjavec ?

TomazErjavec commented 3 years ago

Any idea how to overcome this, @TomazErjavec ?

This way of running saxon used to work, and maybe it still does, if you somehow install the saxon class. However, now I just run it directly, and in 845e1b2 this is how it is run in the Makefile - it should work, I hope, on new-tantra. On other machines, you must first download saxon from https://sourceforge.net/projects/saxon/files/Saxon-HE/10/Java/, I think the file SaxonHE10-5J.zip and then put the .jar file somewhere and call it as per Makefile. Let me know if it don't work.

kajad commented 3 years ago

I did not manage to resolve this issue on my PC, however, the conversion works as expected on new-tantra, which is good enough.