« Back to Application Servers

WebSphere 6.1 tips

Install Websphere 6.1 on Windows 7 or Windows Server 2008 #

When you attempt to use the GUI installer to install IBM WAS v6.1 on Microsoft Windows 7 or Windows Server 2008 R2, you might encounter the following error message from the InstallShield Wizard:

The installer is unable to run in graphical mode. Try running the installer with the -console or -silent flag.

The IBM Software Development Kit (SDK) v1.5, which was bundled with WAS v6.1 in 2006, does not properly recognize the Windows 7 and Windows Server 2008 R2 operating systems.

Resolving the problem #

  • Right-click Properties on the install.exe file with the WAS folder of the installation image for WAS v6.1.The Properties window displays.
  • Click the Compatibility tab on the Properties window.
  • Click Change settings for all users on the Compatibility tab. A new Properties window displays.
  • Select the Run the program in compatibility mode option and select either the Windows Vista mode or Windows Server 2008 (Service Pack 1) mode.You can select any of the Windows Vista modes when you are using the Windows 7 operating system. However, you must select the Server 2008 (Service Pack 1) mode when you are using the Windows Server 2008 R2 operating system.
  • Click OK at the bottom of the window and click OK on the remaining window.
  • Run the install.exe file to install the application server. A system prereq-check failure windows displays during the installation process.The failure message occurs for any operating system that was released after the 2006 introduction of WAS v6.1. For this installation process, you can ignore that failure message and continue.

Note: During the installation process, if you use an Aero desktop theme, it will be temporarily changed to a ˜Windows 7 Basic theme.

Update #

Update your WAS v6.1 installation to version 6.1.0.29 or later using Update Installer for WebSphere Software v7.0.0.9 or later.

Install Portal v6 #

Installing Portal on WAS 6.1 requires some additional steps before portals war can be deployed:

  • add jpa.jar to the WebSphere6/AppServer/lib/ext.
  • add following jars to the WebSphere6/AppServer/java/jre/lib/ext, as WebSphere already contains older versions these jars which must be overridden at the highest level of the class path (older version are located here: WebSphere6/AppServer/plugins):
    • activation.jar
    • mail.jar
    • portlet.jar
    • servlets-api.jar
    • log4j.jar
    • stax.jar

MessageListenerException: javax.mail.NoSuchProviderException: No provider for pop3s #

See Install Portal v6. Websphere 6.1 comes with the old jars, and mail-impl.jar that comes with Websphere 6.1. is old and does not have pop3s provider. Follow installation instructions above and add new jars. For this issue you would need just:mail.jar and activation.jar

Error 404: SRVE0190E #

If servlet filters mapped to URLs/resources don’t physically exist, WebSphere 6.1 will return "Error 404: SRVE0190E". Run WebSphere in trace mode for FileNotFoundException in the log file (or debug 404.jsp).

Fix #

Navigate to: Application servers > server1 > Web Container Settings > Web container > Custom Properties

Set the following properties:

  • com.ibm.ws.webcontainer.invokeFiltersCompatibility = true
  • com.ibm.ws.webcontainer.invokefilterscompatibility = true

They are the same, except the second is all lowercased. Save config and restart the server.

Alternative - local fix #

Use an empty file for the included file. For login, put an empty file 'home' in doc root.

http://www-01.ibm.com/support/docview.wss?uid=swg21385723

http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg1PK65408

http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp?topic=/com.ibm.websphere.express.doc/info/exp/ae/rweb_custom_props.html

Enable http_access.log #

Enable following options:

  • Application servers > server1 > HTTP error and NCSA access logging > Enable service at server startup
  • Application servers > server1 > Web container transport chains > WCInboundDefault > HTTP inbound channel (HTTP_2) > Enable access and error logging

Set the VM arguments #

Navigate to: Servers > WebSphere application servers > server1 > Configuration tab > Server Infrastructure > Java and Process Management > Process definition > Additional Properties > Java Virtual Machine > Java Virtual Machine > Generic JVM arguments

Make changes and save configuration.

Compile JSP from command line #

Sometimes it is convenient to compile JPSs from command line - that would show immediately potential JSP errors, without having server running. It is possible to compile single JSP, but also the whole web app - in our case a portlet.

Compile single jsp in portlet:

WebSphere6\AppServer\bin> JspBatchCompiler
		-enterpriseapp.name web-form-portlet_war
		-webmodule.name web-form-portlet.war
		-filename /foo.jsp
		-keepgenerated true

Compile all JSPs of portal:

JspBatchCompiler -enterpriseapp.name liferay-portal-6_0_12_war -webmodule.name liferay-portal-6.0.12.war -keepgenerated true

Compile all JSPs of portlet:

JspBatchCompiler -enterpriseapp.name mail-portlet_war -webmodule.name mail-portlet.war -keepgenerated true

More info: http://publib.boulder.ibm.com/infocenter/wsdoc400/v6r0/index.jsp?topic=/com.ibm.websphere.iseries.doc/info/ae/ae/rweb_jspbchtl.html

Restarting portal #

Restarting portal inside application server seems not possible because of Websphere bug. Bug appears as following exception message in the log:

java.lang.VerifyError: class loading constraint violated

Simultaneous hit to the database causes the problem - issue with apps server's class loading hierarchy.

Quick solution is to set Websphere6 in the "development mode" from the web console (navigate to the "Application servers", check the "Run in development mode" and do a quick restart). Restart Websphere 6. After I was able to restart liferay in websphere6!

Important WAS parameters #

Set these, especially the first one.

com.ibm.ws.webcontainer.invokeFiltersCompatibility=true 
com.ibm.ws.webcontainer.enabledefaultservletrequestpathelements=true
prependSlashToResource=true

Dynamic JSP tag attributes #

Following JSP tag with dynamic attributes:

<aui:input name="fileName" type="hidden" value="<%= fileName %>" />

may generate java code in two ways by Websphere 6 JSP compiler:

  • inline; when tag is simply replaced with some set of java lines at place of usage; or
  • as a method, when the same set of java lines are moved into a method and tag is replaces with method invocation.

The later usually happens when JSP page is big since there is a limit of how big java method can be; therefore Websphere shorten the main JSP method and extract some tags into the external methods.

The problem with this is that Websphere 6 has a bug: it simply copy/paste generated java lines for a tag and wraps it into method; so all dynamic attributes becomes unknown in the method scope! Like this:

private boolean _jspx_meth_aui_input_4(javax.servlet.jsp.tagext.JspTag _jspx_th_aui_field$1wrapper_2, PageContext pageContext)
     throws Throwable {
    JspWriter out = pageContext.getOut();
    com.liferay.taglib.aui.InputTag _jspx_th_aui_input_4 = new com.liferay.taglib.aui.InputTag();
    ...
    _jspx_th_aui_input_4.setType(fileName);

Obviously, this is a bug. To solve this, we would need to send html-code of raw attributes inside one dynamic attribute. As websphere 6 lifespan ended, we would not support this: the complexity of the solution gives significantly less readable/maintainable JSP pages, and having that only because of 6.1 is too much.

The portal code should not have issues with this. Here is the list of portlets found so far with the issue:

  • mail portlet
  • reports portlet (EE)

Set user.timezone ! #

Don't forget to set JVM argument: -Duser.timezone=GMT as many things can go wrong with Websphere and IBMs JDK (i.e. date conversion). This can be set in: Application servers > server1 > Process Definition > Java Virtual Machine > Generic JVM arguments.

0 Attachments
34412 Views
Average (0 Votes)
The average rating is 0.0 stars out of 5.
Comments