Com.ibm.db2.jcc.b.SqlException: DB2 SQL Error: SQLCODE=-973, SQLSTATE=00000
Hi,
We are running WebLogic 10.3.0 on RHEL 5.3 with JRockit JDK 1.6 and DB2 Version 8 on mainframe running z/OS 1.9.
We are getting below exception in webLogic logs from connection pool connecting to DB2 database.
>
####<Jul 23, 2010 10:05:49 AM EDT> <Warning> <JDBC> <testing.us.test.net> <testingDB2> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1279893949615> <BEA-001129> <Received exception while creating connection for pool "TestDB2Pool": DB2 SQL Error: SQLCODE=-973, SQLSTATE=00000, SQLERRMC=MON_HEAP_SZ, DRIVER=3.53.70>
####<Jul 23, 2010 10:05:49 AM EDT> <Info> <JDBC> <testing.us.test.net> <testingDB2> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1279893949616> <BEA-001156> <Stack trace associated with message 001129 follows:
com.ibm.db2.jcc.b.SqlException: DB2 SQL Error: SQLCODE=-973, SQLSTATE=00000, SQLERRMC=MON_HEAP_SZ, DRIVER=3.53.70
at com.ibm.db2.jcc.b.bd.a(bd.java:679)
at com.ibm.db2.jcc.b.bd.a(bd.java:60)
at com.ibm.db2.jcc.b.bd.a(bd.java:127)
at com.ibm.db2.jcc.b.jb.a(jb.java:4016)
at com.ibm.db2.jcc.t4.bb.l(bb.java:403)
at com.ibm.db2.jcc.t4.bb.d(bb.java:141)
at com.ibm.db2.jcc.t4.b.Oc(b.java:1305)
at com.ibm.db2.jcc.t4.b.b(b.java:1225)
at com.ibm.db2.jcc.t4.b.B(b.java:5129)
at com.ibm.db2.jcc.t4.b.c(b.java:783)
at com.ibm.db2.jcc.t4.b.b(b.java:726)
at com.ibm.db2.jcc.t4.b.a(b.java:409)
at com.ibm.db2.jcc.t4.b.<init>(b.java:345)
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:197)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:316)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:217)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1109)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1033)
at weblogic.common.resourcepool.ResourcePoolImpl.createResources(ResourcePoolImpl.java:574)
at weblogic.jdbc.wrapper.Connection.run(Connection.java:268)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
>
Below is snippet of my datasource configuration.
<?xml version='1.0' encoding='UTF-8'?>
<jdbc-data-source xmlns="http://www.bea.com/ns/weblogic/jdbc-data-source" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/jdbc-data-source http://www.bea.com/ns/weblogic/jdbc-data-source/1.0/jdbc-data-source.xsd">
<name>TestingDB2</name>
<jdbc-driver-params>
<url>jdbc:db2://DB2.testing.us.com:50003/TestingDB</url>
<driver-name>com.ibm.db2.jcc.DB2Driver</driver-name>
<properties>
<property>
<name>maxRetriesForClientReroute</name>
<value>2</value>
</property>
<property>
<name>retryIntervalForClientReroute</name>
<value>5</value>
</property>
<property>
<name>user</name>
<value>testuser</value>
</property>
<property>
<name>resultSetHoldability</name>
<value>2</value>
</property>
<property>
<name>enableSysplexWLB</name>
<value>true</value>
</property>
<property>
<name>enableConnectionConcentrator</name>
<value>true</value>
</property>
<property>
<name>databaseName</name>
<value>DB2QA</value>
</property>
<property>
<name>maxTransportObjects</name>
<value>108</value>
</property>
</properties>
<password-encrypted>{3DES}eh4WI16Xb8E=</password-encrypted>
</jdbc-driver-params>
<jdbc-connection-pool-params>
<initial-capacity>40</initial-capacity>
<max-capacity>215</max-capacity>
<capacity-increment>1</capacity-increment>
<shrink-frequency-seconds>300</shrink-frequency-seconds>
<highest-num-waiters>2147483647</highest-num-waiters>
<connection-creation-retry-frequency-seconds>15</connection-creation-retry-frequency-seconds>
<connection-reserve-timeout-seconds>10</connection-reserve-timeout-seconds>
<test-frequency-seconds>300</test-frequency-seconds>
<test-connections-on-reserve>true</test-connections-on-reserve>
<ignore-in-use-connections-enabled>true</ignore-in-use-connections-enabled>
<inactive-connection-timeout-seconds>300</inactive-connection-timeout-seconds>
<test-table-name>SYSIBM.SYSDUMMY</test-table-name>
<login-delay-seconds>1</login-delay-seconds>
<statement-cache-size>300</statement-cache-size>
<statement-cache-type>LRU</statement-cache-type>
<remove-infected-connections>true</remove-infected-connections>
<seconds-to-trust-an-idle-pool-connection>15</seconds-to-trust-an-idle-pool-connection>
<statement-timeout>-1</statement-timeout>
<pinned-to-thread>false</pinned-to-thread>
</jdbc-connection-pool-params>
<jdbc-data-source-params>
<jndi-name>TestingDB2</jndi-name>
<global-transactions-protocol>None</global-transactions-protocol>
</jdbc-data-source-params>
</jdbc-data-source>
Please help me on this.
- BoyelT
Thanks Joe. I will test the standalone client program you provided.
Below are links I found on web on SQL CODE -972 error message
http://www.dbforums.com/db2/875633-sqlcode-973-sqlstate-57011-drda_heap_sz-cobol-db2-error.html
http://publib.boulder.ibm.com/infocenter/tivihelp/v4r1/index.jsp?topic=/com.ibm.tpc_V411.doc/fqz0_r_tbs_db2_sql_973.html
http://www-01.ibm.com/support/docview.wss?uid=swg1IY55389
Below is explanation about this message
===============================================
SQL0973N Not enough storage is available in the "<heap-name>" heap to process the statement.
Explanation: All available memory for this heap has been used. The statement cannot be processed.
User Response: Terminate the application on receipt of this message (SQLCODE). Increase the configuration parameter for "<heap-name>" to increase the heap size.
===============================================
Can you please advise if this is the problem from DBMS side?
Similar Messages
-
REP-1401 'beforereport' Fatal PL/SQL error occurred. ORA 00000 normal.
Hi,
I am running the report Journals - General (132 char)- file name GLRGNJ.rdf from
Oracle Report Builder 6.0.8.11.3.
I have commented all the (srw.user_exit) in the Before Report trigger but i still
get the message:
REP-1401 'beforereport' Fatal PL/SQL error occurred. ORA 00000 normal,
successful completion.
Can anyone suggest a solution please?
Thanks,
FarisDear sir, i am created one formula column in Reports6i and the following error has come. Could u please find out a solution. Thanks in advance.
my function is below
function CF_Branch_NameFormula return Char is
lc_branch_name varchar2(100);
begin
SELECT rtrim(substr(FVT.DESCRIPTION
,instr(FVT.DESCRIPTION,'-',1)+1
,100)) INTO lc_branch_name
FROM FND_FLEX_VALUES FFV, FND_FLEX_VALUES_TL FVT
WHERE FFV.flex_value_Set_id = 1007956
AND FFV.FLEX_VALUE_ID = FVT.FLEX_VALUE_ID
AND FFV.FLEX_VALUE = FVT.FLEX_VALUE_MEANING
AND FVT.DESCRIPTION <> 'xxx'
and rownum<=1
AND SUBSTR(FVT.FLEX_VALUE_MEANING,3,2) = :P_BRANCH;
return (lc_branch_name);
end; -
DB2 on zOS support in SQL Developer?
I managed to connect to DB2 on zOS by adding third party JDBC drivers from IBM (db2jcc4.jar and db2jcc_license_cisuz.jar) in SQL Developer preferences. During connecting I get an error:
DB2 SQL Error: SQLCODE=-204, SQLSTATE=42704, SQLERRMC=SYSCAT.SCHEMATA, DRIVER=4.18.60
The connection actually works and I can successfully execute SQL statements afterwards, however autocompletion and browsing the list of tables doesn't, which renders the tool pretty useless.
So is this a faulty setup on my part, or does SQL Developer not support DB2 on zOS yet?
If that is the case, are there any plans/roadmap for at least minimal support of DB2?The 3rd party database support in Oracle SQL Developer is provided for helping you migrate said 3rd party databases to Oracle Database
Our list of supported platforms -
Displaying full sql error text?
I'm using getErrorCode() and getMessage() to display the following for an sql error
SQL error: SQLCODE: -551, SQLSTATE: 42501, SQLERRMC: auth-id ;operation;object-name
The SQLERRMC only has the auth-id, operation and object-name. How do I build this error message without doing it manually (detect 551 and build the error string)?
auth-id DOES NOT HAVE THE PRIVILEGE TO PERFORM OPERATION operation ON OBJECT object-nameWrite an abstract DataAccessException class for your data that wraps a java.sql.SQLException and subclass it for this particular database.Then have the concrete class do the work of checking the SQL error code and state and put out a nicer error message.
That's what Rod Johnson recommends in his "Expert 1-On-1 J2EE". -
Com.ibm.db2.jcc.b.DisconnectException
Hi all,
we have a crm app build on spring, db2, and tomcat6.
Recently I am getting the following error,
com.ibm.db2.jcc.b.DisconnectException: A communication error has been detected. Communication protocol being used: T4Agent.sendRequest(). Communication API being used: OutputStream.flush(). Location where the error was detected: Connection timed out. Communication function detecting the error: *. Protocol specific error codes(s) TCP/IP SOCKETS
But , still i can able to connect the db2 outside the app.
I google it and I am getting some info saying that it would happen becoz of firewall. But I am not getting clear ans.
How can I rectify this error?
Give me u r advice.
Thank you.repost of [http://forums.sun.com/thread.jspa?threadID=5380963]
Locking. -
SQL Error on MBAM ISS server while MBAM client encryption
Hi
While I am starting the encryption through MBAM client getting below error..
unable to connect to the MBAM recovery and hardware service
An error occurred while sending encryption status data
for resolve this issue I have done the
http://support.microsoft.com/kb/2612822?wa=wsignin1.0
Also on MBAM server (where Self service and monitoring components installed)I am getting below SQl error while encryption starts on MBAM client machines. can you please suggest for resolve this issue
Error:-
Log Name: Application
Source: ASP.NET 2.0.50727.0
Date: 4/2/2014 2:50:15 PM
Event ID: 1310
Task Category: Web Event
Level: Warning
Keywords: Classic
User: N/A
Computer: BOMVMSSIPS01.KALPATARUGROUP.COM
Description:
Event code: 100002
Event message: SQL error occured
Event time: 4/2/2014 2:50:15 PM
Event time (UTC): 4/2/2014 9:20:15 AM
Event ID: 502b42574bbf4c95b66fea631dbf3428
Event sequence: 42
Event occurrence: 41
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/2/ROOT/MBAMComplianceStatusService-1-130409000569502687
Trust level: Full
Application Virtual Path: /MBAMComplianceStatusService
Application Path: C:\inetpub\Microsoft BitLocker Management Solution\Compliance Status Service\
Machine name: BOMVMSSIPS01
Process information:
Process ID: 2580
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: SqlException
Exception message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured
to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Request information:
Request URL:
Request path:
User host address:
User:
Is authenticated: False
Authentication Type:
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information:
Thread ID: 15
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject,
Boolean withFailover)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject, Boolean withFailover)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.MBAM.ReportingService.DataProcessor.ProcessStatusReportInfo(StatusInfoType reportInfo)
Custom event details:
Application: MBAMComplianceStatusService
Sql Server:
Database: MBAM Compliance Status
Sql ErrorCode: -1
Error Message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured
to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="ASP.NET 2.0.50727.0" />
<EventID Qualifiers="32768">1310</EventID>
<Level>3</Level>
<Task>3</Task>
<Keywords>0x80000000000000</Keywords>
<TimeCreated SystemTime="2014-04-02T09:20:15.000000000Z" />
<EventRecordID>9161</EventRecordID>
<Channel>Application</Channel>
<Computer>BOMVMSSIPS01.KALPATARUGROUP.COM</Computer>
<Security />
</System>
<EventData>
<Data>100002</Data>
<Data>SQL error occured</Data>
<Data>4/2/2014 2:50:15 PM</Data>
<Data>4/2/2014 9:20:15 AM</Data>
<Data>502b42574bbf4c95b66fea631dbf3428</Data>
<Data>42</Data>
<Data>41</Data>
<Data>0</Data>
<Data>/LM/W3SVC/2/ROOT/MBAMComplianceStatusService-1-130409000569502687</Data>
<Data>Full</Data>
<Data>/MBAMComplianceStatusService</Data>
<Data>C:\inetpub\Microsoft BitLocker Management Solution\Compliance Status Service\</Data>
<Data>BOMVMSSIPS01</Data>
<Data> Application: MBAMComplianceStatusService
Sql Server:
Database: MBAM Compliance Status
Sql ErrorCode: -1
Error Message: A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured
to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
</Data>
<Data>2580</Data>
<Data>w3wp.exe</Data>
<Data>NT AUTHORITY\NETWORK SERVICE</Data>
<Data>SqlException</Data>
<Data>A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to
allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)</Data>
<Data>
</Data>
<Data>
</Data>
<Data>
</Data>
<Data>
</Data>
<Data>False</Data>
<Data>
</Data>
<Data>NT AUTHORITY\NETWORK SERVICE</Data>
<Data>15</Data>
<Data>NT AUTHORITY\NETWORK SERVICE</Data>
<Data>False</Data>
<Data> at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo, SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64 timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean integratedSecurity, SqlConnection owningObject,
Boolean withFailover)
at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObject, Boolean withFailover)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String host, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, Int64 timerStart)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.MBAM.ReportingService.DataProcessor.ProcessStatusReportInfo(StatusInfoType reportInfo)
</Data>
</EventData>
</Event>
Shailendra DevYou are using Java import syntax. You should use @page directive in JSP pages. Refer to: http://java.sun.com/products/jsp/syntax/2.0/syntaxref2010.html
[The line "org.apache.jasper.JasperException: /result.jsp(1,4) Invalid directive"
in the stack trace tells you that there is no @import directive] -
Com.ibm.db2.jcc.DB2Driver
I'm using db2 and eclipse and I created dynamic web project. I wanna connect to db2 with dinamic web project and I wanna execute query.. how I do it ?
This is my code
<%@ page import="javax.sql.*" %>
<%@ page import="java.sql.*" %>
<%@ page import="javax.naming.*" %>
<%
System.out.println("sistem");
Connection connection = null;
String dbName = "EMPLOYEE";
String userid = "";
String password = "";
String url = "jdbc:db2://localhost:50001/" + dbName;
String driver = "com.ibm.db2.jcc.DB2Driver";
try {
Class.forName(driver).newInstance();
connection = DriverManager.getConnection(url, userid, password);
} catch(Exception e) {
e.printStackTrace();
%>
error
java.lang.ClassNotFoundException: com.ibm.db2.jcc.DB2DriverFirst of all: Never, ever write DB access code in a JSP! It's a terribly bad idea! Instead, put you business logic (including database access) into Servlets (or Actions, if you happen to use one of the many web frameworks) and use the JSPs only to present information that you created/extracted in your Servlets/Actions.
Next: You need to provide the DB2 JDBC driver .jar to your web application. Either ensure that the servlet container has it (by putting it in some common lib directory) or provide it in your web applications' WEB-INF/lib directory. -
No Suitable Driver Exception and COM.ibm.db2.jdbc.app.DB2Driver
Greetings,
I am attempting to connect to a DB2 UDB (6.1) on an AIX (4.x) box from a win95 box and have cobbled some code together to do this. Despite loading and verifying that the driver loads, I get nothing but the SQLException: "No Suitable Driver". My Java code follows for comment. Thanks in advance...
import java.lang.reflect.*;
import java.sql.*;
import java.io.*;
class db2JDBCtest
static Driver driver = null;
static final String url = "jdbc:db2//1xx.x.x4x.xx/";
public static void main(String args[]) {
Connection con = null;
// GET CONNECTION
try
driver = (Driver)Class.forName("COM.ibm.db2.jdbc.app.DB2Driver").newInstance();
System.out.println(driver);
if (args.length == 3) {
con = DriverManager.getConnection(url + args[0], args[1], args[2]);
else{
System.out.println("\nUsage: java db2JDBCtest [databasealias username password]\n");
System.exit( - 1 );}
// GET CONNECTION WARNINGS
SQLWarning warning = null; {
warning = con.getWarnings();
if (warning == null){
System.out.println("No Warnings");
return; }
while (warning != null) {
System.out.println("Warning: "+warning);
warning = warning.getNextWarning();
// CREATE PREPARED STATEMENT
PreparedStatement prepstmt;
prepstmt = con.prepareStatement("select * from MDM.DEALER where 1=0");
// GET RESULTS !
ResultSet resultset = prepstmt.executeQuery();
System.out.println(resultset);
prepstmt.close();
catch
(Exception e){
System.out.println(e);
}1)IBM document says that you use COM.ibm.jdbc.net.DB2Driver when you use Applets
2)For applications use COM.ibm.jdbc.app.DB2Driver
3)Both these files are in db2java.zip file
4)db2java.zip is the DB2 driver just like classes111.zip is the driver for Oracle
6)You need to put db2java.zip in your classpath.
5)If you are using COM.ibm.jdbc.net.DB2Driver and you are getting "COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0616E Error opening socket
. SQLSTATE=08S01 "
you need to run "db2jstrt" on the target host(machine running DB2) with the specified port as the parameter
6)If you are using COM.ibm.jdbc.app.DB2Driver and getting " java.sql.SQLException: No suitable driver ", most probably db2java.zip is not in classpath.
7)Note : you need to install DB2 client software on the application machine, just putting the zip file does not work.
8)There is a Java file at IBM that walks you thru the connection.
ftp://ftp.software.ibm.com/software/websphere/info/tools/jdbctest
Just download in into the client machine, compile and run it. -
Class not found error for COM.ibm.db2.jdbc.app.DB2Driver
i have written this code:
import java.io.*;
import java.sql.*;
public class tryjdbc
{ public static void main (String args[])
{ try
{ Class.forName("COM.ibm.db2.jdbc.app.DB2Driver"); }
catch (java.lang.ClassNotFoundException e)
{ System.out.print(e.getMessage()); }
and once i try to run it, it gives out a class not found exception error.
I haven't changed anything with the classpath since I don't think the problem is with the classpath. I have read in the IBM Developer Kit for Java documentaton that the AS/400 Developer Kit for Java automatically adds the db2_class.jar file to the classpath. So why do I get a class not found exception error?I was using Web Spehere 4.0.3 and trying to connect to a database on DB2 7.2. I was just following a tutorial and trying to get a handle on Web Sphere. I am running all of these on a Windows 2000 Operating System. Here are some of my observations :
a. db2java.zip packaged under %DB2ROOT%\SQLLIB\JAVA, does not work.
b. CLASSPATH needs to be set to %DB2ROOT%\sqllib\java12\db2java.zip
c. Include this as one of the packages in the package defined in
WebSphere, using the Java Perspective.
d. Ensure that case sensitivity is respected. All though the package
shows up as COM.ibm.db2.jdbc.app.DB2Driver, for some reason, it
will only accept com.ibm.db2.jdbc.app.DB2Driver.
With these settings, I was able to connect to a db2 database.
I am a little puzzled on the following. I did not include java.io package, but still it could print the messages. Did anybody have a similar experience
Thanks for this posting. -
What's wrong with COM.ibm.db2.jdbc.app.DB2Driver?
Hello everybody,
first of all I posted this on
http://www-105.ibm.com/developerworks/java_df.nsf/AllViewTemplate?OpenForm&RestrictToCategory=33
so you can check the IBM forum as well, may be some IBM gurus can comment this...
I'm using the COM.ibm.db2.jdbc.app.Driver shipped with DB2Connect v6.1, v7.1 (tested both on NT and SunOS 5.6, 5.8), the database is DB2 v6, v7 running on an OS390. I am pretty confused:DatabaseMetaData.getProcedureColumns(catalog, schemaPattern, namePattern)cannot handle the namePattern parameter correct. It works only with "", null and "%". Passing any other value results in :COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2] SQL0206N "PROCEDURE " ist in dem verwendeten Kontext ung�ltig. SQLSTATE=42703
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:241)
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:186)
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGenerator.java:419)
at COM.ibm.db2.jdbc.app.DB2DatabaseMetaData.getProcedures(DB2DatabaseMetaData.java:1446)I think that even if the pattern doesn't match any procedure the function should return an empty ResultSet. The only "solution" is to scroll all the procedures in the ResultSet until you find the passing ones. Does IBM think this is serious?
I have dug a bit and found another incompatibitly with the JDBC specification: the names of the result set columns returned by DatabaseMetaData.getProcedureColumns() as returned by the DB2Driver:
PROCEDURE_CAT
PROCEDURE_SCHEM
PROCEDURE_NAME
COLUMN_NAME
COLUMN_TYPE
DATA_TYPE
TYPE_NAME
COLUMN_SIZE
BUFFER_LENGTH
DECIMAL_DIGITS
NUM_PREC_RADIX
NULLABLE
REMARKS
Here comes the JDBC specification:
<quote>
Each procedure description has the the following columns:
PROCEDURE_CAT String => procedure catalog (may be null)
PROCEDURE_SCHEM String => procedure schema (may be null)
PROCEDURE_NAME String => procedure name
COLUMN_NAME String => column/parameter name
COLUMN_TYPE Short => kind of column/parameter:
procedureColumnUnknown - nobody knows
procedureColumnIn - IN parameter
procedureColumnInOut - INOUT parameter
procedureColumnOut - OUT parameter
procedureColumnReturn - procedure return value
procedureColumnResult - result column in ResultSet
DATA_TYPE short => SQL type from java.sql.Types
TYPE_NAME String => SQL type name, for a UDT type the type name is fully qualified
PRECISION int => precision
LENGTH int => length in bytes of data
SCALE short => scale
RADIX short => radix
NULLABLE short => can it contain NULL.
procedureNoNulls - does not allow NULL values
procedureNullable - allows NULL values
procedureNullableUnknown - nullability unknown
REMARKS String => comment describing parameter/column </quote>
I would appreciate your comments.
Regards,
Anton Maleev
IT Consultant, Software Engineer
Frankfurt, Germany
mailto: [email protected]Futhermore, when you call DatabaseMetaData.getProcedures(catalog, schemaPattern, "%") when you specified schemaPattern it returns all the procedures no mather if the schema matches the pattern...
-
Getting class (COM.ibm.db2.jdbc.app.DB2Connection)
We are migrating from Websphere 3.5 to 4.0 and I am setting up my WSAD 4.0 on my local system. DB2 7.2 is the database for the application.
When i configure the Data Source, all works fine, but when I run the application, i get the following error.
The class (COM.ibm.db2.jdbc.app.DB2Connection) does not implement javax.sql.ConnectionPoolDataSource or javax.sql.XADataSource
My JDBC driver is in the file db2java.zip. Can anyone tell me what is the way to remove this error and If i need to download some new drivers, where can i get them from?sorry to say this but we also fed up with all those things and using db2 is 1 of the worst thing in the world if u get enough help from anywhere.. plz inform me also...
-
Cannot load driver COM.ibm.db2.jdbc.app.DB2Driver
Hi ,
I need help on this matter and will really appreciate.
I have installed Jdeveloper 11g and Weblogic 11gR1 on windows. I am trying to configure my weblogic server for JDBC-Datasourse to connect to DB2 and get this error.
cannot load driver COM.ibm.db2.jdbc.app.DB2Driver
This is how my classpath and path looks
classpath :.;C:\Program Files\JDEdwards\BPMBroker\JRE\1.3\lib\ext\QTJava.zip;C:\Program Files\Java\jdk1.6.0_20\lib\tools.jar;C:\Program Files\Java\jdk1.6.0_20\lib\dt.jar;C:\Program Files\Java\jre6\lib\rt.jar;C:\Sun\db2java.zip;C:\Sun\COM\ibm\db2\jdbc\app\DB2Driver.class;C:\Program Files\IBM\WebSphere\AppServer\derby\lib\deprecated\db2jcc.jar;C:\Program Files\IBM\WebSphere\AppServer\derby\lib\deprecated\db2jcc_license_cu.jar;
path : C:\Program Files\Java\jdk1.6.0_20\bin;C:\Sun\db2java.zip;
I don't know what to do and everytime i try to test my connection i get this error .
Please help.
Thank youI added Driver Classname =com.ibm.db2.jcc.DB2Driver
and now it no longer gives me cannot load driver COM.ibm.db2.jdbc.app.DB2Driver.
But now i am getting
Execution failed due to a distribution protocol error that caused deallocation of the conversation. A DRDA Data Stream Syntax Error was detected. Reason: 0x1 DB2ConnectionCorrelator: null
com.ibm.db2.jcc.b.cb.l(cb.java:1207)
com.ibm.db2.jcc.b.cb.c(cb.java:357)
com.ibm.db2.jcc.b.cb.v(cb.java:1440)
com.ibm.db2.jcc.b.db.a(db.java:42)
com.ibm.db2.jcc.b.b.e(b.java:1165)
com.ibm.db2.jcc.b.b.b(b.java:1090)
com.ibm.db2.jcc.b.b.q(b.java:925)
com.ibm.db2.jcc.b.b.a(b.java:665)
com.ibm.db2.jcc.b.b.a(b.java:654)
com.ibm.db2.jcc.b.b.<init>(b.java:293)
com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:165)
com.bea.console.utils.jdbc.JDBCUtils.testConnection(JDBCUtils.java:505)
com.bea.console.actions.jdbc.datasources.createjdbcdatasource.CreateJDBCDataSource.testConnectionConfiguration(CreateJDBCDataSource.java:450)
sun.reflect.GeneratedMethodAccessor196.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.apache.beehive.netui.pageflow.FlowController.invokeActionMethod(FlowController.java:870)
org.apache.beehive.netui.pageflow.FlowController.getActionMethodForward(FlowController.java:809)
org.apache.beehive.netui.pageflow.FlowController.internalExecute(FlowController.java:478)
org.apache.beehive.netui.pageflow.PageFlowController.internalExecute(PageFlowController.java:306)
Please help.
Thanks -
Applet using COM.ibm.db2.jdbc.app.DB2Driver
Hi,
I have an applet that is downloaded from a webserver which then needs to access the local db2java.zip file. It was my understanding if you use the COM.ibm.db2.jdbc.app.DB2Driver it would allow you to access the local copy of that file in your classpath. I also understand that if you use COM.ibm.db2.jdbc.net.DB2Driver you can access the db2java.zip on the server. I unfortunately need to access the local db2java.zip file. I am upgrading from Java 1.2.2 to Java 1.3.1 and it is not allowing this connection. I also changed my java.policy file and have created my own certificate as well, I understand all that.
Here is the section of my code that fails...
java.sql.Driver d = (java.sql.Driver) Class.forName(getDriver()).newInstance();
WHSConnection.con = DriverManager.getConnection(getURL(), getUser(), getPassword());
WHSConnection.con.setAutoCommit(true);
System.out.println("Database Connection Successful");
} catch (java.lang.Throwable except) {
except.printStackTrace();
System.out.println("Database Connection Failed");
Any suggestions would be appreciated. Thanks ~AYes, I forgot to mention that I stopped all DB2 Services and ran the file "runjdbc2.bat"... When I run Java 1.2.2 everything works great. When I run 1.3.1 it attempts to locate the db2java.zip classes on the server and not locally... Here is the error message I receive...
java.lang.ClassNotFoundException: java.io.FileNotFoundException: http://www.example.com/Java131/COM/ibm/db2/jdbc/app/DB2Driver.class
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
at sun.plugin.protocol.jdk12.http.HttpURLConnection.checkCookieHeader(Unknown Source)
at sun.plugin.protocol.jdk12.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at sun.plugin.security.PluginClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at Serverlet.WHSConnection.getConnection(WHSConnection.java:159)
at Serverlet.MainApplet.onOk(MainApplet.java:522)
at Serverlet.MainApplet.connEtoM1(MainApplet.java:60)
at Serverlet.MainApplet.actionPerformed(MainApplet.java:29)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Database Connection Failed -
Hi All,
when executing an application and attempting to connect to DB2 I get;
error java.lang.ClassNotFoundException: COM.ibm.db2.jdbc.app.DB2Driver
I've added the 'db2java.zip' library to the java.conf file (and the native db2 libs) and can make db2 connections using the database connect via the IDE. But not when executing my application - what am I missing.
TIA
BillHi Deepak,
I added the db2java.zip to the
project properties/libraries/classpath
and it works fine. (well my code fails - but that's another problem <g>.)
Thanks for all your help.
Bill -
Changed IBM As/400 system from V4R5 to V5R2 and now get this message when using Access to link to external database the same exact settings on everything I can determine on all computers.
IBM Client Access ODBC Driver DB2/400 SQL7017 Unable to run statement with specified commit level #-7017
I have Commit immediate = *NONE in the Advanced Server Options in ODBC Data Source Administrator. It shows the AS/400 files in the Link Tables list and allows me to add it to the Access table objects, but when I try to open it in datasheet view I get that
error.
What am I missing?Ouch. That's a lot of paste...
INFO: PATH = C:\oracle\product\10.2.0\client_2;C:\oracle\product\10.2.0
\client_1;T:\SDCHS20N440\Oracle\agent10g\jlib;T:\SDCHS20N440
\Oracle\agent10g\bin
INFO: The flags set for this home (T:\SDCHS20N440\Oracle\agent10g) are:clean
SEVERE: Abnormal program termination. An internal error has occured. Please
provide the following files to Oracle Support : I wonder how "T:" is involved. Looks like you got a management agent on a network drive. If so, is this Home registered with the oraInventory on your machine? Can you try the same install on a machine without any previous Oracle software installed?
Maybe you are looking for
-
Premiere Elements 12 will only render some of my footage?
Premiere Elements 12 will only allow me to render some of my footage while it won't render other footage at all. The footage it renders has a green line above it in the work space and no line is above the footage that won't render. I'm using a MacBoo
-
CCMS Monitoring Sets in SAP Netweaver ABAP 7.01 Trial
Hi community, I have successfully installed the trial in the subject but I can't see the alerts in transaction rz20 under CCMS Monitoring Templates. If I click on a node the message "No alerts data exists" appears in the status bar I am not an expert
-
SharpDevelop and Crystal Reports V10 References
Hi All, I'm new to C# and am writing a C# program to run Crystal Reports files developed using CR10 Professional. What references do I need to add to the project to allow me to use the CR10 Viewer or directly execute the CR reports files? I have CR10
-
Hi, I'm having trouble importing some AVI files. Most AVI files work with FCE, but I found that AVI files exported from Adobe Premier for Windows don't play video in Quicktime and Final Cut Express. The audio is there, but there is no video. Quicktim
-
Hi, I'm trying to set an Application level Item to hold a user's 'licence code' when they log into our website. This information is held in a cookie already set in the user's browser (for demo purposes I've called this 'EASY_COOKIE'). For development