|
From: <ray...@wg...> - 2004-01-30 01:53:09
|
All,
I'm trying to setup the Java Service Wrapper WrapperSimpleApp Integration
(Win32) on Win 2000 server. This is for Oracle's OC4J which is an
implementation of Orion. My working bat file is:
java -Xrs -jar -classpath "c:\Program
Files\Java\j2re1.4.2_02\lib\rt.jar" c:\oracle\oc4j\j2ee\home\oc4j.jar
The java wrapper doesn't seem to like the -jar additional parameter:
wrapper.java.additional.1=-Xrs
wrapper.java.additional.2=-jar
If I have this in I get:
jvm 1 | java.util.zip.ZipException: The system cannot find the
file specified
Commented out (the -jar parameter) I get:
jvm 1 | WrapperSimpleApp: Unable to locate the class
c:\Oracle\oc4j\j2ee\home\oc4j.jar: java.lang.ClassNotFoundException
Any help with this?
Thanks,
Ray Henderson
Washington Group Intl. Inc.
PS. My complete conf file:
#********************************************************************
# Wrapper Properties
#********************************************************************
wrapper.java.command=C:\Program Files\Java\j2re1.4.2_02\bin\java
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=C:\Program Files\Java\j2re1.4.2_02\lib\rt.jar
wrapper.java.library.path.1=../lib
# Java Additional Parameters
wrapper.java.additional.1=-Xrs
wrapper.java.additional.2=-jar
wrapper.java.initmemory=3
wrapper.java.maxmemory=64
# Application parameters. Add parameters as needed starting from 1
wrapper.app.parameter.1=c:/Oracle/oc4j/j2ee/home/oc4j.jar
#********************************************************************
# Wrapper Logging Properties
#********************************************************************
wrapper.console.format=PM
wrapper.console.loglevel=INFO
wrapper.logfile=../logs/wrapper.log
wrapper.logfile.format=LPTM
# Log Level for log file output. (See docs for log levels)
#wrapper.logfile.loglevel=INFO
wrapper.logfile.loglevel=DEBUG
wrapper.logfile.maxsize=0
wrapper.logfile.maxfiles=0
wrapper.syslog.loglevel=NONE
#********************************************************************
# Wrapper NT Service Properties
#********************************************************************
wrapper.ntservice.name=OC4J
wrapper.ntservice.displayname=OC4J Oracle Components for Java
wrapper.ntservice.description=OC4J Oracle Components for Java
# Service dependencies. Add dependencies as needed starting from 1
#wrapper.ntservice.dependency.1=
wrapper.ntservice.starttype=AUTO_START
wrapper.ntservice.interactive=false
|
|
From: Leif M. <le...@ta...> - 2004-01-31 04:02:48
|
Ray,
The Wrapper does not directly support executable jar files. But
this is easily worked
around by looking in the jar's manifest file for the main class and then
specifying that as
the application's main class. I just added a new FAQ entry describing
the process:
http://wrapper.tanukisoftware.org/doc/english/faq.html
I had a couple other notes below as well.
Cheers,
Leif
Ray Henderson wrote:
> All,
>
> I'm trying to setup the Java Service Wrapper WrapperSimpleApp
> Integration (Win32) on Win 2000 server. This is for Oracle's OC4J
> which is an implementation of Orion. My working bat file is:
> java -Xrs -jar -classpath "c:\Program
> Files\Java\j2re1.4.2_02\lib\rt.jar" c:\oracle\oc4j\j2ee\home\oc4j.jar
>
> The java wrapper doesn't seem to like the -jar additional parameter:
> wrapper.java.additional.1=-Xrs
> wrapper.java.additional.2=-jar
>
> If I have this in I get:
> jvm 1 | java.util.zip.ZipException: The system cannot find
> the file specified
>
> Commented out (the -jar parameter) I get:
> jvm 1 | WrapperSimpleApp: Unable to locate the class
> c:\Oracle\oc4j\j2ee\home\oc4j.jar: java.lang.ClassNotFoundException
>
> Any help with this?
>
> Thanks,
>
> Ray Henderson
>
> Washington Group Intl. Inc.
>
> PS. My complete conf file:
>
> #********************************************************************
> # Wrapper Properties
> #********************************************************************
> wrapper.java.command=C:\Program Files\Java\j2re1.4.2_02\bin\java
> wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp
> wrapper.java.classpath.1=../lib/wrapper.jar
> wrapper.java.classpath.2=C:\Program Files\Java\j2re1.4.2_02\lib\rt.jar
>
You should not have to include the rt.jar file on the classpath. The
JVM will
find that on its own.
> wrapper.java.library.path.1=../lib
>
> # Java Additional Parameters
> wrapper.java.additional.1=-Xrs
>
There is a note in the FAQ about the -Xrs parameter as well. Read it
and make sure
it is really what you want to do. In most cases you shouldn't need it
when using the
Wrapper.
> wrapper.java.additional.2=-jar
>
> wrapper.java.initmemory=3
> wrapper.java.maxmemory=64
>
> # Application parameters. Add parameters as needed starting from 1
> wrapper.app.parameter.1=c:/Oracle/oc4j/j2ee/home/oc4j.jar
>
> #********************************************************************
> # Wrapper Logging Properties
> #********************************************************************
> wrapper.console.format=PM
> wrapper.console.loglevel=INFO
> wrapper.logfile=../logs/wrapper.log
> wrapper.logfile.format=LPTM
>
> # Log Level for log file output. (See docs for log levels)
> #wrapper.logfile.loglevel=INFO
> wrapper.logfile.loglevel=DEBUG
>
> wrapper.logfile.maxsize=0
> wrapper.logfile.maxfiles=0
> wrapper.syslog.loglevel=NONE
>
> #********************************************************************
> # Wrapper NT Service Properties
> #********************************************************************
> wrapper.ntservice.name=OC4J
> wrapper.ntservice.displayname=OC4J Oracle Components for Java
> wrapper.ntservice.description=OC4J Oracle Components for Java
>
> # Service dependencies. Add dependencies as needed starting from 1
> #wrapper.ntservice.dependency.1=
>
> wrapper.ntservice.starttype=AUTO_START
> wrapper.ntservice.interactive=false
>
|
|
From: whack er <wha...@ya...> - 2004-02-02 14:44:21
|
Warm Greetings How could I ensure that only one instance of my application runs at any given time when using the Wrapper service, i have figured out methods using native Java application but not with the wrapper. I need to do this on Windows and Linux. TIA --------------------------------- Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! |
|
From: Leif M. <le...@ta...> - 2004-02-02 15:10:36
|
The NT service manager will prevent you from launching more than one copy of the Wrapper as a service. But it is still possible to launch one or more instances of the application as Console applications. There is currently not a way to prevent this with the Wrapper as it is without implementing something in your application. I like this idea however and just logged a feature request so I will be sure to get it implemented. The list has been growing lately so it may be a version or two before I am able to get it in. http://sourceforge.net/tracker/index.php?func=detail&aid=889123&group_id=39428&atid=425190 Body of request. --- Add a property that will tell the Wrapper to check whether or not another instance of the same application is already running. It is important that more than one copy of the Wrapper be allowed to run as long as the java application is different. Use the ntservice name as a key when checking for other instances on startup. --- On the UNIX side, this should already be working as long as you are using the scripts provided with the Wrapper to launch your application. They make use of a PID file to detect whether or not the application is currently running. If you attempt to launch a second instance you will get an error. Cheers, Leif whack er wrote: > Warm Greetings > > How could I ensure that only one instance of my application runs at > any given time when using the Wrapper service, i have figured out > methods using native Java application but not with the wrapper. > > I need to do this on Windows and Linux. > > TIA > |