US and Worldwide: +1 (866) 660-7555
Results 1 to 10 of 10

Thread: java.lang.ClassNotFoundException: org.scannotation.AnnotationDB

  1. #1

    Default java.lang.ClassNotFoundException: org.scannotation.AnnotationDB

    When I first start up the Schema Workbench, I get this exception thrown:

    java.lang.ClassNotFoundException: org.scannotation.AnnotationDB

    It's the very first thing I've tried to do once starting up the workbench for the very first time.

    Note that instructions say to go to Tools->Options first, but there is no "Tools" menu. If I go to Options->Connection... , I get the same exceptoin



  2. #2

    Default

    Here is my environment:
    Mondrian / PDI Version - 3.5.0
    OS version CentOS release 6.4 (Final)
    Java version - 1.7.0_25
    Database version
    - MySQL 5.5.32

    Here is the full traceback, note that there is no "Preferences" menu item either:


    DEBUG: Using JAVA_HOME
    DEBUG: _PENTAHO_JAVA_HOME=/usr/lib/jvm/java-1.7.0
    DEBUG: _PENTAHO_JAVA=/usr/lib/jvm/java-1.7.0/bin/java
    14:23:48,917 INFO [MondrianProperties] Mondrian: properties loaded from 'file=/home/dangulo/schema-workbench/mondrian.properties (exists=true)'
    14:23:48,931 INFO [MondrianProperties] Mondrian: properties loaded from 'file:/home/dangulo/schema-workbench/mondrian.properties'
    14:23:48,931 INFO [MondrianProperties] Mondrian: loaded 0 system properties
    14:24:29,397 ERROR [I18n] Can't find the translation for key = jdbcMetaData.blank.exception: using default (Driver={0}
    Connection URL={1}
    Use Preferences to set Database Connection parameters first and then open a Schema)
    java.util.MissingResourceException: Can't find resource for bundle java.util.PropertyResourceBundle, key jdbcMetaData.blank.exception
    at java.util.ResourceBundle.getObject(ResourceBundle.java:395)
    at java.util.ResourceBundle.getString(ResourceBundle.java:355)
    at mondrian.gui.I18n.getString(I18n.java:338)
    at mondrian.gui.I18n.getFormattedString(I18n.java:302)
    at mondrian.gui.JdbcMetaData.initConnection(JdbcMetaData.java:110)
    at mondrian.gui.JdbcMetaData.<init>(JdbcMetaData.java:63)
    at mondrian.gui.Workbench.getNewJdbcMetadata(Workbench.java:1951)
    at mondrian.gui.Workbench.openSchemaFrame(Workbench.java:1757)
    at mondrian.gui.Workbench.newSchemaMenuItemActionPerformed(Workbench.java:1334)
    at mondrian.gui.Workbench.access$200(Workbench.java:55)
    at mondrian.gui.Workbench$12.actionPerformed(Workbench.java:567)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:376)
    at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:833)
    at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:877)
    at java.awt.Component.processMouseEvent(Component.java:6505)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3312)
    at java.awt.Component.processEvent(Component.java:6270)
    at java.awt.Container.processEvent(Container.java:2229)
    at java.awt.Component.dispatchEventImpl(Component.java:4861)
    at java.awt.Container.dispatchEventImpl(Container.java:2287)
    at java.awt.Component.dispatchEvent(Component.java:4687)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    at java.awt.Container.dispatchEventImpl(Container.java:2273)
    at java.awt.Window.dispatchEventImpl(Window.java:2719)
    at java.awt.Component.dispatchEvent(Component.java:4687)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:694)
    at java.awt.EventQueue$3.run(EventQueue.java:692)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:708)
    at java.awt.EventQueue$4.run(EventQueue.java:706)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
    Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/scannotation/AnnotationDB
    at org.pentaho.di.core.plugins.BasePluginType.findAnnotatedClassFiles(BasePluginType.java:237)
    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.connectionButtonActionPerformed(Workbench.java:1247)
    at mondrian.gui.Workbench.access$900(Workbench.java:55)
    at mondrian.gui.Workbench$11.actionPerformed(Workbench.java:544)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
    at java.awt.Component.processMouseEvent(Component.java:6505)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3312)
    at java.awt.Component.processEvent(Component.java:6270)
    at java.awt.Container.processEvent(Container.java:2229)
    at java.awt.Component.dispatchEventImpl(Component.java:4861)
    at java.awt.Container.dispatchEventImpl(Container.java:2287)
    at java.awt.Component.dispatchEvent(Component.java:4687)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422)
    at java.awt.Container.dispatchEventImpl(Container.java:2273)
    at java.awt.Window.dispatchEventImpl(Window.java:2719)
    at java.awt.Component.dispatchEvent(Component.java:4687)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:735)
    at java.awt.EventQueue.access$200(EventQueue.java:103)
    at java.awt.EventQueue$3.run(EventQueue.java:694)
    at java.awt.EventQueue$3.run(EventQueue.java:692)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87)
    at java.awt.EventQueue$4.run(EventQueue.java:708)
    at java.awt.EventQueue$4.run(EventQueue.java:706)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:705)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
    Caused by: java.lang.ClassNotFoundException: org.scannotation.AnnotationDB
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 47 more

  3. #3
    Join Date
    Jan 2013
    Posts
    516

    Default

    AFAIK the scannotation library is not used by the workbench in Mondrian 3.5. Where did you get your copy of workbench?

    It could be worth seeing whether the error happens for you with the current snapshot:
    http://ci.pentaho.com/job/mondrian-3.5/lastSuccessfulBuild/artifact/dist/workbench-3.5-SNAPSHOT.zip

  4. #4

    Default

    Quote Originally Posted by mcampbell View Post
    AFAIK the scannotation library is not used by the workbench in Mondrian 3.5. Where did you get your copy of workbench?

    It could be worth seeing whether the error happens for you with the current snapshot:
    http://ci.pentaho.com/job/mondrian-3.5/lastSuccessfulBuild/artifact/dist/workbench-3.5-SNAPSHOT.zip
    The documentation says that the workbench is distributed with Mondrian, but I could not find any such files. I downloaded the workbench from here: http://sourceforge.net/projects/mond.../3.5.0-stable/

    I'm working on LInux (CentOS), so I didn't get the .zip file, but rather the .tar.gz

    I'll try the snapshot at the link you sent. Thanks.

  5. #5

    Default

    Quote Originally Posted by mcampbell View Post
    AFAIK the scannotation library is not used by the workbench in Mondrian 3.5. Where did you get your copy of workbench?

    It could be worth seeing whether the error happens for you with the current snapshot:
    http://ci.pentaho.com/job/mondrian-3.5/lastSuccessfulBuild/artifact/dist/workbench-3.5-SNAPSHOT.zip
    I start the app and click Option->connection, and get exactly the same traceback.

  6. #6
    Join Date
    Jan 2013
    Posts
    516

    Default

    I'm not sure what's going on. To get more information, could you uncomment the following two lines from workbench.sh: 1) the line that says "echo $CP, 2) the line that says 'JAVA_FLAGS="-verbose $JAVA_FLAGS". Then capture all the startup messages with
    ./workbench.sh > startup.log

    Another thing you could try to get unstuck is to just download the scannotation.jar and put it in the workbench lib directory. Like I said earlier, though, scannotation shouldn't be required so I'm not sure why you're getting that error in the first place.

  7. #7

    Default

    Quote Originally Posted by mcampbell View Post
    I'm not sure what's going on. To get more information, could you uncomment the following two lines from workbench.sh: 1) the line that says "echo $CP, 2) the line that says 'JAVA_FLAGS="-verbose $JAVA_FLAGS". Then capture all the startup messages with
    ./workbench.sh > startup.log
    Sure, I'll do that

    Quote Originally Posted by mcampbell View Post
    download the scannotation.jar
    Where do I get that from? Is that part of the source for Workbench, which would allow me to find it in SourceForge?

  8. #8
    Join Date
    Jan 2013
    Posts
    516

    Default

    I think scannotation is itself a sourceforge project, so you should be able to download it from SF.

  9. #9
    Join Date
    Dec 2006
    Posts
    1

    Default

    Hi, I had the same problem. I was able to solve it by copying the scannotation.jar and javassist.jar in the /lib folder (you can download them easily from Internet). Then I included these lines in workbench.sh

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

    around line 48 to include them in the classpath. Now workbench is working again...

  10. #10

    Default

    Thanks!! Works for me!

    Emannuel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •