473,835 Members | 1,971 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 7928
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.p lwrote:
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
4428
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 package: file:/C:/jboss/server/default/deploy/mysql-service.xml 15:14:32,078 WARN Duplicate throwable nesting of same base type: class org.jboss.deployment.DeploymentException is assignable from:
0
2892
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 syntax ? Or another syntax is more appropriated ?
0
1839
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 syntax ? Or another syntax is more appropriated ?
0
2257
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 their needed dependencies inside the jar files (and have a reference to them in the Class-Path entry in their MANIFEST.MF). The problem shows when I want these beans to be scoped, this is, to have their own classloader inside JBoss and not use the...
0
1879
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 get an error, this saxparser is not supported. WTF. I have tried to install the latest xalan and xerces under windows and no go. Sometimes I get the error, namespace not supported.
0
1803
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 "run.bat" at the jboss bin directory, from windows DOS command-line). IN WINDOWS-XP, I USED THE TWO FOLLOWING COMPILERS DIFFERENTLY AT THE DOS COMMAND-LINE:
0
2003
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 more details". Same for all versions of JBoss. I couldn't find what causes the error. Any help would be much appreciated. My installation is: JDK 1.5.0 update 11 Jboss 4.0.4GA Eclipse 3.2.2
1
2066
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 java.net.ServerSocket.bind(ServerSocket.java:319) at java.net.ServerSocket.<init>(ServerSocket.java:185) at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:169) at org.jnp.server.Main.initBootstrapListener(Main.java:354) at...
1
3911
by: viswanathtvs | last post by:
java.util.NoSuchElementException javax.faces.el.EvaluationException: java.util.NoSuchElementException at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:102) at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102) at javax.faces.component.UICommand.broadcast(UICommand.java:387) at...
0
9653
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10524
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9348
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7768
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6968
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5639
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5805
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3997
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3092
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.