Tuesday, March 25, 2008

Howto configure a simple TREX index

This will walk you thru the configuration of a simple TREX index on a SAP Netweaver Portal.

This quick guide assumes that you are an administrative user on all the involved systems. First of all, we need to configure the TREX backend-server. This is done by logging into the J2EE administration tool, Visual Administrator.

Go to the Cluster --> Server --> Services --> TREX Service node and select the nameserver.address-field. Enter the correct value for the TREX nameserver. E.g. tcpip://myserver.domain.tld:30001

The correct port can be found by starting the TREXAdmin tool. Here, you will find the info needed on the start-page. Once this value is maintained, click the "Update" button.

Now we are almost ready to create our first search index.

Log on to the Netweaver Portal and follow the steps show here. This will open the "Component Monitor iView" in a new window. Before we continue with the setup, it is important to make sure that all Knowledge Management components and functioning correctly.

In this example case shown below, we get a few common errors, that needs to be corrected - otherwise we might see some strange behaviour of our index.

To correct these specific errors, go to System Administration --> System Configuration --> Knowledge Management --> Content Management --> Global Services --> Scheduler Tasks. Other errors may need some additional post installation steps, check the TREX installation guide or service.sap.com/notes for more info.

Once we have confirmed that all of our KMC components are functioning, we can create our first Index.

From the "Index Administration", create a new Index. The ID must be unique, and if the TREX backend is used for more that one AS Java, I find it useful to include the portal SID. The Name field will be the displayed name of this particular index.

Before we can complete the index creation, a data source must be assigned to this Index. Click the data source link where a list of all KM repositories will be displayed. Select one or more folders and save the Index. The selected repository will now be crawled by the TREX spiders, and all the collected information will be indexed and made searchable.

Please note, that some additional steps will be needed in a productive-like environment, e.g. schedule indexing, permissions, creation of taxonomies and such.

To check the over-all health and status from day to day of your Index(es) and TREX service, open the TREX Monitor iView.

Have fun making unstructured information more accessible ;o)

Wednesday, January 16, 2008

Working with Developer Workplace on a laptop

As a developing consultant, working with SAP Developer Workplace can be a tedious task.

Usually you will want to start VPN connections to various places, for instance your home office, to check your mail, or whatever might be needed.

When you do this, Developer Workplace responds with restarting the J2EE engine.

Well, follow my guide here - and you won't be griefed with 20 minutes of restarting the J2EE engine, because you had to check your mail :-)

The solution is pretty simple actually, as well as the reason for why this happens.

When SAP created the Netweaver Java engine, they wheren't expecting the infrastructure to change on the fly. Therefore they bind the server directly to your external IP address.
It seems rather unnecessary, and this binding, ofcourse, can be hacked!

First of all, locate your Developer Workplace installation directory.
This is usually something like:

... and browse to:

In here, you'll find a number of configuration files.

Create a backup copy of all the files in this directory.
The _JC00_ files are the Java Server configuration, and the _SC01_ files are the message server files.

Next, load up your favorite text editor (notepad) - and open the file:
... for example, if your installation has "AB1" as name, and your computer is called "MYCOMPUTER":

Next, locate the line with the following statement:
.. change it to:

Save & Close the configuration file.

Next, open up the file:

Again, locate the line with the following statement:
.. change it to:

Finally, do the same for the two message server configuration files.

Now restart the cluster.

Presto, your developer workplace will stop restarting when network changes takes place. You can even pull out the network cable of your laptop, hibernate your computer - and work on the train on your way home. :-)