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
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.

Reply via email to