NoClassDefFoundError: com/ibm/db2/jcc/SQLJPackage

NoClassDefFoundError: com/ibm/db2/jcc/SQLJPackage

Post by dfdf » Wed, 25 Jun 2003 23:28:02



I'm getting an error:  NoClassDefFoundError: com/ibm/db2/jcc/SQLJPackage
when
I try to create a prepared statement.  I am using DB2 8.1/FP1 and Java
1.3.1.
My code looks like this:

String query = "INSERT INTO FOO (X, Y, Z) VALUES (?, ?, ?)
PreparedStatement stmt = conn.prepareStatement(query);

I am using the type 4 JDBC driver.  Non-prepared statements work just fine.

Any clues?

thanks

 
 
 

NoClassDefFoundError: com/ibm/db2/jcc/SQLJPackage

Post by dfdf » Wed, 25 Jun 2003 23:42:22


* Never Mind *.

I found it in db2cc.jar.


Quote:> I'm getting an error:  NoClassDefFoundError: com/ibm/db2/jcc/SQLJPackage
> when
> I try to create a prepared statement.  I am using DB2 8.1/FP1 and Java
> 1.3.1.
> My code looks like this:

> String query = "INSERT INTO FOO (X, Y, Z) VALUES (?, ?, ?)
> PreparedStatement stmt = conn.prepareStatement(query);

> I am using the type 4 JDBC driver.  Non-prepared statements work just
fine.

> Any clues?

> thanks


 
 
 

NoClassDefFoundError: com/ibm/db2/jcc/SQLJPackage

Post by Barbara von E » Thu, 26 Jun 2003 23:00:34


Today, we've got the same problem. Can you tell me, what you've done
with the db2cc.jar?
Thanks

> * Never Mind *.

> I found it in db2cc.jar.



> > I'm getting an error:  NoClassDefFoundError: com/ibm/db2/jcc/SQLJPackage
> > when
> > I try to create a prepared statement.  I am using DB2 8.1/FP1 and Java
> > 1.3.1.
> > My code looks like this:

> > String query = "INSERT INTO FOO (X, Y, Z) VALUES (?, ?, ?)
> > PreparedStatement stmt = conn.prepareStatement(query);

> > I am using the type 4 JDBC driver.  Non-prepared statements work just
>  fine.

> > Any clues?

> > thanks

 
 
 

1. com.ibm.db2.jcc.c.SQLException: DB2 SQL error: SQLCODE: -302, SQLSTATE: 22001, SQLERRMC:

hi, we are using db2 v8.1 fixpack 2 on NT. i have create a database
with code set UTF-8, when i try to copy the table from AS400 to DB2, i
got the error
com.ibm.db2.jcc.c.SQLException: DB2 SQL error: SQLCODE: -302,
SQLSTATE: 22001, SQLERRMC:

the table on AS400 contains Japanese data, i try to create the table
to store Japanese data on DB2.

But if i change the length of each field to 4 times of the original
length, i can pass and generate the table with data.

Since now on DB2 the length stored in sysibm.syscolomuns is 4 times of
the actual length, so i have to divide this length by 4 to get the
actual length of each field. But the problem is some of the fields is
substring of another field, e.g. apkey on AS400 is 8 length now, after
copy the table to DB2, it becomes 32 bytes long. i have key2
substr(apkey,1,6), then key2's actual length stored in
sysibm.syscolomuns, so looks like some of the fields are 4 times of
original field, some are the actual length. that causes my program
problem , because i assumes all the fiels definition must divide by 4
to get the right length .

i don't understand why i need to 4 times length, because as i see all
the value occupy one byte for up to 8 if the length is 8 bytes, if i
times 4 , that would be 32 length, so the rest 24 byte are space.
please help. thanks

2. IBM RS/6000 as a database server

3. com.ibm.db2.jcc.b.SQLException: NULLID.SYSSH203 0X5359534C564C3031

4. SQL Server Connection

5. com.ibm.db2.jcc.b.SQLException: under construction

6. double loop and the reusabaility

7. Differences between COM.ibm.db2.jdbc.app.DB2Driver and COM.ibm.db2.jdbc.net.DB2Driver

8. Getdate

9. Help please NoClassDefFoundError: com/ms/com/LicenceMgr

10. error: java.lang.NoClassDefFoundError: com/ms/com/Variant

11. Hel please! NoClassDefFoundError: com/ms/com/LicenceMgr

12. COM.ibm.db2.jdbc.appDB2Exception

13. VB6/ADO com DB2(IBM RISC)