JSR 303 - validation

35 views
Skip to first unread message

David R.

unread,
Aug 11, 2010, 8:31:06 AM8/11/10
to GWT-Ent Developer Forum
Hi,

The JSR 303 specifications are now completed and you should use a
reference to the main API instead of rewriting the spec by hand.

Here is the dependency you could add to your project:

<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>

Hope it helps.


David

James Luo

unread,
Aug 11, 2010, 7:43:47 PM8/11/10
to gwt...@googlegroups.com
Hi, David

  Thanks for your kindness remind, from version RC2, we will support JSR303 1.0 fully.

James


--
You received this message because you are subscribed to the Google Groups "GWT-Ent Developer Forum" group.
To post to this group, send email to gwt...@googlegroups.com.
To unsubscribe from this group, send email to gwt-ent+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gwt-ent?hl=en.




--
Regards
James Luo

Dave

unread,
Aug 26, 2010, 9:29:45 PM8/26/10
to GWT-Ent Developer Forum
Hi James,

I would very much like to use the this library in a project I am
working on, initially for the reflection functions. However, the
classes I wish to annotate are shared between my server and client
sides. On the server side we are using Hibernate with the Hibernate
Validation framework. The validation classes in gwtent.jar conflict
and cause exceptions on the server side.

I downloaded the latest source from the server and tried to build it,
but I get an error trying to run the test cases (I don't use or
understand maven, so can't really dig to find out what has gone
wrong).

When is RC2 likely to be released?

Thanks,
Dave


PS For reference on the build problem, here is the output of "mvn -
version"
Maven version: 2.0.10
Java version: 1.6.0_13
OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"

And the output of "mvn package" is:
[INFO] Scanning for projects...
[INFO] Reactor build order:
[INFO] A Reflection, AOP, HTML template, UI Binding,
Validate(JSR303) framewo
k and JPA annotation Emulation for GWT. Parent Project
[INFO] A Reflection, AOP, HTML template, UI Binding,
Validate(JSR303) framewo
k and JPA annotation Emulation for GWT. Main Module
[INFO] A Reflection, AOP, HTML template, UI Binding,
Validate(JSR303) framewo
k and JPA annotation Emulation for GWT. ORM module
[INFO] A Reflection, AOP, HTML template, UI Binding,
Validate(JSR303) framewo
k and JPA annotation Emulation for GWT. Ext module
[INFO] A Reflection, AOP, HTML template, UI Binding,
Validate(JSR303) framewo
k and JPA annotation Emulation for GWT. GXT module
[INFO] A Reflection, AOP, HTML template, UI Binding,
Validate(JSR303) framewo
k and JPA annotation Emulation for GWT. Showcase Module
[INFO]
------------------------------------------------------------------------
[INFO] Building A Reflection, AOP, HTML template, UI Binding,
Validate(JSR303)
ramework and JPA annotation Emulation for GWT. Parent Project
[INFO] task-segment: [package]
[INFO]
------------------------------------------------------------------------
[INFO] [site:attach-descriptor]
[INFO]
------------------------------------------------------------------------
[INFO] Building A Reflection, AOP, HTML template, UI Binding,
Validate(JSR303)
ramework and JPA annotation Emulation for GWT. Main Module
[INFO] task-segment: [package]
[INFO]
------------------------------------------------------------------------
[INFO] [resources:resources]
[INFO] Using 'utf-8' encoding to copy filtered resources.
[INFO] Copying 553 resources
[INFO] [compiler:compile]
[INFO] Compiling 449 source files to C:\Data\src\gwtent\gwt-ent-read-
only\gwten
\target\classes
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Compilation failure

C:\Data\src\gwtent\gwt-ent-read-only\gwtent\src\main\java\com\gwtent
\gen\reflec
ion\GeneratorHelper.java:[35,61] package
com.gwtent.client.test.reflection.Clas
TypeGenTestCase does not exist

C:\Data\src\gwtent\gwt-ent-read-only\gwtent\src\main\java\com\gwtent
\validate\c
ient\impl\ConfigurationImpl.java:[17,34] package
org.hibernate.validator.xml do
s not exist

C:\Data\src\gwtent\gwt-ent-read-only\gwtent\src\main\java\com\gwtent
\validate\c
ient\impl\ConfigurationImpl.java:[29,7]
com.gwtent.validate.client.impl.Configu
ationImpl is not abstract and does not override abstract method
addMapping(java
io.InputStream) in javax.validation.Configuration

C:\Data\src\gwtent\gwt-ent-read-only\gwtent\src\main\java\com\gwtent
\validate\c
ient\impl\MessageInterpolatorGWTImpl.java:[15,7]
com.gwtent.validate.client.imp
.MessageInterpolatorGWTImpl is not abstract and does not override
abstract meth
d
interpolate(java.lang.String,javax.validation.MessageInterpolator.Context,jav
.util.Locale) in javax.validation.MessageInterpolator


[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 7 seconds
[INFO] Finished at: Fri Aug 27 11:29:08 EST 2010
[INFO] Final Memory: 22M/55M
[INFO]
------------------------------------------------------------------------


On Aug 12, 9:43 am, James Luo <jamesluo...@gmail.com> wrote:
> Hi, David
>
>   Thanks for your kindness remind, from version RC2, we will support JSR303
> 1.0 fully.
>
> James
>
>
>
>
>
> On Wed, Aug 11, 2010 at 10:31 PM, David R. <david.ren...@gmail.com> wrote:
> > Hi,
>
> > The JSR 303 specifications are now completed and you should use a
> > reference to the main API instead of rewriting the spec by hand.
>
> > Here is the dependency you could add to your project:
>
> > <dependency>
> >  <groupId>javax.validation</groupId>
> >  <artifactId>validation-api</artifactId>
> >  <version>1.0.0.GA</version>
> > </dependency>
>
> > Hope it helps.
>
> > David
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "GWT-Ent Developer Forum" group.
> > To post to this group, send email to gwt...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > gwt-ent+u...@googlegroups.com<gwt-ent%2Bunsu...@googlegroups.com >
> > .

James Luo

unread,
Aug 26, 2010, 9:39:19 PM8/26/10
to gwt...@googlegroups.com
Hi, Dave

  I will build a jar file for you, with this version there is no more conflict, because in server side all java code will be shared, in client side, GWT will using our emumalation code.

  The validation not finish yet, but the Emulation should stable now. you can include the following line to your GWT module file.

  <inherits name="com.gwtent.validate.emul.Emulation" />

  I'm working with Validation framework and try to make it go through most of TCK testing. I need update showcase as well, I think I need at least 2 weeks.

James

To unsubscribe from this group, send email to gwt-ent+u...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/gwt-ent?hl=en.




--
Regards
James Luo

James Luo

unread,
Aug 26, 2010, 9:49:20 PM8/26/10
to gwt...@googlegroups.com
Hi,Dave

  you can go to "http://code.google.com/p/gwt-ent/source/browse/#svn/trunk/gwtent/target" to download the jar file.

  please note, with this jar file, validation is not working.

Thanks
James
--
Regards
James Luo

Dave

unread,
Aug 27, 2010, 2:17:50 AM8/27/10
to GWT-Ent Developer Forum
Hi James,

thanks for the very quick response. The updated .jar file works a
treat.

For now we will restrict ourselves to using the reflection API. Once
the RC2 is out we will look into the other features of the library.

Thanks again,
Dave


On Aug 27, 11:49 am, James Luo <jamesluo...@gmail.com> wrote:
> Hi,Dave
>
>   you can go to "http://code.google.com/p/gwt-ent/source/browse/#svn/trunk/gwtent/target" to
> download the jar file.
>
>   please note, with this jar file, validation is not working.
>
> Thanks
> James
>
>
>
>
>
> On Fri, Aug 27, 2010 at 11:39 AM, James Luo <jamesluo...@gmail.com> wrote:
> > Hi, Dave
>
> >   I will build a jar file for you, with this version there is no more
> > conflict, because in server side all java code will be shared, in client
> > side, GWT will using our emumalation code.
>
> >   The validation not finish yet, but the Emulation should stable now. you
> > can include the following line to your GWT module file.
>
> >   <inherits name="com.gwtent.validate.emul.Emulation" />
>
> >   I'm working with Validation framework and try to make it go through most
> > of TCK testing. I need update showcase as well, I think I need at least 2
> > weeks.
>
> > James
>
> >> <gwt-ent%2Bunsu...@googlegroups.com<gwt-ent%252Bunsubscribe@googlegroup s.com>>
> >> > > .
> >> > > For more options, visit this group at
> >> > >http://groups.google.com/group/gwt-ent?hl=en.
>
> >> > --
> >> > Regards
> >> > James Luo
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "GWT-Ent Developer Forum" group.
> >> To post to this group, send email to gwt...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> gwt-ent+u...@googlegroups.com<gwt-ent%2Bunsu...@googlegroups.com >
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/gwt-ent?hl=en.
>
> > --
> > Regards
> > James Luo
>
> --
> Regards
> James Luo

Dave

unread,
Aug 31, 2010, 3:48:30 AM8/31/10
to GWT-Ent Developer Forum
Hi James,

the updated .jar you created for me has been working wonderfully well
during development. However, today I went to do the proper GWT compile
and I get error messages:

[java] [ERROR] Errors in 'generated://
E38F283E5205AB54A0F68A09F92938F6/com/gwtent/reflection/client/
TypeOracle_Visitor.java'
[java] [ERROR] Line 160: Rebind result
'com.gwtent.reflection.client.java.lang.annotation.Documented_TypeOracle_Visitor_java_lang_annotation_Documented_GWTENTAUTO_ClassType__Reflection'
could not be found
[java] [ERROR] Line 161: Rebind result
'com.gwtent.reflection.client.java.io.Serializable_TypeOracle_Visitor_java_io_Serializable_GWTENTAUTO_ClassType__Reflection'
could not be found
[java] [ERROR] Line 163: Rebind result
'com.gwtent.reflection.client.java.lang.annotation.Retention_TypeOracle_Visitor_java_lang_annotation_Retention_GWTENTAUTO_ClassType__Reflection'
could not be found
[java] [ERROR] Line 164: Rebind result
'com.gwtent.reflection.client.java.lang.annotation.Inherited_TypeOracle_Visitor_java_lang_annotation_Inherited_GWTENTAUTO_ClassType__Reflection'
could not be found
[java] [ERROR] Line 166: Rebind result
'com.gwtent.reflection.client.java.lang.CharSequence_TypeOracle_Visitor_java_lang_CharSequence_GWTENTAUTO_ClassType__Reflection'
could not be found
[java] [ERROR] Line 168: Rebind result
'com.gwtent.reflection.client.java.lang.annotation.Annotation_TypeOracle_Visitor_java_lang_annotation_Annotation_GWTENTAUTO_ClassType__Reflection'
could not be found
[java] [ERROR] Line 171: Rebind result
'com.gwtent.reflection.client.java.lang.String_TypeOracle_Visitor_java_lang_String_GWTENTAUTO_ClassType__Reflection'
could not be found
[java] [ERROR] Line 173: Rebind result
'com.gwtent.reflection.client.java.lang.StringBuilder_TypeOracle_Visitor_java_lang_StringBuilder_GWTENTAUTO_ClassType__Reflection'
could not be found
[java] [ERROR] Line 176: Rebind result
'com.gwtent.reflection.client.java.lang.Long_TypeOracle_Visitor_java_lang_Long_GWTENTAUTO_ClassType__Reflection'
could not be found
[java] [ERROR] Line 177: Rebind result
'com.gwtent.reflection.client.java.lang.Appendable_TypeOracle_Visitor_java_lang_Appendable_GWTENTAUTO_ClassType__Reflection'
could not be found
[java] [ERROR] Line 178: Rebind result
'com.gwtent.reflection.client.java.util.Comparator_TypeOracle_Visitor_java_util_Comparator_GWTENTAUTO_ClassType__Reflection'
could not be found
[java] [ERROR] Line 179: Rebind result
'com.gwtent.reflection.client.java.lang.Object_TypeOracle_Visitor_java_lang_Object_GWTENTAUTO_ClassType__Reflection'
could not be found
[java] [ERROR] Line 180: Rebind result
'com.gwtent.reflection.client.java.lang.Deprecated_TypeOracle_Visitor_java_lang_Deprecated_GWTENTAUTO_ClassType__Reflection'
could not be found
[java] [ERROR] Line 181: Rebind result
'com.gwtent.reflection.client.java.lang.Comparable_TypeOracle_Visitor_java_lang_Comparable_GWTENTAUTO_ClassType__Reflection'
could not be found
[java] [ERROR] Line 183: Rebind result
'com.gwtent.reflection.client.java.lang.annotation.Target_TypeOracle_Visitor_java_lang_annotation_Target_GWTENTAUTO_ClassType__Reflection'
could not be found
[java] [ERROR] Line 184: Rebind result
'com.gwtent.reflection.client.java.lang.StringBuffer_TypeOracle_Visitor_java_lang_StringBuffer_GWTENTAUTO_ClassType__Reflection'
could not be found


Any idea what I am forgetting to do?

Thanks,
Dave


On Aug 27, 11:49 am, James Luo <jamesluo...@gmail.com> wrote:
> Hi,Dave
>
>   you can go to "http://code.google.com/p/gwt-ent/source/browse/#svn/trunk/gwtent/target" to
> download the jar file.
>
>   please note, with this jar file, validation is not working.
>
> Thanks
> James
>
>
>
>
>
> On Fri, Aug 27, 2010 at 11:39 AM, James Luo <jamesluo...@gmail.com> wrote:
> > Hi, Dave
>
> >   I will build a jar file for you, with this version there is no more
> > conflict, because in server side all java code will be shared, in client
> > side, GWT will using our emumalation code.
>
> >   The validation not finish yet, but the Emulation should stable now. you
> > can include the following line to your GWT module file.
>
> >   <inherits name="com.gwtent.validate.emul.Emulation" />
>
> >   I'm working with Validation framework and try to make it go through most
> > of TCK testing. I need update showcase as well, I think I need at least 2
> > weeks.
>
> > James
>
> >> <gwt-ent%2Bunsu...@googlegroups.com<gwt-ent%252Bunsubscribe@googlegroup s.com>>
> >> > > .
> >> > > For more options, visit this group at
> >> > >http://groups.google.com/group/gwt-ent?hl=en.
>
> >> > --
> >> > Regards
> >> > James Luo
>
> >> --
> >> You received this message because you are subscribed to the Google Groups
> >> "GWT-Ent Developer Forum" group.
> >> To post to this group, send email to gwt...@googlegroups.com.
> >> To unsubscribe from this group, send email to
> >> gwt-ent+u...@googlegroups.com<gwt-ent%2Bunsu...@googlegroups.com >
> >> .
> >> For more options, visit this group at
> >>http://groups.google.com/group/gwt-ent?hl=en.
>
> > --
> > Regards
> > James Luo
>
> --
> Regards
> James Luo

James Luo

unread,
Aug 31, 2010, 6:12:10 AM8/31/10
to gwt...@googlegroups.com
Hi, Dave, I'm working on it, thank you.

To unsubscribe from this group, send email to gwt-ent+u...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/gwt-ent?hl=en.




--
Regards
James Luo

James Luo

unread,
Aug 31, 2010, 7:08:25 AM8/31/10
to gwt...@googlegroups.com
Hi, Dave

  I just uploaded a new version, please have a try, any problem just let me know please.

  Thanks.

James
--
Regards
James Luo

Dave

unread,
Sep 1, 2010, 10:07:33 PM9/1/10
to GWT-Ent Developer Forum
Thanks, James. The new version fixes the compile problem.

Thanks again for the quick turnaround.

Dave


On Aug 31, 9:08 pm, James Luo <jamesluo...@gmail.com> wrote:
> Hi, Dave
>
>   I just uploaded a new version, please have a try, any problem just let me
> know please.
>
>   Thanks.
>
> James
>
>
>
> On Tue, Aug 31, 2010 at 8:12 PM, James Luo <jamesluo...@gmail.com> wrote:
> > Hi, Dave, I'm working on it, thank you.
>
> >> > >> .util.Locale) in...
>
> read more »
Reply all
Reply to author
Forward
0 new messages