Look more like a REST deserialization problem then a wicket. Could it be that se.**.core.domain.KmsUser only is available in your back end server? We use an environment very much like yours, with a back end which we send REST request to from our wicket layer, and we don't use the same classes at both ends.

//Swanthe



On 2010-03-19 13:05, Svante Reutland wrote:
Hi!

Im working on a project and I'm getting a weird exception in which I don't 
understand how to resolve. My application resides in two modules.

One server side module where all business logic are. On the server side I user 
spring and restful webservices. Than I have a web module which interact with 
the server side. The web tier is written in Wicket framework.

Now to the problem. When I try to access my restful webservices everything 
works great until I try to access a webservice that handles more than one 
entity. For example trying to access a users roles by entering userID.

this is the exception being thrown:
Code:
ERROR - RequestCycle.logRuntimeException(1521) | Method onFormSubmitted of 
interface org.apache.wicket.markup.html.form.IFormSubmitListener targeted at 
component [MarkupContainer [Component id = form]] threw an exception
org.apache.wicket.WicketRuntimeException: Method onFormSubmitted of interface 
org.apache.wicket.markup.html.form.IFormSubmitListener targeted at component 
[MarkupContainer [Component id = form]] threw an exception
         at 
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:193)
         at 
org.apache.wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:73)
         at 
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
         at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250)
         at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329)
         at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428)
         at org.apache.wicket.RequestCycle.request(RequestCycle.java:545)
         at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:468)
         at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:301)
         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 
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
         at 
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
         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:536)
         at 
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:930)
         at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
         at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
         at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
         at 
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
         at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Caused by: java.lang.reflect.InvocationTargetException
         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 
org.apache.wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:182)
         ... 25 more
Caused by: org.jboss.resteasy.spi.ReaderException: 
java.lang.TypeNotPresentException: Type se.**.core.domain.KmsUser not present
         at 
org.jboss.resteasy.core.messagebody.ReaderUtility.doRead(ReaderUtility.java:123)
         at 
org.jboss.resteasy.client.core.BaseClientResponse.readFrom(BaseClientResponse.java:246)
         at 
org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:210)
         at 
org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:171)
         at 
org.jboss.resteasy.client.core.ClientInvoker.extractEntity(ClientInvoker.java:170)
         at 
org.jboss.resteasy.client.core.ClientInvoker.invoke(ClientInvoker.java:112)
         at 
org.jboss.resteasy.client.core.ClientProxy.invoke(ClientProxy.java:59)
         at $Proxy353.getRoles(Unknown Source)
         at 
se.**.core.client.impl.KmsUserClientImpl.getRoles(KmsUserClientImpl.java:89)
         at se.**.ui.pages.Index$2.onSubmit(Index.java:83)
         at 
org.apache.wicket.markup.html.form.Form.delegateSubmit(Form.java:1514)
         at org.apache.wicket.markup.html.form.Form.process(Form.java:914)
         at 
org.apache.wicket.markup.html.form.Form.onFormSubmitted(Form.java:876)
         ... 30 more
Caused by: java.lang.TypeNotPresentException: Type se.**.core.domain.KmsUser 
not present
         at 
sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:98)
         at 
sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:107)
         at 
sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
         at 
sun.reflect.generics.visitor.Reifier.reifyTypeArguments(Reifier.java:50)
         at 
sun.reflect.generics.visitor.Reifier.visitClassTypeSignature(Reifier.java:120)
         at 
sun.reflect.generics.tree.ClassTypeSignature.accept(ClassTypeSignature.java:31)
         at 
sun.reflect.generics.repository.ConstructorRepository.getParameterTypes(ConstructorRepository.java:76)
         at java.lang.reflect.Method.getGenericParameterTypes(Method.java:282)
         at 
org.codehaus.jackson.map.introspect.AnnotatedMethod.getParameterTypes(AnnotatedMethod.java:109)
         at 
org.codehaus.jackson.map.introspect.AnnotatedMethod.getParameterCount(AnnotatedMethod.java:121)
         at 
org.codehaus.jackson.map.introspect.BasicBeanDescription.findSetters(BasicBeanDescription.java:395)
         at 
org.codehaus.jackson.map.deser.BeanDeserializerFactory.addBeanProps(BeanDeserializerFactory.java:369)
         at 
org.codehaus.jackson.map.deser.BeanDeserializerFactory.buildBeanDeserializer(BeanDeserializerFactory.java:124)
         at 
org.codehaus.jackson.map.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:94)
         at 
org.codehaus.jackson.map.deser.StdDeserializerProvider._createDeserializer(StdDeserializerProvider.java:249)
         at 
org.codehaus.jackson.map.deser.StdDeserializerProvider._createAndCacheValueDeserializer(StdDeserializerProvider.java:181)
         at 
org.codehaus.jackson.map.deser.StdDeserializerProvider.findValueDeserializer(StdDeserializerProvider.java:100)
         at 
org.codehaus.jackson.map.deser.BasicDeserializerFactory.createCollectionDeserializer(BasicDeserializerFactory.java:162)
         at 
org.codehaus.jackson.map.deser.StdDeserializerProvider._createDeserializer(StdDeserializerProvider.java:239)
         at 
org.codehaus.jackson.map.deser.StdDeserializerProvider._createAndCacheValueDeserializer(StdDeserializerProvider.java:181)
         at 
org.codehaus.jackson.map.deser.StdDeserializerProvider.findValueDeserializer(StdDeserializerProvider.java:100)
         at 
org.codehaus.jackson.map.deser.StdDeserializer.findDeserializer(StdDeserializer.java:253)
         at 
org.codehaus.jackson.map.deser.BeanDeserializer.resolve(BeanDeserializer.java:238)
         at 
org.codehaus.jackson.map.deser.StdDeserializerProvider._resolveDeserializer(StdDeserializerProvider.java:255)
         at 
org.codehaus.jackson.map.deser.StdDeserializerProvider._createAndCacheValueDeserializer(StdDeserializerProvider.java:213)
         at 
org.codehaus.jackson.map.deser.StdDeserializerProvider.findValueDeserializer(StdDeserializerProvider.java:100)
         at 
org.codehaus.jackson.map.ObjectMapper._findRootDeserializer(ObjectMapper.java:1209)
         at 
org.codehaus.jackson.map.ObjectMapper._readValue(ObjectMapper.java:1123)
         at 
org.codehaus.jackson.map.ObjectMapper.readValue(ObjectMapper.java:528)
         at 
org.codehaus.jackson.jaxrs.JacksonJsonProvider.readFrom(JacksonJsonProvider.java:339)
         at 
org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl.proceed(MessageBodyReaderContextImpl.java:105)
         at 
org.jboss.resteasy.plugins.interceptors.encoding.GZIPDecodingInterceptor.read(GZIPDecodingInterceptor.java:46)
         at 
org.jboss.resteasy.core.interception.MessageBodyReaderContextImpl.proceed(MessageBodyReaderContextImpl.java:108)
         at 
org.jboss.resteasy.core.messagebody.ReaderUtility.doRead(ReaderUtility.java:111)
         ... 42 more

Anyone have an idea of whats wrong?
appreciate your help.

Best Regards Svante                                     
Kolla din Hotmail i mobilen! Ta med dig Hotmail i mobilen!                      
                
_________________________________________________________________
Mejla på krogen! Hotmail i mobilen.
http://new.windowslivemobile.msn.com/SE-SE/windows-live-hotmail/default.aspx



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to