Hi,

I am trying to use the windows-service-installer maven plugin to create
a windows installer that will install a windows service that will run
Jena Fuseki.
 https://github.com/alexkasko/windows-service-installer

My DaemonLauncher for Jena Fuseki, is here:
 
https://github.com/steinarb/fusekiservice/blob/master/src/main/java/no/priv/bang/fuseki/fusekiservice/FusekiService.java

I have written a JUnit test that attempts to start and stop the service
(just to see if I can make it run at all).
 
https://github.com/steinarb/fusekiservice/blob/master/src/test/java/no/priv/bang/fuseki/fusekiservice/FusekiServiceTest.java

The JUnit test currently fails with the following console output:
 [2016-01-31 18:21:38] FusekiService INFO  FUSEKI_HOME: null
 [2016-01-31 18:21:38] Server     ERROR Can't find resourceBase (tried webapp 
and src/main/webapp)
 [2016-01-31 18:21:38] Server     ERROR Failed to start

So my question is: what am I missing from the FusekiService.startDaemon() 
method?

I have been stealing code from here (mainly):
 
https://github.com/apache/jena/blob/master/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/cmd/FusekiCmd.java

The reason I haven tried using FusekiCmd, is that I would like to have
        JettyFuseki.instance.start();
in the startDaemon() method, and
        JettyFuseki.instance.join();
in the stopDaemon() method (unless I've misunderstood how they are
supposed to work...?)

The failing code, is in
 
https://github.com/apache/jena/blob/master/jena-fuseki2/jena-fuseki-core/src/main/java/org/apache/jena/fuseki/jetty/JettyFuseki.java
in the JettyFuseki.createWebApp() method.

The code in createWebapp() looks like it expects a directory, with
WEB-INF/web.xml residing in that directory (ie. WEB-INF a subdirectly of
the webapp directory), so I have been toying with the idea of
downloading and unpacking the fuseki webapp in a directory and give that
directory.

But even if I could make that work in a JUnit test, I have no idea of
how to accomplish the same thing in a windows service installed by an
installer created by the windows-service-installer maven plugin...

And the ready packaged jena fuseki starts and runs from a single .jar,
so unpacking something shouldn't be necessary.

So how should I proceed with this?  Is this doable?

Thanks!


- Steinar

Reply via email to