Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
SMSSvr as a windows service by using Java Service Wrapper
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
sheirkoo  
View profile  
 More options Jan 9 2008, 5:00 am
From: sheirkoo <mehr1...@gmail.com>
Date: Wed, 9 Jan 2008 02:00:14 -0800 (PST)
Local: Wed, Jan 9 2008 5:00 am
Subject: SMSSvr as a windows service by using Java Service Wrapper
Here is the details to use Java Service Wrapper to make SMSSvr as a
windows service:
1.      install SMSLIB AND CONFIGURE SMSSvr.conf file and put it in dist/
classes/org/smslib/smssvr
2.      copy log4j-1.2.15.jar to Lib dir
3.      copy win32com.dll , comm.jar and javax.comm.properties from
JavaComm to Lib dir
4.      copy sqljdbc.jar to Lib dir
5.      set JAVA_HOME to your JDK dir in system variables ( i.e : C:\Java
\jdk1.6.0_03)
6.      download Java Service Wrapper  from :
http://wrapper.tanukisoftware.org/doc/english/introduction.html
7.      I used method 1 (http://wrapper.tanukisoftware.org/doc/english/
integrate-simple-win.html)  as follow in summary :
8.      First we will copy the following files into the SMSlib Dist\
classes directory:
{WRAPPER_HOME}\bin\Wrapper.exe
{WRAPPER_HOME}\src\bin\App.bat.in
{WRAPPER_HOME}\src\bin\InstallApp-NT.bat.in
{WRAPPER_HOME}\src\bin\UninstallApp-NT.bat.in
9.      Rename the three batch files as follows. Be sure to remove the .in
extensions so that the files all end in .bat. Depending on how your
file explorer is configured, you may not be able to see the
extensions.
{ SMSlib _dist}\ classes \ SMSlib.bat
{ SMSlib _dist }\ classes \Install SMSlib -NT.bat
{ SMSlib _dist }\ classes \Uninstall SMSlib -NT.bat

10.     The Wrapper.exe file is the actual Wrapper executable. The three
batch files are used to run SMSSvr in a console, and to install and
remove it as an NT Service. These scripts should not require any
modification. They do assume that the wrapper.conf file will be
located within a conf directory one level up, ../conf/wrapper.conf. If
you wish to locate this file someplace else, then the three batch
files will require that small modification.
11.     Copy the following two files into the SMSlib lib directory:
{WRAPPER_HOME}\lib\Wrapper.DLL
{WRAPPER_HOME}\lib\wrapper.jar
The Wrapper.DLL file is a native library required by the portion of
the Wrapper which runs within the JVM. The wrapper.jar file contains
all of the Wrapper classes.
12.     conf directory
The Wrapper requires a configuration file. The standard location for
this file is in a conf directory in the application's home directory.
SMSlib does not have such a directory by default, so we will need to
create one. Please do so and copy the template wrapper.conf file to
that location:
{WRAPPER_HOME}\src\conf\wrapper.conf.in
Be sure to remove the .in extension so that the file is named
wrapper.conf. Depending on how your file explorer is configured, you
may not be able to see the extension. You should now have:
{ SMSlib_dist }\conf\wrapper.conf
If you wish to relocate the configuration file, you are free to do so.
You will need to modify the batch scripts copied into the bin
directory above, to reflect the new location
13.     logs directory:
The default wrapper.conf file will place a wrapper.log file in a logs
directory under the application home directory. SMSlib does not have
such a directory by default, so we will need to create one. Please do
so. You should now have the following directory:
{ SMSlib_dist }\logs
If you wish to place the log file in another location, you will need
to edit the wrapper.conf file and modify the wrapper.logfile property
to reflect the new location
14.     Modifying the wrapper.conf File:
This is new wrapper.conf file for SMSSvr to work (you can copy and
replace this with original conf ):
#********************************************************************
# Wrapper Properties
#********************************************************************
# Java Application
wrapper.java.command=%JAVA_HOME%/bin/java

# Java Main class.  This class must implement the WrapperListener
interface
#  or guarantee that the WrapperManager class is initialized.  Helper
#  classes are provided to do this for you.  See the Integration
section
#  of the documentation for details.
wrapper.java.mainclass=org.tanukisoftware.wrapper.WrapperSimpleApp

# Java Classpath (include wrapper.jar)  Add class path elements as
#  needed starting from 1
wrapper.java.classpath.1=../lib/wrapper.jar
wrapper.java.classpath.2=../classes

# Java Library Path (location of Wrapper.DLL or libwrapper.so)
wrapper.java.library.path.1=../lib

# Java Additional Parameters
wrapper.java.additional.1=-Dsmssvr.configdir=org/smslib/smssvr/

# Initial Java Heap Size (in MB)
#wrapper.java.initmemory=3

# Maximum Java Heap Size (in MB)
#wrapper.java.maxmemory=64

# Application parameters.  Add parameters as needed starting from 1
wrapper.app.parameter.1=org.smslib.smssvr.SMSSvr

#********************************************************************
# Wrapper Logging Properties
#********************************************************************
# Format of output for the console.  (See docs for formats)
wrapper.console.format=PM

# Log Level for console output.  (See docs for log levels)
wrapper.console.loglevel=INFO

# Log file to use for wrapper output logging.
wrapper.logfile=../logs/wrapper.log

# Format of output for the log file.  (See docs for formats)
wrapper.logfile.format=LPTM

# Log Level for log file output.  (See docs for log levels)
wrapper.logfile.loglevel=INFO

# Maximum size that the log file will be allowed to grow to before
#  the log is rolled. Size is specified in bytes.  The default value
#  of 0, disables log rolling.  May abbreviate with the 'k' (kb) or
#  'm' (mb) suffix.  For example: 10m = 10 megabytes.
wrapper.logfile.maxsize=0

# Maximum number of rolled log files which will be allowed before old
#  files are deleted.  The default value of 0 implies no limit.
wrapper.logfile.maxfiles=0

# Log Level for sys/event log output.  (See docs for log levels)
wrapper.syslog.loglevel=NONE

#********************************************************************
# Wrapper Windows Properties
#********************************************************************
# Title to use when running as a console
wrapper.console.title=sms application server

#********************************************************************
# Wrapper Windows NT/2000/XP Service Properties
#********************************************************************
# WARNING - Do not modify any of these properties when an application
#  using this configuration file has been installed as a service.
#  Please uninstall the service before modifying this section.  The
#  service can then be reinstalled.

# Name of the service
wrapper.ntservice.name=SMSLib

# Display name of the service
wrapper.ntservice.displayname=SMSLib application server

# Description of the service
wrapper.ntservice.description=SMSLib application server

# Service dependencies.  Add dependencies as needed starting from 1
wrapper.ntservice.dependency.1=
# Mode in which the service is installed.  AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START

# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=false
# Mode in which the service is installed.  AUTO_START or DEMAND_START
wrapper.ntservice.starttype=AUTO_START

# Allow the service to interact with the desktop.
wrapper.ntservice.interactive=false

15.     Trying It Out
SMSSvr can now be run by simply executing the SMSlib.bat script.
Because of the way the Wrapper sets its current directory, it is not
necessary to run this script from within the dist directory. Please
try running the application once as a console application to verify
the configuration before attempting to run it as a service.

For installing run InstallSMSlib-NT.bat

Then go to services and start it or in cmd : net start SMSLib

To shutdown go to services or in cmd : net stop SMSLib

Congratulations. Your application should now be up and running.

Caution : after installing as service don't edit wrapper.conf . If you
need some change first uninstall the service then edit it


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
sheirkoo  
View profile  
 More options Jan 9 2008, 8:20 am
From: sheirkoo <mehr1...@gmail.com>
Date: Wed, 9 Jan 2008 05:20:32 -0800 (PST)
Local: Wed, Jan 9 2008 8:20 am
Subject: Re: SMSSvr as a windows service by using Java Service Wrapper
for start and stop bat files you can do as here:

SMSLibstart.bat :

@echo off
net start SMSLib

SMSLibstop.bat :

@echo off
net stop SMSLib


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jayesh Gohel  
View profile  
 More options Mar 7 2008, 1:53 pm
From: Jayesh Gohel <jayesh.go...@gmail.com>
Date: Fri, 7 Mar 2008 10:53:34 -0800 (PST)
Local: Fri, Mar 7 2008 1:53 pm
Subject: Re: SMSSvr as a windows service by using Java Service Wrapper
Followed the procedure mentioned above, and the wrapper.log generated
this. Any idea whats wrong? (does the server require the device to be
connected at start?)

INFO   | jvm 1    | 2008/03/08 00:16:11 |
java.lang.NullPointerException
INFO   | jvm 1    | 2008/03/08 00:16:11 |       at
java.lang.Class.forName0(Native Method)
INFO   | jvm 1    | 2008/03/08 00:16:11 |       at
java.lang.Class.forName(Class.java:164)
INFO   | jvm 1    | 2008/03/08 00:16:11 |       at
org.smslib.smssvr.SMSSvr.initialize(SMSSvr.java:109)
INFO   | jvm 1    | 2008/03/08 00:16:11 |       at
org.smslib.smssvr.SMSSvr.execute(SMSSvr.java:281)
INFO   | jvm 1    | 2008/03/08 00:16:11 |       at
org.smslib.smssvr.SMSSvr.main(SMSSvr.java:456)
INFO   | jvm 1    | 2008/03/08 00:16:11 |       at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO   | jvm 1    | 2008/03/08 00:16:11 |       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
INFO   | jvm 1    | 2008/03/08 00:16:11 |       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:
25)
INFO   | jvm 1    | 2008/03/08 00:16:11 |       at
java.lang.reflect.Method.invoke(Method.java:585)
INFO   | jvm 1    | 2008/03/08 00:16:11 |       at
org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:
240)
INFO   | jvm 1    | 2008/03/08 00:16:11 |       at
java.lang.Thread.run(Thread.java:595)
INFO   | jvm 1    | 2008/03/08 00:16:11 |
java.lang.NullPointerException

-gnat


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »