10 Replies Latest reply on Dec 3, 2012 3:15 PM by Steven Hawkins

    Powerhub driver not working with Teiid

    tanmoypalit Newbie

      Hi,

       

      I have a Powerhub drvier which is com.lgc.dam.phs.client.jdbc.PhsJDBCDriver. This is a custom JDBC driver from Landmark.

      Connection string looks like the following:

      jdbc:scwapi:<server_name>;<powerhub_user>;<passwd>;<database_instance><database_name;<username>;<dbpasswd>

      Using the above I made JNDI reference in JBoss AS 5.0.1 and worte simple java code which makes connection to underlying data source and fetches data.

       

      But when I am trying to consume the source Teiid I am getting the followin error:

      11-29-2012 10-43-25 AM.jpg

      I could not find the log.

      Although the connection was successful from Test Connection but I think Teiid is not able to get metadata from the underlying data source.

       

      Any help will be appreciated.

       

      Regards

      Tanmoy Palit

        • 1. Re: Powerhub driver not working with Teiid
          Ramesh Reddy Master

          Is this JBoss AS 5.0.1 or AS 5.1.0? Teiid 7.x only works with JBoss AS 5.1.0.  Teiid 8.x works with JBoss AS 7.1.1.

           

          If you are using JBoss AS 5.1.0, then the log file will be in "jboss-5.1.0.GA/server/default/log", also check this JDBC driver with tools like SqurrieL and make sure the metadata is shown correctly.

           

          Ramesh..

          • 2. Re: Powerhub driver not working with Teiid
            tanmoypalit Newbie

            Sorry that was a typo. It is Jboss AS 5.1.0.GA. I do not see any error message in jboss-5.1.0.GA\server\default\log\server.log

             

            I do use Squrriel SQL Client to check metadata and build queries to this Powerhub data source using same PhsJDBC driver. It works fine.

             

            Regards

            Tanmoy Palit

             

            • 3. Re: Powerhub driver not working with Teiid
              Ramesh Reddy Master

              Tanmoy,

               

              Couple things

               

              1) The driver looks like using awt or swing, you can not run GUI based drivers. You should be able to set "java.awt.headless" system property so that no GUI errors pop up. But this still does not fix the issue

              2) I believe the driver is not talking about the server log, it may be talking about the driver's log file. See if there is a configuration or default location this driver writes a log file.

               

              Here is guy who installed a spy driver to figure out what went wrong


              http://hollyghozi.com/index.php/2009/09/powerhub-jdbc-log/

               

              I suspect, JBoss AS is calling JDBC API method that this driver does not implement and giving issues.

               

              Hope this helps.

               

              Ramesh..

              • 4. Re: Powerhub driver not working with Teiid
                tanmoypalit Newbie

                I got the error and the stack trace.

                 

                Error:

                Unexpected exception while calling com.lgc.dam.phs.client.jdbc.PhsJDBCDatabaseMetaData.getTableTypes() and processing results on Acceptance PowerExplorer.CDSPROD

                 

                Here is the complete stack trace for the error:

                java.lang.NullPointerException

                          at com.metamatrix.modeler.internal.jdbc.ui.wizards.JdbcImportMetadataPage.initializeInTransaction(JdbcImportMetadataPage.java:313)

                          at com.metamatrix.modeler.internal.jdbc.ui.wizards.JdbcImportMetadataPage.setVisible(JdbcImportMetadataPage.java:238)

                          at org.eclipse.jface.wizard.WizardDialog.updateForPage(WizardDialog.java:1260)

                          at org.eclipse.jface.wizard.WizardDialog.access$4(WizardDialog.java:1239)

                          at org.eclipse.jface.wizard.WizardDialog$8.run(WizardDialog.java:1228)

                          at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)

                          at org.eclipse.jface.wizard.WizardDialog.showPage(WizardDialog.java:1226)

                          at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDialog.java:915)

                          at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:428)

                          at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:624)

                          at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:240)

                          at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

                          at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)

                          at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)

                          at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)

                          at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)

                          at org.eclipse.jface.window.Window.open(Window.java:801)

                          at org.eclipse.ui.internal.handlers.WizardHandler$Import.executeHandler(WizardHandler.java:150)

                          at org.eclipse.ui.internal.handlers.WizardHandler.execute(WizardHandler.java:277)

                          at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293)

                          at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)

                          at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)

                          at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)

                          at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241)

                          at org.eclipse.ui.internal.actions.CommandAction.runWithEvent(CommandAction.java:157)

                          at org.eclipse.ui.internal.actions.CommandAction.run(CommandAction.java:171)

                          at org.eclipse.ui.actions.ImportResourcesAction.run(ImportResourcesAction.java:97)

                          at org.eclipse.ui.actions.BaseSelectionListenerAction.runWithEvent(BaseSelectionListenerAction.java:168)

                          at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)

                          at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)

                          at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)

                          at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

                          at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)

                          at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)

                          at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)

                          at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)

                          at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)

                          at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)

                          at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)

                          at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

                          at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)

                          at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

                          at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)

                          at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)

                          at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)

                          at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)

                          at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)

                          at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)

                          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                          at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

                          at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

                          at java.lang.reflect.Method.invoke(Unknown Source)

                          at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)

                          at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)

                          at org.eclipse.equinox.launcher.Main.run(Main.java:1410)

                          at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

                 

                Any idea what's going wrong?

                • 5. Re: Powerhub driver not working with Teiid
                  tanmoypalit Newbie

                  Here is some information about PowerHub Driver:

                   

                  PowerHub organizes data models into ‘topics’, which can be thought

                  of as ‘logical’ tables. JDBC methods like

                  DatabaseMetaData.getTables() will therefore return ‘topics’. Since

                  PhsJDBC is a PowerHub client application, the PowerHub access

                  control mechanism is automatically applied. Topics (capabilities) that

                  the user does not have access to, will not be visible in PhsJDBC.

                   

                  Note that the getSchemas() and getTables() functions may return

                  schemas (datamodels) and tables (topics) that don’t correspond to the

                  datamodel that was selected in the URL. To perform queries against

                  these tables, it will be necessary to establish a new connection.

                   

                  I do not think I have access issues because I can access the metadata from SQuirreL using the same login.

                  • 6. Re: Powerhub driver not working with Teiid
                    Ramesh Reddy Master

                    Looks like the JDBC driver does not implement "getTableTypes" method on DatabaseMetadata correctly thus above exception.

                    • 7. Re: Powerhub driver not working with Teiid
                      tanmoypalit Newbie

                      But I am using the same JDBC driver from SQuirreL and there it works fine.

                      • 8. Re: Powerhub driver not working with Teiid
                        Steven Hawkins Master

                        It's not an issue of the driver per se, but with assumptions with what functionality it provides.  SQuirreL is probably making fewer assumptions/catching more exceptions than Designer.  You should log an issue with Teiid Designer including the stacktrace shown above.

                         

                        Steve