facebook

DB2 Errors with MyEclipse Database Explorer

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 15 posts - 16 through 30 (of 34 total)
  • Author
    Posts
  • #243502 Reply

    why i am not show table under tree ,my conncection to db2 universal driver is sucessful and when i running sql query it is also giving result ,but i am unable to see my tables name under connection node.can any body provide me needful help for this.i will thankful if any body give me his valuable suggestion.

    Thanks & Regards
    Sandeep Narela

    #245646 Reply

    lwilcox
    Participant

    @Support-Brian wrote:

    Delan,

    Sorry there wasn’t any work done on this front in the light of more pressing issues for M2. However, the bug will very likey be on our target list for 4.1GA which is due in under a fortnight.

    We apologize for the inconvenience to all affected users, but are looking at wrapping it up soon.

    Best,
    Brian.

    Brian,

    We need this fix ASAP. Here is information about the product:

    *** MyEclipse details:
    MyEclipse Enterprise Workbench

    Version: 4.1.0 GA
    Build id: 20060122-4.1-GA

    *** Eclipse details:
    Eclipse SDK

    Version: 3.1.1
    Build id: M20050929-0840

    Eclipse Platform

    Version: 3.1.1
    Build id: M20050929-0840

    Eclipse RCP

    Version: 3.1.1
    Build id: M20050929-0840

    Eclipse Java Development Tools

    Version: 3.1.1
    Build id: M20050929-0840

    Eclipse Plug-in Development Environment

    Version: 3.1.1
    Build id: M20050929-0840

    Eclipse Project SDK

    Version: 3.1.1
    Build id: M20050929-0840

    DB2 Information:

    Database Product Name DB2
    Database Product Version DSN07011
    Driver Major Version 2
    Driver Minor Version 3
    Driver Name IBM DB2 JDBC Universal Driver Achitecture
    Driver Version 2.3.73

    Here are the jar files:
    db2jcc.jar
    db2jcc_javax.jar
    db2jcc_license_cisuz.jar

    Here is the driver classname:
    com.ibm.db2.jcc.DB2Driver

    Here is the error message I got:
    Database Explorer was unable to obtain any metadata regarding the connected database. Perhaps the connection is closed or the database server is down. Do you want to reconnect?

    This is the message from the \workspace\.metadata\.log file:

    !ENTRY com.genuitec.eclipse.sqlexplorer 4 4 2006-01-30 11:58:51.750
    !MESSAGE Error getting database metadata
    !STACK 0
    com.ibm.db2.jcc.b.SqlException: unsupported encoding Cp500 for result set column
    at com.ibm.db2.jcc.b.i.a(i.java:419)
    at com.ibm.db2.jcc.a.zb.a(zb.java:2331)
    at com.ibm.db2.jcc.a.db.a(db.java:3186)
    at com.ibm.db2.jcc.a.db.a(db.java:1724)
    at com.ibm.db2.jcc.a.db.b(db.java:1657)
    at com.ibm.db2.jcc.a.db.a(db.java:1626)
    at com.ibm.db2.jcc.a.db.m(db.java:440)
    at com.ibm.db2.jcc.a.db.l(db.java:345)
    at com.ibm.db2.jcc.a.db.e(db.java:102)
    at com.ibm.db2.jcc.a.r.e(r.java:72)
    at com.ibm.db2.jcc.a.sb.i(sb.java:194)
    at com.ibm.db2.jcc.b.zc.q(zc.java:1319)
    at com.ibm.db2.jcc.b.ad.d(ad.java:2283)
    at com.ibm.db2.jcc.b.bd.U(bd.java:188)
    at com.ibm.db2.jcc.b.s.a(s.java:7815)
    at com.ibm.db2.jcc.b.s.Wd(s.java:6424)
    at com.ibm.db2.jcc.b.s.getSchemas(s.java:6352)
    at net.sourceforge.squirrel_sql.fw.sql.SQLDatabaseMetaData.getSchemas(SQLDatabaseMetaData.java:242)
    at com.genuitec.eclipse.sqlexplorer.model.DatabaseModel.initializeMetaData(DatabaseModel.java:69)
    at com.genuitec.eclipse.sqlexplorer.model.DatabaseModel.<init>(DatabaseModel.java:44)
    at com.genuitec.eclipse.sqlexplorer.model.SessionTreeNode.<init>(SessionTreeNode.java:66)
    at com.genuitec.eclipse.sqlexplorer.model.SessionTreeModel.createSessionTreeNode(SessionTreeModel.java:128)
    at com.genuitec.eclipse.sqlexplorer.actions.RetrievingTableDataProgress$RetrieveData.run(RetrievingTableDataProgress.java:48)
    at java.lang.Thread.run(Unknown Source)

    Help me here Brian.

    Thanks,

    #245652 Reply

    Brian Fernandes
    Moderator

    Lien,

    We spent quite some time trying to get a hold of this issue in 4.1, but faced some technical issues due to which no progress was ultimately made.

    I know we’ve had a pretty long thread here with your DB2 issues – could you please restate exactly what you were doing when you saw this stack trace?
    It is my understanding that you are unable to expand any tables in your database? Has anything changed since then?

    A couple of questions

    1) What JDK are you using to run eclipse? Is it possible for you to use the latest in the 1.4.x series or the 1.5 series?
    2) Edit your conneciton profile (or create a new profile) on the second page of the wizard, make sure you choose choose all schemas if you haven’t already.

    Best,
    Brian.

    #245654 Reply

    lwilcox
    Participant

    @Support-Brian wrote:

    Lien,

    We spent quite some time trying to get a hold of this issue in 4.1, but faced some technical issues due to which no progress was ultimately made.

    I know we’ve had a pretty long thread here with your DB2 issues – could you please restate exactly what you were doing when you saw this stack trace?
    It is my understanding that you are unable to expand any tables in your database? Has anything changed since then?

    A couple of questions

    1) What JDK are you using to run eclipse? Is it possible for you to use the latest in the 1.4.x series or the 1.5 series?
    2) Edit your conneciton profile (or create a new profile) on the second page of the wizard, make sure you choose choose all schemas if you haven’t already.

    Best,
    Brian.

    I cannot connect to the database at all. I try to open database connection.

    I use jre1.5.0_06 series.

    I did choose all schemas. (FYI: I have no problem connect with SQL)

    Thanks,
    Lien

    #245657 Reply

    Brian Fernandes
    Moderator

    Lien,

    I remember you could connect to DB2 prior to 4.1GA and could not view your table details.
    Please confirm that now you cannot connect to DB2 at all, but you could before?

    Are you using a JRE or a JDK? MyEclipse requires that you run with a full JDK and not just the runtime environment; could you please check that up?

    Best,
    Brian.

    #245658 Reply

    lwilcox
    Participant

    You are correct. I could connect before with ME 4.0. But now I cannot connect with any version of ME at all. I try to down grade all the version of ME and they all give me the exact same message.

    I have jdk142_05 on my machine. But this is the default when I install ME 4.1 it pointed to jre1.5.0_06.

    What should I do here?

    #245663 Reply

    Brian Fernandes
    Moderator

    Lien,

    Thank you for clarifying that.

    Add the following to your existing eclipse startup shortcut to point it to your JDK installation.

    
    -vm d:\j2sdk1.4.2_05\bin\javaw.exe
    
    for example:
    eclipse.exe -vm d:\j2sdk1.4.2_05\bin\javaw.exe
    

    Do not forget to replace d:\j2sdk1.4.2_05 with the correct path to your JDK installation.

    Best,
    Brian.

    #245671 Reply

    lwilcox
    Participant

    @Support-Brian wrote:

    Lien,

    Thank you for clarifying that.

    Add the following to your existing eclipse startup shortcut to point it to your JDK installation.

    
    -vm d:\j2sdk1.4.2_05\bin\javaw.exe
    
    for example:
    eclipse.exe -vm d:\j2sdk1.4.2_05\bin\javaw.exe
    

    Do not forget to replace d:\j2sdk1.4.2_05 with the correct path to your JDK installation.

    Best,
    Brian.

    Hello Brian

    I navigated to Window –> Preferences –> Java –> Installed JREs and edit the location of JRE to my JDK directory (jdk1.5.0_06). I am be able to connect to my DB2 database and see all the table names. I still cannot expand my table to view all columns. What can I do to be able to expand the table. I know that I need to be able to expand down to columns level in order for me to generate the hibernate mapping file correctly.

    I did not use the set up you show me earlier. I tried but it give me an error message.

    Thank you
    Lien

    #245676 Reply

    lwilcox
    Participant

    @lwilcox wrote:

    @Support-Brian wrote:

    Lien,

    Thank you for clarifying that.

    Add the following to your existing eclipse startup shortcut to point it to your JDK installation.

    
    -vm d:\j2sdk1.4.2_05\bin\javaw.exe
    
    for example:
    eclipse.exe -vm d:\j2sdk1.4.2_05\bin\javaw.exe
    

    Do not forget to replace d:\j2sdk1.4.2_05 with the correct path to your JDK installation.

    Best,
    Brian.

    Hello Brian

    I navigated to Window –> Preferences –> Java –> Installed JREs and edit the location of JRE to my JDK directory (jdk1.5.0_06). I am be able to connect to my DB2 database and see all the table names. I still cannot expand my table to view all columns. What can I do to be able to expand the table. I know that I need to be able to expand down to columns level in order for me to generate the hibernate mapping file correctly.

    I did not use the set up you show me earlier. I tried but it give me an error message.

    Thank you
    Lien

    Here is the error message I got from the \workspace\.metadata\.log file after I clicked on the Plus sign of table name

    !ENTRY com.genuitec.eclipse.sqlexplorer 4 4 2006-01-30 15:18:01.546
    !MESSAGE Cannot get indices
    !STACK 0
    com.ibm.db2.jcc.b.SqlException: Invalid argument: unknown column name NON_UNIQUE
    at com.ibm.db2.jcc.b.m.a(m.java:1260)
    at com.ibm.db2.jcc.b.rc.a(rc.java:1368)
    at com.ibm.db2.jcc.b.rc.getBoolean(rc.java:1137)
    at com.genuitec.eclipse.sqlexplorer.views.details.ColumnsDetail$3.run(ColumnsDetail.java:194)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
    at com.genuitec.eclipse.sqlexplorer.views.details.ColumnsDetail.activate(ColumnsDetail.java:186)
    at com.genuitec.eclipse.sqlexplorer.views.DetailManager.activate(DetailManager.java:124)
    at com.genuitec.eclipse.sqlexplorer.views.TableInfoView.setInput(TableInfoView.java:53)
    at com.genuitec.eclipse.sqlexplorer.views.DatabaseTreeViewer$4.selectionChanged(DatabaseTreeViewer.java:127)
    at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
    at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:1044)
    at org.eclipse.core.runtime.Platform.run(Platform.java:783)
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:148)
    at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160)
    at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1784)
    at org.eclipse.jface.viewers.StructuredViewer.handleSelect(StructuredViewer.java:1027)
    at org.eclipse.jface.viewers.StructuredViewer$4.widgetSelected(StructuredViewer.java:1053)
    at org.eclipse.jface.util.OpenStrategy.fireSelectionEvent(OpenStrategy.java:209)
    at org.eclipse.jface.util.OpenStrategy.access$3(OpenStrategy.java:204)
    at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:364)
    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(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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)

    #245708 Reply

    Brian Fernandes
    Moderator

    Lien,

    Thank you for that information, could you please try the following:

    1) Download the latest type 4 driver from here, unzip the zip and then try with the new jar files: http://www14.software.ibm.com/webapp/download/preconfig.jsp?id=2004-09-20+10%3A09%3A21.003415R&cat=database&fam=&s=c&S_TACT=104CBW71&S_CMP=

    2) Your DB2 server installation will also have a type 2 driver – the file name is db2java.zip. Create a new driver configuration, and specify only that zip file (wihout unzipping). Use the driver COM.ibm.db2.jdbc.app.DB2Driver

    Make sure your db2jcct.dll and all the dependent DLLs are on the classpath (puttting them in your system32 folder if you are on windows should solve that issue). You can attempt to try without moving any DLL files, any missing DLLs should be reported by a failed connection error in the Eclipse error log, place them in system32 for them to be properly accessable.

    3) Since you see the tables in your browser, can you try to generate Hibernate mappings and see what happens?

    4) FYI: The JRE you specified is the JRE that will be used to compile programs within your workspace. Eclipse will still start with your default JRE. If the command I specified does not work, you probably have an error somewhere, or you have specified the wrong path. Can you paste it here for us to check out?

    Best,
    Brian.

    #245760 Reply

    lwilcox
    Participant

    Brian,

    I trried step 2 on your list. I got this error message: <b>Cannot instantiate driver, given driver class name is not a valid jdbc driver </b>

    Step 3: when I generate hibernate mapping this is the error message I got: </b> An internal error occurred during: “Generating Artifacts”.</b>

    Step 4: C:\eclipseSDK3_1_1\eclipse\eclipse.exe -vm C:\Program Files\Java\jdk1.5.0_06\bin\javaw.exe

    Thanks.

    #245769 Reply

    lwilcox
    Participant

    Hi Brian,

    How many DLLs files are you talking about. Can you list them for me if possible?

    Thanks,
    Lien

    #245770 Reply

    Brian Fernandes
    Moderator

    Lien,

    As you rightly concluded, you are unable to set that as the driver because the DLLs it required are not all accessable. (The error log might mention the missing DLL)
    Could you see that the following set of DLLs is made available: db2sys.dll, db2sysp.dll, db2wint.dll, db2app.dll db2g11n.dll

    Tip: If you are on windows, you can use the depends.exe program to open up the dll and get a list of it’s dependencies.

    Best,
    Brian.

    #246866 Reply

    soceirin
    Member

    I have being having similiar issues trying to connect to a DB2 server using the type 2 JDBC drivers. I can use the latest drivers but these drivers do not seem to support multi-line sql commands. Following the suggestions above concerning the dlls I have been able to make some progress but an error is still being reported in the logs (see stack trace below).
    I have somehow managed to get past this and multiline sql now seems to be working. The driver being used is COM.ibm.db2.jdbc.app.DB2Driver (ie the type 2 JDBC driver). Whenever I set this as the driver a popup was displayed telling me the driver could not be instantiated. I am not sure how I got the driver name to stick but somehow it has.
    If you need any of setting please let me know as I would like to be able to document how to get this working.

    java.sql.SQLException: java.lang.UnsatisfiedLinkError: Native Library D:\dev\External\DB2Drivers\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(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at com.genuitec.eclipse.sqlexplorer.preferences.CreateDriverDialog.testDriverClass(CreateDriverDialog.java:238)
    at com.genuitec.eclipse.sqlexplorer.preferences.CreateDriverDialog.okPressed(CreateDriverDialog.java:180)
    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:3125)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758)
    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:126)
    at com.genuitec.eclipse.sqlexplorer.preferences.DriverContainerGroup$7.widgetSelected(DriverContainerGroup.java:271)
    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:3125)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758)
    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:3125)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2758)
    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(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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)

    #246876 Reply

    Haris Peco
    Member

    soceirin,

    Is there special reason for using type 2 libraries.Please, try with last type 4 drivers, if it possible and send us version database, operating system where database is.It’s better that you start new thread, but isn’t very important

    lwilcox,

    Error ‘Invalid argument: unknown column name NON_UNIQUE ‘ when MyEclipse get indices can be problem with drivers – NON_UNIQUE is standrad column in JDBC specification for geting indices and it can be problem with drivers.Problem with encoding is another type problems : What is database’s operating system ?

    Best

Viewing 15 posts - 16 through 30 (of 34 total)
Reply To: DB2 Errors with MyEclipse Database Explorer

You must be logged in to post in the forum log in