Accidentially deleted Topicmap causes inconsistent situation
On a new Topicmap which I had created in a workspace "Testworkspace" I created two Persons and then revealed the Topicmap Topic to change its name (from "untitled" to "Testtopicmap"). While doing so I accidentally deleted the topicmap. This caused the following error message:
The UI did not reflect that deletion. The Topicmap was still displayed in the dropdown menu. To further stress the scenario I also deleted the according "Testworkspace" the UI looked like this:
I then tried to reload the browser. Now the following message was displayed:
I was able to stop the server with CTR+C and restart it.
When trying to create the workspace "Testworkspace" anew the search/create menu revealed the still existing Workspacename "Testworkspace". This element however was not associated with a workspace anymore.
The terminal printed:
WARNUNG: Object 4160 (typeUri="dmx.workspaces.workspace_name") is not assigned to any workspace -- WRITE permission is refused
Trying to delete the remaining workspace name results in the following error message:
401 Unauthorized { "exception": "java.lang.RuntimeException", "message": "Fetching and deleting topic 4160 failed", "cause": { "exception": "java.lang.RuntimeException", "message": "Deleting topic 4160 failed", "cause": { "exception": "systems.dmx.core.service.accesscontrol.AccessControlException", "message": "user "admin" has no WRITE permission for object 4160" } } }
Then a subsequent message was displayed. Even after stopping the server with CTR+C I was not able to start it again. On booting the following message came up. I aborted the tests with this installation and started over again with a fresh installation.
SCHWERWIEGEND: Request "GET /workspace/object/3982" failed. Responding with 401 (Unauthorized). The original exception/error is: java.lang.RuntimeException: Fetching topic 3975 failed at systems.dmx.core.impl.PersistenceLayer.getTopic(PersistenceLayer.java:74) at systems.dmx.core.impl.CoreServiceImpl.getTopic(CoreServiceImpl.java:82) at systems.dmx.workspaces.WorkspacesPlugin.getAssignedWorkspace(WorkspacesPlugin.java:163) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:564) 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.headerComplete(AbstractHttpConnection.java:971) at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1033) 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: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.base/java.lang.Thread.run(Thread.java:844) Caused by: systems.dmx.core.service.accesscontrol.AccessControlException: user has no READ permission for object 3975 at systems.dmx.accesscontrol.AccessControlPlugin.checkAccess(AccessControlPlugin.java:912) at systems.dmx.accesscontrol.AccessControlPlugin.checkReadAccess(AccessControlPlugin.java:888) at systems.dmx.accesscontrol.AccessControlPlugin.checkTopicReadAccess(AccessControlPlugin.java:521) at systems.dmx.core.impl.CoreEvent$1.dispatch(CoreEvent.java:35) at systems.dmx.core.impl.EventManager.dispatchEvent(EventManager.java:83) at systems.dmx.core.impl.EventManager.fireEvent(EventManager.java:59) at systems.dmx.core.impl.PersistenceLayer.checkTopicReadAccess(PersistenceLayer.java:802) at systems.dmx.core.impl.TopicModelImpl.checkReadAccess(TopicModelImpl.java:136) at systems.dmx.core.impl.PersistenceLayer.checkReadAccess(PersistenceLayer.java:792) at systems.dmx.core.impl.PersistenceLayer.checkReadAccessAndInstantiate(PersistenceLayer.java:759) at systems.dmx.core.impl.PersistenceLayer.getTopic(PersistenceLayer.java:72) ... 53 more