Errors when creating composite value topics using webclient's search/create dialog
Here is an error description I can not make fully sense of (yet). It's reproducible and I tried to document the behaviour as well as possible. I also tried to circumvent the error for the last 2 hours but did not succeed.
I think it would be great for us to know, if I can workaround these errors by adapting the dmx-webpages further to DMX 5.0 or if these are errors which must be adressed at platform level. What follows are two distinct errors, involving slightly different type defintitions but might have a very similar cause of error.
Here is the rough, type def outline which I deemed relevant for the interpretation of these errors, but I can't make sense of these stacktraces.
-
Header (Value Type)
-> Title
-> Many Buttons (Entity Type)
--> Title (identityAttr)
--> Link (identityAttr) -
Section (Value Type) -> Title
-> ...
-> Many Tiles (Value Type)
1. Header topic creation
When I try to create a new Header topic using the webclients search/create dialog.
A Header in webpages can contain "Buttons" and is defined in detail in th file Migration6, see the following link: https://github.com/mukil/dmx-webpages/blob/master/src/main/resources/migrations/migration6.json
When pressing "Create" I get the following error message.
INFORMATION: ##### Logging in as "admin" => SUCCESSFUL!
Jul 31, 2020 11:08:24 AM systems.dmx.topicmaps.TopicmapsPlugin getTopicmap
INFORMATION: Fetching topicmap 2590, includeChildren=false
Jul 31, 2020 11:08:46 AM systems.dmx.core.impl.DMXObjectModelImpl update
INFORMATION: Updating association 842 (typeUri="dmx.core.composition")
Jul 31, 2020 11:08:56 AM systems.dmx.core.impl.DMXObjectModelImpl update
INFORMATION: Updating association 1487 (typeUri="dmx.core.composition")
Jul 31, 2020 11:09:02 AM systems.dmx.core.util.UniversalExceptionMapper logException
SCHWERWIEGEND: Request "POST /core/topic" failed. Responding with 500 (Internal Server Error). The original exception/error is:
java.lang.RuntimeException: Creating topic failed, model=TopicModelImpl {
"id": -1,
"typeUri": "de.mikromedia.header",
"children": {
"de.mikromedia.header.js": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.header.js",
"value": "",
"children": {}
},
"de.mikromedia.header.html": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.header.html",
"value": "",
"children": {}
},
"dmx.webclient.color#de.mikromedia.font.color": {
"id": -1,
"uri": "",
"typeUri": "dmx.webclient.color",
"value": "",
"children": {}
},
"de.mikromedia.button": [{
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.button",
"value": "",
"children": {
"de.mikromedia.button.title": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.button.title",
"value": "",
"children": {}
},
"de.mikromedia.button.style": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.button.style",
"value": "",
"children": {}
},
"de.mikromedia.link": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.link",
"value": "",
"children": {}
}
}
}],
"de.mikromedia.header.title": {
"id": 2265,
"typeUri": "de.mikromedia.header.title",
"value": "My Header",
"children": {}
},
"dmx.webclient.color#de.mikromedia.background.color": {
"id": -1,
"uri": "",
"typeUri": "dmx.webclient.color",
"value": "",
"children": {}
}
}
}
at systems.dmx.core.impl.AccessLayer.createTopic(AccessLayer.java:139)
at systems.dmx.core.impl.CoreServiceImpl.createTopic(CoreServiceImpl.java:132)
at systems.dmx.core.impl.CoreServiceImpl.createTopic(CoreServiceImpl.java:34)
at systems.dmx.webservice.WebservicePlugin.createTopic(WebservicePlugin.java:120)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.ResourceObjectRule.accept(ResourceObjectRule.java:100)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1480)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1411)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1360)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1350)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:339)
at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:300)
at org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:93)
at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:50)
at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)
at org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:76)
at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:49)
at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
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: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.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
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:667)
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:748)
Caused by: java.lang.RuntimeException: Value integration failed, newValues=TopicModelImpl {
"id": -1,
"typeUri": "de.mikromedia.header",
"children": {
"de.mikromedia.header.js": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.header.js",
"value": "",
"children": {}
},
"de.mikromedia.header.html": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.header.html",
"value": "",
"children": {}
},
"dmx.webclient.color#de.mikromedia.font.color": {
"id": -1,
"uri": "",
"typeUri": "dmx.webclient.color",
"value": "",
"children": {}
},
"de.mikromedia.button": [{
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.button",
"value": "",
"children": {
"de.mikromedia.button.title": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.button.title",
"value": "",
"children": {}
},
"de.mikromedia.button.style": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.button.style",
"value": "",
"children": {}
},
"de.mikromedia.link": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.link",
"value": "",
"children": {}
}
}
}],
"de.mikromedia.header.title": {
"id": 2265,
"typeUri": "de.mikromedia.header.title",
"value": "My Header",
"children": {}
},
"dmx.webclient.color#de.mikromedia.background.color": {
"id": -1,
"uri": "",
"typeUri": "dmx.webclient.color",
"value": "",
"children": {}
}
}
}, targetObject=null, compDef=null
at systems.dmx.core.impl.ValueIntegrator.integrate(ValueIntegrator.java:116)
at systems.dmx.core.impl.AccessLayer.updateValues(AccessLayer.java:863)
at systems.dmx.core.impl.AccessLayer.createTopic(AccessLayer.java:137)
... 54 more
Caused by: java.lang.NullPointerException
at systems.dmx.core.impl.ValueIntegrator.parentCandidates(ValueIntegrator.java:668)
at systems.dmx.core.impl.ValueIntegrator.unifyChildTopics(ValueIntegrator.java:604)
at systems.dmx.core.impl.ValueIntegrator.unifyComposite(ValueIntegrator.java:317)
at systems.dmx.core.impl.ValueIntegrator.integrateComposite(ValueIntegrator.java:266)
at systems.dmx
2. Section topic creation
A very similar (same?) error apperas when I want to create a new `Section`` topic using the webclients search/create dialog.
A section is defined in Migration8 of the dmx-webpages module. In Webpages, every "Section" can, among other things, be composed of "Tiles". All details are defined in the following file: See https://github.com/mukil/dmx-webpages/blob/master/src/main/resources/migrations/migration8.json
I then get the following error message.
Jul 31, 2020 11:09:11 AM systems.dmx.core.util.UniversalExceptionMapper logException
SCHWERWIEGEND: Request "POST /core/topic" failed. Responding with 500 (Internal Server Error). The original exception/error is:
java.lang.RuntimeException: Creating topic failed, model=TopicModelImpl {
"id": -1,
"typeUri": "de.mikromedia.section",
"children": {
"de.mikromedia.section.placement": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.section.placement",
"value": "",
"children": {}
},
"dmx.webclient.color#de.mikromedia.font.color": {
"id": -1,
"uri": "",
"typeUri": "dmx.webclient.color",
"value": "",
"children": {}
},
"de.mikromedia.tile": [{
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.tile",
"value": "",
"children": {
"dmx.webclient.color#de.mikromedia.font.color": {
"id": -1,
"uri": "",
"typeUri": "dmx.webclient.color",
"value": "",
"children": {}
},
"de.mikromedia.tile.html": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.tile.html",
"value": "",
"children": {}
},
"de.mikromedia.tile.headline": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.tile.headline",
"value": "",
"children": {}
},
"dmx.webclient.color#de.mikromedia.background.color": {
"id": -1,
"uri": "",
"typeUri": "dmx.webclient.color",
"value": "",
"children": {}
},
"de.mikromedia.link": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.link",
"value": "",
"children": {}
}
}
}],
"de.mikromedia.section.css_class": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.section.css_class",
"value": "",
"children": {}
},
"de.mikromedia.section.layout": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.section.layout",
"value": "",
"children": {}
},
"de.mikromedia.section.title": {
"id": 2436,
"typeUri": "de.mikromedia.section.title",
"value": "My Section",
"children": {}
},
"dmx.webclient.color#de.mikromedia.background.color": {
"id": -1,
"uri": "",
"typeUri": "dmx.webclient.color",
"value": "",
"children": {}
}
}
}
at systems.dmx.core.impl.AccessLayer.createTopic(AccessLayer.java:139)
at systems.dmx.core.impl.CoreServiceImpl.createTopic(CoreServiceImpl.java:132)
at systems.dmx.core.impl.CoreServiceImpl.createTopic(CoreServiceImpl.java:34)
at systems.dmx.webservice.WebservicePlugin.createTopic(WebservicePlugin.java:120)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.ResourceObjectRule.accept(ResourceObjectRule.java:100)
at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1480)
at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1411)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1360)
at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1350)
at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:339)
at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:300)
at org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:93)
at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:50)
at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:31)
at org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:76)
at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:49)
at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:684)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:501)
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: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.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)
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:667)
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:748)
Caused by: java.lang.RuntimeException: Value integration failed, newValues=TopicModelImpl {
"id": -1,
"typeUri": "de.mikromedia.section",
"children": {
"de.mikromedia.section.placement": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.section.placement",
"value": "",
"children": {}
},
"dmx.webclient.color#de.mikromedia.font.color": {
"id": -1,
"uri": "",
"typeUri": "dmx.webclient.color",
"value": "",
"children": {}
},
"de.mikromedia.tile": [{
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.tile",
"value": "",
"children": {
"dmx.webclient.color#de.mikromedia.font.color": {
"id": -1,
"uri": "",
"typeUri": "dmx.webclient.color",
"value": "",
"children": {}
},
"de.mikromedia.tile.html": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.tile.html",
"value": "",
"children": {}
},
"de.mikromedia.tile.headline": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.tile.headline",
"value": "",
"children": {}
},
"dmx.webclient.color#de.mikromedia.background.color": {
"id": -1,
"uri": "",
"typeUri": "dmx.webclient.color",
"value": "",
"children": {}
},
"de.mikromedia.link": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.link",
"value": "",
"children": {}
}
}
}],
"de.mikromedia.section.css_class": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.section.css_class",
"value": "",
"children": {}
},
"de.mikromedia.section.layout": {
"id": -1,
"uri": "",
"typeUri": "de.mikromedia.section.layout",
"value": "",
"children": {}
},
"de.mikromedia.section.title": {
"id": 2436,
"typeUri": "de.mikromedia.section.title",
"value": "My Section",
"children": {}
},
"dmx.webclient.color#de.mikromedia.background.color": {
"id": -1,
"uri": "",
"typeUri": "dmx.webclient.color",
"value": "",
"children": {}
}
}
}, targetObject=null, compDef=null
at systems.dmx.core.impl.ValueIntegrator.integrate(ValueIntegrator.java:116)
at systems.dmx.core.impl.AccessLayer.updateValues(AccessLayer.java:863)
at systems.dmx.core.impl.AccessLayer.createTopic(AccessLayer.java:137)
... 54 more
Caused by: java.lang.NullPointerException
at systems.dmx.core.impl.ValueIntegrator.parentCandidates(ValueIntegrator.java:668)
at systems.dmx.core.impl.ValueIntegrator.unifyChildTopics(ValueIntegrator.java:604)
at systems.dmx.core.impl.ValueIntegrator.unifyComposite(ValueIntegrator.java:317)
at systems.dmx.core.impl.ValueIntegrator.integrateComposite(ValueIntegrator.java:266)
at systems.dmx.core.impl.ValueIntegrator.integrate(ValueIntegrator.java:108)
... 56 more
Jul 31, 2020 11:09:11 AM systems.dmx.core.impl.TransactionFactory$TransactionResourceFilter$2 filter
WARNUNG: ### Rollback transaction of systems.dmx.webservice.WebservicePlugin#createTopic()