× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: Re: JDBC Native Driver
  • From: cujo@xxxxxxxxxx
  • Date: Fri, 4 Feb 2000 11:32:33 -0600

The dreaded "SQL system error."  That messing stinks, doesn't it?  I wish I
had some control over it but I do not.  This is a very common question...
what should I do when I get this?  I don't see anything wrong off the top
of my head looking at your code by the way.

Start with this:
An object of type SQLException can give you more information than just the
message.  There are methods for getting the vendor code and the SQLSTATE
from the exception.  You should always try to look at these values when you
get a database exception (on any platform).  They are very helpful to the
database vendors most of the time.

This SQLState and vendor code can be looked up in DB2/400 reference manual.
That will usually help a lot.

You can also:
Look into the joblog for the run.  Before websphere 3.0, you just make sure
that your job has logging on (this usually amounts to making sure that
QGPL/QDFTJOBD has *SECLVL for the logging level).  Of course, you don't
have to be using QDFTJOBD as your job description, but you get the idea.

In WebSphere 3.0 and beyond, they supress job logging by default.  Make
sure that your user profile is going to log requests as above, and then
follow the directions below to change WebSphere's default.

I hope some of this information helps out.  If you get really stuck, e-mail
me the vendor code and SQLSTATE and I will take a stab at what might be
going wrong.


------- How to enable job logging in WebSphere 3.0 and beyond
---------------------

In the admin.properties file for their instance, there will be the
following line:
java.properties=jdbc.db2.cli.nojoblog=true

That line can be removed, or set to false.
FYI. The admin.properties file contains settings for the admin server. The
monitor job starts the admin server. The admin server is used by the GUI
console, and starts/stops application servers.
By default, the file is:
/qibm/userdata/webasadv/<instanceName>/properties/admin.properties and is
ASCII format.

Then of course, the entire thing (monitor, admin server, application
server) will need to be stopped/started.
------------------------------------------------

Regards,

Richard D. Dettinger
AS/400 Java Data Access Team

"TRUE! nervous, very, very dreadfully nervous I had been and am; but why
WILL you say that I am mad?
The disease had sharpened my senses, not destroyed, not dulled them. "

                                                                              

 Edgar Allan Poe
                                                                              

The Tell-Tale Heart"




"DUCRET Gilles (GVA)" <Gilles.DUCRET@lloydsbank.ch> on 02/04/2000 09:08:27
AM

Please respond to JAVA400-L@midrange.com

To:   "'JAVA400-L@midrange.com'" <JAVA400-L@midrange.com>
cc:
Subject:  JDBC Native Driver




Hi,

We have a very strange problem since we have installed Websphere 3 Advanced
version on our as400 (v4r4).

We had some Java program using the native drive. Everything worked
correctly.

We tested servlets with Websphere3. We then had a problem when getting a
connexion.
The exception we received is:

 Getting the connection: jdbc:db2://gva4004/CHDATAR;

 com.ibm.db2.jdbc.app.DB2SQLException2: SQL system error.


com/ibm/db2/jdbc/app/DB2ConnectionRuntimeImpl.connect(Ljava/lang/String
 ;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;III)I+80
(DB2Connectio
 nRuntimeImpl.java:100)



Since we have this problem nothing runs. It is not possible to get a
connexion. We always receive
the same exception.

We used the following code:

          // Create a properties object for JDBC connection
          Properties jdbcProperties = new Properties();

          // Set the properties for the JDBC connection
          jdbcProperties.put("user", "HERVE");
          jdbcProperties.put("password","HERVE");
          jdbcProperties.put("naming", "system");
          jdbcProperties.put("errors", "full");
          jdbcProperties.put("date format", "iso");
          jdbcProperties.put("libraries", "CHOBJ1R,CHDATAR,CHOBJ1");


          // Load the AS400 Native JDBC driver into the JVM
          // This method automatically verifies the existence of the
driver
          // and loads it into the JVM -- should not use
DriverManager.registerDriver()
          System.out.println("Instanciating the native driver");
          Class.forName ("com.ibm.db2.jdbc.app.DB2Driver");

          // Connect using the properties object
          System.out.println("Getting the connection:
jdbc:db2://gva4004/CHDATAR;");
          dbConnection =
DriverManager.getConnection("jdbc:db2://gva4004/CHDATAR;" ,
jdbcProperties);


Is there something wrong in the properties?

It's like if the driver suddenly become unavailable.

Any idea?

Gilles



**********************************************************************
 This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept for
the presence of computer viruses.
**********************************************************************

Title: JDBC Native Driver

Hi,

We have a very strange problem since we have installed Websphere 3 Advanced version on our as400 (v4r4).

We had some Java program using the native drive. Everything worked correctly.

We tested servlets with Websphere3. We then had a problem when getting a connexion.
The exception we received is:

 Getting the connection: jdbc:db2://gva4004/CHDATAR;                         
 com.ibm.db2.jdbc.app.DB2SQLException2: SQL system error.                    
       com/ibm/db2/jdbc/app/DB2ConnectionRuntimeImpl.connect(Ljava/lang/String
 ;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;III)I+80 (DB2Connectio
 nRuntimeImpl.java:100)                                                      
 

Since we have this problem nothing runs. It is not possible to get a connexion. We always receive
the same exception.

We used the following code:

                // Create a properties object for JDBC connection
                Properties jdbcProperties = new Properties();
       
                // Set the properties for the JDBC connection
                jdbcProperties.put("user", "HERVE");
                jdbcProperties.put("password","HERVE");
                jdbcProperties.put("naming", "system");
                jdbcProperties.put("errors", "full");
                jdbcProperties.put("date format", "iso");
                jdbcProperties.put("libraries", "CHOBJ1R,CHDATAR,CHOBJ1");

       
                // Load the AS400 Native JDBC driver into the JVM
                // This method automatically verifies the existence of the driver
                // and loads it into the JVM -- should not use DriverManager.registerDriver()
                System.out.println("Instanciating the native driver");
                Class.forName ("com.ibm.db2.jdbc.app.DB2Driver");

                // Connect using the properties object
                System.out.println("Getting the connection: jdbc:db2://gva4004/CHDATAR;");
                dbConnection = DriverManager.getConnection("jdbc:db2://gva4004/CHDATAR;" , jdbcProperties);


Is there something wrong in the properties?

It's like if the driver suddenly become unavailable.

Any idea?

Gilles



**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept for
the presence of computer viruses.
**********************************************************************

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.