- This topic has 21 replies, 5 voices, and was last updated 15 years, 6 months ago by OldSchool.
-
AuthorPosts
-
OldSchoolMemberSince upgrading one of our iSeries systems to OS v6r1, database explorer in 6.0 or 7.0 m2 won’t display the table layout. I’ve tried using a new jt400.jar from the system, but that didn’t change things? Is there a fix for this? Anyone else seeing?
Riyad KallaMemberOldSchool, the DB explorer is built on pure JDBC, so assuming the driver is in good order things should work – unfortunately we don’t have an AS400 system to test with.
Could you check (Window > Show View > Other… > General > Errors) if there is an exception getting logged when it fails to list the tables? You can try and hit the red “x” to clear the error log, then try the operation (connecting to the server then expanding the tree nodes) and see if some exception gets logged. That would help us run that down.
healeyParticipant@OldSchool wrote:
Since upgrading one of our iSeries systems to OS v6r1, database explorer in 6.0 or 7.0 m2 won’t display the table layout. I’ve tried using a new jt400.jar from the system, but that didn’t change things? Is there a fix for this? Anyone else seeing?
I am having the same issue. Just updated our iSeries this past weekend. Has anyone seen a fix yet?
healeyParticipantHere is the error that is getting generated when I try to refresh the table view:
Error getting table information
java.sql.SQLException: [SQL0901] SQL system error.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:650)
at com.ibm.as400.access.AS400JDBCDatabaseMetaData.getTables(AS400JDBCDatabaseMetaData.java:4627)
at net.sourceforge.squirrel_sql.fw.sql.SQLDatabaseMetaData.getTables(SQLDatabaseMetaData.java:603)
at com.genuitec.eclipse.sqlexplorer.model.TableObjectTypeNode.loadTables(TableObjectTypeNode.java:146)
at com.genuitec.eclipse.sqlexplorer.model.TableObjectTypeNode.refreshDetails(TableObjectTypeNode.java:102)
at com.genuitec.eclipse.sqlexplorer.actions.RefreshTableObjectType.run(RefreshTableObjectType.java:47)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:583)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:500)
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:1003)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3823)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3422)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
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:386)
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:549)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
Riyad KallaMemberWell it’s originating in the JDBC driver, just not sure why. If you use the older driver does it work?
I did find this that might help: http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzaii/rzaiiodbcsql0901.htm
healeyParticipantWell it’s originating in the JDBC driver, just not sure why. If you use the older driver does it work?
I did find this that might help: http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzaii/rzaiiodbcsql0901.htm
I tried 5.2 and 6.4 versions. Both do not work. Thanks for finding the link. I will try to figure out what is wrong with the JDBC driver.
healeyParticipantAssuming the method getting called on the jdbc driver is getTables(String catalog, String schemaPattern, String tableNamePattern,String[] types) I tried writing a quick program to call it and it does not fail. But I call it with all null parameters. Could someone in support tell me what parameters are getting passed in when MyEclipse calls it? Or do I have the incorrect method?
Riyad KallaMemberI have to kick this back to the DB team to get those details. Please allow a few days for a reply.
Brian LeathemMemberWe are experiencing this issue with V6R1 as well, and look forward to a fix. Hand writing JPA entities is a real pain!
healeyParticipantIt is amazing how much of a time saver it is. Luckily I have only had to do one mapping manually so far. Very painful.
Riyad KallaMemberThe DB team is gonna look into this tomorrow for us.
Brian LeathemMemberThanks for the update!
Brian FernandesModeratorI looked up SQL0901 and found this page: http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzaii/rzaiiodbcsql0901.htm
Could you try to follow those instructions and see if that sheds more light on the issue?Are your JPA / Hibernate apps working with this database? (i.e. are other JDBC apps able to connect and work with the database)
Finally, what structure is the DB Browser currently displaying, do you get a list of Catalogs with nested Schemata under which there is a “TABLE” node? Is the displayed tree correct upto this point? You can either describe it or you could send a screenshot to support@genuitec.com ATTN Brian; we can move on from there.
Sorry for the inconvenience caused, hope we can nail this soon.
healeyParticipant@Support-Brian wrote:
I looked up SQL0901 and found this page: http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=/rzaii/rzaiiodbcsql0901.htm
Could you try to follow those instructions and see if that sheds more light on the issue?Are your JPA / Hibernate apps working with this database? (i.e. are other JDBC apps able to connect and work with the database)
Finally, what structure is the DB Browser currently displaying, do you get a list of Catalogs with nested Schemata under which there is a “TABLE” node? Is the displayed tree correct upto this point? You can either describe it or you could send a screenshot to support@genuitec.com ATTN Brian; we can move on from there.
Sorry for the inconvenience caused, hope we can nail this soon.
Using the link you provided I found the iSeries error message:
System: AS400TST
Job . . : QZDASOINIT User . . : QUSER Number . . . : 088161Job 088161/QUSER/QZDASOINIT started on 02/16/09 at 14:06:17 in subsystem
QUSRWRK in QSYS. Job entered system on 02/16/09 at 14:06:17.
User HEALEY from client 172.x.x.x connected to server.
Library XXXXXX added to library list.
Receiver value too small to hold result.
File HVR0005F in library ORMAT0001 not found.
File in library not found.
File in library not found.
File in library not found.
Internal failure occurred in query processor.
SQL system error.My Hibernate apps are still working.
I think you are onto something with what the db browser is displaying. I obtained a trial version of a different JDBC Driver from a different software vendor (Hit Software) and it works with the db browser, hibernate reverse engineering and all !!!. The working driver displays the catalog and then the nested schemas below it. The jt400 driver (ibm’s driver) only displays the schemas without the catalog. So it looks like the IBM driver is to blame as you stated before (leave it to IBM to break their own JDBC driver for their own proprietary system). I am not sure what to report to the IBM jt400 JDBC driver team as to what the problem is. It would be easier if I knew what exactly is getting passed to the getTables(String catalog, String schemaPattern, String tableNamePattern,String[] types) method on the com.ibm.as400.access.AS400JDBCDatabaseMetaData object (which implements the java.sql.DatabaseMetaData interface) If I know the exact parameters I can recreate the problem and report it to the IBM jt400 JDBC driver team.
Thanks for all of your help so far…..
Brian FernandesModeratorhealey,
Thanks for getting back so quickly, this does seem like a deviant driver/database interaction problem. I have a few questions:
1) With the HIT driver, I assume the catalogs and schema names displayed are correct?
2) With the regular driver, are the schemata from the catalog you are interested in?
3) With AS400, difficulty in getting a list of catalogs seems to be a common issue. Sometimes a connection string might constrain the connection to a specific catalog. In other cases, it may be looking for a catalog but if one is not specified, it will just use the default catalog (which in some databases is the same as your username). What connection string are you using exactly? Is the name of the catalog you need to work with the same as your username?
4) If you edit your connection in the DB Browser, go to page 2 and select the 3rd option, does that give you a list of catalogs (not schema)? If not, try the default catalog option and click finish. Does that help?
5) The point at which the failure occurs is this:
connection.getMetaData().getTables(catalog, schema, “%”, new String[] {“TABLE”});
connection is an instance of interface java.sql.Connection
catalog and schema are String objects, null if not applicable.
This is a standard call that is used for all databases.Since with the default driver we are not getting a list of catalogs, the catalog field in the above call will be null. As a result, the schema is unqualified which is likely causing the call to fail. (i.e. we need tables from mycatalog.myschema and not just from myschema).
I hope this helps, please let us know what you find out.
-
AuthorPosts