|
From: Leif M. <le...@ta...> - 2004-09-04 16:13:41
|
Christopher, Looking closely at the stack trace below, I noticed that you are using the WrapperSimpleApp rather than the WrapperStartStopApp class. If you correct the main class to be: wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperStartStopApp and then uncomment the properties that you commented out then I bet it will work. With the WrapperSimpleApp helper class, all of those parameters were being passed to the Bootstrap class on startup. My guess is that the class is seeing the final argument and thinking that you are telling it to shutdown. Cheers, Leif Christopher Haskins wrote: > Hi, > > I’m trying to get the wrapper to add Tomcat as a service under NT/XP. > > I have followed the instructions at, > http://wrapper.tanukisoftware.org/doc/english/integrate-start-stop-win.html > > But when I run ‘Tomcat.bat’ in the console I get the following; > > STATUS | wrapper | 2004/08/31 16:02:26 | --> Wrapper Started as Console > > STATUS | wrapper | 2004/08/31 16:02:26 | Launching a JVM... > > INFO | jvm 1 | 2004/08/31 16:02:27 | Wrapper (Version 3.1.1) > http://wrapper.tanukisoftware.org > > INFO | jvm 1 | 2004/08/31 16:02:27 | > > INFO | jvm 1 | 2004/08/31 16:02:28 | Catalina.stop: > java.net.ConnectException: Connection refused: connect > > INFO | jvm 1 | 2004/08/31 16:02:28 | java.net.ConnectException: > Connection refused: connect > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > java.net.PlainSocketImpl.socketConnect(Native Method) > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305) > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171) > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158) > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > java.net.Socket.connect(Socket.java:452) > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > java.net.Socket.connect(Socket.java:402) > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > java.net.Socket.<init>(Socket.java:309) > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > java.net.Socket.<init>(Socket.java:124) > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > org.apache.catalina.startup.Catalina.stopServer(Catalina.java:436) > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > java.lang.reflect.Method.invoke(Method.java:324) > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > org.apache.catalina.startup.Bootstrap.stopServer(Bootstrap.java:322) > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:400) > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > java.lang.reflect.Method.invoke(Method.java:324) > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:136) > > INFO | jvm 1 | 2004/08/31 16:02:28 | at > java.lang.Thread.run(Thread.java:534) > > STATUS | wrapper | 2004/08/31 16:02:30 | <-- Wrapper Stopped > > Now to me it looks like the wrapper is trying to invoke the ‘stop’ > command before it has started tomcat. So I commented out the > ‘wrapper.app.parameters’ with the stop info in. Example; > > # Application parameters. Add parameters as needed starting from 1 > > #wrapper.app.parameter.1=<YourMainClass> > > # The first application parameter is the name of the class whose main > > # method is to be called when the application is launched. The class > > # name is followed by the number of parameters to be passed to its main > > # method. Then comes the actual parameters. > > wrapper.app.parameter.1=org.apache.catalina.startup.Bootstrap > > wrapper.app.parameter.2=1 > > wrapper.app.parameter.3=start > > # The start parameters are followed by the name of the class whose main > > # method is to be called to stop the application. The stop class name > > # is followed by a flag which controls whether or not the Wrapper should > > # wait for all non daemon threads to complete before exiting the JVM. > > # The flag is followed by the number of parameters to be passed to the > > # stop class's main method. Finally comes the actual parameters. > > #wrapper.app.parameter.4=org.apache.catalina.startup.Bootstrap > > #wrapper.app.parameter.5=true > > #wrapper.app.parameter.6=1 > > #wrapper.app.parameter.7=stop > > Now everything seems to work ok. Started up in the console and also > added it as a service, with tomcat starting and stopping. > > Does anyone see a problem with me removing the 4 lines from my conf > file. Why does it work? Are they not required for Tomcat 5? > > Thanks for any help/advice. > > Chris Haskins > > Java Developer > > Piper Group plc > > Email: cha...@pi... <mailto:cha...@pi...> > > Tel: + 44 (0) 1454 284900 > > Fax: + 44 (0) 1454 284950 > > www.piper-group.com <http://www.piper-group.com/> > > *Information contained in this e-mail is intended for the use of the > addressee only, and is confidential and may be the subject of legal > professional privilege. Any dissemination, distribution, copying or > use of this communication without permission of the addressee is > strictly prohibited. The views expressed* *in this communication may > not necessarily be the views held by Piper Group plc.*** > |