- This topic has 3 replies, 3 voices, and was last updated 18 years, 3 months ago by robieb4942.
-
AuthorPosts
-
David WilkinsonMemberHi
Iam not sure if this is the correct place to post this info/bug but here gose
Iam currently using eclipse3.1 with MyEclipse 4.0M2 and I have the JDBC drivers for DB2 setup for use with the MyEclipse database Explorer, but when trying to set up a data source for a report in the Business Intelligence and Reporting Tools, I was getting the error shown bellow due to the fact that the Database Explorer had alreay loaded the drivers native files into another classloader dispite the fact that the database Explorer prospective was not open or had yet been used. The only way I was able to get round the problem was to manually edit the file SQLDrivers.xml once eclipse had been stoped and the restart it.
This now means that the MyEclipse Database Explorer will not work with the DB2 drivers as BIRT has the native files loaded into a classloader which MyEclipse is not using.
Is there any why round this or Iam I just going to have to keep stoping eclise to edit files when I want to use ther different tools.
On a simaler note when trying to edit any of the properties of the DB2 drivers from the eclipse prefrences menu I also keeped getting the same error about the classloader.
Regards
DRAW
Stack trace from MyEclipse
java.sql.SQLException: java.lang.UnsatisfiedLinkError: Native Library D:\IBM\SQLLIB\BIN\db2jdbc.dll already loaded in another classloader at COM.ibm.db2.jdbc.app.DB2Driver.<init>(Unknown Source) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:494) at java.lang.Class.newInstance0(Class.java:350) at java.lang.Class.newInstance(Class.java:303) at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.registerSQLDriver(SQLDriverManager.java:61) at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager$MyDriverListener.propertyChange(SQLDriverManager.java:163) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333) at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270) at net.sourceforge.squirrel_sql.fw.util.PropertyChangeReporter.firePropertyChange(PropertyChangeReporter.java:52) at net.sourceforge.squirrel_sql.fw.sql.SQLDriver.setJarFileNames(SQLDriver.java:267) at com.genuitec.eclipse.sqlexplorer.preferences.CreateDriverDialog.okPressed(CreateDriverDialog.java:175) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:409) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:556) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713) at org.eclipse.jface.window.Window.runEventLoop(Window.java:809) at org.eclipse.jface.window.Window.open(Window.java:787) at com.genuitec.eclipse.sqlexplorer.preferences.DriverContainerGroup$2.run(DriverContainerGroup.java:109) at com.genuitec.eclipse.sqlexplorer.preferences.DriverContainerGroup$7.widgetSelected(DriverContainerGroup.java:244) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713) at org.eclipse.jface.window.Window.runEventLoop(Window.java:809) at org.eclipse.jface.window.Window.open(Window.java:787) at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:66) at org.eclipse.jface.action.Action.runWithEvent(Action.java:996) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:538) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:843) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3080) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2713) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163) 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:585) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334) at org.eclipse.core.launcher.Main.basicRun(Main.java:278) at org.eclipse.core.launcher.Main.run(Main.java:973) at org.eclipse.core.launcher.Main.main(Main.java:948)
And From BIRT
org.eclipse.birt.data.engine.core.DataException: Cannot open the connection for the driver (org.eclipse.birt.report.data.oda.jdbc). Cannot create instance of JDBC Driver class: [COM.ibm.db2.jdbc.app.DB2Driver]. at org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnection(ConnectionManager.java:108) at org.eclipse.birt.data.engine.executor.DataSource.newConnection(DataSource.java:147) at org.eclipse.birt.data.engine.executor.DataSource.open(DataSource.java:140) at org.eclipse.birt.data.engine.impl.DataSourceRuntime.openOdiDataSource(DataSourceRuntime.java:137) at org.eclipse.birt.data.engine.impl.PreparedQuery$Executor.openDataSource(PreparedQuery.java:649) at org.eclipse.birt.data.engine.impl.PreparedQuery$Executor.prepareExecution(PreparedQuery.java:461) at org.eclipse.birt.data.engine.impl.PreparedQuery$Executor.access$000(PreparedQuery.java:386) at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:171) at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:137) at org.eclipse.birt.report.designer.internal.ui.util.DataSetManager.execute(DataSetManager.java:239) at org.eclipse.birt.report.designer.internal.ui.util.DataSetManager.getColumns(DataSetManager.java:191) at org.eclipse.birt.report.designer.internal.ui.util.DataSetManager.getColumns(DataSetManager.java:132) at org.eclipse.birt.report.designer.internal.ui.views.data.providers.DataSetNodeProvider.getChildren(DataSetNodeProvider.java:95) at org.eclipse.birt.report.designer.internal.ui.views.ViewsTreeProvider.getChildren(ViewsTreeProvider.java:37) at org.eclipse.birt.report.designer.internal.ui.util.UIUtil.containElement(UIUtil.java:700) at org.eclipse.birt.report.designer.internal.ui.util.UIUtil.containElement(UIUtil.java:703) at org.eclipse.birt.report.designer.internal.ui.util.UIUtil.containElement(UIUtil.java:679) at org.eclipse.birt.report.designer.internal.ui.views.data.DataViewPage.handleSelectionChange(DataViewPage.java:296) at org.eclipse.birt.report.designer.internal.ui.views.data.DataViewPage.performRequest(DataViewPage.java:276) at org.eclipse.birt.report.designer.core.util.mediator.ReportMediator.notifyRequest(ReportMediator.java:121) at org.eclipse.birt.report.designer.internal.ui.editors.parts.DeferredGraphicalViewer$1.run(DeferredGraphicalViewer.java:337) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3057) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2716) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1699) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1663) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:367) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:103) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:226) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:163) 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:585) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:334) at org.eclipse.core.launcher.Main.basicRun(Main.java:278) at org.eclipse.core.launcher.Main.run(Main.java:973) at org.eclipse.core.launcher.Main.main(Main.java:948) Caused by: org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot create instance of JDBC Driver class: [COM.ibm.db2.jdbc.app.DB2Driver]. at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.loadAndRegisterDriver(JDBCDriverManager.java:468) at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.doConnect(JDBCDriverManager.java:145) at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.getConnection(JDBCDriverManager.java:94) at org.eclipse.birt.report.data.oda.jdbc.Connection.connectByUrl(Connection.java:218) at org.eclipse.birt.report.data.oda.jdbc.Connection.open(Connection.java:179) at org.eclipse.birt.data.engine.odaconsumer.manager.OdaConnection.open(OdaConnection.java:221) at org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnection(ConnectionManager.java:96) ... 40 more
Scott AndersonParticipantJust a thought, but could you make a copy of all the drivers and then point the MyEclipse db tools to one set and BIRT to another? That way, they’ll be loading their own *copies* of the same DLL, but not the *same* dll.
I’ve also opened a bug report with the dev team for further investigation, but based on the workload for 4.0 it’s unlikely it will make the 4.0 GA build at the end of the month, which is why I’m trying to brainstorm a workaround. 🙂
David WilkinsonMemberThanks for the reply, I will try what you have sugested and post the results back to the forum.
Regards
DRAW
robieb4942MemberI am having a problem getting an instance of the DB2 app jdbc driver created.
I’m running on Eclipse 3.2 with BIRT 2.1.0.
Did you get this issue resolved?
-
AuthorPosts