I have compiled sphinx4 on Win32 using ant successfully and ran jsapi.exe on lib directory. When I tried executing HelloWorld.jar, I got following error message.
Does anyone know what I need to do to correct this problem?
$ java -mx256m -jar bin/HelloWorld.jar
Loading...
09:57.343 INFO logMath Log base is 1.0001
09:57.343 INFO logMath Using AddTable when adding logs
09:57.343 INFO logMath LogAdd table has 99022 entries.
class not found !java.lang.ClassNotFoundException: edu.cmu.sphinx.jsapi.JSGFGram
mar
Problem configuring HelloWorld: Property Exception component:'null' property:'nu
ll' - null
edu.cmu.sphinx.util.props.PropertyException: java.lang.ClassNotFoundException: j
sgfGrammar
Property Exception component:'null' property:'null' - null
edu.cmu.sphinx.util.props.PropertyException: java.lang.ClassNotFoundException: j
sgfGrammar
at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.ja
va:305)
at edu.cmu.sphinx.linguist.flat.FlatLinguist.newProperties(FlatLinguist.
java:174)
at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:4
11)
at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.ja
va:269)
at edu.cmu.sphinx.decoder.search.SimpleBreadthFirstSearchManager.newProp
erties(SimpleBreadthFirstSearchManager.java:139)
at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:4
11)
at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.ja
va:269)
at edu.cmu.sphinx.decoder.Decoder.newProperties(Decoder.java:52)
at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:4
11)
at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.ja
va:269)
at edu.cmu.sphinx.recognizer.Recognizer.newProperties(Recognizer.java:78
)
at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:4
11)
at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationMa
nager.java:144)
at demo.sphinx.helloworld.HelloWorld.main(HelloWorld.java:46)
Caused by: java.lang.ClassNotFoundException: jsgfGrammar
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.ja
va:279)
... 13 more
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have compiled sphinx4 on Win32 using ant successfully and ran jsapi.exe on lib directory. When I tried executing HelloWorld.jar, I got following error message.
Does anyone know what I need to do to correct this problem?
$ java -mx256m -jar bin/HelloWorld.jar
Loading...
09:57.343 INFO logMath Log base is 1.0001
09:57.343 INFO logMath Using AddTable when adding logs
09:57.343 INFO logMath LogAdd table has 99022 entries.
class not found !java.lang.ClassNotFoundException: edu.cmu.sphinx.jsapi.JSGFGram
mar
Problem configuring HelloWorld: Property Exception component:'null' property:'nu
ll' - null
edu.cmu.sphinx.util.props.PropertyException: java.lang.ClassNotFoundException: j
sgfGrammar
Property Exception component:'null' property:'null' - null
edu.cmu.sphinx.util.props.PropertyException: java.lang.ClassNotFoundException: j
sgfGrammar
at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.ja
va:305)
at edu.cmu.sphinx.linguist.flat.FlatLinguist.newProperties(FlatLinguist.
java:174)
at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:4
11)
at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.ja
va:269)
at edu.cmu.sphinx.decoder.search.SimpleBreadthFirstSearchManager.newProp
erties(SimpleBreadthFirstSearchManager.java:139)
at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:4
11)
at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.ja
va:269)
at edu.cmu.sphinx.decoder.Decoder.newProperties(Decoder.java:52)
at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:4
11)
at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.ja
va:269)
at edu.cmu.sphinx.recognizer.Recognizer.newProperties(Recognizer.java:78
)
at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:4
11)
at edu.cmu.sphinx.util.props.ConfigurationManager.lookup(ConfigurationMa
nager.java:144)
at demo.sphinx.helloworld.HelloWorld.main(HelloWorld.java:46)
Caused by: java.lang.ClassNotFoundException: jsgfGrammar
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.ja
va:279)
... 13 more
Sphinx jars are still missing in your classpath? It's better to start demos following the tutorial.
I just had to recompile sphinx4 AFTER I ran jsapi command. Maybe this should be documented more clearly?
Probably so, but where?