How to install DBWERP:
You can find, all the required files, in the folder setup files supplied with this guide.
Installation of JDK (virtual machine) and Glassfish (Web Application
Installing the SAP JCO
Installing configuration files of DBWERP
Connection parameters to SAP
Test the operation of DBWERP
- Run GlassFish as a Windows service
1. Installation of JDK (virtual machine) and Glassfish (Web Application Server).
Just run the file java_ee_sdk-5_08-jdk-6u17-windows.exe contained in the installation folder and
accept the default settings.
2. Once you get to the screen below, accept the terms of condition.
3. Create the folder AppServer inside ‘C:\Sun’ and select it for the installation (as in the image below).
The folder will be create automatically and previous installation of the JDK will be identified.
4. Set the configuration parameters for Glassfish:
user name, password, communications ports.
These are my personal data:
user: techsoladmin (only alphanumeric characters)
Select: Prompt for Admin User Name and Password
Leave the ports set to default.
5. In the installation options select: Create Windows Service and leave the other defaults.
The option "Create windows service" is used to run Glassfish automatically when you restart the
6. Skip the registration
7. Start the server by using the appropriate button that appear on the screen
Installing the SAP JCO. This is a Java package developed by SAP AG that handles the communication
between Java and SAP.
Unzip the file sapjco3-ntintel-3.0.6.zip, contained in the installation folder, into the folder
Set environment variables as written in the file "sapjco\javadoc\installation.htm".
Specify PATH -> C:\Sun\AppServer\Lib user variables for administrator
CLASSPATH - > C:\Sun\AppServer\bin\sapjco3.jar system variables
In some Microsoft operating systems you may encounter problems related to DLL not updated.
In that case just run the file "vcredist_x86.exe" located in the installation files.
To be sure that you have all the dll it's better to install the SAPGui.
Installing configuration files of DBWERP.
Copy the folder DBWERP contained in the installation files to the path:
1. Connect via a web browser at: http://localhost:4848
(If you changed the port during installation, the address will change)
2. Enter the username and password administrator of Glassfish (although these were chosen at
3. select Applications --> Web Application from the menu on the left and click "deploy"
4. leave the default settings and select the "Browse" button next to "location"
5. then select the file: DBWERP.war contained in the installation folder
6. press the button "OK" to deploy it
Restart GlassFish. this operation is required so GlassFsih can exploit the JCO.
To restart the web application service use the service created during the installation of GlassFish. Then open
the Services panel in Windows where you will find a new service: "SunJavaSystemAppServer9PE”. Select
the service and carry out a restart.
Connection parameters to SAP.
To set the connection parameters to SAP you should open the file destination.xml found in the folder
Open the file with a text editor:
At this point you must edit the fields with the correct values.
<type>SAP</type> connection to
<version>4.6C</version> SAP version
<name>TECHSOL SVIL</name> the SAP connection NAME
<host>10.100.1.220</host> * SAP host
<sysnr>00</sysnr> * SAP system number
<language>en</language> * SAP login language
<user>PROGRAMATORE</user> * user
<password>MIKI</password> * password
The ‘*’ means the field is required.
Test the operation of DBWERP. To check whether the application is properly installed can connect to this
address: http://localhost:8080/DBWERP. If is all correct you will find a screen like the following:
Run GlassFish as a Windows service.
Glassfish comes with a Windows executable called appservService.exe which communicates with the
Windows service controller.
The Windows service you create for Glassfish starts appservService.exe with several parameters that tell it
which asadmin commands to execute when starting and stopping.
Glassfish does not come with a tool to easily create a Windows service for appservService.exe, however the
installer for Sun Java Application Server 9.x has an "Install as a Windows service" checkbox. If you want to
create a Windows service for Glassfish, the instructions show a rather large command to run from the
command prompt. If your Glassfish installation path contains spaces such as
C:\ProgramFiles\Sun\GlassfishV2\, then finding the correct way to escape the escape characters becomes
complicated rather quickly.
Copy the file GlassfishSvc.jar into your Glassfish installation path (such as C:\Program
Files\Sun\GlassfishV2\), then run the following command from the command line:
C:\Program Files\Sun\GlassfishV2>java -jar GlassfishSvc.jar -i
glassfishsvc v1.0 (Aug 19 2007)
Service name : GlassfishAppServer
Glassfish installation path : C:\Program Files\Sun\GlassfishV2
Glassfish domain : domain1
Glassfish admin username : admin
Installing service... Done.
The -i argument will install the service with default options. A complete listing of the command line arguments
glassfishsvc v1.0 (Aug 19 2007)
Installs and uninstalls a Windows service for Glassfish
java -jar glassfishsvc.jar [-i | -u] [OPTIONS]
-i Installs a Windows service for Glassfish.
-u Uninstalls a Windows service for Glassfish.
-n name Name for the Windows service. Use double quotes
that contain spaces. Defaults to
-d path Directory where Glassfish is installed. Use double
quotes around paths with spaces, and escape back
Defaults to current directory.
-m domain Name of the Glassfish domain to start and stop.
-a user Glassfish admin user name. Defaults to admin.
-p pwd Glassfish admin password. A password.txt file will
in the Glassfish install directory containing the
plain text, and the Windows service will be
configured to read
from it. This is usually not necessary. If no
password is passed
in, the password.txt file will not be created.
java -jar glassfishsvc.jar -i
java -jar glassfishsvc.jar -i -p adminadmin
java -jar glassfishsvc.jar -i -n MyServiceName -d "C:\\Program
Files\\Sun\\Glassfish" -m myDomain -a admin5 -p secretpwd
java -jar glassfishsvc.jar -u
java -jar glassfishsvc.jar -u -n MyServiceName
Ryan de Laplante <ryan at ijws dot com>
If you installed the Glassfish cluster profile then Glassfish will ask for the admin password as the service
starts. To get around this use the -p option when installing the service. A password.txt file will be created in
Glassfish's root directory containing the password in plain text. The Windows service will be configured to
use this file so that it can start unattended. You should make sure to configure appropriate NTFS security on
this file after it is created so that unauthorized users do not have read or write access to it.
Windows User Log-out
By default the JVM catches signals from Windows that indicate the OS is shutting down, or a user is logging
out, and shuts itself down cleanly. This means that the Glassfish service will be shut down any time a user
logs out of Windows. This defeats the purpose of having a Windows service so we need to turn off this JVM
feature by using the -Xrs JVM option.
Open the <GF_HOME>\domains\domain1\config\domain.xml file and locate the section that has a lot of
<jvm-options>some JVM option</jvm-options> lines. Add the following line in that section:
Save and close domain.xml. If the Glassfish service is already running, restart it for the change to take effect.
Note: There have been reports that adding the -Xrs jvm-option to domain.xml does not solve this problem on
some Windows 2003 Server installations. The reported solution is to add the jvm option to