3.0.37a NT service not working?

Hi,

I'm running 3.0.37a and the NT service won't start. I'm getting the following running the wrapper.exe program from the console (with -c instead of -s):

java.lang.NoSuchMethodError: com.screenscraper.util.Updater.handleLocalUpdate()

Any workarounds?

3.0.37a NT service not working?

Hi,

Well, this is a bit odd because that same line of code gets executed whether you're running screen-scraper in workbench or server mode. You said that the workbench works fine for you, correct?

This seems odd to ask, but would you mind un-jarring your screen-scraper.jar file to ensure that the Updater.class file is present? You could even decompile it to look for that method (we obviously don't obfuscate the code). Also, I don't believe it makes a difference, but you should also have an updater.jar file in your screen-scraper folder. Could you check for that as well?

Thanks,

Todd

3.0.37a NT service not working?

Ok, I found a way to crank up logging: set wrapper.logfile.loglevel=DEBUG in resources/conf/wrapper.conf.

Now the log/wrapper.log contains the NoSuchMethodError which the "wrapper.exe -c" console mode had been reporting, even when I run it through the fully supported start_service.bat. A section of the log is included below.

As I mentioned before, it really looks like the method com.screenscraper.util.Updater.handleLocalUpdate() is no longer present. It appears that ControllerMain.main is trying to call it on line 537 of ControllerMain.java resulting in the VM throwing the exception, and bringing down the process.

I'm surprised this doesn't repro for you on 3.0.37a...

INFO   | jvm 1    | 2007/08/21 22:23:10 | WrapperStartStopApp: start(args) Will wait up to 2 seconds for the main method to complete.
INFO   | jvm 1    | 2007/08/21 22:23:10 | WrapperStartStopApp: invoking start main method
INFO   | jvm 1    | 2007/08/21 22:23:10 |
INFO   | jvm 1    | 2007/08/21 22:23:10 | WrapperStartStopApp: Encountered an error running start main: java.lang.NoSuchMethodError: com.screenscraper.util.Updater.handleLocalUpdate()V
INFO   | jvm 1    | 2007/08/21 22:23:10 | java.lang.NoSuchMethodError: com.screenscraper.util.Updater.handleLocalUpdate()V
INFO   | jvm 1    | 2007/08/21 22:23:10 |       at com.screenscraper.controller.ControllerMain.main(ControllerMain.java:537)
INFO   | jvm 1    | 2007/08/21 22:23:10 |       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO   | jvm 1    | 2007/08/21 22:23:10 |       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
INFO   | jvm 1    | 2007/08/21 22:23:10 |       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
INFO   | jvm 1    | 2007/08/21 22:23:10 |       at java.lang.reflect.Method.invoke(Unknown Source)
INFO   | jvm 1    | 2007/08/21 22:23:10 |       at org.tanukisoftware.wrapper.WrapperStartStopApp.run(WrapperStartStopApp.java:224)
INFO   | jvm 1    | 2007/08/21 22:23:10 |       at java.lang.Thread.run(Unknown Source)
INFO   | jvm 1    | 2007/08/21 22:23:10 | WrapperStartStopApp: start(args) end.  Main Completed=true, exitCode=1
INFO   | jvm 1    | 2007/08/21 22:23:10 | WrapperManager.stop(1) called by thread: Wrapper-Connection
INFO   | jvm 1    | 2007/08/21 22:23:10 | Send a packet STOP : 1
DEBUG  | wrapperp | 2007/08/21 22:23:10 | read a packet STOP : 1
DEBUG  | wrapper  | 2007/08/21 22:23:10 | JVM requested a shutdown. (1)

I'm actually more surprised that tanukisoftware's wrapper program doesn't think an unhandled exception is an Error level log event... :shock:

3.0.37a NT service not working?

Running screen-scraper from the java VM command-line I get no error on the console or in the log\error.log file. I had deleted it before starting

I don't have 2 java.exe processes - just one.

I know the service doesn't work because I get this on the command line:

C:\Program Files\screen-scraper professional edition>server.bat start
Starting the screen-scraper service...
Stopping...
The screen-scraper service was launched, but failed to start.
Press any key to continue . . .

This message is repeated in the log\wrapper.log file and in the Windows event log. No other messages could be found anywhere.

3.0.37a NT service not working?

Hi,

Thanks for the reply. Win XP SP2 should be fine.

If you could, going forward, let's completely remove running wrapper.exe in console mode from the picture.

When you run screen-scraper as I described in my earlier email (jre\bin\java...), is it true that you get no error messages in either the command prompt or the log\error.log file? By the way, you'll want to be sure to delete your error.log file before testing this. If it is the case that you get no error messages, how are you determining that it's not working? Do you have two java.exe processes running in the Windows Task Manager?

Thanks,

Todd

3.0.37a NT service not working?

Sure thing -

I'm running Win XP SP 2. I am still getting the NoSuchMethodError when I run Wrapper.exe in console mode, but not if I start screenscraper from a java VM. However, the NT Service still won't start.

3.0.37a NT service not working?

Hi,

Just a couple more questions to help troubleshoot

1. What operating system are you running?
2. When you say that it "fails in the same way", could you clarify? It sounds like you're no longer getting the NoSuchMethodError (otherwise you'd see an error), so it would help to know just how it's behaving.

Thanks,

Todd

3.0.37a NT service not working?

Invoking it with the above command line runs without the error. No other errors are observed, as well. The service fails in the same way, however, and no errors are logged from that failure.

3.0.37a NT service not working?

Hi,

Here's what I'd recommend:

1. Ensure that you've disabled any anti-spyware or anti-virus software on your computer. It's possible that ports could be getting blocked by these programs.
2. Ensure no instances of screen-scraper are currently running. To be sure, you should use the Windows Task Manager to make certain you have no java.exe or javaw.exe processes running.
2. Open a DOS prompt and navigate to the folder where you have screen-scraper installed.
3. Type the following at the DOS prompt:

jre\bin\java -Xmx128M -jar screen-scraper.jar --start-server --interactive

4. Check for any error messages in the DOS prompt (disregard the message about not being able to use JSP files) and in the log\error.log file.

Hopefully that turns something up. Please write back to let me know how it goes.

Thanks,

Todd

3.0.37a NT service not working?

I'm just trying to get the service to run.

Why isn't it running? Nothing is written to the log file.

I start it via the batch file, and it quits, saying the service cannot be started.

3.0.37a NT service not working?

Hi,

That's great that you're so familiar with wrapper.exe. If you'd like to pursue debugging screen-scraper by invoking the wrapper.exe directly, you'll need to do that on your own, as it's not a method we support or are familiar with. The wrapper.exe is part of the Java Service Wrapper program (http//wrapper.tanukisoftware.org/doc/english/introduction.html), so you can find more documentation there.

If you run out of ideas pursuing that route, please feel free to post back, and we'd be happy to help.

Kind regards,

Todd

3.0.37a NT service not working?

Hi Todd,

Please let me be clear: I am aware of the operation of wrapper.exe. I know that there is the start service and stop service batch files which are used during normal operation of the service. However, this is not a normal execution. I am debugging why the service doesn't start when I use the batch files. For this, it is reasonable, and probably necessary, to start wrapper.exe in _console mode_. Note that I am not just running wrapper.exe in service mode from the console. I am explicitly running it in console mode by changing the typical "-s" switch to the "-c" switch. What this does is to initialize the screen-scraper java class in a Win32 console process instead of a service process, and connects the standard out and standard error streams to the console. This is how I got the stack trace which indicates the NoSuchMethodError being thrown as the cause of why the service isn't starting by the batch files.

3.0.37a NT service not working?

Hi,

You actually don't want to run wrapper.exe directly. On Windows, there are three ways to start the server

1. Under the "Start" menu, use the "Start server" shortcut for the "screen-scraper professional edition" program group.
2. Launch the "start_server.bat" file, located in the directory where screen-scraper is installed.
3. In the Windows "Services" control panel applet, start the "screen-scraper" service.

Just let us know if we can clarify further.

Kind regards,

Todd Wilson

3.0.37a NT service not working?

Thanks for the reply.

Perhaps I wasn't clear in my original post. My problem is that the SS NT service isn't starting. I wanted to find out why, and the wrapper.log file wasn't helpful. I know that SS runs as an NT service via the wrapper.exe program. This program allows running in a console with the '-c' switch rather than the '-s' switch, so I did this in order to get better diagnostics. This, indeed, worked to this end, since it gave me a stack trace on the console (which was absent from the log file) when the exception - java.lang.NoSuchMethodError - crashed the program.

My workbench runs fine.

3.0.37a NT service not working?

rplaire,

You don't want to attempt to run the wrapper.exe executable from the command line. If you're attempting to start the workbench from the command line the following will start the workbench with anything sent to standard out written to the command window.

jre\bin\java -Xbootclasspath/p:lib/dom.jar -Xmx256M -jar screen-scraper.jar

Run this code from within the screen-scraper installation directory.

Thanks,
Scott