Thanks David - I will be spending some more time with this later this week and will try it then! > On 20 Jul 2015, at 14:29, David Powell <djpow...@djpowell.net> wrote: > > Running the .exe directly from a console window might help, as it will show > you any errors as console output. > > I use a similar set up, but pass the parameters on the command-line rather > than via environment variables. I set StartMode=jvm, > StartClass=com.example.Start, and leave StartMethod unset (so it just calls > -main). > > Try and see if you can get it working with a Java class first maybe? If that > works confirm that your jar is an uberjar and contains the expected class > file. > > (Note that I did have issues with the Stop mechanism - it didn't seem to run > in the same classloader, so I had to use a small Java stub to stop the > service using a special HTTP request) > > > On Mon, Jul 20, 2015 at 12:54 PM, Colin Yates <colin.ya...@gmail.com > <mailto:colin.ya...@gmail.com>> wrote: > Hi all, > > I am trying to get my Clojure app deployable on Windows using procrun, and I > am running into a brick wall. > > I can install the service, but when I start it I get an error: "Windows could > not start the ... on Local Computer. For more information, review the System > Event Log..." The System Event Log has an Error but absolutely no useful > information. > > Any suggestions welcome! > > My procure configuration is: > > --- start > REM user configuration below > set INST_DIR=c:\test > > REM -------- DO NOT MODIFY -------- > REM Dist layout > set SERVICE_NAME=MyTestService > set PR_INSTALL=%INST_DIR%\dist\prunsrv.exe > set LOGS_DIR=%INST_DIR%\logs > > REM Service log configuration > set PR_LOGPREFIX=%SERVICE_NAME% > set PR_LOGPATH=%LOGS_DIR% > set PR_STDOUTPUT=%LOGS_DIR%\stdout.txt > set PR_STDERROR=%LOGS_DIR%\stderr.txt > set PR_LOGLEVEL=Info > > REM Path to java installation > set PR_CLASSPATH=%INST_DIR%/dist/my.jar > > REM Startup configuration > set PR_STARTUP=manual > set PR_STARTMODE=auto > set PR_STARTCLASS=test.prod > set PR_STARTMETHOD=startSystem > > REM Shutdown configuration > set PR_STOPMODE=auto > set PR_STOPCLASS=test.prod > set PR_STOPMETHOD=stopSystem > > REM JVM configuration > set PR_JVMMS=256 > set PR_JVMMX=1024 > set PR_JVMSS=4000 > > REM Install service > %INST_DIR%/dist/prunsrv.exe //US//%SERVICE_NAME% > > --- end > > My test.prod class: > > --- start > (ns test > (:require [environ.core :as env] > [test.systems :refer [core-system]] > [com.stuartsierra.component :as component] > [util.heartbeat :as heartbeat]) > (:gen-class > :methods [^{:static true} [startSystem ["[Ljava.lang.String;"] void] > ^{:static true} [stopSystem ["[Ljava.lang.String;"] void]])) > > (def db {:subprotocol "jtds:sqlserver" > :subname (env/env :database-subname) > :user (env/env :database-user) > :password (env/env :database-password)}) > > (def system (core-system db)) > > (defn -startSystem [& args] > (println "Starting system.") > (alter-var-root #'system component/start) > (let [heartbeat-listener-registry (:heartbeat-listener-registry system)] > (heartbeat/start heartbeat-listener-registry)) > (println "System started.")) > > (defn -stopSystem [& args] > (println "Stopping system.") > (alter-var-root #'system component/stop) > (println "System stopped.")) > > (defn -main [& args] > (let [arg (first args)] > (if (= "stop" arg) > (-startSystem) > (-stopSystem)))) > --- end > > > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > <mailto:clojure@googlegroups.com> > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > <mailto:clojure%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > <http://groups.google.com/group/clojure?hl=en> > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com > <mailto:clojure+unsubscr...@googlegroups.com>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. > > > -- > You received this message because you are subscribed to the Google > Groups "Clojure" group. > To post to this group, send email to clojure@googlegroups.com > Note that posts from new members are moderated - please be patient with your > first post. > To unsubscribe from this group, send email to > clojure+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/clojure?hl=en > <http://groups.google.com/group/clojure?hl=en> > --- > You received this message because you are subscribed to the Google Groups > "Clojure" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to clojure+unsubscr...@googlegroups.com > <mailto:clojure+unsubscr...@googlegroups.com>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>.
-- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.