Greens8301
asked on
creating a service
I am creating a service from a batch command
Downloaded javaservice from
http://oraclebizint.wordpress.com/2008/02/15/oracle-bi-ee-101332-creating-windows-service-for-bi-ee-oc4j/
and from the cmd session typed the following
javaservice -install OracleBIEEOC4J2 C:\Program Files\Java\jdk1.6.0_07\jre \bin\clien t\jvm.dll -XX:MaxPermSize=128m -Djava.class.path=C:\Oracl eBI\oc4j_b i\j2ee\hom e\oc4j.jar -start oracle.oc4j.loader.boot.Bo otStrap -description OracleBIEEOC4JService2
Service was succesfully created. BUt when I tried to start the service, it started/stopped" with the message "Some services stop automatically when no work to do"
Any idea how to resolve this
Thanks
Downloaded javaservice from
http://oraclebizint.wordpress.com/2008/02/15/oracle-bi-ee-101332-creating-windows-service-for-bi-ee-oc4j/
and from the cmd session typed the following
javaservice -install OracleBIEEOC4J2 C:\Program Files\Java\jdk1.6.0_07\jre
Service was succesfully created. BUt when I tried to start the service, it started/stopped" with the message "Some services stop automatically when no work to do"
Any idea how to resolve this
Thanks
There is information regarding how to use javaservice here:
http://javaservice.objectweb.org/docs/devdocs/devcmds.html
"...
Example Command
A simple example might look like the following:
JavaService.exe -install "My Service" c:\j2sdk\jre\bin\server\jv m.dll -Djava.class.path=c:\app\c lasses.jar -start com.my.ExampleClass -err c:\app\stderr.txt
This would create a service that, when started, would create a JVM from the JDK in c:\j2sdk using a classpath set to be c:\app\classes.jar. It would then call the main method of the com.my.ExampleClass class with a String array of length 0 (no parameters). Anything written to System.err would be redirected into the file c:\app\stderr.txt.
..."
I suggest to add the -err switch to your command and check what it says::
javaservice -install "OracleBIEEOC4J2" C:\Program Files\Java\jdk1.6.0_07\jre \bin\clien t\jvm.dll -XX:MaxPermSize=128m -Djava.class.path=C:\Oracl eBI\oc4j_b i\j2ee\hom e\oc4j.jar -start oracle.oc4j.loader.boot.Bo otStrap -description "OracleBIEEOC4JService2" -err c:\OracleBI\stderr.txt
http://javaservice.objectweb.org/docs/devdocs/devcmds.html
"...
Example Command
A simple example might look like the following:
JavaService.exe -install "My Service" c:\j2sdk\jre\bin\server\jv
This would create a service that, when started, would create a JVM from the JDK in c:\j2sdk using a classpath set to be c:\app\classes.jar. It would then call the main method of the com.my.ExampleClass class with a String array of length 0 (no parameters). Anything written to System.err would be redirected into the file c:\app\stderr.txt.
..."
I suggest to add the -err switch to your command and check what it says::
javaservice -install "OracleBIEEOC4J2" C:\Program Files\Java\jdk1.6.0_07\jre
javaservice -install Oracle BI EE OC4J C:\Program Files\Java\jdk1.5.0_11\jre \bin\clien t\jvm.dll -XX:MaxPermSize=128m -Djava.class.path=D:\Oracl e\OracleBI \OC4J_BI\j 2ee\home\o c4j.jar -start oracle.oc4j.loader.boot.Bo otStrap -description Oracle BI EE OC4J Service
The above is from the blog page you got this from.
Notice that sections that have quotes. The Program Files directory has a space so you must put that in quotes. You have taken care of the service name and description by taking out the spaces, but if I am not mistaken the -D portion of this is meant to be the program parameters for launching service, so it shoudl be passed as string to creation of service instead of used as an option of the statement you are currently calling but I may be wrong there. I would try those two things.
You will need to uninstall the service instance you have already created.
http://javaservice.objectweb.org/docs/usrdocs/usrcmds.html
Before and after trying my suggestion, you can check the logs to see if anything being traced there also.
The above is from the blog page you got this from.
Notice that sections that have quotes. The Program Files directory has a space so you must put that in quotes. You have taken care of the service name and description by taking out the spaces, but if I am not mistaken the -D portion of this is meant to be the program parameters for launching service, so it shoudl be passed as string to creation of service instead of used as an option of the statement you are currently calling but I may be wrong there. I would try those two things.
You will need to uninstall the service instance you have already created.
http://javaservice.objectweb.org/docs/usrdocs/usrcmds.html
Before and after trying my suggestion, you can check the logs to see if anything being traced there also.
ASKER
javaservice -install OracleBIEEOC4J3 C:\Program Files\Java\jdk1.6.0_07\jre \bin\clien t\jvm.dll -XX:MaxPermSize=128m -Djava.class.path=C:\Oracl eBI\oc4j_b i\j2ee\hom e\oc4j.jar -start oracle.oc4j.loader.boot.Bo otStrap -description OracleBIEEOC4JService3 -err C:\oc4jservice\stderr.txt
I get error message:
The last 2 parameters (from '-err') were not recognised
JavaService install command parameters not valid, or incomplete
The Program Files directory has a space so you must put that in quotes.
I do have quotes around, the cut and paste show in the posting as special chars
I get error message:
The last 2 parameters (from '-err') were not recognised
JavaService install command parameters not valid, or incomplete
The Program Files directory has a space so you must put that in quotes.
I do have quotes around, the cut and paste show in the posting as special chars
ASKER
mwvisa1,
I did pass a string. Is this what you meant
-Djava.class.path=C:\Oracl eBI\oc4j_b i\j2ee\hom e\oc4j.jar
I did pass a string. Is this what you meant
-Djava.class.path=C:\Oracl
Yes I was talking about doing this:
"C:\Program Files\Java\jdk1.6.0_07\jre \bin\clien t\jvm.dll" <--- sounds like you have this already
And this:
"-Djava.class.path=C:\Orac leBI\oc4j_ bi\j2ee\ho me\oc4j.ja r"
I just noticed now that the pasted copy didn't carry through because of the special characters. You have to delete those and retype all double quotes in places shown by those special characters on the website.
"C:\Program Files\Java\jdk1.6.0_07\jre
And this:
"-Djava.class.path=C:\Orac
I just noticed now that the pasted copy didn't carry through because of the special characters. You have to delete those and retype all double quotes in places shown by those special characters on the website.
ASKER
This is the message from the event log: Does it give any clue
The LoadLibrary function failed for the following reason: The specified module could not be found.
.
Thanks
The LoadLibrary function failed for the following reason: The specified module could not be found.
.
Thanks
Think that is pointing to the fact that it can't find oracle.oc4j.loader.boot.Bo otStrap in the classpath. I may be mistaken, but did you remove the service and re-run command with quotes as indicated above.
If so, check that the service parameters include the class path setting.
If it does not, then try adding the C:\OracleBI\oc4j_bi\j2ee\h ome\oc4j.j ar archive to your class path manually.
If so, check that the service parameters include the class path setting.
If it does not, then try adding the C:\OracleBI\oc4j_bi\j2ee\h
ASKER
mwvisa1,
This the command "cut and paste from website' worked
javaservice -install "Oracle BI EE OC4J" "C:\Program Files\Java\jdk1.6.0_07\jre \bin\clien t\jvm.dll" -XX:MaxPermSize=128m "-Djava.class.path=C:\Orac leBI\oc4j_ bi\j2ee\ho me\oc4j.ja r" -start oracle.oc4j.loader.boot.Bo otStrap -description "Oracle BI EE OC4J Service"
I could not find any difference from the one which did not work
If you could find, can you post it
Thanks
This the command "cut and paste from website' worked
javaservice -install "Oracle BI EE OC4J" "C:\Program Files\Java\jdk1.6.0_07\jre
I could not find any difference from the one which did not work
If you could find, can you post it
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
hardcoded ? Good point
Thanks
Thanks
ASKER