In postCreateTopic listener topic value and children are empty for an Entity topic
The dmx-nofications plugins hooks into Topicmap creation (or rather post-creation) but cannot access the given topicmap name.
Simply accessing topicmap.getSimpleValue()
returns also just an "" empty value.
When trying to access the topicmap_name
child, the core says the topicmap object has no such child.
Here is the stacktrace when trying to access the topicmap name directly:
Aug 23, 2020 11:27:21 AM systems.dmx.core.util.UniversalExceptionMapper logException
SCHWERWIEGEND: Request "POST /topicmaps?name=Neww+Map&topicmapTypeUri=dmx.topicmaps.topicmap" failed. Responding with 500 (Internal Server Error). The original exception/error is:
java.lang.RuntimeException: Creating topicmap "Neww Map" failed, topicmapTypeUri="dmx.topicmaps.topicmap", viewProps={}
at systems.dmx.topicmaps.TopicmapsPlugin.createTopicmap(TopicmapsPlugin.java:88)
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.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: Creating topic failed, model=TopicModelImpl {
"id": -1,
"typeUri": "dmx.topicmaps.topicmap",
"children": {
"dmx.topicmaps.topicmap_type_uri": {
"id": 1777,
"typeUri": "dmx.topicmaps.topicmap_type_uri",
"value": "dmx.topicmaps.topicmap",
"children": {}
},
"dmx.topicmaps.topicmap_name": {
"id": 8197,
"typeUri": "dmx.topicmaps.topicmap_name",
"value": "Neww Map",
"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.topicmaps.TopicmapsPlugin.createTopicmap(TopicmapsPlugin.java:79)
... 50 more
Caused by: java.lang.RuntimeException: Value integration failed, newValues=TopicModelImpl {
"id": -1,
"typeUri": "dmx.topicmaps.topicmap",
"children": {
"dmx.topicmaps.topicmap_type_uri": {
"id": 1777,
"typeUri": "dmx.topicmaps.topicmap_type_uri",
"value": "dmx.topicmaps.topicmap",
"children": {}
},
"dmx.topicmaps.topicmap_name": {
"id": 8197,
"typeUri": "dmx.topicmaps.topicmap_name",
"value": "Neww Map",
"children": {}
}
}
}, targetObject=null, compDef=null
at systems.dmx.core.impl.ValueIntegrator.integrate(ValueIntegrator.java:110)
at systems.dmx.core.impl.AccessLayer.updateValues(AccessLayer.java:863)
at systems.dmx.core.impl.AccessLayer.createTopic(AccessLayer.java:137)
... 53 more
Caused by: java.lang.RuntimeException: Creating single topic failed, model=TopicModelImpl {
"id": 8202,
"uri": "",
"typeUri": "dmx.topicmaps.topicmap",
"value": "",
"children": {"dmx.workspaces.workspace#dmx.workspaces.workspace_assignment": {
"id": 1767,
"uri": "dmx.workspaces.dmx",
"typeUri": "dmx.workspaces.workspace",
"value": "DMX",
"children": {},
"assoc": {
"id": 8205,
"uri": "",
"typeUri": "dmx.workspaces.workspace_assignment",
"value": "",
"children": {},
"player1": {
"topicId": 8202,
"roleTypeUri": "dmx.core.parent"
},
"player2": {
"topicId": 1767,
"roleTypeUri": "dmx.core.child"
}
}
}}
}, uriPrefix="null"
at systems.dmx.core.impl.AccessLayer.createSingleTopic(AccessLayer.java:185)
at systems.dmx.core.impl.AccessLayer.createSingleTopic(AccessLayer.java:146)
at systems.dmx.core.impl.ValueIntegrator.createSimpleTopic(ValueIntegrator.java:767)
at systems.dmx.core.impl.ValueIntegrator.identifyParent(ValueIntegrator.java:347)
at systems.dmx.core.impl.ValueIntegrator.unifyComposite(ValueIntegrator.java:308)
at systems.dmx.core.impl.ValueIntegrator.integrateComposite(ValueIntegrator.java:254)
at systems.dmx.core.impl.ValueIntegrator.integrate(ValueIntegrator.java:102)
... 55 more
Caused by: java.lang.RuntimeException: An error occurred in the PostCreateTopic of plugin "DMX Notifications"
at systems.dmx.core.impl.EventManager.dispatchEvent(EventManager.java:96)
at systems.dmx.core.impl.EventManager.fireEvent(EventManager.java:59)
at systems.dmx.core.impl.AccessLayer.createSingleTopic(AccessLayer.java:182)
... 61 more
Caused by: java.lang.RuntimeException: Comp Def URI "dmx.topicmaps.topicmap_name" not found in [dmx.workspaces.workspace#dmx.workspaces.workspace_assignment]
at systems.dmx.core.impl.ChildTopicsModelImpl.getTopic(ChildTopicsModelImpl.java:61)
at systems.dmx.core.impl.ChildTopicsModelImpl.getString(ChildTopicsModelImpl.java:121)
at systems.dmx.core.impl.ChildTopicsImpl.getString(ChildTopicsImpl.java:125)
at systems.dmx.notifications.NotificationsPlugin.notifyWorkspaceSubscribersAboutNewTopicmap(NotificationsPlugin.java:320)
at systems.dmx.notifications.NotificationsPlugin.postCreateTopic(NotificationsPlugin.java:263)
at systems.dmx.core.impl.CoreEvent$9.dispatch(CoreEvent.java:113)
at systems.dmx.core.impl.EventManager.dispatchEvent(EventManager.java:83)
... 63 more
Aug 23, 2020 11:27:21 AM systems.dmx.core.impl.TransactionFactory$TransactionResourceFilter$2 filter
WARNUNG: ### Rollback transaction of systems.dmx.topicmaps.TopicmapsPlugin#createTopicmap()