World Wind Forums

Go Back   World Wind Forums > WorldWind JAVA forums > Server Discussion

Server Discussion Sever discussion for configuring, setting up and supporting your own World wind tile server

Reply
 
Thread Tools Display Modes
Old 10-18-2011, 09:10 PM   #1
TheGuardian
Junior Member
 
Join Date: Mar 2010
Posts: 13
TheGuardian is on a distinguished road
Default Problems with WW Servers as a service

I have some problems with installing World Wind Server as a server using the "InstallAsWindowsService" script.

* I have a fresh installed jre 1.7.0 and jdk1.7.0 installation, 64 bit on a 2008 server.
* I am able to run "StartWMS.bat" and that works fine.

I modified InstallAsWindowsService.bat to reflect the jdk version. I also changed c:/opt/wms to c:/apps/wms as that is the pointer to the directory containing all the files.

When I run the script as an administrator, I got the following error: "wmsd.exe" is not reconginized as a command. It is a result of running c:\windows\system32>wmsd.exe //IS/wmsd blablabla

If I navigate (using command line, as admin) to c:\apps\wms and launch the InstallAsWindowsService.bat, all works fine and the service is created.

If I try to start the service, I get a error, which could be traced to:

[2011-10-18 21:51:18] [info] ( :0 ) Commons Daemon procrun finished
[2011-10-18 21:52:13] [debug] ( prunsrv.c:1494) Commons Daemon procrun log initialized
[2011-10-18 21:52:13] [info] ( :0 ) Commons Daemon procrun (1.0.5.0 64-bit) started
[2011-10-18 21:52:13] [info] ( :0 ) Running 'wmsd' Service...
[2011-10-18 21:52:13] [debug] ( prunsrv.c:1246) Inside ServiceMain...
[2011-10-18 21:52:13] [info] ( :0 ) Starting service...
[2011-10-18 21:52:13] [debug] ( javajni.c:206 ) loading jvm 'C:\Program Files\Java\jdk1.7.0\jre\bin\server\jvm.d ll'
[2011-10-18 21:52:13] [debug] ( javajni.c:251 ) Setting DLL search path to 'C:\Program Files\Java\jdk1.7.0\jre\bin\server'
[2011-10-18 21:52:13] [debug] ( javajni.c:251 ) Setting DLL search path to 'C:\Program Files\Java\jdk1.7.0\jre\bin'
[2011-10-18 21:52:13] [debug] ( javajni.c:660 ) Jvm Option[0] -Djava.awt.headless=true
[2011-10-18 21:52:13] [debug] ( javajni.c:660 ) Jvm Option[1] -Dsun.java2d.noddraw=true
[2011-10-18 21:52:13] [debug] ( javajni.c:660 ) Jvm Option[2] -Djava.util.logging.config.file=C:\Apps\W MS\wms.logging.properties
[2011-10-18 21:52:13] [debug] ( javajni.c:660 ) Jvm Option[3] -Djava.library.path=C:\Apps\WMS\lib
[2011-10-18 21:52:13] [debug] ( javajni.c:660 ) Jvm Option[4] -Djava.class.path=C:\Apps\WMS;C:\Apps\WMS \lib;C:\Apps\WMS\lib\WMS.jar;C:\Apps\WMS \lib\gdal.jar;C:\Apps\WMS\lib\worldwind. jar;C:\Apps\WMS\lib\jogl.jar;C:\Apps\WMS \lib\gluegen-rt.jar
[2011-10-18 21:52:13] [error] ( javajni.c:810 ) FindClass gov/nasa/worldwind/servers/wms/WMSServer failed

and

2011-10-18 21:52:13 Commons Daemon procrun stdout initialized
2011-10-18 21:52:13 Commons Daemon procrun stderr initialized
java.lang.NoClassDefFoundError: gov/nasa/worldwind/servers/wms/WMSServer
Caused by: java.lang.ClassNotFoundException: gov.nasa.worldwind.servers.wms.WMSServer
at java.net.URLClassLoader$1.run(URLClassLo ader.java:366)
at java.net.URLClassLoader$1.run(URLClassLo ader.java:355)
at java.security.AccessController.doPrivile ged(Native Method)
at java.net.URLClassLoader.findClass(URLCla ssLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoa der.java:423)
at sun.misc.Launcher$AppClassLoader.loadCla ss(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoa der.java:356)

It probably has something to do with a classpath or something, but that is strange cause if I run it using startWMS.bat, all is fine..
TheGuardian is offline   Reply With Quote
Old 10-24-2011, 09:52 AM   #2
TheGuardian
Junior Member
 
Join Date: Mar 2010
Posts: 13
TheGuardian is on a distinguished road
Default

Solved it: C:\opt\wms\lib\worldwind-servers.jar was for some strange reason not in the InstallAsWindowsService.bat script..
TheGuardian is offline   Reply With Quote
Old 05-04-2012, 05:23 AM   #3
plipscomb
Junior Member
 
Join Date: Jan 2010
Location: Omaha, NE
Posts: 1
plipscomb is on a distinguished road
Default

TheGuardian,
Can you please elaborate on "Solved it: C:\opt\wms\lib\worldwind-servers.jar was for some strange reason not in the InstallAsWindowsService.bat script.." I am getting the exact same error but do not know how to fix.
plipscomb is offline   Reply With Quote
Old 05-04-2012, 09:35 AM   #4
TheGuardian
Junior Member
 
Join Date: Mar 2010
Posts: 13
TheGuardian is on a distinguished road
Default

I'm not sure what I had done exactly as it was half a year ago, but please find my InstallAsWindowsService script below. I thought it had something to do with the Set SERVICE_STARTUP_CLASS:

@echo on
SET SERVICE_NAME=wmsd
SET SERVICE_PATH=C:\opt\wms
SET SERVICE_DESCRIPTION="NASA World Wind WMS (Web Map Service)"
SET SERVICE_STARTUP_CLASS="gov.nasa.worldwin d.servers.wms.WMSServer"
SET JDK_SERVER_JVM_PATH="C:\Program Files\Java\jdk1.7.0\bin\server\jvm.dll"
REM SET JAVA_CLASSPATH="C:\Java\jdk1.6.0_25\jre\ lib\alt-rt.jar;C:\Java\jdk1.6.0_25\jre\lib\chars ets.jar;C:\Java\jdk1.6.0_25\jre\lib\depl oy.jar;C:\Java\jdk1.6.0_25\jre\lib\javaw s.jar;C:\Java\jdk1.6.0_25\jre\lib\jce.ja r;C:\Java\jdk1.6.0_25\jre\lib\jsse.jar;C :\Java\jdk1.6.0_25\jre\lib\management-agent.jar;C:\Java\jdk1.6.0_25\jre\lib\pl ugin.jar;C:\Java\jdk1.6.0_25\jre\lib\res ources.jar;C:\Java\jdk1.6.0_25\jre\lib\r t.jar;C:\Java\jdk1.6.0_25\jre\lib\ext\cl ibwrapper_jiio.jar;C:\Java\jdk1.6.0_25\j re\lib\ext\dnsns.jar;C:\Java\jdk1.6.0_25 \jre\lib\ext\jai_codec.jar;C:\Java\jdk1. 6.0_25\jre\lib\ext\jai_core.jar;C:\Java\ jdk1.6.0_25\jre\lib\ext\jai_imageio.jar; C:\Java\jdk1.6.0_25\jre\lib\ext\localeda ta.jar;C:\Java\jdk1.6.0_25\jre\lib\ext\m libwrapper_jai.jar;C:\Java\jdk1.6.0_25\j re\lib\ext\sunjce_provider.jar;%CLASSPAT H%"

%SERVICE_NAME%.exe //IS//%SERVICE_NAME% --Description=%SERVICE_DESCRIPTION% --Startup=auto --DisplayName=%SERVICE_DESCRIPTION% --Install="%SERVICE_PATH%\%SERVICE_NAME%.e xe" --LogPath=%SERVICE_PATH% --LogPrefix=%SERVICE_NAME% --LogLevel=DEBUG --StdOutput="%SERVICE_PATH%\%SERVICE_NAME%-stdout.txt" --Jvm=%JDK_SERVER_JVM_PATH% --Classpath="%SERVICE_PATH%;%SERVICE_PATH% \lib;%SERVICE_PATH%\lib\WMS.jar;%SERVICE _PATH%\lib\gdal.jar;%SERVICE_PATH%\lib\w orldwind.jar;%SERVICE_PATH%\lib\jogl.jar ;%SERVICE_PATH%\lib\gluegen-rt.jar" --StartMode=jvm --StartClass=%SERVICE_STARTUP_CLASS% --StartMethod=main --StartParams=start --StartPath=%SERVICE_PATH% --StopMode=jvm --StopClass=%SERVICE_STARTUP_CLASS% --StopMethod=main --StopParams=stop --StopTimeout=10 --StopPath=%SERVICE_PATH% ++JvmOptions="-Djava.awt.headless=true;-Dsun.java2d.noddraw=true;-Djava.util.logging.config.file=%SERVICE_ PATH%\wms.logging.properties;-Djava.library.path=%SERVICE_PATH%\lib;"

pause
TheGuardian is offline   Reply With Quote
Old 06-22-2012, 05:03 PM   #5
Unregistered
Guest
 
Posts: n/a
Default WMS should be worldwind-servers.jar

In the InstallAsWindowsService.bat, I added ";%SERVICE_PATH%\lib\worldwind-servers.jar" after WMS.jar. I suspect WMS.jar does not exist.

Also, once I ran the original script, running it with modification did not change the existing entries for the service in the registry. Use regedit and change the classpath if you ran the original InstallAsWindowsService.bat.
  Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with wms layer manager and .net service with digest authorization NoCk Development Help 3 04-06-2011 02:02 PM
Problems with Mars server avilahuerta Server Discussion 0 06-22-2010 09:25 AM
SVS and WMS Problems Kristian Technical Support 6 04-11-2007 09:15 PM
Problems even with online servers... Exa WorldWind General 3 09-27-2004 01:30 PM


All times are GMT +1. The time now is 09:04 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.