On Monday, October 21, 2013 11:11:07 PM UTC+2, Nermin wrote:
Dear Thomas,
thank you for your Post. I have checked my OSIV konfiguration and I have it the right way (transaction per service method).
Apparently not (see below)
The debuggung in ReflectiveServiceLayer#validate showed sofar an appropriate behaviour.
So it correctly returns ConstraintViolations in all cases?
The only problem is that the javax.validation.ConstraintViolationException is turned into a java.lang.RuntimeException in case of an entity update. (see error below.)
There shouldn't be any ConstraintViolation*Exception*.
I cannot figure out why is this happening.
I personally find GWT beeing an easy and very elegant tool for web development. The Appengine-Datastore-handling part is in my point of view a real pain in the ass.
JPA and JDO are a PITA, whether or not they're used on AppEngine.
There are alternatives though (e.g. Objectify).
com.google.web.bindery.event.shared.UmbrellaException: Exception caught: Server Error 500 <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 500 Validation failed for com.emajstor.server.persistence.TestEntity@ 59778fd8 during pre-update for groups [interface javax.validation.groups. Default] - exceptions are attached</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /unAuthRequestFactory. Reason:
<pre> Validation failed for com.emajstor.server.persistence.TestEntity@ 59778fd8 during pre-update for groups [interface javax.validation.groups. Default] - exceptions are attached</pre></p><h3>Caused by:</h3><pre>javax.validation. ConstraintViolationException : Validation failed for com.emajstor.server.persistence.TestEntity@ 59778fd8 during pre-update for groups [interface javax.validation.groups. Default] - exceptions are attached
at org.datanucleus.validation.BeanValidatorHandler.validate( BeanValidatorHandler.java:71)
at org.datanucleus.validation.BeanValidatorHandler.preStore( BeanValidatorHandler.java:86)
at org.datanucleus.api.jpa.JPACallbackHandler.preStore( JPACallbackHandler.java:102)
at org.datanucleus.state.JDOStateManager.flush( JDOStateManager.java:3827)
at org.datanucleus.ObjectManagerImpl. flushInternalWithOrdering( ObjectManagerImpl.java:3888)
at org.datanucleus.ObjectManagerImpl. flushInternal( ObjectManagerImpl.java:3811)
at org.datanucleus.ObjectManagerImpl.flush( ObjectManagerImpl.java:3751)
at org.datanucleus.ObjectManagerImpl.preCommit( ObjectManagerImpl.java:4141)
at org.datanucleus.ObjectManagerImpl. transactionPreCommit( ObjectManagerImpl.java:428)
at org.datanucleus.TransactionImpl. internalPreCommit( TransactionImpl.java:398)
at org.datanucleus.TransactionImpl.commit( TransactionImpl.java:287)
at org.datanucleus.ObjectManagerImpl.close( ObjectManagerImpl.java:1090)
at org.datanucleus.api.jpa.JPAEntityManager.close( JPAEntityManager.java:193)
at com.emajstor.server.AppHandlerFilter.doFilter( AppHandlerFilter.java:91)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain. doFilter(ServletHandler.java: 1157)
Your OSIV filter is causing a TransactionImpl.commit, which means there's a transaction spanning the entire request (or maybe you have auto-commit enabled, I don't know how JPA/JDO really work).
That commit triggers validation, and the ConstraintViolationException is shadowing the RequestFactory response (which, if ReflectiveServiceLayer#validate behaved expectedly, would be an onConstraintViolations response)
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/groups/opt_out.
No comments:
Post a Comment