Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » OM2M » container class cast Exception (using mongodb)(when create container)
container class cast Exception (using mongodb) [message #1777042] Fri, 24 November 2017 00:54 Go to next message
Jingyu SUN is currently offline Jingyu SUNFriend
Messages: 1
Registered: November 2017
Junior Member
I was testing om2m with mongoDB, after successfully created the ae, I failed to create container under it. I got the following error, seems like there is something wrong with the type adapting of container and announcedContainer. Anyone can help?

[2017-11-24 09:45:18,940 ERROR] - org.eclipse.om2m.core.controller.Controller
Controller internal error
java.lang.ClassCastException: org.eclipse.om2m.commons.entities.ContainerAnncEntity cannot be cast to org.eclipse.om2m.commons.entities.ContainerEntity
at org.eclipse.om2m.core.controller.ContainerController.doCreate(ContainerController.java:263)
at org.eclipse.om2m.core.controller.Controller.doRequest(Controller.java:80)
at org.eclipse.om2m.core.router.Router.doRequest(Router.java:237)
at org.eclipse.om2m.binding.http.RestHttpServlet.service(RestHttpServlet.java:130)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.equinox.http.servlet.internal.ServletRegistration.service(ServletRegistration.java:61)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.processAlias(ProxyServlet.java:128)
at org.eclipse.equinox.http.servlet.internal.ProxyServlet.service(ProxyServlet.java:76)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.equinox.http.jetty.internal.HttpServerManager$InternalHttpServiceServlet.service(HttpServerManager.java:360)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:503)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:229)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1086)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:429)
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.Server.handle(Server.java:370)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:494)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:982)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1043)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:696)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:53)
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(Unknown Source)
Re: container class cast Exception (using mongodb) [message #1777777 is a reply to message #1777042] Mon, 04 December 2017 15:29 Go to previous message
Dorian Kurzaj is currently offline Dorian KurzajFriend
Messages: 16
Registered: May 2016
Junior Member
Do you have any tips on how to replace H2 by another database (in your case MongoDB) ? I was thinking about replacing it by Cassandra, but I don't know how to do it without replacing all the calls to the H2 database in the OM2M code.
Previous Topic:Device Management with LwM2M
Next Topic:add your plugin
Goto Forum:
  


Current Time: Fri Sep 21 18:17:50 GMT 2018

Powered by FUDForum. Page generated in 0.01550 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top