Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: Connecting to JDBC (MySQL) Datasource via Report Designer

  1. #1
    Join Date
    Aug 2013
    Posts
    4

    Default Connecting to JDBC (MySQL) Datasource via Report Designer

    I am receiving the message below when trying to connect to my MySQL database. I can connect to the JDBC datasource via Data Integration. I have read various post that suggest I copy the mysql jar file into the /report-designer/ directory. That is not possible because when I installed Report Designer that directory was not created. However, i do see directories under .pentaho. Please help

    Error connecting to database [bvreporting] : org.pentaho.di.core.exception.KettleDatabaseException:
    Error occured while trying to connect to the database


    Exception while loading class
    org.gjt.mm.mysql.Driver




    org.pentaho.di.core.exception.KettleDatabaseException:
    Error occured while trying to connect to the database


    Exception while loading class
    org.gjt.mm.mysql.Driver




    at org.pentaho.di.core.database.Database.normalConnect(Database.java:366)
    at org.pentaho.di.core.database.Database.connect(Database.java:315)
    at org.pentaho.di.core.database.Database.connect(Database.java:277)
    at org.pentaho.di.core.database.Database.connect(Database.java:267)
    at org.pentaho.di.core.database.DatabaseFactory.getConnectionTestReport(DatabaseFactory.java:86)
    at org.pentaho.di.core.database.DatabaseMeta.testConnection(DatabaseMeta.java:2464)
    at org.pentaho.ui.database.event.DataHandler.testDatabaseConnection(DataHandler.java:533)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.pentaho.ui.xul.impl.AbstractXulDomContainer.invoke(AbstractXulDomContainer.java:329)
    at org.pentaho.ui.xul.swing.tags.SwingButton$OnClickRunnable.run(SwingButton.java:58)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:676)
    at java.awt.EventQueue$2.run(EventQueue.java:674)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:205)
    at java.awt.Dialog$1.run(Dialog.java:1049)
    at java.awt.Dialog$3.run(Dialog.java:1101)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Dialog.show(Dialog.java:1099)
    at java.awt.Component.show(Component.java:1615)
    at java.awt.Component.setVisible(Component.java:1567)
    at java.awt.Window.setVisible(Window.java:843)
    at java.awt.Dialog.setVisible(Dialog.java:984)
    at org.pentaho.ui.xul.swing.tags.SwingDialog.show(SwingDialog.java:234)
    at org.pentaho.reporting.ui.datasources.jdbc.ui.XulDatabaseDialog.open(XulDatabaseDialog.java:256)
    at org.pentaho.reporting.ui.datasources.jdbc.ui.ConnectionPanel$EditDataSourceAction.actionPerformed(ConnectionPanel.java:159)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:272)
    at java.awt.Component.processMouseEvent(Component.java:6414)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3275)
    at java.awt.Component.processEvent(Component.java:6179)
    at java.awt.Container.processEvent(Container.java:2083)
    at java.awt.Component.dispatchEventImpl(Component.java:4776)
    at java.awt.Container.dispatchEventImpl(Container.java:2141)
    at java.awt.Component.dispatchEvent(Component.java:4604)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4619)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4280)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4210)
    at java.awt.Container.dispatchEventImpl(Container.java:2127)
    at java.awt.Window.dispatchEventImpl(Window.java:2489)
    at java.awt.Component.dispatchEvent(Component.java:4604)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:717)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:676)
    at java.awt.EventQueue$2.run(EventQueue.java:674)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:690)
    at java.awt.EventQueue$3.run(EventQueue.java:688)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:687)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:205)
    at java.awt.Dialog$1.run(Dialog.java:1049)
    at java.awt.Dialog$3.run(Dialog.java:1101)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Dialog.show(Dialog.java:1099)
    at java.awt.Component.show(Component.java:1615)
    at java.awt.Component.setVisible(Component.java:1567)
    at java.awt.Window.setVisible(Window.java:843)
    at java.awt.Dialog.setVisible(Dialog.java:984)
    at org.pentaho.reporting.libraries.designtime.swing.CommonDialog.performEdit(CommonDialog.java:156)
    at org.pentaho.reporting.ui.datasources.jdbc.ui.JdbcDataSourceDialog.performConfiguration(JdbcDataSourceDialog.java:759)
    at org.pentaho.reporting.ui.datasources.jdbc.JdbcDataSourcePlugin.performEdit(JdbcDataSourcePlugin.java:67)
    at org.pentaho.reporting.designer.core.actions.report.AddDataFactoryAction.actionPerformed(AddDataFactoryAction.java:79)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2028)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.AbstractButton.doClick(AbstractButton.java:389)
    at com.apple.laf.ScreenMenuItem.actionPerformed(ScreenMenuItem.java:95)
    at java.awt.MenuItem.processActionEvent(MenuItem.java:650)
    at java.awt.MenuItem.processEvent(MenuItem.java:609)
    at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:343)
    at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:331)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:720)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:676)
    at java.awt.EventQueue$2.run(EventQueue.java:674)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:97)
    at java.awt.EventQueue$3.run(EventQueue.java:690)
    at java.awt.EventQueue$3.run(EventQueue.java:688)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:687)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    Caused by: org.pentaho.di.core.exception.KettleDatabaseException:
    Exception while loading class
    org.gjt.mm.mysql.Driver


    at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:421)
    at org.pentaho.di.core.database.Database.normalConnect(Database.java:350)
    ... 109 more
    Caused by: java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
    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 java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:171)
    at org.pentaho.di.core.database.Database.connectUsingClass(Database.java:412)
    ... 110 more

  2. #2
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Did you actually install a driver by copying the JDBC-driver Jar into the report-designer's lib-directory?

    MySQL has the legal stance that their driver is GPL and that everyone who uses that driver (or their database protocol, just in case you want to use an alternative driver) infects itself with the GPL clause and thus all your software has to be opensource. Therefore we do not ship with MySQL drivers. When you copy your driver into your installation, then only your copy is GPL and only you have to deal with the consequences.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  3. #3
    Join Date
    Aug 2013
    Posts
    4

    Default

    Thanks for the response. I have not copied any Jar file into the report-designer's lib-directory? Because when I installed report designer (using prd-ce-mac-3.9.1-GA.tar.gz) no report-designer directories were installed. This may be the real issue.

    On the other hand, I am successfully able to use data integration by coping the mysql-connector-java-5.1.26-bin.jar file into the appropriate data-integration folder.

  4. #4
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    An APP bundle is a directory. With your finder, go to the "/Applications" folder, and then right/click on the report-designer bundle and select "Open Bundle". Then you will see all the directories, including the "lib" directory.

    Data-integration does not ship with an standard-mac bundle, thats why you see all the files and folders in your applications menu when you click on it.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  5. #5
    Join Date
    Aug 2013
    Posts
    4

    Default

    In my applications folder I can see only the Pentaho Report Designer application icon. There isn't a report-designer bundle/directory.

    Thanks

  6. #6
    Join Date
    Mar 2003
    Posts
    8,085

    Default

    Right click on the application. An MacOS application is a directory - so just right-click and you find the option named "Open Bundle". Then proceed from there.
    Get the latest news and tips and tricks for Pentaho Reporting at the Pentaho Reporting Blog.

  7. #7
    Join Date
    Oct 2013
    Posts
    18

    Default

    This had being a headache for me the whole day (and it was a looong day).
    I just applied your solution and I can see the wonderful 'ok' message when testing my connection.

    Thank you soooooo much!!!!!!!!!!

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.