Validation-api-1.0.0, Doesn't work

756 views
Skip to first unread message

MaximeMularz

unread,
May 21, 2011, 3:21:50 AM5/21/11
to Google Web Toolkit
Hi,

I tried to use Validation-api-1.0.0 with GWT 2.3 but it didn't
work !!!

My Code :
Line 32. : Validator validator =
Validation.buildDefaultValidatorFactory().getValidator();

The Error :
09:18:57.323 [ERROR] [validation] Line 32 The method
buildDefaultValidatorFactory() is undefined for the type Validation


Thanks for your help

Maxime

Adolfo Panizo Touzon

unread,
May 22, 2011, 9:54:55 AM5/22/11
to google-we...@googlegroups.com
Hi Maxime,

I also am trying to test the validation api.

The fact that no work for you is normal, generic classes are calling facto standard.
You should call the classes implemented by google.
Before you continue writing, you could say that you imported libraries anddependencies on other projects are you working?

A greeting.


2011/5/21 MaximeMularz <max...@mularz.fr>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.




--
El precio es lo que pagas. El valor es lo que recibes.
Warren Buffet

MaximeMularz

unread,
May 22, 2011, 1:28:57 PM5/22/11
to Google Web Toolkit
Hi Adolfo,

I added in web-inf/lib "Validation-api-1.0.0.GA" and "Validation-
api-1.0.0.GA-sources", What are the classes implemented by google ?

Maxime

On May 22, 3:54 pm, Adolfo Panizo Touzon <adolfo.pan...@gmail.com>
wrote:

Adolfo Panizo Touzon

unread,
May 22, 2011, 3:37:01 PM5/22/11
to google-we...@googlegroups.com
Hi,
First, I recommend that you download the repository gwt development [
]. 

The project amountsto eclipse gwt-user and the project sample / validation.

Once you do that look in src/com.google.validation (here there is the GWT class validation) and src/org.hibernate.validation.

Those are the two main projects of validation for google. In addition to the standardbase classes Bean Validation JSR-303 (coming in the package javax.validation).

Once you've done this, you must import your project in the gwt-user and use in your***. gwt.xml one similar to that comes in the sample project.

Now I'm at that point, when you add the gwt-user project to my main project,something is wrong.

A possible hand solicion would compile the gwt-user project and use the classes ofthe packages described above (these classes do not appear in the distribution of theSDK provided by Google). This step I am not able to do so because as I can compilewith ant. If you are able to do it yourself, then you explain step by step how to run thevalidation api.

Greetings!.



2011/5/22 MaximeMularz <max...@mularz.fr>

MaximeMularz

unread,
May 23, 2011, 4:40:27 AM5/23/11
to Google Web Toolkit
Hi,

I compiled the sources but when I'm using Validator validator =
Validation.buildDefaultValidatorFactory().getValidator(),

these are the errors :

* Deferred binding result type 'javax.validation.ValidatorFactory'
should not be abstract
* Unable to load modumle entry point class validation.client :
10:17:54.989 [ERROR] [validation] Unable to load module entry point
class validation.client.Entry (see associated exception for details)


java.lang.RuntimeException: Deferred binding failed for
'javax.validation.ValidatorFactory' (did you forget to inherit a
required module?)

at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:
53)

at com.google.gwt.core.client.GWT.create(GWT.java:98)

at
com.google.gwt.validation.client.spi.GwtValidationProvider.buildValidatorFactory(GwtValidationProvider.java:
39)

at
com.google.gwt.validation.client.BaseGwtConfiguration.buildValidatorFactory(BaseGwtConfiguration.java:
55)

at
com.google.gwt.validation.client.Validation.buildDefaultValidatorFactory(Validation.java:
228)

at validation.client.Entry.onModuleLoad(Entry.java:48)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)

at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:
200)

at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
523)

at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
362)

at java.lang.Thread.run(Unknown Source)
Caused by: com.google.gwt.core.ext.UnableToCompleteException: (see
previous log entries)

at
com.google.gwt.dev.shell.ModuleSpace.rebindAndCreate(ModuleSpace.java:
503)

at com.google.gwt.dev.shell.GWTBridgeImpl.create(GWTBridgeImpl.java:
49)

at com.google.gwt.core.client.GWT.create(GWT.java:98)

at
com.google.gwt.validation.client.spi.GwtValidationProvider.buildValidatorFactory(GwtValidationProvider.java:
39)

at
com.google.gwt.validation.client.BaseGwtConfiguration.buildValidatorFactory(BaseGwtConfiguration.java:
55)

at
com.google.gwt.validation.client.Validation.buildDefaultValidatorFactory(Validation.java:
228)

at validation.client.Entry.onModuleLoad(Entry.java:48)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)

at
com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:
200)

at
com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:
523)

at
com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:
362)

at java.lang.Thread.run(Unknown Source)


Maxime




On 22 mai, 21:37, Adolfo Panizo Touzon <adolfo.pan...@gmail.com>
wrote:
> *Hi,*
> *First, I recommend that you download the repository gwt development [**http://google-web-toolkit.googlecode.com/svn/trunk/
> **
> ].
> *
> *
> *
> *The project amountsto eclipse gwt-user and the project sample / validation.
>
> Once you do that look in src/com.google.validation (here there is the GWT
> class validation) and src/org.hibernate.validation.
>
> Those are the two main projects of validation for google. In addition to the
>  standardbase classes Bean Validation JSR-303 (coming in the package
> javax.validation).
>
> Once you've done this, you must import your project in the gwt-user and use
> in your***. gwt.xml one similar to that comes in the sample project.
>
> Now I'm at that point, when you add the gwt-user project to my main
> project,something
> is wrong.
>
> A possible hand solicion would compile the gwt-user project and use the
> classes ofthe packages described above (these classes do not appear in the
> distribution of theSDK provided by Google). This step I am not able to do so
>  because as I can compilewith ant. If you are able to do it yourself, then
> you explain step by step how to run thevalidation api.
>
> Greetings!.*

Adolfo Panizo Touzon

unread,
May 23, 2011, 4:54:10 AM5/23/11
to google-we...@googlegroups.com
Try it with: 
Validator validator = GWT.create(SampleValidator.class);

Other thing, send us the modules that you are inhertir in your project.

If you use your form, you must specify in your xxx.gwt.xml the change of the class (remember, you must use the gwt class and not the standar class), like this:

<generate-with class="com.google.gwt.validation.rebind.ValidatorGenerator">
    <when-type-assignable class="javax.validation.Validator" />
  </generate-with>

Please, send me the jar that you are compiled at adolfo...@gmail.com ?? If I have the gwt-user.jar that includes all the packages of validation y can do it an example and I can solve your problems.

Thank you very much.


2011/5/23 MaximeMularz <max...@mularz.fr>

Adolfo Panizo Touzon

unread,
May 23, 2011, 4:56:47 AM5/23/11
to google-we...@googlegroups.com
Another thing I forgot, you could specify the steps you have done to compile the gwt-user project?

Thanks in advance.


2011/5/23 Adolfo Panizo Touzon <adolfo...@gmail.com>

Adolfo Panizo Touzon

unread,
May 23, 2011, 8:10:53 AM5/23/11
to google-we...@googlegroups.com
Hi Maxime,
I answered for you in the mail from which you sent me the link.

While I wait your answer I am working to see if I can fix it.

Thank you very much for everything.

MaximeMularz

unread,
May 23, 2011, 8:12:38 AM5/23/11
to Google Web Toolkit
Hi,

1/ I did the tuto : http://code.google.com/webtoolkit/makinggwtbetter.html#workingoncode.
2/ I visited this page "http://subversion.apache.org/packages.html"
3/ I downloaded and Installed : Win32Svn (32-bit client, server and
bindings, MSI and ZIPs; maintained by David Darj)
4/ I added SVN.exe to the PATH
5/ and the command ant !!!

Regards

Maxime

On 23 mai, 10:56, Adolfo Panizo Touzon <adolfo.pan...@gmail.com>
wrote:
> Another thing I forgot, you could specify the steps you have done to compile
>  the gwt-user project?
>
> Thanks in advance.
>
> 2011/5/23 Adolfo Panizo Touzon <adolfo.pan...@gmail.com>
>
>
>
> > Try it with:
> > Validator validator = GWT.create(SampleValidator.class);
>
> > Other thing, send us the modules that you are inhertir in your project.
>
> > If you use your form, you must specify in your xxx.gwt.xml the change of
> > the class (remember, you must use the gwt class and not the standar class),
> > like this:
>
> >   <generate-with class=
> > "com.google.gwt.validation.rebind.ValidatorGenerator">
> >      <when-type-assignable class="javax.validation.Validator" />
> >    </generate-with>
>
> > Please, send me the jar that you are compiled at adolfo.pan...@gmail.com?? If I have the gwt-user.jar that includes all the packages of validation y

Adolfo Panizo Touzon

unread,
May 23, 2011, 8:17:22 AM5/23/11
to google-we...@googlegroups.com
Hi, 

[I
 feel like a complete idiot right now. XD. There is a tutorial on google!]

Ok. I'm putting to work to try to compile everything on my own in the meantime, if youmanage what you put in the mail to compile all the SDK and get it, accelerate the whole process and so I can create the complete sample validation .

We are in touch, thank you very much for everything.


2011/5/23 MaximeMularz <max...@mularz.fr>

MaximeMularz

unread,
May 23, 2011, 8:49:06 AM5/23/11
to Google Web Toolkit
Hi,

I'm waiting your sample because, I don't know how to play with !!!

Maxime

On 23 mai, 14:17, Adolfo Panizo Touzon <adolfo.pan...@gmail.com>

Adolfo Panizo Touzon

unread,
May 23, 2011, 9:10:01 AM5/23/11
to google-we...@googlegroups.com
You've read the email you send to another address? Is there a problem that prevents theapplication run.
I need all the sdk result of the compilation not only gwt-user.

I copied the email you send:
Listen, now there is another problem, when I substitute the "gwt-user"original, foryours in the GWT SDK and run the project. There's something I do not like eclipse.
[I have no choice but to do this because if I include your lib in the classpath when the module of my project runs collides thw sdk of google and your library compiled]
I enclose a picture.

Would you know how to fix? I believe that through a compilation entire google sdk(which if you look very similar to what you've done just that by running the ant.xmlgeneral) would end the problems.
Foto GWT.jpg

Adolfo Panizo Touzon

unread,
May 23, 2011, 12:31:10 PM5/23/11
to google-we...@googlegroups.com
Hi Maxim!!!

It works!!!

I have made
 a very simple example based on Google (because if you have a problemthat I do not solve, sure there are people that if you could lend a hand.)
The steps you follow are the following:
-Add the project (which I attached) to your workspace.
-Select your gwt sdk 0.0.0.0
-Add the libraries to your classpath you in the picture attached.
-Run it.

If you have any questions or comment on it is a problem here that I miss you a hand with any thing.

Greetings!


Now I work as an example to finally understand itself completely.

Adolfo Panizo.

2011/5/23 Adolfo Panizo Touzon <adolfo...@gmail.com>
You've read the email you send to another address? Is there a problem that prevents theapplication run.
libsSample.jpg

Nick Chalko

unread,
May 23, 2011, 12:34:15 PM5/23/11
to google-we...@googlegroups.com
Glad you got it working.
Nick Chalko | SWE | nch...@google.com | 916-521-0754
 

MaximeMularz

unread,
May 25, 2011, 5:26:44 AM5/25/11
to Google Web Toolkit
Hi,

Client Side no probem it works, but ServerSide I can't catch the
excepetion becasue HashSet is not supported by RPCService :

[ERROR] javax.servlet.ServletContext log: Exception while dispatching
incoming RPC call
com.google.gwt.user.client.rpc.SerializationException: Type
'java.util.HashSet' was not included in the set of types which can be
serialized by this SerializationPolicy or its Class object could not
be loaded. For security purposes, this type will not be serialized.:
instance =
[ConstraintViolationImpl{interpolatedMessage='{custom.name.size.message}',
propertyPath=name, rootBeanClass=class myvalidator.shared.Person,
messageTemplate='{custom.name.size.message}'}]
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:
619)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
126)
at
javax.validation.ConstraintViolationException_CustomFieldSerializer.serialize(ConstraintViolationException_CustomFieldSerializer.java:
49)
at
javax.validation.ConstraintViolationException_CustomFieldSerializer.serializeInstance(ConstraintViolationException_CustomFieldSerializer.java:
72)
at
javax.validation.ConstraintViolationException_CustomFieldSerializer.serializeInstance(ConstraintViolationException_CustomFieldSerializer.java:
28)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeImpl(ServerSerializationStreamWriter.java:
740)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serialize(ServerSerializationStreamWriter.java:
621)
at
com.google.gwt.user.client.rpc.impl.AbstractSerializationStreamWriter.writeObject(AbstractSerializationStreamWriter.java:
126)
at com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter
$ValueWriter$8.write(ServerSerializationStreamWriter.java:153)
at
com.google.gwt.user.server.rpc.impl.ServerSerializationStreamWriter.serializeValue(ServerSerializationStreamWriter.java:
539)
at com.google.gwt.user.server.rpc.RPC.encodeResponse(RPC.java:616)
at
com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:
390)
at
com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:
588)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:
208)
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:
248)
at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:
62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:
511)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1166)
at
com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:
35)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:
58)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:
43)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:
122)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:
94)
at org.mortbay.jetty.servlet.ServletHandler
$CachedChain.doFilter(ServletHandler.java:1157)
at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:
388)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:
216)
at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:
182)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:
765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:
418)
at
com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:
70)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at com.google.appengine.tools.development.JettyContainerService
$ApiProxyHandler.handle(JettyContainerService.java:351)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:
152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:
542)
at org.mortbay.jetty.HttpConnection
$RequestHandler.content(HttpConnection.java:938)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:755)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
409)
at org.mortbay.thread.QueuedThreadPool
$PoolThread.run(QueuedThreadPool.java:582)

Thanks for your help

Maxime

On 23 mai, 18:34, Nick Chalko <ncha...@google.com> wrote:
> Glad you got it working.
>
> On Mon, May 23, 2011 at 9:31 AM, Adolfo Panizo Touzon <
>
> adolfo.pan...@gmail.com> wrote:
> > Hi Maxim!!!
>
> > It works!!!
>
> > I have made a very simple example based on Google (because if you have a
> > problemthat I do not solve, sure there are people that if you could lend a
> >  hand.)
> > The steps you follow are the following:
>
> > -Add the project (which I attached) to your workspace.
> > -Select your gwt sdk 0.0.0.0
> > -Add the libraries to your classpath you in the picture attached.
> > -Run it.
>
> > If you have any questions or comment on it is a problem here that I miss
> > you a hand with any thing.
>
> > Greetings!
>
> > Now I work as an example to finally understand itself completely.
>
> > Adolfo Panizo.
>
> > 2011/5/23 Adolfo Panizo Touzon <adolfo.pan...@gmail.com>
>
> >> You've read the email you send to another address? Is there a problem that
> >> prevents theapplication run.
> >> I need all the sdk result of the compilation not only gwt-user.
>
> >> I copied the email you send:
>
> >> *Listen*, now there is another problem, when I substitute the "gwt-user
> >> "original, foryours in the GWT SDK and run the project. There's something
> >> I do not like eclipse.
> >> *[*I have no choice but to do this because if I include your lib in the
> >> classpath when the module of my project runs collides thw sdk of google
> >> and your library compiled]
> >> *I enclose* a picture.
> >> *
> >> *
> >> *Would you know* how to fix? I believe that through a compilation entire
> ...
>
> plus de détails »

Adolfo Panizo Touzon

unread,
May 25, 2011, 5:30:09 AM5/25/11
to google-we...@googlegroups.com
You can save the errors strings in an arrayList<String> and transpor by rpc to the client side. 

2011/5/25 MaximeMularz <max...@mularz.fr>

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

MaximeMularz

unread,
May 25, 2011, 8:42:09 AM5/25/11
to Google Web Toolkit
The implementation (http://code.google.com/p/google-web-toolkit/source/
browse/trunk/samples/validation/src/com/google/gwt/sample/validation):

public class GreetingServiceImpl extends RpcServlet implements
GreetingService {

private final Validator validator =
Validation.buildDefaultValidatorFactory().getValidator();

public SafeHtml greetServer(Person person) throws
IllegalArgumentException,
ConstraintViolationException {
// Verify that the input is valid.
Set<ConstraintViolation<Person>> violations =
validator.validate(person,
Default.class, ServerGroup.class);
if (!violations.isEmpty()) {
Set<ConstraintViolation<?>> temp = new
HashSet<ConstraintViolation<?>>(
violations);
throw new ConstraintViolationException(temp);
}

String serverInfo = getServletContext().getServerInfo();
String userAgent = getThreadLocalRequest().getHeader("User-
Agent");

// Escape data from the client to avoid cross-site script
vulnerabilities.
SafeHtmlBuilder builder = new SafeHtmlBuilder();

SafeHtml safeHtml = builder//
.appendEscapedLines("Hello, " + person.getName() + "!")//
.appendHtmlConstant("<br>")//
.appendEscaped("I am running " + serverInfo + ".")//
.appendHtmlConstant("<br><br>")//
.appendEscaped("It looks like you are using: ")//
.appendEscaped(userAgent)//
.toSafeHtml();
return safeHtml;
}

On 25 mai, 11:30, Adolfo Panizo Touzon <adolfo.pan...@gmail.com>
> ...
>
> plus de détails »

Adolfo Panizo Touzon

unread,
May 25, 2011, 10:51:27 AM5/25/11
to google-we...@googlegroups.com
I don´t understand. ¿What´s the problem?

Maybe you can declarate HashMap in the client side and can´t transport by rpc.

I´m not sure, but, what´s the problem?

2011/5/25 MaximeMularz <max...@mularz.fr>
> ...
>
> plus de détails »

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Adolfo Panizo Touzon

unread,
May 25, 2011, 11:00:43 AM5/25/11
to google-we...@googlegroups.com

MaximeMularz

unread,
May 25, 2011, 12:21:16 PM5/25/11
to Google Web Toolkit
I want use the Validation API, http://gwt-code-reviews.appspot.com/1040802/show
but I don't where add the user/javax and user/org/hibernate files


On 25 mai, 17:00, Adolfo Panizo Touzon <adolfo.pan...@gmail.com>
wrote:
> http://code.google.com/webtoolkit/doc/trunk/DevGuideServerCommunicati...
>
> 2011/5/25 Adolfo Panizo Touzon <adolfo.pan...@gmail.com>
>
> > I don´t understand. ¿What´s the problem?
>
> > Maybe you can declarate HashMap in the client side and can´t transport by
> > rpc.
>
> > I´m not sure, but, what´s the problem?
>
> > 2011/5/25 MaximeMularz <max...@mularz.fr>
>
> >> The implementation (http://code.google.com/p/google-web-toolkit/source/
> >> browse/trunk/samples/validation/src/com/google/gwt/sample/validation<http://code.google.com/p/google-web-toolkit/source/browse/trunk/sampl...>
> >> ):
> ...
>
> plus de détails »

Adolfo Panizo Touzon

unread,
May 25, 2011, 1:06:11 PM5/25/11
to google-we...@googlegroups.com
user/javax and user/org/hibernate files ???
The libraries?

2011/5/25 MaximeMularz <max...@mularz.fr>
> ...
>
> plus de détails »

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

A. Stevko

unread,
May 25, 2011, 2:23:17 PM5/25/11
to google-we...@googlegroups.com
Try adding gwt-servlet-deps.jar and gwt-servlet,jar to your build path.
-- A. Stevko
===========
"If everything seems under control, you're just not going fast enough." M. Andretti





MaximeMularz

unread,
May 25, 2011, 2:45:07 PM5/25/11
to Google Web Toolkit
These Classes are not in the api :

javax.validation.ConstraintViolationException_CustomFieldSerializer

org.hibernate.validator.engine.ConstraintViolationImpl_CustomFieldSerializer
org.hibernate.validator.engine.PathImpl_CustomFieldSerializer

How can i add them ?


I added gwt-servlets-deps.jar but the same error :
On 25 mai, 20:23, "A. Stevko" <andy.ste...@gmail.com> wrote:
> Try adding gwt-servlet-deps.jar and gwt-servlet,jar to your build path.
>
> On Wed, May 25, 2011 at 10:06 AM, Adolfo Panizo Touzon <
>
> ...
>
> plus de détails »

Nick Chalko

unread,
May 25, 2011, 2:49:34 PM5/25/11
to google-we...@googlegroups.com

MaximeMularz

unread,
May 25, 2011, 3:00:29 PM5/25/11
to Google Web Toolkit
I red it, but nothing about RPC

On 25 mai, 20:49, Nick Chalko <ncha...@google.com> wrote:
> Take a look athttp://code.google.com/p/google-web-toolkit/wiki/BeanValidation

A. Stevko

unread,
May 25, 2011, 3:09:12 PM5/25/11
to google-we...@googlegroups.com
I have hibernate-validator-4.1.0.Final.jar and validation-api.1.0.0.GA.jar in my lib
I downloaded them from the Hibernate Validation project at
http://www.hibernate.org/subprojects/validator.html

Hibernate Validator 4.x is the reference implementation for JSR 303 - Bean Validation of which Red Hat is the specification lead.



> ...
>
> plus de détails »

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

Nick Chalko

unread,
May 25, 2011, 3:31:44 PM5/25/11
to google-we...@googlegroups.com
You will need to do something like this.


public class ExposeImpl implements IsSerializable {
  
  @SuppressWarnings("unused")
  private ConstraintViolationImpl<?> constraintViolationImpl;
  
  @SuppressWarnings("unused")
  private PathImpl pathIpml;
  
  @SuppressWarnings("unused")
  private HashSet<?> hashSet;
}

And then Create a dummy method like the following in your RemoteService

 ExposeImpl dummy();
 



I am working on a simpler solution.

MaximeMularz

unread,
May 25, 2011, 4:14:55 PM5/25/11
to Google Web Toolkit
Sorry, I don't understand your implementation could you please give me
more details ?

MaximeMularz

unread,
May 26, 2011, 5:21:34 AM5/26/11
to Google Web Toolkit
Hi,

I have a new error :

[ERROR] javax.servlet.ServletContext log: Exception while dispatching
incoming RPC call
java.lang.ExceptionInInitializerError
at com.google.gwt.rpc.server.RPC.decodeRequest(RPC.java:160)
at com.google.gwt.rpc.server.RpcServlet.processCall(RpcServlet.java:
169)
at com.google.gwt.rpc.server.RpcServlet.processPost(RpcServlet.java:
233)
Caused by: java.lang.RuntimeException: Unable to get Unsafe instance
at
com.google.gwt.rpc.server.CommandSerializationUtil.<clinit>(CommandSerializationUtil.java:
457)
... 35 more
Caused by: java.security.AccessControlException: access denied
(java.lang.RuntimePermission accessClassInPackage.sun.misc)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at com.google.appengine.tools.development.DevAppServerFactory
$CustomSecurityManager.checkPermission(DevAppServerFactory.java:166)
at java.lang.SecurityManager.checkPackageAccess(Unknown Source)
at java.lang.ClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.lang.ClassLoader.checkPackageAccess(Unknown Source)
at
com.google.gwt.rpc.server.CommandSerializationUtil.<clinit>(CommandSerializationUtil.java:
444)
... 35 more
???? What's wrong ?

Adolfo Panizo Touzon

unread,
May 26, 2011, 10:00:06 AM5/26/11
to google-we...@googlegroups.com
Maybe it can help you
revise, maybe that this exception can not serialize. 

Also revise the configuration of the server.
2011/5/26 MaximeMularz <max...@mularz.fr>
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

MaximeMularz

unread,
May 26, 2011, 1:45:27 PM5/26/11
to Google Web Toolkit
The validation sample works !!! only without GAE - library,

My new question : "Does the validation sample work with google app
engine ?"

Thanks

On 26 mai, 16:00, Adolfo Panizo Touzon <adolfo.pan...@gmail.com>
wrote:
> Maybe it can help youhttp://stackoverflow.com/questions/2116583/gwt-java-security-accessco...
> <http://stackoverflow.com/questions/2116583/gwt-java-security-accessco...>revise,
Reply all
Reply to author
Forward
0 new messages