Friday, August 28, 2009

J2EE Engine Startup Errors codes and their Description

1. Positive exit codes which usually cause restart of server/dispatcher:

0 normal exit/shutdown
1 Forced shutdown was executed by the engine server side because of a non
recoverable error.
11 xml parser cannot be initialized by the engine server side.
64 Error while reading the properties for bootstrap process.
65 Error when bootstrap process tries to connect/work with the data
base.
66 Common error code for issues in bootstrap process. Check note 997510.
666 Could be caused by memory misconfiguration or memory leak of applications
involved. During startup misconfiguration is more reasonable. Under special
circumstances a hotspot error is generated instead of an
OutOfMemoryError (Note 597187).
888 When the shutdown of the server/dispatcher process cannot finish for the
preconfigured timeout, the VM is halt with this exit code. This happens if
there are many applications deployed on the system and some of them take
significant time to finalize the usage of common resources. Usually this is
not an issue as long as the consecutive engine start is flawless.
999 When an error occurs during engine shutdown the server/dispatcher process
will exit with code 999.

2. Negative exit codes which usually will not cause restart of server/dispatcher:

-1 JSTARTUP_INTERNAL_ERROR
This code is also used when experiencing issues with Wily Introscope. The
dev_server log file in the work directory contains the following message:
[Thr 7920] *** ERROR => can't find native registration class
[com.sap.bc.proj.jstartup.JStartupNatives] [jhvmxx.c 551]
Exception in thread "main" [Thr 7920] JLaunchCloseProgram: good
bye (exitcode = -1).

-2 JSTARTUP_VM_ABORTED

-3 JSTARTUP_INVALID_ARGUMENTS

-4 JSTARTUP_INVALID_SHUTDOWN

-6 comes from within the VM itself, in dev_jcontrol:
ERROR => JHVM_LoadJavaVM: Cannot create Java VM (rc=-6)
please check std_server.out, might be wrong parameter

-10 JSTARTUP_NO_MORE_MEMORY

-11 JSTARTUP_PARENT_ATTACH_ERROR

-12 JSTARTUP_TIMEOUT

-13 JSTARTUP_SYNC_SEMAPHORE_ERROR

-14 JSTARTUP_INVALID_PROPERTY_FILE

-15 JSTARTUP_INVALID_VMTYPE

-16 JSTARTUP_NO_PERMISSION

-17 JSTARTUP_INVALID_JDK

-18 JSTARTUP_NODE_NOT_FOUND

-100 JSTARTUP_NO_SYSTEMNAME

-101 JSTARTUP_PARAM_NOT_EXISTS

-102 JSTARTUP_INVALID_LOCAL_PROFILE

-103 JSTARTUP_CREATE_LOCAL_PROFILE

-104 JSTARTUP_NO_MORE_PROCESSES

-105 JSTARTUP_INVALID_PROCESS

-106 JSTARTUP_PROGRAM_ALREADY_RUNS

-107 JSTARTUP_SHM_NOT_INITIALIZED

-108 JSTARTUP_DEBUG_SESSION_ALREADY_ACTIVATED

-109 JSTARTUP_DEBUG_SESSION_NOT_ACTIVATED

-333 server/dispatcher process is restarted because it has missed a cluster
broadcast message due to network problems.

-334 server/dispatcher process is restarted because of error getting confirmation
during reattach to the message server.

-335 server/dispatcher process is restarted because of timeout for reconnecting to
message server has reached.

-336 server/dispatcher process is restarted because no notification is received
from message server.

-337 server/dispatcher process is restarted because exits listener loop.

-338 server/dispatcher process is restarted because of invalid message.

-339 client is not authorized to access the message server.

-1000 JSTARTUP_PROCESS_IS_STOPPED.

-1001 JSTARTUP_PROCESS_WAITERROR

-1501 server/dispatcher process is not able to start because the initialization of
some manager ends up with error.

-11111 server/dispatcher process is stopped due to license expiration.

-11112 server/dispatcher explicit shutdown is invoked from shell command or Visual
Administration tool. No restart will be performed. Not a problem.

-11113 Essential service fails to start so the server/dispatcher process should exit.

-11114 Services load timeout has been reached. In case the value of
"haltOnServiceTimeout" property of ServiceManager is true server/dispatcher
process would exit.

Tuesday, August 25, 2009

SAP executables will fail to run because of Microsoft ATL Patch.

Background information: A recent security update of Microsoft`s ATL(Active Template Library) resulted in an updated Visual Studio and an updated c-runtime. All SAP executables(sapstart.exe, sapstartsrv.exe, etc...) made with that updated c-runtime will require this updated c-runtime installed on the customers system. Therefore every SAP customer running Windows is need to apply the Microsoft security patch.

Detecting whether an SAP system will not start up due to missing MS patch: Described below are steps that will indicate if a customer is affected by the missing Microsoft security patch.

Try to execute a SAP binary (like sapntchk.exe) on the customers system.
You can do this in two ways.

1) If you started the executable from the command prompt and get the following message,

“The system cannot execute the specified program”



have a look at the event viewer.
To do this either type eventvwr into your command prompt, or Start->Settings->Control Panel->Administrative Tools->Event Viewer.
Continue with section “Event Viewer analysis”.


2) If you double-clicked the executable within Microsoft`s file explorer and you get the following error with pop-up:

E:\patch_test\sapntchk.exe
This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem




have a look at the event viewer.
To do this either type eventvwr into your command prompt, or Start->Settings->Control Panel->Administrative Tools->Event Viewer.
Continue with section “Event Viewer analysis”.

Event Viewer analysis:

In the tree display click the System entry like shown below.



Now scan the list on the right side and search for the source "SideBySide" like below:



Now click on these events and check for one of the following messages:

Friday, August 21, 2009

Business Server Pages Do you want to edit pages Using Proxies

This troubleshooting guide describes all the different problems observed with the use of proxies.

WARNING IN RED: Unforunately, this is a very complex topic! It is recommended at all times to first fetch a cup of coffee and secondly to close the office door. Then read this text slowly, word for word. Read it twice! Experience has shown that a number of GoLive! dates could easily have been kept by prudent reading skills on this one topic alone. This warning is in the spirit of a helping hand. Let us learn from past experience!


What Proxies are Supported?



In principle, when the term proxy is used within this text, we usually and silently refer to a SAP Web Dispatcher. However, in principle, any form of proxy can be used, as long as it obeys the constrains of what we require from a proxy. Most of it will also be listed below as part of the troubleshooting guide.


Documentation



Most of the aspects on the generation of URLs in the context of a proxy is described in URL Generation in an AS-ABAP - Web Dispatcher Configuration . This page is written and continuously updated from OSS support work. As such, we will find large amounts of duplicate information. The documentation itself is written in the form of A to Z, convering the topic systematically. This page is written more in the sense of a troubleshooting guide, containing questions to help troubleshoot a problem to a final solution. It effectively highlights again the documentation. What to read? Both! Twice! (Don't forget the coffee and to close the office door.)

For general information about SAP Web Dispatcher, see the corresponding documentation . Just to stress this point one final time: A number of complex OSS trouble tickets could have been completely avoided by one careful reading session! Make the time this once, it is really worth it!

URL Generation Concepts



Although far off-topic for the immediate discussion of proxies, the basic concepts must be understood.

A URL for a page is written in the form of http(s)://server.domain.ext:port/URL. After the HTML for the page is loaded, all other URLs on the page itself are server-relative. They are either of the form /URL2 or just URL3 or ../URL3. The written URLs within the HTML code will (usually!) never contain a protocol (http(s)://) part, and as such does not hard contain any server references.

The first important aspect to understand is that each and every request from the browser is always server-absolute. This is a must in the world of HTTP! What it means is that each and every incoming HTTP request is triggered by an URL of the form http(s)://server.domain.ext:port/URL, that is, with protocol, server, port and server-relative URL. (For interested reader, if the port has the default value of 80 for HTTP or 443 for HTTPS, it is usually not listed.)

So how does the browser build up these correct URLs? The trick is that the browser will always take the missing parts of information from the URL of the current page that is displayed. In the case of the absolute URL shown above, the browser will take the current active protocol and server information, and generate a new server-absolute URL: http(s)://server.domain.ext:port/URL2.

In the case of a relative URL, the browser will again use the information from the current loaded page to construct a server-absolute URL: http(s)://server.domain.ext:port/URL3. What we notice in this game, is that as long as URLs in HTML pages never contain a protocol (http(s)://) or any form of server information (server.domain.ext:port), URL generation will always work correctly, independent of the actual protocol in use. This is why most code will work correctly in context of a proxy.

So why do we even have problems with proxies? (And why all this complex text?) There are typically two (plus one special one) cases where server-absolute URLs must be generated. And these usually fail if not carefully done.

Wednesday, August 19, 2009

Analyzing issues with Single Sign On (SSO)

Differentiate the possible implementations/solutions

The initial step to approach problems in SSO, of course, is to identify what SSO solution actually is being used. A first indicator is the client software: do you use a Web browser for accessing your servers, or do you use SAP's "classical" client program SAPGUI (sometimes called WinGUI)?

Attention: Newer client development and the related use of words make it easy to mix up certain versions of the Web browser-based clients with SAP's standalone client SAPGUI for ABAP servers. In the context of this note, the term SAPGUI will not be used for those Web-browser based clients.

Web browser-based clients can use either of the following mechanisms for implementing SSO:
- SAP logon tickets (covered in this note) or
- X.509 client certificates (covered in this note) or
- SAML Browser/Artifact Profile

The SAPGUI always requires Secure Network Communications (SNC) for SSO.

Typical Scenarios

The most common situation where SSO is used are system landscapes that are made accessible by an SAP Enterprise Portal.

Here, usually SAP logon tickets are used, because they are easily available and can be created and accepted by all SAP server products. In a typical portal landscape, the SAP Enterprise Portal issues the user a logon ticket after the initial logon, which is then used for further authentication purposes, both in the portal itself as well as in all SAP back-end systems that are being made accessible from the portal. Some third party services can also use the SAP logon ticket for authentication through the use of SAPSSOEXT (a Java-based toolkit for verifying SAP logon tickets).

A completely different situation exists when the client software for accessing ABAP-based SAP servers is SAPGUI. With SAPGUI, the only way to implement SSO is to install SNC. SNC, in turn, can be implemented in a number of ways - but it always makes use of the GSS interface provided by SAPGUI and the ABAP-based SAP servers.

For more general information about SSO, see SAP Notes 138498 and 550742.

In the following, I refer to the servers involved as the AS ABAP and the
AS Java for ABAP-based and Java-based system, respectively.

Solution

In the following, you will find hints on how to analyze problems with logon and Single Sign-On, ordered by the technical means for authentication that are being used.

1. SSO based on SAP Logon Tickets

SAP logon tickets are messages that confirm a successful (primary) logon. They are created on the SAP server and are passed to the user's client. From there, they are also passed to the intended target system(s) (in newer implementations also directly to the target system). SAP logon tickets provide a "simple", but proprietary solution for Single Sign-On.

The actual strategy for analyzing problems with SAP logon tickets is to follow the path of the SAP logon ticket from its creation, and then along the paths it takes in the network, until it is finally received and verified in the destination server.
The (now outdated) note 356691 is intended to help with this, but it refers
to older releases, where the "standalone Internet Transaction Server (ITS)" was common for Web-based access.

To assert the authenticity of a user, SAP logon tickets make use of digital signatures based on the DSA algorithms. As a consequence, Secure Store and Forward (SSF) needs to be configured correctly to be able to verify the logon tickets. This includes the configuration for trusting the SAP logon ticket issuer (in terms of SSF), which is done by storing the logon ticket issuer's public key (certificate) in the target system's certificate store. (The target system is the system that verifies the incoming logon ticket.) Additionally, the logon ticket issuer needs to be entered into an access control list (ACL). The required steps differ between the involved system's base technology (ABAP or Java), but from the SSF point of view, they serve the same purpose.

Tuesday, August 18, 2009

How to change copy right text on SAP EP logon screen

1) Copy the file with the name ”com.sap.portal.runtime.logon.par” from the following location. It has the additional ending ".bak", which you should remove on your local copy:

\\j2ee\cluster\server<#>\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\deployment\pcd\

2) Import the PAR file into NetWeaver Developer Studio:

- Select File>Import.
- Choose the option PAR file. Select Next and a popup window appears.
- In the window you have 3 text fields: The location of the par file, a project name (which will also be the new par file name) and the location where the project should be saved.



3) Manually unzip the par file using WinZip or WinRar and copy “umelogonbase.jar” and “com.sap.portal.runtime.logon_api.jar” files from PORTAL-INF\lib to newly created project\dist\PORTAL-INF\lib.

4) Un zip umelogonbase.jar and open “logonLabels_xx.properties”; here “xx” is language of the specific browser. Edit the text which you want to change and save the changes.

5) Now select all files under umelogonbase folder and zip using WinZip or WinRar

6) Rename “umelogonbase.zip” to “umelogonbase.jar” and don’t forget to remove original umelogonbase.jar before renaming.

7) From NWDS right click on dist and select Quick Par upload and give full path and file name which is “com.sap.portal.runtime.logon.par”.

8) Now upload the new par file: system Administration -> support -> Portal runtime -> Administration console -> browse for the new file and click on upload.

9) Restart of engine is not required.

Tuesday, August 11, 2009

NW 6.40(2004) SPS(Support Package Stack) 19 Upgrade

Unlike in NW7.0, in NW 2004 SPS upgrade needs to be done using sapinst tool as there is no JSPM in NW 2004.

Note: JSPM tool was introduced in NW 7.0

In order to apply the Support Package Stack in NW 2004, you need upgrade each Usage type separately in following order:

o SAP Web AS Java
o Enterprise Portal (EP)
o Knowledge Management & Collaboration (KMC)

• Download SPS19 upgrade files from service.sap.com. Naming convention is mentioned separately for each Usage Type.

SP stacks for SAP WEB AS Java 6.40 -->

1. Download latest JCE Policy file from sun.java.com

2. Download below support packages from Service Market Place(www.service.sap.com)

J2EERT_.SAR: J2EERT19_0-10001982.SAR
SAPINST_.SAR: SAPINST19_0-10002790.SAR
CTRL_.SAR: CTRLORA19_0-20000121.SAR
J2EERTOS_.SAR: J2EERTOS19_0-20000121.SAR

3. Extract above 4 SAR files using SAPCAR.

4. Then change to directory where sapinst is existed:



5. Run sapinst



6. Select Import Support Package 19 and click on Next



7. Browse for instance profile and select, and then click on Next



8. Give JDK Home directory path and click on Next



9. Give location for JCE Policy Archive and click on Next



10. As we need to update only Java components first,keep default selection and click on Next



11. Sapinst itself will take the PREREQUISITE CHECK XML in this step. Click on Next



12. If you found any conditions does not met like below, check what needs to be adjusted in order to meet the prerequisites.
In this case Soft Resource Limit file descriptors was not met the condition.



13. Check Soft resource limit description size by using ulimit –n.
14. In this case the value is 1024.
15. If needed change the value using ulimit -d
&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbspE.g.: ulimit –d





16. Then click on Next



17. Click on Start






18. Press on Retry button and try again to avoid the error







19. Press on OK button





20. Click on OK



21. Open System info page and check whether Upgrade completed successfully or not.



Updating the Portal Platform:

1. Extract following 4 files using SAPCAR in order to upgrade to sp19

Note: Before uncaring files rename old uncared folders
to avoid over writing.

Portal Platform 6.0_640:

EP6CTRL_.SAR: EP6CTRL19_0-10002790.SAR
EP6TOOLS_.SAR: EP6TOOLS19_0-20000394.SAR
EP6PORTAL_.SAR: EP6PORTAL19_0-20000394.SAR
SAPINST_.SAR: SAPINST19_0-20000121.SAR

2. Then change to following directory and start sapinst



3. Enter Administrator user and password for that user and click on Next



4. When updating SP Stack, the SDM should be in safe mode. And sapinst itself will take care of this.

5. In this step, it will ask whether to stay in Safe mode after applying patches or switch back to Normal mode once upgrade is done.

6. Keep default selection and click on Next



7. Click on Start to start with Portal Upgrade



8. Click on OK button to confirm the portal platform upgrade.



9. Open portal and check whether upgrade completed successfully or not.



Updating the KMC:

1. Extract following 4 files using SAPCAR

Note: Before uncaring files rename old uncared folders to avoid over writing.

CM+COLLABORATION 6.0_640:

EP6KMC_.SAR: EP6KMC19_0-10002972.SAR
EP6CTRL_.SAR: EP6CTRL19_0-10002790.SAR
EP6TOOLS_.SAR: EP6TOOLS19_0-20000394.SAR
SAPINST_
.SAR: SAPINST19_0-20000121.SAR

2. Change to following directory and start sapinst




3. Enter Administrator user name and password for that user



4. When updating SP Stack, the SDM should be in safe mode. And sapinst itself will take care of this.

5. In this step, it will ask whether to stay in Safe mode after applying patches or switch back to Normal mode once upgrade is done.

6. Keep default selection and click on Next.



7. Click on Start button to start installation





Saturday, August 1, 2009

Designing a new Theme – Changing the Banner and Logo in SAP Portal

Old


New




Table of Contents
1. Portal Theme, Portal Framework, Portal Desktop
2. New Theme - Designing
3. Include Theme to ‘Portal Desktop’
4. Changing the Theme – Single User
5. Changing the Theme – Default theme for all the Users
6. Deleting a Theme
7. Exporting and importing a Theme
8. Reference


1. Portal Theme, Portal Framework, Portal desktop
A portal theme defines the visual appearance of the control elements, font size, colors, and contrast of the user interface elements of a portal desktop. A portal theme does not define the layout, structure, or contents of a portal desktop. This is defined by the default framework page. Neither the framework page nor the portal theme are directly assigned to a user. Combinations of framework pages and portal themes result in portal desktops. Portal desktops are assigned to users
Steps in personalizing a theme include:


2. New Theme – Designing

2.1 Go to System Administration -> Theme Editor




2.2 Select any Theme Templates for creating a new theme