|
From: Hickey, T. (INTERN) <Tre...@si...> - 2012-04-25 16:47:33
|
So I did try Christian's advice on using the WrapperSimpleJarApp and it looks like my application is working. It seems to be a much easier way to integrate JAR applications. Anyways, thank you for the great advice. Sincerely, Trever Hickey ________________________________ From: jeroen vranckx [mailto:jvr...@gm...] Sent: Monday, April 23, 2012 10:32 PM To: wra...@li... Subject: Re: [Wrapper-user] FW: Advice on configuring the Java Service Wrapper for I/O heavy application sry, missed christian's email there ^^ grtz, jeroen On 24 April 2012 07:29, jeroen vranckx <jvr...@gm...<mailto:jvr...@gm...>> wrote: INFO | jvm 1 | 2012/04/23 15:27:49 | WrapperSimpleApp Error: Unable to locate the class CenturaDataCollectionProgram.Program : java.lang.ClassNotFoundException: CenturaDataCollectionProgram.Program looks like indeed, that the wrappersimpleapp class can't find your own main-class. Make sure that the main-class name of your application that you have specified is correct. I am using the "Default Package" in Eclipse, so I was wondering if this has been an issue when detecting a class? Do I have to use the unzipped version of my JAR file and/or include the dependent jar files in my class path? First check if the main-class is correct. It could be indeed, that the problem is, that you need to specify all the jar files which are needed to run the application in your classpath. You can always try the process of trial and error. You can't do much wrong by trying different things out. As christian will probably know more of this, and will be able to give you specific information, it's best for his response maybe. grtz, jeroen On 24 April 2012 00:50, Hickey, Trever (INTERN) <Tre...@si...<mailto:Tre...@si...>> wrote: Thank you for catching that parameter being commented out. It was commented out in my default file, so I wasn't catching it. I am now getting this error. STATUS | wrapper | 2012/04/23 15:27:47 | --> Wrapper Started as Console STATUS | wrapper | 2012/04/23 15:27:47 | Java Service Wrapper Community Edition 32-bit 3.5.14 STATUS | wrapper | 2012/04/23 15:27:48 | Copyright (C) 1999-2011 Tanuki Software, Ltd. All Rights Reserved. STATUS | wrapper | 2012/04/23 15:27:48 | http://wrapper.tanukisoftware.com<http://wrapper.tanukisoftware.com/> STATUS | wrapper | 2012/04/23 15:27:48 | STATUS | wrapper | 2012/04/23 15:27:48 | Launching a JVM... INFO | wrapper | 2012/04/23 15:27:48 | Command: "C:\WINDOWS\system32\java.exe" -DReactor=Centura12 -Djava.library.path="./lib" -classpath "./lib/wrapper.jar;./CenturaDataCollectionProgram.jar" -Dwrapper.key="OGQRdtjCQtlDJ0Da" -Dwrapper.port=32000 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -Dwrapper.pid=3064 -Dwrapper.version="3.5.14" -Dwrapper.native_library="wrapper" -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1 org.tanukisoftware.wrapper.WrapperSimpleApp CenturaDataCollectionProgram.Program INFO | jvm 1 | 2012/04/23 15:27:49 | WrapperManager: Initializing... INFO | jvm 1 | 2012/04/23 15:27:49 | WrapperSimpleApp Error: Unable to locate the class CenturaDataCollectionProgram.Program : java.lang.ClassNotFoundException: CenturaDataCollectionProgram.Program INFO | jvm 1 | 2012/04/23 15:27:49 | INFO | jvm 1 | 2012/04/23 15:27:49 | WrapperSimpleApp Usage: INFO | jvm 1 | 2012/04/23 15:27:49 | java org.tanukisoftware.wrapper.WrapperSimpleApp {app_class{/app_method}} [app_arguments] INFO | jvm 1 | 2012/04/23 15:27:49 | INFO | jvm 1 | 2012/04/23 15:27:49 | Where: INFO | jvm 1 | 2012/04/23 15:27:49 | app_class: The fully qualified class name of the application to run. INFO | jvm 1 | 2012/04/23 15:27:49 | app_arguments: The arguments that would normally be passed to the INFO | jvm 1 | 2012/04/23 15:27:49 | application. ERROR | wrapper | 2012/04/23 15:27:50 | JVM exited while loading the application. I am using the "Default Package" in Eclipse, so I was wondering if this has been an issue when detecting a class? Do I have to use the unzipped version of my JAR file and/or include the dependent jar files in my class path? Sincerely, Trever Hickey ________________________________ From: jeroen vranckx [mailto:jvr...@gm...<mailto:jvr...@gm...>] Sent: Monday, April 23, 2012 2:29 PM To: wra...@li...<mailto:wra...@li...> Subject: Re: [Wrapper-user] FW: Advice on configuring the Java Service Wrapper for I/O heavy application Hey, ERROR | wrapper | 2012/04/23 08:56:29 | JVM exited while loading the application. This line doesn't give much information about what is going on. Can you post some additional information? also, i scrolled through your config and noticed the following which maybe could give you some issues. 1) delete that commented out wrappertest.jar and shift everything one up, so you'll get this.probably won't do anything, but i have something against unnecessairy commando's ^^ wrapper.java.classpath.1=./lib/wrapper.jar wrapper.java.classpath.2=./CenturaDataCollectionProgram.jar 2)You actually kinda guessed it yourself, but the wrappersimpleapp class will need to know what the main class is of your own application. You need to specify the mainclass-name of your own application with application parameters. I can see the following commented out in the config file: # Application parameters. Add parameters as needed starting from 1 #wrapper.app.parameter.1= CenturaDataCollectionProgram.Program change it to: wrapper.app.parameter.1= CenturaDataCollectionProgram.Program grtz, jeroen On 23 April 2012 18:01, Hickey, Trever (INTERN) <Tre...@si...<mailto:Tre...@si...>> wrote: Dear Christian, I took your advice and thank you again for clarifying the class path issue I had. I made the changes and I am now getting a different error. I turned on the feature that prints out what is being called at the command line to help clarify some of the issues I am having. STATUS | wrapper | 2012/04/23 08:56:26 | --> Wrapper Started as Console STATUS | wrapper | 2012/04/23 08:56:26 | Java Service Wrapper Community Edition 32-bit 3.5.14 STATUS | wrapper | 2012/04/23 08:56:26 | Copyright (C) 1999-2011 Tanuki Software, Ltd. All Rights Reserved. STATUS | wrapper | 2012/04/23 08:56:26 | http://wrapper.tanukisoftware.com<http://wrapper.tanukisoftware.com/> STATUS | wrapper | 2012/04/23 08:56:26 | STATUS | wrapper | 2012/04/23 08:56:27 | Launching a JVM... INFO | wrapper | 2012/04/23 08:56:27 | Command: "C:\WINDOWS\system32\java.exe" -DReactor=Centura12 -Djava.library.path="./lib" -classpath "./lib/wrapper.jar;./CenturaDataCollectionProgram.jar" -Dwrapper.key="sc7LFwUkpfl3IHps" -Dwrapper.port=32001 -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 -Dwrapper.pid=4716 -Dwrapper.version="3.5.14" -Dwrapper.native_library="wrapper" -Dwrapper.cpu.timeout="10" -Dwrapper.jvmid=1 org.tanukisoftware.wrapper.WrapperSimpleApp INFO | jvm 1 | 2012/04/23 08:56:27 | WrapperManager: Initializing... INFO | jvm 1 | 2012/04/23 08:56:27 | INFO | jvm 1 | 2012/04/23 08:56:27 | WrapperSimpleApp Usage: INFO | jvm 1 | 2012/04/23 08:56:27 | java org.tanukisoftware.wrapper.WrapperSimpleApp {app_class{/app_method}} [app_arguments] INFO | jvm 1 | 2012/04/23 08:56:27 | INFO | jvm 1 | 2012/04/23 08:56:27 | Where: INFO | jvm 1 | 2012/04/23 08:56:27 | app_class: The fully qualified class name of the application to run. INFO | jvm 1 | 2012/04/23 08:56:27 | app_arguments: The arguments that would normally be passed to the INFO | jvm 1 | 2012/04/23 08:56:27 | application. ERROR | wrapper | 2012/04/23 08:56:29 | JVM exited while loading the application. If this is the case, do I have to do something to my runnable JAR or to the conf file to pass the app_class to it? Sincerely, Trever Hickey ________________________________ From: Christian Mueller [mailto:chr...@ta...<mailto:chr...@ta...>] Sent: Sunday, April 22, 2012 10:50 PM To: wra...@li...<mailto:wra...@li...> Subject: Re: [Wrapper-user] FW: Advice on configuring the Java Service Wrapper for I/O heavy application Hello Trever, I noticed the following in your conf file: wrapper.java.mainclass=org.tanukisoftware.wrapper.test.WrapperSimpleApp please note that the classname is incorrect, it should read as: wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp Furthermore, thanks to the directory structure, you attached, I'd like to point out that relative pathes in the conf file are relative to the location of the wrapper.exe file. In your directory structure, wrapper.exe (and the working dir) is "C:\Documents and Settings\hickeyex\Desktop\CenturaDataCollectionProgramDeployment\CenturaDataCollectionProgram12\" When you defined your classpath elements, you had the following properties: wrapper.java.classpath.2=../lib/wrapper.jar which translated means: C:\Documents and Settings\hickeyex\Desktop\CenturaDataCollectionProgramDeployment\CenturaDataCollectionProgram12\..\lib\wrapper.jar this path doesn't exist, however. So in order to specify the class path correctly, please change this property (and the others) to wrapper.java.classpath.2=./lib/wrapper.jar wrapper.java.classpath.3=./CenturaDataCollectionProgram.jar wrapper.java.library.path.1=./lib Hope this information helps you out. Cheers, Christian On Sat, Apr 21, 2012 at 1:27 AM, Hickey, Trever (INTERN) <Tre...@si...<mailto:Tre...@si...>> wrote: I am still running into some issues with the installation even with those changes. So here is my current conf file. I have included a document with a few pictures of my programs folder layout with the Java Service Wrapper setup I also have included a print out of the folder directory with everything in it instead if that works better. Thank you, Trever ________________________________ From: Christian Mueller [mailto:chr...@ta...<mailto:chr...@ta...>] Sent: Thursday, April 19, 2012 8:50 PM To: wra...@li...<mailto:wra...@li...> Subject: Re: [Wrapper-user] FW: Advice on configuring the Java Service Wrapper for I/O heavy application Hello Trever, A java.lang.ClassNotFoundException means that the JVM didn't find the wrapper.jar file on the class path. could you please verify that the jar file is added correctly to the class path? >From your first mail, I can see that you have the following setting: wrapper.java.classpath.2=../lib/wrapper.jar Furthermore, you need to add your jar file also to the classpath: wrapper.java.classpath.3=./CenturaDataCollectionProgram.jar Lastly, the name of your main class is commented out: #wrapper.app.parameter.1=CenturaDataCollectionProgram.Program If that's the correct name of your main class, please remove the comments. Hope this information helps you out. Cheers, Christian On Fri, Apr 20, 2012 at 1:45 AM, Hickey, Trever (INTERN) <Tre...@si...<mailto:Tre...@si...>> wrote: Hello again, I tried your solution about removing the line, and instead I got this error, STATUS | wrapper | 2012/04/19 09:41:19 | Launching a JVM... INFO | jvm 5 | 2012/04/19 09:41:19 | java.lang.NoClassDefFoundError: org/tanukisoftware/wrapper/test/WrapperSimpleApp INFO | jvm 5 | 2012/04/19 09:41:19 | Caused by: java.lang.ClassNotFoundException: org.tanukisoftware.wrapper.test.WrapperSimpleApp INFO | jvm 5 | 2012/04/19 09:41:19 | at java.net.URLClassLoader$1.run(Unknown Source) INFO | jvm 5 | 2012/04/19 09:41:19 | at java.security.AccessController.doPrivileged(Native Method) INFO | jvm 5 | 2012/04/19 09:41:19 | at java.net.URLClassLoader.findClass(Unknown Source) INFO | jvm 5 | 2012/04/19 09:41:19 | at java.lang.ClassLoader.loadClass(Unknown Source) INFO | jvm 5 | 2012/04/19 09:41:19 | at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) INFO | jvm 5 | 2012/04/19 09:41:19 | at java.lang.ClassLoader.loadClass(Unknown Source) INFO | jvm 5 | 2012/04/19 09:41:19 | Could not find the main class: org.tanukisoftware.wrapper.test.WrapperSimpleApp. Program will exit. ERROR | wrapper | 2012/04/19 09:41:19 | JVM exited while loading the application. FATAL | wrapper | 2012/04/19 09:41:19 | There were 5 failed launches in a row, each lasting less than 300 seconds. Giving up. FATAL | wrapper | 2012/04/19 09:41:19 | There may be a configuration problem: please check the logs. STATUS | wrapper | 2012/04/19 09:41:19 | <-- Wrapper Stopped Now it seems like the program is not recognizing my program at all. My program is stored in an executable JAR file, so wouldn't I need this line wrapper.java.additional.2= -jar "./CenturaDataCollectionProgram.jar" to execute my program? Sincerely, Trever Hickey ________________________________ From: Christian Mueller [mailto:chr...@ta...<mailto:chr...@ta...>] Sent: Thursday, April 12, 2012 1:42 AM To: wra...@li...<mailto:wra...@li...> Subject: Re: [Wrapper-user] FW: Advice on configuring the Java Service Wrapper for I/O heavy application Hello Trever, thank you for your mail. The reason, your JVM stops after 30 seconds is basically because of a small misconfiguration. Please get rid of the following line in your conf file: wrapper.java.additional.2= -jar "./CenturaDataCollectionProgram.jar" Actually, with this line you kind of intercept the logic of how the JVM will interpret the command line.... Hope this helps you out. Best Regards, Christian On Thu, Apr 12, 2012 at 4:27 AM, Hickey, Trever (INTERN) <Tre...@si...<mailto:Tre...@si...>> wrote: Hi, This is my first time trying to post here, so here it goes. I am trying to turn my Java Application into a Windows service using Simple Server App class. I am using Java Service Wrapper Community Edition 32-bit 3.5.14 Copyright (C) 1999-2011 Tanuki Software, Ltd. All Rights Reserved. http://wrapper.tanukisoftware.com<http://wrapper.tanukisoftware.com/> on Windows XP SP 3. I have also included my log file and conf file. The errors I think it most likely relates to are ERROR | wrapper | 2012/04/11 11:37:40 | Startup failed: Timed out waiting for a signal from the JVM. ADVICE | wrapper | 2012/04/11 11:37:40 | ADVICE | wrapper | 2012/04/11 11:37:40 | ------------------------------------------------------------------------ ADVICE | wrapper | 2012/04/11 11:37:40 | Advice: ADVICE | wrapper | 2012/04/11 11:37:40 | The Wrapper consists of a native component as well as a set of classes ADVICE | wrapper | 2012/04/11 11:37:40 | which run within the JVM that it launches. The Java component of the ADVICE | wrapper | 2012/04/11 11:37:40 | Wrapper must be initialized promptly after the JVM is launched or the ADVICE | wrapper | 2012/04/11 11:37:40 | Wrapper will timeout, as just happened. Most likely the main class ADVICE | wrapper | 2012/04/11 11:37:40 | specified in the Wrapper configuration file is not correctly initializing ADVICE | wrapper | 2012/04/11 11:37:40 | the Wrapper classes: ADVICE | wrapper | 2012/04/11 11:37:40 | org.tanukisoftware.wrapper.test.WrapperSimpleApp ADVICE | wrapper | 2012/04/11 11:37:40 | While it is possible to do so manually, the Wrapper ships with helper ADVICE | wrapper | 2012/04/11 11:37:40 | classes to make this initialization processes automatic. ADVICE | wrapper | 2012/04/11 11:37:40 | Please review the integration section of the Wrapper's documentation ADVICE | wrapper | 2012/04/11 11:37:40 | for the various methods which can be employed to launch an application ADVICE | wrapper | 2012/04/11 11:37:40 | within the Wrapper: ADVICE | wrapper | 2012/04/11 11:37:40 | http://wrapper.tanukisoftware.com/doc/english/integrate.html ADVICE | wrapper | 2012/04/11 11:37:40 | ------------------------------------------------------------------------ ADVICE | wrapper | 2012/04/11 11:37:40 | So far it looks like my application starts correctly, but terminates after about 30 seconds when it then opens a new JVM and repeats for 4 more times. I believe this might be one of two issues. One my application stays constantly within my main method and doesn't exit out. I think there are a couple of parameters that can be set to handle this, but I haven't had much luck. Second idea is my application is very I/O heavy. My program is constantly collecting data from a tool [using a special communication protocol] and writing it to a log file. Could the JVM be timing out because of the heavy I/O and if so, is their a way around this so my program can still be a Windows Service? If anyone has any advice for handling this type of error I would appreciate it. Thank you, Trever This communication and any files or attachments transmitted with it may contain information that is copyrighted or confidential and exempt from disclosure under applicable law. It is intended solely for the use of the individual or the entity to which it is addressed. If you are not the intended recipient, you are hereby notified that any use, dissemination, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us at once so that we may take the appropriate action and avoid troubling you further. Thank you for your cooperation. Please contact your local IT staff or email in...@si...<mailto:in...@si...?subject=Disclaimer> if you need assistance. ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Wrapper-user mailing list Wra...@li...<mailto:Wra...@li...> https://lists.sourceforge.net/lists/listinfo/wrapper-user This communication and any files or attachments transmitted with it may contain information that is copyrighted or confidential and exempt from disclosure under applicable law. It is intended solely for the use of the individual or the entity to which it is addressed. If you are not the intended recipient, you are hereby notified that any use, dissemination, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us at once so that we may take the appropriate action and avoid troubling you further. Thank you for your cooperation. Please contact your local IT staff or email in...@si...<mailto:in...@si...>if you need assistance. ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Wrapper-user mailing list Wra...@li...<mailto:Wra...@li...> https://lists.sourceforge.net/lists/listinfo/wrapper-user This communication and any files or attachments transmitted with it may contain information that is copyrighted or confidential and exempt from disclosure under applicable law. It is intended solely for the use of the individual or the entity to which it is addressed. If you are not the intended recipient, you are hereby notified that any use, dissemination, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us at once so that we may take the appropriate action and avoid troubling you further. Thank you for your cooperation. Please contact your local IT staff or email in...@si...<mailto:in...@si...>if you need assistance. ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Wrapper-user mailing list Wra...@li...<mailto:Wra...@li...> https://lists.sourceforge.net/lists/listinfo/wrapper-user This communication and any files or attachments transmitted with it may contain information that is copyrighted or confidential and exempt from disclosure under applicable law. It is intended solely for the use of the individual or the entity to which it is addressed. If you are not the intended recipient, you are hereby notified that any use, dissemination, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us at once so that we may take the appropriate action and avoid troubling you further. Thank you for your cooperation. Please contact your local IT staff or email in...@si...<mailto:in...@si...>if you need assistance. ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Wrapper-user mailing list Wra...@li...<mailto:Wra...@li...> https://lists.sourceforge.net/lists/listinfo/wrapper-user This communication and any files or attachments transmitted with it may contain information that is copyrighted or confidential and exempt from disclosure under applicable law. It is intended solely for the use of the individual or the entity to which it is addressed. If you are not the intended recipient, you are hereby notified that any use, dissemination, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us at once so that we may take the appropriate action and avoid troubling you further. Thank you for your cooperation. Please contact your local IT staff or email in...@si...<mailto:in...@si...>if you need assistance. ------------------------------------------------------------------------------ For Developers, A Lot Can Happen In A Second. Boundary is the first to Know...and Tell You. Monitor Your Applications in Ultra-Fine Resolution. Try it FREE! http://p.sf.net/sfu/Boundary-d2dvs2 _______________________________________________ Wrapper-user mailing list Wra...@li...<mailto:Wra...@li...> https://lists.sourceforge.net/lists/listinfo/wrapper-user This communication and any files or attachments transmitted with it may contain information that is copyrighted or confidential and exempt from disclosure under applicable law. It is intended solely for the use of the individual or the entity to which it is addressed. If you are not the intended recipient, you are hereby notified that any use, dissemination, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us at once so that we may take the appropriate action and avoid troubling you further. Thank you for your cooperation. Please contact your local IT staff or email in...@si... if you need assistance. |