|
|
|
|
|
Re: Virgo as windows service [message #947916 is a reply to message #947865] |
Wed, 17 October 2012 15:18 |
joel mann Messages: 7 Registered: October 2012 |
Junior Member |
|
|
I'm not sure if you have requirements to use the Tanuki Java Wrapper, however I found YAJSW (Yet Another Java Service Wrapper) to be easier to setup and get going. All you need to do is run the Virgo server (via startup.bat), then use the YAJSW tool genConfig.bat <PID of Server> and it will generate all the configurations for you. Much easier then hand jamming all the start up parameters. That is what we are using here, so our config parameters may be slightly different.
The good thing about using YAJSW, is that "in theory" it "should" be running the exact same start up procedures that are used when running the Virgo 3.5 startup.bat file.
Here's a snippet of what we have:
wrapper.working.dir=C:\\Virgo-server\\
wrapper.java.app.mainclass=org.eclipse.equinox.launcher.Main
wrapper.java.command = C:\\Program Files\\Java\\jdk1.6.0_35\\bin\\java
wrapper.java.classpath.1 = .\\lib\\org.eclipse.equinox.launcher_1.3.0.v20120308-1358.jar
wrapper.java.classpath.2 = .\\lib\\javax.transaction_1.1.1.v201105210645.jar
wrapper.java.classpath.3 = .\\lib\\javax.annotation_1.1.0.v201108011116.jar
wrapper.java.classpath.4 = .\\lib\\org.eclipse.osgi_3.8.0.v20120508-2119.jar
wrapper.java.classpath.5 = .\\lib\\org.eclipse.virgo.kernel.authentication_3.5.0.RELEASE.jar
wrapper.java.classpath.6 = .\\lib\\org.eclipse.virgo.kernel.shutdown_3.5.0.RELEASE.jar
wrapper.java.classpath.7 = .\\lib\\org.eclipse.virgo.osgi.console_3.5.0.RELEASE.jar
wrapper.java.classpath.8 = .\\lib\\org.eclipse.virgo.osgi.extensions.equinox_3.5.0.RELEASE.jar
wrapper.java.classpath.9 = .\\lib\\org.eclipse.virgo.osgi.launcher_3.5.0.RELEASE.jar
wrapper.java.classpath.10 = .\\plugins\\org.eclipse.osgi_3.8.0.v20120508-2119.jar
wrapper.java.classpath.11 = .\\plugins\\org.eclipse.equinox.console.ssh_1.0.0.v20120430-1356.jar
wrapper.app.parameter.1 = -noExit
wrapper.java.additional.1 = -Xms512m
wrapper.java.additional.2 = -Xmx1024m
wrapper.java.additional.3 = -XX:PermSize=128m
wrapper.java.additional.4 = -XX:MaxPermSize=256m
wrapper.java.additional.2 = -Xmx1024m
wrapper.java.additional.3 = -XX:PermSize=128m
wrapper.java.additional.4 = -XX:MaxPermSize=256m
wrapper.java.additional.5 = -Dcom.sun.management.jmxremote.port=9875
wrapper.java.additional.6 = -Dcom.sun.management.jmxremote.authenticate=true
wrapper.java.additional.7 = -Dcom.sun.management.jmxremote.login.config=virgo-kernel
wrapper.java.additional.8 = -Dcom.sun.management.jmxremote.access.file=.\\configuration\\org.eclipse.virgo.kernel.jmxremote.access.properties
wrapper.java.additional.9 = -Djavax.net.ssl.keyStore=.\\configuration\\keystore
wrapper.java.additional.10 = -Djavax.net.ssl.keyStorePassword=changeit
wrapper.java.additional.11 = -Dcom.sun.management.jmxremote.ssl=true
wrapper.java.additional.12 = -Dcom.sun.management.jmxremote.ssl.need.client.auth=false
wrapper.java.additional.13 = -XX:+HeapDumpOnOutOfMemoryError
wrapper.java.additional.14 = -XX:ErrorFile=.\\serviceability\\error.log
wrapper.java.additional.15 = -XX:HeapDumpPath=.\\serviceability\\heap_dump.hprof
wrapper.java.additional.16 = -Djava.security.auth.login.config=.\\configuration\\org.eclipse.virgo.kernel.authentication.config
wrapper.java.additional.17 = -Dorg.eclipse.virgo.kernel.authentication.file=.\\configuration\\org.eclipse.virgo.kernel.users.properties
wrapper.java.additional.18 = -Djava.io.tmpdir=.\\work\\tmp
wrapper.java.additional.19 = -Dorg.eclipse.virgo.kernel.home=C:\\Virgo-server
wrapper.java.additional.20 = -Dosgi.java.profile=file:.\\configuration\\java6-server.profile
wrapper.java.additional.21 = -Dssh.server.keystore=.\\configuration\/hostkey.ser
wrapper.java.additional.22 = -Dorg.eclipse.virgo.kernel.home=C:\\Virgo-server
wrapper.java.additional.23 = -Dorg.eclipse.virgo.kernel.config=.\\configuration
wrapper.java.additional.24 = -Declipse.ignoreApp=true
wrapper.java.additional.25 = -Dosgi.install.area=C:\\Virgo-server
wrapper.java.additional.26 = -Dosgi.configuration.area=.\\work
wrapper.java.additional.27 = -Dosgi.frameworkClassPath=file:\/\/\/.\\lib\\javax.annotation_1.1.0.v201108011116.jar,file:\/\/\/.\\lib\\javax.transaction_1.1.1.v201105210645.jar,file:\/\/\/.\\lib\\org.eclipse.equinox.launcher_1.3.0.v20120308-1358.jar,file:\/\/\/.\\lib\\org.eclipse.osgi_3.8.0.v20120508-2119.jar,file:\/\/\/.\\lib\\org.eclipse.virgo.kernel.authentication_3.5.0.RELEASE.jar,file:\/\/\/.\\lib\\org.eclipse.virgo.kernel.shutdown_3.5.0.RELEASE.jar,file:\/\/\/.\\lib\\org.eclipse.virgo.osgi.console_3.5.0.RELEASE.jar,file:\/\/\/.\\lib\\org.eclipse.virgo.osgi.extensions.equinox_3.5.0.RELEASE.jar,file:\/\/\/.\\lib\\org.eclipse.virgo.osgi.launcher_3.5.0.RELEASE.jar,file:\/\/\/.\\plugins\\org.eclipse.osgi_3.8.0.v20120508-2119.jar,file:\/\/\/.\\plugins\\org.eclipse.equinox.console.ssh_1.0.0.v20120430-1356.jar
Not sure how much help that will be, as I mentioned earlier we get ""ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter" when trying to run with the above...
Please let us know if you are able to get this going as a service. And if anyone else has any idea why this is not working, please chime in...
|
|
|
|
Re: Virgo as windows service [message #964189 is a reply to message #963755] |
Tue, 30 October 2012 10:25 |
Thomas Gillet Messages: 14 Registered: May 2011 |
Junior Member |
|
|
Hi all, have been investigating the same issue, and I think I found a solution.
Seems to me the only problem is the osgi.frameworkClassPath property:
The Virgo startup script generates it with the same contents as the classpath, but with absolute URLs instead of relative paths (see bin/setupClasspath.bat).
I don't see any reason why.
The Eclipse launcher documentation states that this property supports relative paths, but doesn't say relative to which directory.
I tried different paths and I found it's relative to a subdirectory of the Virgo root (probably lib/ or plugins/, but I don't know for sure).
So I took the framework classpath generated by the startup script, made all paths relative and put it in the osgi.frameworkClassPath, in the wrapper conf.
And now it's working for me.
Note: "make all paths relative" means:
the entry file: ///C:\tools\virgo\lib\javax.annotation.jar becomes ../lib/javax.annotation.jar
(assuming Virgo is installed in C:\tools\virgo)
@joel mann:
I ended up with almost the same config file, so I guess replacing "." by ".." in your osgi.frameworkClassPath property should make it work.
(Also it is working fine for me without escaping any slashes).
@Borislav Kapukaranov:
I don't know what this property is for so I won't say anything about keeping it or not, but I think it could really use a little more documentation.
Also, why the hell the startup script generates this classpath with absolute URLs? It may be less confusing to use relative paths...
|
|
|
|
|
|
|
Re: Virgo as windows service [message #1097015 is a reply to message #940659] |
Thu, 29 August 2013 06:14 |
Felix Schöpf Messages: 14 Registered: February 2013 |
Junior Member |
|
|
This is the configuration I use for Virgo 3.6.0 with yajsw-stable-11.03:
wrapper.working.dir=C:\\Virgo_3.6\\
wrapper.tmp.path = ${jna_tmpdir}
wrapper.java.app.mainclass=org.eclipse.equinox.launcher.Main
wrapper.console.loglevel=INFO
wrapper.logfile=${wrapper_home}\/log\/wrapper.log
wrapper.logfile.maxsize=10m
wrapper.logfile.maxfiles=10
wrapper.console.title=Virgo
wrapper.ntservice.name=Virgo
wrapper.ntservice.displayname=Virgo
wrapper.ntservice.description=Virgo Service
wrapper.ntservice.starttype=AUTO_START
wrapper.daemon.run_level_dir=${if (new File('\/etc\/rc0.d').exists()) return '\/etc\/rcX.d' else return '\/etc\/init.d\/rcX.d'}
wrapper.tray = true
wrapper.tray.port = 15002
wrapper.on_exit.0=SHUTDOWN
wrapper.on_exit.default=RESTART
wrapper.filter.trigger.0=Exception
wrapper.filter.script.0=scripts\/trayMessage.gv
wrapper.filter.script.0.args=Exception
placeHolderSoGenPropsComeHere=
wrapper.java.command = C:\\Program Files (x86)\\Java\\jre6\\bin\\java
wrapper.java.classpath.1 = .\\lib\\javax.annotation_1.1.0.v201108011116.jar
wrapper.java.classpath.2 = .\\lib\\javax.transaction_1.1.1.v201105210645.jar
wrapper.java.classpath.3 = .\\lib\\org.eclipse.equinox.launcher_1.3.0.v20120308-1358.jar
wrapper.java.classpath.4 = .\\lib\\org.eclipse.virgo.kernel.equinox.extensions_3.6.0.RELEASE.jar
wrapper.java.classpath.5 = .\\lib\\org.eclipse.virgo.nano.authentication_3.6.0.RELEASE.jar
wrapper.java.classpath.6 = .\\lib\\org.eclipse.virgo.nano.shutdown_3.6.0.RELEASE.jar
wrapper.java.classpath.7 = .\\lib\\org.eclipse.virgo.util.env_3.6.0.RELEASE.jar
wrapper.java.classpath.8 = .\\plugins\\org.eclipse.osgi_3.8.1.v20120830-144521.jar
wrapper.java.classpath.9 = .\\plugins\\org.eclipse.equinox.console.ssh_1.0.0.v20120430-1356.jar
wrapper.app.parameter.1 = -noExit
wrapper.java.additional.1 = -Xmx512m
wrapper.java.additional.2 = -XX:MaxPermSize=512m
wrapper.java.additional.3 = -Dcom.sun.management.jmxremote.port=9875
wrapper.java.additional.4 = -Dcom.sun.management.jmxremote.authenticate=true
wrapper.java.additional.5 = -Dcom.sun.management.jmxremote.login.config=virgo-kernel
wrapper.java.additional.6 = -Dcom.sun.management.jmxremote.access.file=.\\configuration\\org.eclipse.virgo.kernel.jmxremote.access.properties
wrapper.java.additional.7 = -Djavax.net.ssl.keyStore=.\\configuration\\keystore
wrapper.java.additional.8 = -Djavax.net.ssl.keyStorePassword=changeit
wrapper.java.additional.9 = -Dcom.sun.management.jmxremote.ssl=true
wrapper.java.additional.10 = -Dcom.sun.management.jmxremote.ssl.need.client.auth=false
wrapper.java.additional.11 = -XX:+HeapDumpOnOutOfMemoryError
wrapper.java.additional.12 = -XX:ErrorFile=.\\serviceability\\error.log
wrapper.java.additional.13 = -XX:HeapDumpPath=.\\serviceability\\heap_dump.hprof
wrapper.java.additional.14 = -Djava.security.auth.login.config=.\\configuration\\org.eclipse.virgo.kernel.authentication.config
wrapper.java.additional.15 = -Dorg.eclipse.virgo.kernel.authentication.file=.\\configuration\\org.eclipse.virgo.kernel.users.properties
wrapper.java.additional.16 = -Djava.io.tmpdir=.\\work\\tmp
wrapper.java.additional.17 = -Dorg.eclipse.virgo.kernel.home=C:\\Virgo_3.6
wrapper.java.additional.18 = -Dosgi.java.profile=file:.\\configuration\\java6-server.profile
wrapper.java.additional.19 = -Dssh.server.keystore=.\\configuration\/hostkey.ser
wrapper.java.additional.20 = -Dorg.eclipse.virgo.kernel.config=.\\configuration
wrapper.java.additional.21 = -Declipse.ignoreApp=true
wrapper.java.additional.22 = -Dosgi.install.area=C:\\Virgo_3.6
wrapper.java.additional.23 = -Dosgi.configuration.area=.\\work
wrapper.java.additional.24 = -Dosgi.frameworkClassPath="file:\/\/\/C:\\Virgo_3.6\\lib\\javax.annotation_1.1.0.v201108011116.jar\,file:\/\/\/C:\\Virgo_3.6\\lib\\javax.transaction_1.1.1.v201105210645.jar\,file:\/\/\/C:\\Virgo_3.6\\lib\\org.eclipse.equinox.launcher_1.3.0.v20120308-1358.jar\,file:\/\/\/C:\\Virgo_3.6\\lib\\org.eclipse.virgo.kernel.equinox.extensions_3.6.0.RELEASE.jar\,file:\/\/\/C:\\Virgo_3.6\\lib\\org.eclipse.virgo.nano.authentication_3.6.0.RELEASE.jar\,file:\/\/\/C:\\Virgo_3.6\\lib\\org.eclipse.virgo.nano.shutdown_3.6.0.RELEASE.jar\,file:\/\/\/C:\\Virgo_3.6\\lib\\org.eclipse.virgo.util.env_3.6.0.RELEASE.jar\,file:\/\/\/C:\\Virgo_3.6\\plugins\\org.eclipse.osgi_3.8.1.v20120830-144521.jar\,file:\/\/\/C:\\Virgo_3.6\\plugins\\org.eclipse.equinox.console.ssh_1.0.0.v20120430-1356.jar"
Most likely these settings could be optimized, but I am happy as long as they are working.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02516 seconds