Re: java.lang.NoClassDefFoundError: javax/validation/ValidationException
maybe you forgot to import gwt-servlet-deps.jar that contains the missing class .. On 1 Mar, 23:43, Juan Pablo Gardella wrote: > Add jsr303 lib in your classpath > > Juan > > 2011/3/1 Artem Nikulchenko > > > > > > > > > Hi, > > > I'm trying to use GWT application in GAE. I tried to use > > RequestFactory (framework introduced in GWT 2.1) to make client-server > > communication. But I'm constantly getting an error: > > > java.lang.NoClassDefFoundError: javax/validation/ValidationException > > at > > com.google.gwt.requestfactory.server.ServiceLayer.create(ServiceLayer.java: > > 66) > > at > > > com.google.gwt.requestfactory.server.RequestFactoryServlet.(RequestFa > > ctoryServlet.java: > > 88) > > at > > > com.google.gwt.requestfactory.server.RequestFactoryServlet.(RequestFa > > ctoryServlet.java: > > 74) > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native > > Method) > > at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown > > Source) > > at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown > > Source) > > at java.lang.reflect.Constructor.newInstance(Unknown Source) > > at java.lang.Class.newInstance0(Unknown Source) > > at java.lang.Class.newInstance(Unknown Source) > > at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153) > > > Does anybody know how to fix it? > > > Thanks! > > > -- > > 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-toolkit@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. -- 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-toolkit@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.
RequestFactory persist() error with hibernate
Hi, i'm trying to build a custom webapp using RequestFactory + Spring + Hibernate. My goal is to build a table (using CellTable) where users can edit some properties of the objects being displayed and then save them, but anytime i call the persist() method i have an hibernate exception: 02:56:41,500 ERROR LazyInitializationException:42 - could not initialize proxy - no Session org.hibernate.LazyInitializationException: could not initialize proxy - no Session at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java: 86) at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java: 140) at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java: 190) at it.aimvicenza.intercompany.server.entity.Lavorato_$ $_javassist_4.getData(Lavorato_$$_javassist_4.java) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java: 39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java: 25) at java.lang.reflect.Method.invoke(Method.java:597) at com.google.gwt.requestfactory.server.JsonRequestProcessor.serializeEntity(JsonRequestProcessor.java: 1536) at com.google.gwt.requestfactory.server.JsonRequestProcessor.getSerializedEntity(JsonRequestProcessor.java: 1372) at com.google.gwt.requestfactory.server.JsonRequestProcessor.constructBeforeDataMap(JsonRequestProcessor.java: 1167) at com.google.gwt.requestfactory.server.JsonRequestProcessor.processJsonRequest(JsonRequestProcessor.java: 889) at com.google.gwt.requestfactory.server.JsonRequestProcessor.decodeAndInvokeRequest(JsonRequestProcessor.java: 243) at com.google.gwt.requestfactory.server.JsonRequestProcessor.decodeAndInvokeRequest(JsonRequestProcessor.java: 63) at com.google.gwt.requestfactory.server.RequestFactoryServlet.doPost(RequestFactoryServlet.java: 116) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java: 206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java: 127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java: 102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java: 109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: 298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java: 852) at org.apache.coyote.http11.Http11Protocol $Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint $Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662) what i've done so far is: - created EntityProxy (@ProxyFor) for my @Entity class (used by hibernate) - created @Service(ObjectExstendingMyEntity.class). i didn't used the @Entity class directly to keep the code clean, i'm not sure if this can be be a problem, but all static methods are working correctly. I've also tryed to move anything inside the @Entity class but the error still remain. - created a CellTable with some column and some editable fields: here an example of one column updater: comColumn.setFieldUpdater(new FieldUpdater() { public void update(int index, LavoratoProxy object, String value) { LavoratoRequest lavReq = requestFactory.lavoratoRequest(); LavoratoProxy newObject = lavReq.edit(object); int selectedIndex = comOption.getSelectedIndex(); String commId; if (selectedIndex >= 0 ){ //Another column commId = comOption.getValue(selectedIndex); } for (CommessaProxy comm : currentList){ //searching into an existing list if (comm.getId().equals(commId)) { newObject.setCodiceCommessa(comm); lavReq.persist().using(newObject).fire(new Receiver(){ @Override public void onFailure(ServerFailure error){ Window.alert("ERROR: "+error.getMessage()); } @Override public void onSuccess(Object response) { Window.alert