All project (hbm.xml domain and so on ) was modified for short to an integer. Everything is going fine now except value is not inserted into Postgre database. Dunno if this is due to the persist method or the fact that i try to insert an integer into a short field in postgre. Will investigate on it.
Le vendredi 9 août 2013 08:36:44 UTC+2, aurelie...@gmail.com a écrit : > Thanks for replying. Indeed i tried to use an integerBox. > Value appears now but i had to modify a couple of things. > > > 1. in proxy, > > >> Integer getConfirm(); > > Still have this > > void setConfirm(Short confirm); > > > > 2. in domain class, confirm is still a short but to match the proxy, i had > to modify the following > > public Integer getConfirm() { > > return (int)confirm; > > } > > > still have the following setter > > > >> public void setConfirm(Short s) { >> this.confirm = s; >> } >> > > > Everything appears to be ok except when onSave is called. > > @UiHandler("save") > void onSave(ClickEvent event) { > RequestContext context = editorDriver.flush(); > if (editorDriver.hasErrors()) { > dialog.setText("Errors detected locally"); > return; > } > context.fire(new Receiver<Void>() { > @Override > public void onConstraintViolation(Set<ConstraintViolation<?>> > errors) { > dialog.setText("Errors detected on the server"); > editorDriver.setConstraintViolations(errors); > } > @Override > public void onSuccess(Void response) { > dialog.hide(); > } > }); > } > > > iiuc driver is trying to match all fields but one is faulty, integer is a > not a short . > > com.google.web.bindery.requestfactory.server.RequestFactoryServlet doPost > > SEVERE: Unexpected error >> java.lang.IllegalArgumentException: argument type mismatch >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) >> at >> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) >> at java.lang.reflect.Method.invoke(Method.java:606) >> at >> com.google.web.bindery.requestfactory.server.ReflectiveServiceLayer.setProperty(ReflectiveServiceLayer.java:234) >> at >> com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.setProperty(ServiceLayerDecorator.java:193) >> at >> com.google.web.bindery.requestfactory.server.ServiceLayerDecorator.setProperty(ServiceLayerDecorator.java:193) >> at >> com.google.web.bindery.requestfactory.server.SimpleRequestProcessor$1.visitValueProperty(SimpleRequestProcessor.java:549) >> at >> com.google.web.bindery.autobean.vm.impl.ProxyAutoBean.traverseProperties(ProxyAutoBean.java:289) >> at >> com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.traverse(AbstractAutoBean.java:166) >> at >> com.google.web.bindery.autobean.shared.impl.AbstractAutoBean.accept(AbstractAutoBean.java:101) >> at >> com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.processOperationMessages(SimpleRequestProcessor.java:524) >> at >> com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:218) >> at >> com.google.web.bindery.requestfactory.server.SimpleRequestProcessor.process(SimpleRequestProcessor.java:135) >> at >> com.google.web.bindery.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java:133) >> 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:487) >> at >> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:362) >> at >> org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) >> at >> org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) >> at >> org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729) >> at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) >> at >> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) >> at >> org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49) >> at >> org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) >> at org.mortbay.jetty.Server.handle(Server.java:324) >> at >> org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) >> at >> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843) >> at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647) >> at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211) >> at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380) >> at >> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395) >> at >> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488) >> > How can i get rid of that ? > > pierre > > Le jeudi 8 août 2013 15:29:42 UTC+2, Ümit Seren a écrit : > >> Not sure but you could try a IntegerBox ( >> http://www.gwtproject.org/javadoc/latest/com/google/gwt/user/client/ui/IntegerBox.html) >> >> or ValueBox ( >> http://www.gwtproject.org/javadoc/latest/com/google/gwt/user/client/ui/ValueBox.html) >> >> ? > > -- 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+unsubscr...@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.