Hello,
I am using jboss 4.2.1 with PostgreSQL 8.1. With this I tried to bouild an Entity Bean
that stores informations about some servers. One of the fields is the IP of the server. It
looks like this:
@Entity
@IdClass(ComponentPK.class)
public class Server implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
private Long id;
private String hostname;
private String ip;
....
}
I build a JSP creating such an Entity. Using it I get an Exception which ends with:
java.sql.BatchUpdateException: Batch-Eintrag 0 insert into Server (hostname, ip, id,
sessionId) values (albana, 192.168.65.68, NULL, 5) wurde abgebrochen. Rufen Sie
getNextException auf, um die Ursache zu erfahren.
O.K., it is german. Translated to english it means the following:
java.sql.BatchUpdateException: Batch-Entry 0 insert into Server (hostname, ip, id,
sessionId) values (albana, 192.168.65.68, NULL, 5) was canceled. Call getNextException to
discover the reason.
If I find out how to make JBoss english speaking I can also send the real error Message
here.
If I try to use the SQL there in my database I get a syntaxerror. This happens because ma
database thinks that 192.168.65.68 is a number, and there is a problem with the second
point for it. Is it my failure or a bug in JBoss? I think the SQL should be insert into
Server (hostname, ip, id, sessionId) values ('albana', '192.168.65.68' ,
NULL, 5)
If I change it to this the seconp problem is that the NULL as id is not allowed because it
is a primary key. Is anyone using JBoss with Postgre and can tell me what is happening
there?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069322#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...