I am hitting the following error when using RequestFactory (it's about
ValidatorFactory impl not available). Does any one know why ?

20:32:35.092 [ERROR] [Skulgia] Uncaught exception escaped
java.lang.RuntimeException: Server Error 500 <html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1"/>
<title>Error 500 javax/validation/ValidatorFactory</title>
</head>
<body><h2>HTTP ERROR 500</h2>
<p>Problem accessing /Skulgia/gwtRequest. Reason:
<pre>    javax/validation/ValidatorFactory</pre></p><h3>Caused by:</
h3><pre>java.lang.NoClassDefFoundError: javax/validation/
ValidatorFactory
    at
com.google.gwt.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java:
111)
    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.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
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:349)
    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)
Caused by: java.lang.ClassNotFoundException:
javax.validation.ValidatorFactory
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at
com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:
151)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 28 more
</pre>
<h3>Caused by:</h3><pre>java.lang.ClassNotFoundException:
javax.validation.ValidatorFactory
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at
com.google.appengine.tools.development.IsolatedAppClassLoader.loadClass(IsolatedAppClassLoader.java:
151)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at
com.google.gwt.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java:
111)
    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.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
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:349)
    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)
</pre>
<hr /><i><small>Powered by Jetty://</small></i><br/>
<br/>
<br/>
<br/>


On Dec 4, 8:14 pm, ali <a.akhava...@gmail.com> wrote:
> I haven't seen any of this in the documentation either!
>
> On Nov 18, 4:57 pm, Nicholas <nick.sm...@gmail.com> wrote:
>
>
>
>
>
>
>
> > One more thing I forgot to mention.  You have to add an init-param to
> > therequestFactoryServletto identify your implementation class for
> > the user information class.  (This is in your web.xml).  Mine looks
> > like this.
>
> >         <servlet>
> >                 <servlet-name>requestFactoryServlet</servlet-name>
> >                 <servlet-
> > class>com.google.gwt.requestfactory.server.RequestFactoryServlet</
> > servlet-class>
> >                 <init-param>
> >                         <param-name>userInfoClass</param-name>
> >                         
> > <param-value>com.eatrightapp.server.domain.GaeUserInformation</
> > param-value>
> >                 </init-param>
> >         </servlet>
>
> > Without that specified, your login widget will always show the user as
> > "Dummy User" and the logout link will not be functional.  Now that all
> > this is in place, mine is completely working as expected.
>
> > Thanks,
> > Nick
>
> > On Nov 18, 6:18 pm, Nicholas <nick.sm...@gmail.com> wrote:
>
> > > Richard, I was missing that initialization to requestFactory as well.
> > > I had to add that, and I had to add the following sections to my
> > > web.xml:
>
> > >         <servlet>
> > >                 <servlet-name>requestFactoryServlet</servlet-name>
> > >                 <servlet-
> > > class>com.google.gwt.requestfactory.server.RequestFactoryServlet</
> > > servlet-class>
> > >         </servlet>
>
> > >         <servlet>
> > >                 <servlet-name>remoteapi</servlet-name>
> > >                 <servlet-
> > > class>com.google.apphosting.utils.remoteapi.RemoteApiServlet</servlet-
> > > class>
> > >         </servlet>
>
> > >         <servlet-mapping>
> > >                 <servlet-name>remoteapi</servlet-name>
> > >                 <url-pattern>/remote_api</url-pattern>
> > >         </servlet-mapping>
>
> > >         <servlet-mapping>
> > >                 <servlet-name>requestFactoryServlet</servlet-name>
> > >                 <url-pattern>/gwtRequest</url-pattern>
> > >         </servlet-mapping>
>
> > > In addition, I added the appengine-tools-api.jar files to my web-inf/
> > > lib folder.
>
> > > I had to add the following to my apps gwt.xml file:
>
> > > <inherits name='com.google.gwt.json.JSON'/>
>
> > > Finally, I added json.jar to my web-inf/lib folder.  I'm not sure
> > > where this file originated, but I finally tracked down a copy 
> > > at:http://google-web-toolkit.googlecode.com/svn-history/r7687/trunk/bike...
>
> > > Now the app seems to be running without any errors.  I think some of
> > > this needs to go into the RequestBuilder/MVP documentation.  If it's
> > > there I completely overlooked it.
>
> > > Nick
>
> > > On Nov 18, 2:05 pm, Richard Berger <richardlan...@gmail.com> wrote:
>
> > > > As is typical - after working on this for hours, I think I found my
> > > > problem 10 minutes after posting.  Since I am trying to avoid MVP (for
> > > > now, until the brain cell count improves), I had not initialized my
> > > > RequestFactory.  Adding:
> > > >   final EventBus eventBus = new SimpleEventBus();
> > > >   requestFactory.initialize(eventBus);
> > > > has moved me past my NPE.  Into other errors of course...
>
> > > > Thanks for listening....
>
> > > > RB
>
> > > > On Nov 18, 11:50 am, Richard Berger <richardlan...@gmail.com> wrote:
>
> > > > > I am having a very similar problem - NullPointerException when I call
> > > > > fire() (the NPE is in AbstractRequestContext.doFire()).  So I am
> > > > > wondering if you have found a solution to your problem.
>
> > > > > The code with the fire() is:
> > > > > CommitmentSystemRequestFactory requestFactory =
> > > > >         GWT.create(CommitmentSystemRequestFactory.class);
> > > > > requestFactory.commitmentRequest().countCommitments().fire(
> > > > >   new Receiver<Long>() {
> > > > >                 @Override
> > > > >                 public void onSuccess(Long response) {
> > > > >                         Window.alert("Done!");
> > > > >                 }
> > > > >   });
>
> > > > > My CommitmentRequest class has:
> > > > > @Service (Commitment.class)
> > > > > public interface CommitmentRequest extends RequestContext {
> > > > >   Request<Long> countCommitments();
>
> > > > > My Commitment.java class has:
> > > > >   public static long countCommitments() {
> > > > >     ....
> > > > >   }
>
> > > > > Some other notes...
> > > > > * I have also been going through the Expenses sample app, both the
> > > > > description 
> > > > > at:http://code.google.com/webtoolkit/doc/latest/DevGuideRequestFactory.h...
> > > > > and the sample code.
> > > > > * I am NOT using JPA.  My first learning project for GWT/GAE was with
> > > > > JPA, but now I wanted to try the RequestFactory and then add
> > > > > Objectify.
> > > > > * I am NOT using MVP.  I just don't yet have the critical mass of
> > > > > brain cells necessary.
>
> > > > > Thanks for any updates or advice...
> > > > > RB
>
> > > > > On Nov 18, 9:05 am, Nicholas <nick.sm...@gmail.com> wrote:
>
> > > > > > Thanks, you got me on the right rack.  I didn't realize that more
> > > > > > information on the exceptions was available in the dev mode console 
> > > > > > of
> > > > > > eclipse.  My domain entity objects had some Boolean accessors which 
> > > > > > I
> > > > > > had named isProperty() instead of getProperty().  I changed all of
> > > > > > those, and also made the domain service methods 'static' like you
> > > > > > suggested.
>
> > > > > > Now the application is running, but when it fires a request for
> > > > > > UserInformation, I get a null pointer exception.  After debugging, 
> > > > > > it
> > > > > > gets into AbstractRequestContext.doFire(receiver) method, which
> > > > > > attempts to call requestFactory.getRequestTransport().send(...).
> > > > > > requestFactory.getRequestTransport() returns NULL so it throws a 
> > > > > > Null
> > > > > > Pointer Exception.  Do I need to configure the transport somewhere? 
> > > > > >  I
> > > > > > didn't see anything in the documentation or the Expenses sample app.
>
> > > > > > The portion of my code that is initiating this is (~ line 60) 
> > > > > > in:http://code.google.com/p/eatright/source/browse/trunk/EatRightApp/src...
>
> > > > > > On Nov 17, 6:28 pm, Thomas Broyer <t.bro...@gmail.com> wrote:
>
> > > > > > > On 17 nov, 21:06, Nicholas <nick.sm...@gmail.com> wrote:
>
> > > > > > > > I am working on a small GWT app (I have used GWT in the past 
> > > > > > > > but it
> > > > > > > > was a while ago), trying to learn the new MVP and 
> > > > > > > > RequestFactory.  I
> > > > > > > > am not sure if I am just approaching this wrong, or have some 
> > > > > > > > error I
> > > > > > > > can't spot.  When I add a call to instantiate my app's 
> > > > > > > > RequestFactory,
> > > > > > > > it no longer runs.  It gives me "Deferred Binding Failed" for my
> > > > > > > > request factory.
>
> > > > > > > > I went back and double-checked the domain / entity objects and 
> > > > > > > > I think
> > > > > > > > I have the required pattern in place (implicit no-arg 
> > > > > > > > constructor,
> > > > > > > > getId(), findEntity(id) and getVersion()).
>
> > > > > > > > Some of the relevant code:
>
> > > > > > > > Domain 
> > > > > > > > objects:http://code.google.com/p/eatright/source/browse/#svn/trunk/EatRightAp...
>
> > > > > > > > EntityRequest and Proxy 
> > > > > > > > objects:http://code.google.com/p/eatright/source/browse/#svn/trunk/EatRightAp...
>
> > > > > > > > This class instantiates the RequestFactory (line 35) and passes 
> > > > > > > > it to
> > > > > > > > the Activity (line 
> > > > > > > > 41)http://code.google.com/p/eatright/source/browse/trunk/EatRightApp/src...
>
> > > > > > > > This class is where I have a method utilizing the request 
> > > > > > > > factory. (~
> > > > > > > > line 
> > > > > > > > 49)http://code.google.com/p/eatright/source/browse/trunk/EatRightApp/src...
>
> > > > > > > >http://code.google.com/p/eatright/source/browse/trunk/EatRightApp/src...
>
> > > > > > > > Any ideas?
>
> > > > > > > Your "service methods" in your domain objects aren't static, but
> > > > > > > aren't declared as InstanceRequest in your RequestContext.
> > > > > > > (don't you have more specific errors than "deferred binding 
> > > > > > > failed"?)

-- 
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-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to