473,320 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Autoincrement DB2 JBOSS EJB CMP

J have database DB2 and create table T_TEST with fields:
ID - integer autoincrement
NAME - varchar(50)
QTY - Integer

I create java bean CMP and install it on Jboss server and when create new
record from client I get error:

com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -798, SQLSTATE:
428C9, SQLERRMC: ID

I get the same error when execute command:
Insert into T_test (id,name,qty ) values (10,'OK',12)

and when execute :
Insert into T_test (name,qty ) values ('OK',12)
.... all is OK!!!

how to configure Jboss ?

Please Help!!!

thanks



Mar 2 '07 #1
1 7896
you are specifying value for column which is supposed to be auto
generated
that is the cause of error you are getting
here is the explanation from db2
================================================== =======
SQL0798N A value cannot be specified for column
"<column-name>" which is defined as GENERATED ALWAYS.

Explanation:

When inserting or updating a row in a table, a value was
specified for the GENERATED ALWAYS column "<column-name>".
GENERATED ALWAYS columns should not be specified in the
column-list for an INSERT or in the SET clause for an update
unless the keyword DEFAULT is specified.

The INSERT or UPDATE is not performed.

User Response:

Remove the GENERATED ALWAYS column from the column-list or SET
clause, or specify DEFAULT as the column value.

sqlcode : -798

sqlstate : 428C9
================================================== ==================

On Mar 2, 5:09 am, "Grzes_P" <grzesi...@wp.plwrote:
J have database DB2 and create table T_TEST with fields:
ID - integer autoincrement
NAME - varchar(50)
QTY - Integer
I create java bean CMP and install it on Jboss server and when create new
record from client I get error:

com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -798, SQLSTATE:
428C9, SQLERRMC: ID

I get the same error when execute command:
Insert into T_test (id,name,qty ) values (10,'OK',12)

and when execute :
Insert into T_test (name,qty ) values ('OK',12)
... all is OK!!!

how to configure Jboss ?

Please Help!!!

thanks

Mar 2 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Fadzi Ushewokunze | last post by:
hi guys... i am doing the eclipse-tomcat-jboss-mysql integration but i just cant get to see why jboss wont start properly; hes a snippet of the error i am getting: Starting deployment of...
0
by: Bernard Koninckx | last post by:
Hi everybody, I have some question about jBoss. First ------ If I would configure the data source into bean-side. Wich syntax from the bean descriptor have been used ? It's the correct...
0
by: Bernard Koninckx | last post by:
Hi everybody, I have some question about jBoss. First ------ If I would configure the data source into bean-side. Wich syntax from the bean descriptor have been used ? It's the correct...
0
by: Cruinne | last post by:
Hello, In a JBoss 3.2.4 server, I have deployed several enterprise javabeans (each as a separate .jar, not in an .ear bundle). These beans are completely self-contained, as they include all...
0
by: bigbinc | last post by:
I am using the xercesImpl.jar class library with jboss 3.2 and under linux I can call this command: java org.apache.xalan.xslt.Process but with the same classpath and library under windows, I...
0
by: nuhu jibrin | last post by:
Good day all, Please, i can't compile my ejb classes in JBoss-4.0.5.GA or JBoss-4.0.2 after proper installation (because i can log on to the server via http://localhost:8080/ after using ...
0
by: Husey | last post by:
Hi, I am trying to create a very simple EJB project which requires me to create a new jboss configuration in Eclipse. I keep getting the error message "An error has occurred. See error log for...
1
by: khatarnakkhatri | last post by:
java.net.BindException: Address already in use: JVM_Bind at java.net.PlainSocketImpl.socketBind(Native Method) at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359) at...
1
by: viswanathtvs | last post by:
java.util.NoSuchElementException javax.faces.el.EvaluationException: java.util.NoSuchElementException at...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.