- This topic has 16 replies, 3 voices, and was last updated 20 years, 1 month ago by Riyad Kalla.
-
AuthorPosts
-
duckman75MemberI am using the db2java.zip (also have tried db2jcc.jar) to connect to a DB2 database.
I can connect to the dB and drill down into the table i want to query.
When i try to query a table it gives me this error message:“does not have privilige to perform operation “EXECUTE PACKAGE” on object “NULLID.SYSSH200” SQLSTATE=42501
I beleive this is a 7.x DB2 database and i have followed IBM docs on url to use with the driver.
Any idea how i can connect and query a DB2 7.x db?
Eclipse Version 3.0.1
MyEclipseIDE 3.8.2
Windows XPthx
Riyad KallaMemberAre you able to query it from the DB2 console or other utilities? This sounds like a user permission error, not a ME issue…
duckman75MemberYes i can query from other sources, I did test Database Piolt (Jbuilder tool) using the same zip (and jar) and it works fine.
Riyad KallaMemberOk, will check.
duckman75MemberHere are the url types i have tried:
jdbc:db2:<databaseName>
jdbc:db2://<server>:<port>/<databaseName>
jdbc:db2j:net:<databaseName>
jdbc:db2j:net://<server>:<port>/<databaseName>
Riyad KallaMemberAre you having the same problem this user had?
http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-4053.html
duckman75MemberNo, i did see this post.
I can connect to the dB server, but i cannot query a table.
I see all the tables and their structure, but i cannot query.
Riyad KallaMemberI did ask the dev to look at this, in the mean time can you check your .log file for errors? (workspace dir\.metadata\.log)
duckman75Member!ENTRY com.genuitec.eclipse.sqlexplorer 4 4 Sep 28, 2004 15:05:29.481
!MESSAGE Error while trying to login to database
!STACK 0
java.lang.NullPointerException
at com.genuitec.eclipse.sqlexplorer.sessiontree.model.utility.Dictionary.putCatalogSchemaName(Unknown Source)
at com.genuitec.eclipse.sqlexplorer.sessiontree.model.SessionTreeNode.initializeDatabaseModel(Unknown Source)
at com.genuitec.eclipse.sqlexplorer.sessiontree.model.SessionTreeNode.<init>(Unknown Source)
at com.genuitec.eclipse.sqlexplorer.sessiontree.model.SessionTreeModel.createSessionTreeNode(Unknown Source)
at com.genuitec.eclipse.sqlexplorer.sessiontree.actions.RetrievingTableDataProgress$RetrieveData.run(Unknown Source)
at java.lang.Thread.run(Thread.java:534)
Riyad KallaMemberGreat, thanks.
support-jeffMemberPlease try qualifying all table names with the schema they belong to. This may be a long shot.
Also, the error you post is a login error, not a SQL execution error. The fact that you are seeing the structure of the database but are unable to query a particular table suggests either a user priv problem or the above need to fully-qualify the table name with a schema name.
If you could empty your eclipse log of all errors and then retry and see if any DE related errors show up, please send them along. You can do this by opening the Error Log in Eclipse:
(1) Go to WIndow -> Show View -> Other -> PDE Runtime -> Error Log
(2) Remove all messages by clicking on the red ‘X’Let me know if any of this makes a difference.
duckman75MemberOk… I started over on a clean machine with the db2jcc.jar.
I fired up Database Pilot and Aqua Studio, it connects me to the dB and I can query.
I went into ME and setup the driver (com.ibm.db2.jcc.DB2Driver) and setup a connection URL same as used in Database Pilot and Aqua Studio and I get this error message:
java.lang.NullPointerException
at com.genuitec.eclipse.sqlexplorer.sessiontree.model.utility.Dictionary.putCatalogSchemaName(Unknown Source)
at com.genuitec.eclipse.sqlexplorer.sessiontree.model.SessionTreeNode.initializeDatabaseModel(Unknown Source)
at com.genuitec.eclipse.sqlexplorer.sessiontree.model.SessionTreeNode.<init>(Unknown Source)
at com.genuitec.eclipse.sqlexplorer.sessiontree.model.SessionTreeModel.createSessionTreeNode(Unknown Source)
at com.genuitec.eclipse.sqlexplorer.sessiontree.actions.RetrievingTableDataProgress$RetrieveData.run(Unknown Source)
at java.lang.Thread.run(Thread.java:534)It is the same login error message, but why does this work in other tools like Database Pilot and Aqua Studio?!?
I get this error when right click and select connect. I see Logging into database flash by and complete, then i see “Loading Database Metadata for null”.
At this point is when i see error.
Is there an issue when loading the metadata from a dB if there is some type of null in the metadata table?Thanks for the continued help!
support-jeffMemberIt is the same login error message, but why does this work in other tools like Database Pilot and Aqua Studio?!?
I would have no clue as I have no access to the source code for those tools. DE uses standard JDBC to access metadata and run queries.
Did you try qualifying the table names with the schema name? Please report on the results of testing with that.
The “Loading metadata for null” message in the dialog is intriguing. This suggests that the queries for schema/catalog names from DatabaseMetaData object returns nothing. But you still see catalogs/schemas and their member tables, etc.? Could you post a screenshot of your db session with the browser tree fully expanded (except for the tables themselves)? Also, please try selecting individual schema/catalogs to load by editing the connection profile and going to the second page of the wizard – try both the default schema, as well as selecting specific ones.
Thanx for working on this with me.
duckman75MemberOk.. Lets start over. I have came to the conclusion that the 7.1 DB2 JDBC driver does not work at all.
So I have moved to the 8.x JDBC driver.I can use this everywhere but Database Explorer without issue.
here is the URL syntax i use:
jdbc:db2://<server>:<port>/<dbname>I have a few different results to detail here:
All these results are from the Schema Details screen (second screen when configuring db connection)1. When i use “Display All Schemas” i get that null login error message like the above one
2. When i use “Display Default Schema Only” i can connect to dB but there are no schemas listed.
3. When I use “Display All the Selected Schemas” and click “Add” no schemas display to be selected.Keep in mind i use this same driver and URL syntax in many other tools (including BEA, Tomcat) and I have no issue connecting to dB.
Please, please help…
thx
support-jeffMemberBased on the stacktrace you have supplied, I think I have found the problem. The plugin assumes that schema or catalogs exist, and also assumes that the default schema is the login user id (or the system user id or unknown). There was apparently no db login user and no system user being returned – not sure why, but that is the only way an NPE could occur. I have fixed this bug and this fix will be deployed as part of the next release of MyEclipse. Thanx for your patience!
-
AuthorPosts