NWDS update site setup

NWDS 7.3/7.4 uses the update site concept of Eclipse. This makes it easier to update NWDS as an updated component only needs to be updated at the central update site. No need to distribute a whole NWDS installation package to the developers. The NWDS update site even includes a zip archive of the latest NWDS. That means that the developer does not have to download a NWDS version from SAP Market Place or nwds.sap.com.

  • Official documentation at SAP Help: link
  • Information on SCN: link

There is no separate NWDS 7.4 for NetWeaver Java 7.4. You use the 7.31 version when developing applicaitons for NW 7.4 (SAP Note). To set up an update site, first download the SCA

This SCA contains the archives, but not the tool needed to create the update site. You can download the tool from here: link. This tool is available for Windows.

The tools helps you in extracting the content of the SCA and to configure the update site URL. Afterwards, create an alias in the NW Java HTTP provider and copy the files to the directory specified by the alias.

Example

Set the alias to updatesite_731SP13. This alias points to the directory /home/cesadm/updatesite/731SP13

On the server, the folder contente looks like this:

The total size of the update size here is 2.5 GB. To access the update site via HTTP, inform the complete path to index.html:

http://host.fqdn:port/updatesite_731SP13/index.html

In NWDS, the update site is configured under the available software sites.

Thats it. Now NWDS can be updated from the update site.

Debug a portal application

Note: 1st published on SCN on 25. 5. 2012

Debugging an application comes down to see what is going on during execution of the application. One way of debugging is to log specific messages to a file. To get e detail analysis of the program flow you set breakpoints. These breakpoints are set in your source code and are instructions of the Java VM to stop execution when it hits a breakpoint. After the execution stopped you can see the current values of variables.

The instructions here are for SAP Portal 7.x, but the overall process should be the same for the 7.3 portal.

Before you can start debugging a portal application (PAR) you have to enable the debug option on your portal server. This means that you will enable a specific debug port to which your NWDS will connect. To actually debug the portal application you’ll use NWDS. This implies that you rarely will activate and execute a debug session in your productive portal environment. If you have debug a PAR that already is in production, something is wrong with how you release software.

The debug port is activated using the configtool. You set the debug port to an arbitrary value, just make sure that the port is free.

In the portal application, set breakpoints where you want the Java VM to stop execution so you can take a closer look at the VM environment.

This will instruct the VM to stop every time the array a gets a value assigned. Next step is to deploy the PAR. Make sure that you select the option: “Include the source code of the portal application”. If not, the debug won’t work.

To actually start the debug session you create a remote java application configuration:

Specify the portal project, the server and debug port (the one you gave in configtool). After clicking on debug, NWDS will connect to the Java VM and already present you with some nice information of the VM:

When you now execute the PAR, the Java VM will stop the application where you have set the breakpoint.

You can start exploring the current state of your application. The variables are shown with their current values:

To gain a deeper understanding of the environment of the PAR, you can also look at the request object and find out variables and their values:

Resuming execution and the values are being updates:

Making NWDS portable

Note: 1st published at SCN on 2.2.2012

Having to deal with several NetWeaver servers and NWDS installations? Want to make NWDS CE 7.1 portable to be more flexible? Read on …

Developing for NetWeaver AS Java means that you have to use the NetWeaver Developer Studio. The recommendation is to have for every NW release the corresponding NWDS version installed on your computer. When you have to take care of developments running on 7.0, 7.1 and 7.2 you end up having 3 NWDS versions installed.

NWDS for NetWeaver 7.0 can be downloaded at SCN. Until recently this was also true for CE. Hope that the CE 7.2 download comes back as it included a NWDS for CE 7.2.

For installing NWDS for CE 7.1 you have to download the installer from SAP.

https://nwds.sap.com/swdc/downloads/updates/netweaver/nwds/ce. (S-User required)

That is not really complicated, but when you are switching workstations, travel or want to share your NWDS installation with a co-worker things get complicated. You have to download NWDS and install it. There are several pitfalls associated with this:

  • Time
  • administrator rights and
  • bandwidth.

Even when you have the time and bandwidth, you still need to have administrator privileges to install NWDS:

The NWDS for CE download link includes a step by step manual for installing NWDS CE. Step 3 is important: “The installer starts SAP NetWeaver Developer Studio automatically and invokes the Eclipse Update Manager where you can select the available NWDS features that you want to add to your installation.

This sentence means that you effectively install a basic Eclipse that needs to download and install all the features that transform Eclipse to NWDS. In my case, the basic NWDS CE 7.1 was roughly about 71 MB in size:

The preferences show that nothing SAP related is available.

No Java, Portal, Web Dynpro Java, DTR or any other feature and perspective related to SAP development available. Without these features you cannot develop for CE. That’s where step 3 comes in. To the 3 above mentioned possible pitfalls you have to add:

  • proxy configuration

If you corporate proxy isn’t permitting Eclipse to download the features you have a useless basic Eclipse installation. NetWeaver AS Java CE comes with an update site feature (http://server:port/updatesite) [1] that has to be configured by the administrator or by using another connection (home, hotel, other computer). After you managed to install NWDS CE 7.1, how do you get that working version portable? After downloading the features you may be tempted to zip the folder and to copy it to an external drive to make it available as a portable NWDS (it is Eclipse and Java after all). If you do so you will notice that the installation folder is still only 71 MB. So: where are the downloaded files? NWDS CE 7.1 won’t copy them to the eclipse/plugins|features folder. They are downloaded to [username]/.eclipse/ com.sap.netweaver.developerstudio.studio_7.1.0_xyz/ configuration/ eclipse

That’s where the downloaded SAP features are. This installation path makes it complicated to use NWDS when the administrator of your company installed the features: your user does not have access to the folder. Copying them from there to the eclipse directory to make Eclipse aware of them won’t work. Inside the above directory is a file called .eclipseextension. That’s the only hint you get from SAP, but it’s enough to identify it as an extension directory. Copy that directory to another location (e.g.: E:\CE). From there the SAP features can be installed.

The manage configuration dialog (Help -> Software Updates lists the features available.

To add the extension directory: open the context menu -> add -> extension location

Select the eclipse folder.

This will install the features. After a restart of NWDS all SAP features are available:

Done? Depends … if you are on Windows 7, of course not. A library will fail to load, so you’ll have to apply the solution provided by Dzintars Vilnis in the SCN forum: http://forums.sdn.sap.com/thread.jspa?threadID=1052737

Edit the configuration file SapNetweaverDeveloperStudio.ini.

-clean

-vm

<path to Java 1.5>\bin\javaw.exe

-showsplash

com.sap.netweaver.developerstudio

–launcher.XXMaxPermSize

256m

-vmargs

-Xmx512m

-Xms128m

-XX:PermSize=32m

-XX:MaxPermSize=256m

-Dfile.encoding=UTF-8

-DJDK.1.5.0_HOME=<path to Java 1.5>

-Dos.name=Windows XP

-Dos.version=5.1

What do you get after all that work? A NWDS for CE 7.1 that can be copied between computers.

Conclusion: that’s a little bit complicated considering the NWDS is Eclipse with features installed from SAP.

[1] Create Your Own Update Site Mirror for the NW Developer Studio http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/30bd4027-cd09-2e10-2583-ca9fd88e32ba

(That one is for 7.3, but the update site concept was already available for 7.1)