Uploaded image for project: 'Apache Jena'
  1. Apache Jena
  2. JENA-869

Fuseki2: Can't reuse dataset name after DELETE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Fuseki 2.0.0
    • Fuseki 2.3.1
    • Fuseki
    • None

    Description

      In the web interface, I create a persistent dataset "test1". I then remove it. I then create a second one called "test1". Everything works fine.

      However, if I restart Fuseki, now it attemps to register test1 twice:

      [2015-01-28 12:47:33] Servlet    INFO  Initializing Shiro environment
      [2015-01-28 12:47:33] Config     INFO  Shiro file: file:///fuseki/shiro.ini
      [2015-01-28 12:47:33] Builder    INFO  Service: TDB test1
      [2015-01-28 12:47:34] Builder    INFO  Service: TDB test1
      [2015-01-28 12:47:34] Builder    INFO  Service: :service1
      [2015-01-28 12:47:34] Builder    INFO  Service: TDB test3
      [2015-01-28 12:47:34] Config     INFO  Register: /test1
      [2015-01-28 12:47:34] Config     INFO  Register: /test1
      [2015-01-28 12:47:34] Server     ERROR Exception in initialization: Already registered: /test1
      [2015-01-28 12:47:34] WebAppContext WARN  Failed startup of context o.e.j.w.WebAppContext@d04ca48{/,file:/jena-fuseki/webapp/,STARTING}
      org.apache.jena.fuseki.FusekiException: Already registered: /test1
      	at org.apache.jena.fuseki.server.DataAccessPointRegistry.register(DataAccessPointRegistry.java:28)
      	at org.apache.jena.fuseki.server.FusekiServer.enable(FusekiServer.java:232)
      	at org.apache.jena.fuseki.server.FusekiServer.initializeDataAccessPoints(FusekiServer.java:226)
      	at org.apache.jena.fuseki.server.FusekiServerListener.init(FusekiServerListener.java:70)
      	at org.apache.jena.fuseki.server.FusekiServerListener.contextInitialized(FusekiServerListener.java:45)
      	at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:799)
      	at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:446)
      	at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:791)
      	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:296)
      	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1347)
      	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:743)
      	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
      	at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:117)
      	at org.eclipse.jetty.server.Server.start(Server.java:355)
      	at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:99)
      	at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:60)
      	at org.eclipse.jetty.server.Server.doStart(Server.java:324)
      	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:69)
      	at org.apache.jena.fuseki.jetty.JettyFuseki.start(JettyFuseki.java:137)
      	at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.exec(FusekiCmd.java:331)
      	at arq.cmdline.CmdMain.mainMethod(CmdMain.java:102)
      	at arq.cmdline.CmdMain.mainRun(CmdMain.java:63)
      	at arq.cmdline.CmdMain.mainRun(CmdMain.java:50)
      	at org.apache.jena.fuseki.cmd.FusekiCmd$FusekiCmdInner.innerMain(FusekiCmd.java:97)
      	at org.apache.jena.fuseki.cmd.FusekiCmd.main(FusekiCmd.java:60)
      

      In the HTTP log from before:

      [2015-01-28 12:47:02] Admin      INFO  [1] GET http://localhost:3031/$/server
      [2015-01-28 12:47:02] Admin      INFO  [1] 200 OK (11 ms) 
      [2015-01-28 12:47:04] Admin      INFO  [2] GET http://localhost:3031/$/server
      [2015-01-28 12:47:04] Admin      INFO  [2] 200 OK (1 ms) 
      [2015-01-28 12:47:08] Admin      INFO  [3] POST http://localhost:3031/$/datasets
      [2015-01-28 12:47:08] Admin      INFO  [3] Create database : name = /test1
      [2015-01-28 12:47:08] Builder    INFO  Service: TDB test1
      [2015-01-28 12:47:08] Admin      INFO  [3] 200 OK (499 ms) 
      [2015-01-28 12:47:09] Admin      INFO  [4] GET http://localhost:3031/$/server
      [2015-01-28 12:47:09] Admin      INFO  [4] 200 OK (2 ms) 
      [2015-01-28 12:47:12] Admin      INFO  [5] POST http://localhost:3031/$/datasets
      [2015-01-28 12:47:12] Admin      INFO  [5] Create database : name = /test2
      [2015-01-28 12:47:12] Builder    INFO  Service: :service1
      [2015-01-28 12:47:12] Admin      INFO  [5] 200 OK (117 ms) 
      [2015-01-28 12:47:12] Admin      INFO  [6] GET http://localhost:3031/$/server
      [2015-01-28 12:47:12] Admin      INFO  [6] 200 OK (3 ms) 
      [2015-01-28 12:47:16] Admin      INFO  [7] POST http://localhost:3031/$/datasets
      [2015-01-28 12:47:16] Admin      INFO  [7] Create database : name = /test3
      [2015-01-28 12:47:16] Builder    INFO  Service: TDB test3
      [2015-01-28 12:47:16] Admin      INFO  [7] 200 OK (126 ms) 
      [2015-01-28 12:47:16] Admin      INFO  [8] GET http://localhost:3031/$/server
      [2015-01-28 12:47:16] Admin      INFO  [8] 200 OK (3 ms) 
      [2015-01-28 12:47:20] Admin      INFO  [9] DELETE http://localhost:3031/$/datasets/test1
      [2015-01-28 12:47:20] Admin      INFO  [9] DELETE ds=/test1
      [2015-01-28 12:47:20] Admin      INFO  [9] 200 OK (23 ms) 
      [2015-01-28 12:47:20] Admin      INFO  [10] GET http://localhost:3031/$/server
      [2015-01-28 12:47:20] Admin      INFO  [10] 200 OK (1 ms) 
      [2015-01-28 12:47:26] Admin      INFO  [11] POST http://localhost:3031/$/datasets
      [2015-01-28 12:47:26] Admin      INFO  [12] POST http://localhost:3031/$/datasets
      [2015-01-28 12:47:26] Admin      INFO  [11] Create database : name = /test1
      [2015-01-28 12:47:26] Builder    INFO  Service: TDB test1
      [2015-01-28 12:47:27] Admin      INFO  [11] 200 OK (112 ms) 
      [2015-01-28 12:47:27] Admin      INFO  [12] Create database : name = /test1
      [2015-01-28 12:47:27] Admin      INFO  [12] 409 Name already registered /test1 (127 ms) 
      [2015-01-28 12:47:27] Admin      INFO  [13] GET http://localhost:3031/$/server
      [2015-01-28 12:47:27] Admin      INFO  [13] 200 OK (2 ms) 
      

      Notice that 409.. the web UI didn't indicate anything about this.

      Inspecting my /fuseki reveals indeed that test1 appears three times:

      root@35e5b435426c:/fuseki# grep -r test1 .
      Binary file ./system/nodes.dat matches
      ./system_files/f9508798-2ac1-11b2-80c2-dab7e13f8f6e:        rdfs:label                    "TDB test1" ;
      ./system_files/f9508798-2ac1-11b2-80c2-dab7e13f8f6e:        fuseki:name                   "test1" ;
      ./system_files/f9508798-2ac1-11b2-80c2-dab7e13f8f6e:        tdb:location  "/fuseki/databases/test1" .
      ./system_files/f950879c-2ac1-11b2-80c2-dab7e13f8f6e:        rdfs:label                    "TDB test1" ;
      ./system_files/f950879c-2ac1-11b2-80c2-dab7e13f8f6e:        fuseki:name                   "test1" ;
      ./system_files/f950879c-2ac1-11b2-80c2-dab7e13f8f6e:        tdb:location  "/fuseki/databases/test1" .
      ./system_files/f950879b-2ac1-11b2-80c2-dab7e13f8f6e:        rdfs:label                    "TDB test1" ;
      ./system_files/f950879b-2ac1-11b2-80c2-dab7e13f8f6e:        fuseki:name                   "test1" ;
      ./system_files/f950879b-2ac1-11b2-80c2-dab7e13f8f6e:        tdb:location  "/fuseki/databases/test1" .
      

      f950879c-2ac1-11b2-80c2-dab7e13f8f6e is not in ./system/prefixes.dat and ./system/nodes.dat, while the other two UUIDs are.

      Attachments

        1. JENA-869_20150726200200.png
          57 kB
          Bruno P. Kinoshita

        Issue Links

          Activity

            People

              andy Andy Seaborne
              soilandreyes Stian Soiland-Reyes (old) (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: