[JBoss Seam] - Validation patter -> Invalid State
by enda
Hey, I have a question about annotation @Pattern and seam validation of the annotated field. I have this annotation
| @NotNull
| @Pattern(regex="[a-zA-Z]?[a-zA-Z0-9]+",
| message="Username must start with a letter, and only contain letters or numbers")
| public String getFirstName() {
| return firstName;
| }
|
When I call this from view form I will get:
/*message*/
Exception was thrown:validation failed for: edu.baylor.icpc.model.businessobjects.PersonInfo
and log:
| 01:19:02,534 ERROR [ExceptionHandler] Exception[Ljava.lang.StackTraceElement;@875e63
| 01:19:02,534 ERROR [ExceptionHandler] Exception
| org.hibernate.validator.InvalidStateException: validation failed for: edu.xx.xx.model.businessobjects.PersonInfo
| at org.hibernate.validator.event.ValidateEventListener.validate(ValidateEventListener.java:143)
| at org.hibernate.validator.event.ValidateEventListener.onPreUpdate(ValidateEventListener.java:172)
| at org.hibernate.action.EntityUpdateAction.preUpdate(EntityUpdateAction.java:217)
| at org.hibernate.action.EntityUpdateAction.execute(EntityUpdateAction.java:65)
|
| ...
|
| org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:619)
| 01:19:02,537 WARN [ReadWriteCache] An item was expired by the cache while it was locked (increase your cache timeout): edu.xx.xx.model.businessobjects.PersonInfo#2
|
|
Next valid attempt also fail:
/*message*/
Exception was thrown:null
Transaction failed
| [AbstractFlushingEventListener] Could not synchronize database state with session
| org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [edu.xx.xx.model.businessobjects.PersonInfo#2]
| ...
| Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [edu.baylor.icpc.model.businessobjects.PersonInfo#2]
|
|
I guess that here I am supposed to call entityManager.merge() to get valid object state?
But what about @Pattern validation. Is that expected behavior?
(When I use entityHome from seam-gened application it fails too)
Thanks Tomas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128049#4128049
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128049
18 years, 2 months
[JBoss Seam] - Seam/jBpm deployment on linux - need hints
by javabeats
Hello, everyone.
I have a Seam application packaged as an .EAR file. All works very well and without any problems, on a glassfish AS installed in a windows (blergh) machine. It is running in a windows instance because I couldn't make it run on linux =/
First and foremost, my .EAR has all the third party libraries it needs packaged with it, in a /lib folder. I do not have to copy these jars to the glassfish mydomain/lib folder in windows, it all works well out of the box by simply deploying the EAR file. That includes all hibernate libraries and the Seam dependencies. All works fine, no warns or errors on the deployment.
The same is true for the jBpm process. It works well, without errors, through the many pageflows it uses.
In Linux, however... I cannot deploy the EAR by itself. In order for the deployment to work, I must copy all the jars of the EAR/lib folder to the mydomain/lib folder in glassfish.
After that, the deploy still fails with a "cannot deploy process definition" error (URL is null, etc..). The .EAR is exactly the same that is deployed in Windows. I have also tried all sorts of sane and insane workarounds, such as throwing the myprocess jpdl file everywhere through the EAR filesystem and the server itself.
So, my questions are:
1) Any clues why the linux instance of glassfish explicitly requires my libraries to be deployed also "outside" the .EAR file?
2) Any clues why seam/jbpm is unable to find my process definition file, in linux only?
I'm running out of both time, patience, and options... =D So if anyone has run into similar problems, maybe that would help me find out what's wrong with my environment here..
Sorry for the long post, please forgive my english, and thanks in advance ;)
Rodrigo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128038#4128038
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128038
18 years, 2 months
[JBoss Seam] - seam-gen problem with generate-ui and repeated types
by jcg3
I am designing from the entities out and the seam-gen generate-ui is incredibly helpful. Great stuff.
I've noticed a minor thing that I have questions on.
I believe this is a bug... anyone care to confirmation and/or tell me where to log the issue to be fixed in a future release?
The problem is best shown with a contrived example. Suppose I'm building a model of a house and the doors in the house. Here are two simple entities:
@Entity public class House {
@Id private Long id;
@OneToOne private Door frontDoor;
@OneToOne private Door backDoor;
...
}
@Entity public class Door {
@Id private Long id;
private String description;
...
}
When I run seam-gen's generate-ui command, I get a HouseHome.java file that has the following annotations:
@In(create = true)
DoorHome doorHome;
@In(create = true)
DoorHome doorHome;
The obvious problem is that the generator assumes that both Door objects are the same type. Incidentally, hibernate does hbm2ddl on this type of association properly (there are two columns and two foreign keys created in the db).
Thoughts? Am I missing something or a custom mapping that I can provide the seam utility?
Thanks,
Jason
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128032#4128032
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128032
18 years, 2 months
[JBoss Portal] - CMS error
by devfree
Please help me, I was an error in CMS of Jboss Portal, it's :
--- MBeans waiting for other MBeans ---
ObjectName: portal:service=CMS
State: FAILED
Reason: javax.jcr.RepositoryException: failed to create folder for repository
meta data: failed to create folder entry: /: failed to create folder entry: /
I Depend On:
jboss.jca:service=DataSourceBinding,name=PortalDS
portal:service=JAASLoginModule
portal:service=Hibernate,type=CMS
portal:service=Module,type=IdentityServiceController
cms.pm.cache:service=TreeCache
portal:service=AuthorizationManager,type=cms
portal:service=ApprovePublish,type=Workflow
portal:service=InterceptorStackFactory,type=Cms
Depends On Me:
portal:commandFactory=CMSObject
--- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
ObjectName: portal:service=CMS
State: FAILED
Reason: javax.jcr.RepositoryException: failed to create folder for repository
meta data: failed to create folder entry: /: failed to create folder entry: /
I Depend On:
jboss.jca:service=DataSourceBinding,name=PortalDS
portal:service=JAASLoginModule
portal:service=Hibernate,type=CMS
portal:service=Module,type=IdentityServiceController
cms.pm.cache:service=TreeCache
portal:service=AuthorizationManager,type=cms
portal:service=ApprovePublish,type=Workflow
portal:service=InterceptorStackFactory,type=Cms
Depends On Me:
portal:commandFactory=CMSObject
------------------------------------------------------------
I don't know help me !!!!!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4128031#4128031
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4128031
18 years, 2 months