Crux explodes an exception if I try to serialize (at server side) a type with
no raw type defined, like: private java.util.ArrayList myList; ... instead of
declaring: java.util.ArrayList<MyDTO> myList.
Stack:
18/09/2014 11:02:48 ERROR
[org.cruxframework.crux.core.server.rest.servlet.RestServlet] Error serializing
rest service return
org.cruxframework.crux.core.server.rest.spi.InternalServerErrorException: Error
serializing rest service return
at
org.cruxframework.crux.core.server.rest.core.dispatch.ResourceMethod.invoke(Reso
urceMethod.java:277)
at
org.cruxframework.crux.core.server.rest.core.dispatch.ResourceMethod.invoke(Reso
urceMethod.java:169)
at
org.cruxframework.crux.core.server.rest.core.dispatch.RestDispatcher.dispatch(Re
stDispatcher.java:41)
at
org.cruxframework.crux.core.server.rest.servlet.RestServlet.processRequest(RestS
ervlet.java:131)
at
org.cruxframework.crux.core.server.rest.servlet.RestServlet.doGet(RestServlet.ja
va:83)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:735)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)
at
org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231
)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:108
6)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:428)
at
org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1020
)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at
org.eclipse.jetty.server.handler.RequestLogHandler.handle(RequestLogHandler.java
:68)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)
at org.eclipse.jetty.server.Server.handle(Server.java:370)
at
org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnec
tion.java:489)
at
org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConne
ction.java:949)
at
org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(Ab
stractHttpConnection.java:1011)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:644)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at
org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java
:668)
at
org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:
52)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: Unable to determine base class from Type
at org.cruxframework.crux.core.utils.ClassUtils.getRawType(ClassUtils.java:658)
at
org.cruxframework.crux.core.server.rest.util.JsonUtil.hasJsonSubTypes(JsonUtil.j
ava:124)
at
org.cruxframework.crux.core.server.rest.util.JsonUtil.getObjectMapper(JsonUtil.j
ava:112)
at
org.cruxframework.crux.core.server.rest.util.JsonUtil.getObjectMapper(JsonUtil.j
ava:107)
at
org.cruxframework.crux.core.server.rest.util.JsonUtil.createWriter(JsonUtil.java
:68)
at
org.cruxframework.crux.core.server.rest.core.dispatch.ResourceMethod.getReturnWr
iter(ResourceMethod.java:363)
at
org.cruxframework.crux.core.server.rest.core.dispatch.ResourceMethod.invoke(Reso
urceMethod.java:272)
Original issue reported on code.google.com by samuel@cruxframework.org on 19 Sep 2014 at 6:17
Original issue reported on code.google.com by
samuel@cruxframework.org
on 19 Sep 2014 at 6:17