Installing and operating the SAP NetWeaver J2EE Preview by Oliver Schmidt
May 27th, 2006
Installing and operating the SAP NetWeaver J2EE Preview
|
|
Pre-Installation Considerations
There’s no need to search the installation prerequisites for a specific JDK as the SAP NetWeaver Web Application Server (NWAS) comes with its own.
The NWAS is a little picky regarding its network environment, so if you intend to run the server without an active network connection (plane, train, …) be sure to:
- Install the MS Loopback Adapter as described in the docs on the DVD (D:\DOC\html\loopback.htm).
- Disable VMware Virtual Ethernet Adapters (if any) as described in the docs on the DVD (D:\DOC\html\starting.htm towards the end of the page).
Post-Installation Fixups
The installation program doesn’t copy the docs mentioned above from the DVD to the hard disk, but especially the page on authentication (D:\DOC\html\authentication.htm) should be at hand later on so I copied the whole D:\DOC directory to C:\SAP (I used the default installation directory). Then I removed the R/O flags and created a shortcut to C:\SAP\DOC\html\index.htm at a convenient place inside my start menu.
As mentioned above the NWAS comes with SAP’s own JDK. Although it is not intended as a general-purpose JDK the installation program appends its BIN directory to the system-wide PATH variable. This setting is NOT necessary for the operation of neither NWAS nor its accompanying tools. So I strongly recommend to remove the ;C:\SAP\JP1\SYS\exe\run\sapjvm_5\bin from the end of the PATH variable to avoid unintended usage of this JDK.
Operation Tips
The installation program configures the NWAS to provide an optimal first-time usage experience. But this doesn’t necessarily mean that it’s optimal for a machine intended to be used for something different beside running the NWAS
Obviously it depends on the individual scenario what is considered optimal. So let’s just assume that our goal is to reduce the impact of the installed but not currently used NWAS while still being able to start using the accompanying administration tools without additional preparation.
The SAP Management Console (SAPMMC) is the one-stop shopping when it comes to operating the NWAS. When you drill down the two top-level nodes you’ll see three sibling nodes called , 0 and 1. The first one corresponds to the NWAS database engine, the second to the application server itself and the third one to the so-called Central Services.
Stop the Database Engine
When selecting the NWAS database engine without prior interaction with the SAPMMC you’ll get the unfriendly error page below making you believe that something went wrong with the installation, but fortunately this isn’t the case.

Just start the Windows service SAP DB WWW and retry. Now You’ll get a login page. Using the installation password you should see the page below showing you that the database engine is actually running (aka Online).

This means that the database web admin interface is not running by default while the database engine itself IS running by default. For our goal it makes much more sense to have it the other way round. Therefore we set the SAP DB WWW Windows service to Startup type Automatic and the Windows service SAPDB: JP1 (which represents the database engine) to the Startup type Manual.
The later does by no means imply that we now have to start the database engine manually before starting the application server. Rather when we select Start on the JP1 node the SAPMMC takes care of having the database engine started before doing anything else.
The same is by the way true for the two scripts available in the start menu as Start Engine and Stop Engine. The only thing you have to change here is to keep them generally from dealing with the database web admin interface:
- C:\SAP\JP1\SYS\exe\run\startSystem.cmd: Comment out net start sapdbwww.
- C:\SAP\JP1\SYS\exe\run\stopSystem.cmd: Comment out net stop sapdbwww.
Stop the Central Services
When opening the SAPMMC without prior interaction you’ll notice that the central services (the 1 node) are marked green which means that they are running. If you stop them and reboot the machine they will be running again. Fortunately it’s easy to change that behaviour:
C:\SAP\JP1\SYS\profile\START_SCS01_: Change Autostart = 1 to Autostart = 0.
Again this modification does by no means imply that we now have to start the central services manually before starting the application server. Rather when we select Start on the JP1 node the SAPMMC takes care of having the central services started after the database engine but before the application server. The same holds true for the two scripts in the start menu.
Stop the Starters
To further reduce the impact of the NWAS it’s reasonable to have a closer look at the involved processes. A really great tool for doing so is the Sysinternals ProcessExplorer. It doesn’t need to be installed at all, instead you can run it directly from the opened zip file.
The screenshot below shows how the two Windows services SAPJP1_00 and SAPJP1_01 map to the corresponding two nodes in the SAPMMC and processes in the ProcessExplorer. Additionally it shows that the SAPJP1_01 Windows service starts the processes making up the central services from the SAPMMC’s perspective.

With the application server itself there’s even one more indirection as the process started by the Windows service itself starts child processes doing the real work. Inside the SAPMMC they show up in the J2EE Process Table.

The SAPMMC manages all those child processes while the two Windows services have the Startup type Automatic. But fortunately this doesn’t have to be that way. Just close the SAPMMC and then stop the Windows services SAPJP1_00 and SAPJP1_01. When you now open the SAPMMC again you’ll notice that it takes quite some time to come up. This is the time it needs to start the two Windows services again. So if you (like me) can live with that delay once after a reboot you can set safely set the the Startup type of the two Windows services in question to Manual.
The Start Engine script available in the start menu doesn’t take care of starting the two Windows services, but you can change that in C:\SAP\JP1\SYS\exe\run\startSystem.cmd by inserting two extra lines for the central services:
echo.
echo ============== Starting central services instance …
echo.
net start SAPJP1_01
ping -n 2 127.0.0.1 > NUL
sapcontrol -prot PIPE -nr 01 -host . -function StartWait 60 10
…and two extra lines for the application server:
echo.
echo ============== Starting java instance …
echo.
net start SAPJP1_00
ping -n 2 127.0.0.1 > NUL
sapcontrol -prot PIPE -nr 00 -host . -function StartWait 180 15
The ping statements are just a workaround for the by default missing sleep or wait commands. Between two ICMP messages ping waits for one second so sending two messages makes ping wait for one second. This timeout is necessary to make sure the Windows services are really ready to be used.
Wrap up
With the tips pointed out here the SAP NetWeaver J2EE Preview doesn’t consume much more than just disk space if you don’t need it while still being available at your fingertips if you do - so go ahead and give it a try!
Oliver Schmidt is a Member of SAP Platform Ecosystem’s Market Development Engineering (MDE) team.
Entry Filed under: SAP Articles