Pages

Google Ads

Monday, August 12, 2013

Caused by: java.lang.ClassNotFoundException: javassist.bytecode.ClassFile

Hi Pentaho Folks,

Last week when I executed ./workbench.sh on my Mac I've got this error:

Caused by: java.lang.ClassNotFoundException: javassist.bytecode.ClassFile

It also occurs in Linux Ubuntu.

MacBook-Air-de-Caio:schema-workbench caiomsouza$ ./workbench.sh

/Applications/Pentaho/psw-ce-3.5.0/schema-workbench
WARNING: Using java from path
DEBUG: _PENTAHO_JAVA_HOME=
DEBUG: _PENTAHO_JAVA=java
17:09:41,822 ERROR [Workbench] main
java.lang.NoClassDefFoundError: javassist/bytecode/ClassFile
    at org.scannotation.AnnotationDB.scanClass(AnnotationDB.java:311)
    at org.scannotation.AnnotationDB.scanArchives(AnnotationDB.java:294)
    at org.pentaho.di.core.plugins.BasePluginType.findAnnotatedClassFiles(BasePluginType.java:238)
    at org.pentaho.di.core.plugins.BasePluginType.registerPluginJars(BasePluginType.java:500)
    at org.pentaho.di.core.plugins.BasePluginType.searchPlugins(BasePluginType.java:115)
    at org.pentaho.di.core.plugins.PluginRegistry.init(PluginRegistry.java:420)
    at org.pentaho.di.core.KettleEnvironment.init(KettleEnvironment.java:121)
    at org.pentaho.di.core.KettleEnvironment.init(KettleEnvironment.java:68)
    at mondrian.gui.Workbench.getDbMeta(Workbench.java:1225)
    at mondrian.gui.Workbench.loadDatabaseMeta(Workbench.java:193)
    at mondrian.gui.Workbench.(Workbench.java:132)
    at mondrian.gui.Workbench.main(Workbench.java:2094)
Caused by: java.lang.ClassNotFoundException: javassist.bytecode.ClassFile
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 12 more


How to solve it:

I edited workbench.sh and add the line below:

CP="${CP}${PS}${MONDRIAN_HOME}/lib/javassist.jar"

I also put the javassist.jar on psw-ce-3.5.0/schema-workbench/lib

After that, It worked fine.

If you find a better way to solve it, please let me know it.

No comments: