[EJB 3.0] - JBoss and PostgreSQL 8.1
by fermat42
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#4069322
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069322
16Â years, 9Â months
[JBoss jBPM] - Bypass Form Validation For Certain Operations?
by khamburg
This seems like a pretty simple question, but I have searched and can't find the answer. I have a bunch of xhtml forms corresponding to tasks in my workflow. Some of them specify input fields that are required and must be validated. I set required=true on the input component and included a custom validator:
| <h:inputText value="#{var['My Date']}" required="true">
| <f:validator validatorId="my.DateValidator"/>
| </h:inputText>
|
Below, I have my transitions defined. One transition requires the input data to be validated, and the others do not. I want to bypass validation for the transitions that do not require it. I have tried using the immediate attribute as follows, but it has no affect:
| <tf:saveButton value="Save"/>
| <tf:transitionButton transition="Accept Data" value="Accept Data"/>
| <tf:transitionButton transition="Ignore Data" value="Ignore Data" immediate="true"/>
|
Any ideas how I can bypass validation using this technique or another one?
Thanks in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4069316#4069316
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4069316
16Â years, 9Â months