1. Imported WAR into WSAD as Web Project
Context root: strutscx
2. Started EAR on WAS 5
3. Got the following error:
com.ibm.etools.archive.exception.ResourceLoadException: IWAE0007E Could not load resource "WEB-INF/web.xml" in archive "StrutsCX.war"
Stack trace of nested exception:
java.lang.NumberFormatException: 60 minutes
-> Changes web.xml
<session-config> <session-timeout>60
<!-- minutes--> </session-timeout> </session-config>to
<session-config> <session-timeout>60 </session-timeout> </session-config>
4. Got errors on files
[7/18/03 23:08:34:047 CEST] 5e0e5889 Digester E org.apache.commons.digester.Digester TRAS0014I: The following exception was logged java.lang.reflect.InvocationTargetException: java.lang.UnsupportedClassVersionError: com/cappuccinonet/strutscx/prototype/presentation/actionform/InfoFormBean (Unsupported major.minor version 48.0)
at java.lang.ClassLoader.defineClass0(Native Method)
[7/18/03 23:08:34:277 CEST] 5e0e5889 WebGroup E SRVE0020E: [Servlet Error]-[StrutsCXServlet]: Failed to load servlet: java.lang.UnsupportedClassVersionError: com/cappuccinonet/strutscx/xslt/StrutsCXServlet (Unsupported major.minor version 48.0)
-> Files in jar file seem to be compiled with JDK 1.4, but WAS5 uses JDK 1.3
Removed strutscx-0.9.3.jar from lib directory, and moved source files from src directory to the source directory of the Web Project (Java Source). They get recompiled.
5.
package com.cappuccinonet.strutscx.prototype.presentation.action.InfoIntroActionhas error on
DOMImplementation domImpl =
new org.apache.xerces.dom.DOMImplementationImpl();-> xerces.jar is part of JDK 1.4, but not 1.3
added xerces.jar to project (from WebSphere, variable WAS_V5_XERCES)
6. Warnings and Errors in StrutsCXBaseActionHelper
Kind Status Priority Description Resource In Folder Location
Warning The constructor com.cappuccinonet.strutscx.util.StrutsCXDateString() is deprecated StrutsCXBaseActionHelper.java StrutsCX/Java Source/com/cappuccinonet/strutscx/action line 377 in StrutsCXBaseActionHelper.getDateToday(HttpSession, Locale)
Warning The method getDateString(java.lang.String) from the type com.cappuccinonet.strutscx.util.StrutsCXDateString is deprecated StrutsCXBaseActionHelper.java StrutsCX/Java Source/com/cappuccinonet/strutscx/action line 377 in StrutsCXBaseActionHelper.getDateToday(HttpSession, Locale)
Warning The type com.cappuccinonet.strutscx.util.StrutsCXDateString is deprecated StrutsCXBaseActionHelper.java StrutsCX/Java Source/com/cappuccinonet/strutscx/action line 377 in StrutsCXBaseActionHelper.getDateToday(HttpSession, Locale)
Warning The constructor com.cappuccinonet.strutscx.util.StrutsCXDateString() is deprecated StrutsCXBaseActionHelper.java StrutsCX/Java Source/com/cappuccinonet/strutscx/action line 429 in StrutsCXBaseActionHelper.getYear(HttpSession)
Warning The method getThisYearString() from the type com.cappuccinonet.strutscx.util.StrutsCXDateString is deprecated StrutsCXBaseActionHelper.java StrutsCX/Java Source/com/cappuccinonet/strutscx/action line 429 in StrutsCXBaseActionHelper.getYear(HttpSession)
Warning The type com.cappuccinonet.strutscx.util.StrutsCXDateString is deprecated StrutsCXBaseActionHelper.java StrutsCX/Java Source/com/cappuccinonet/strutscx/action line 429 in StrutsCXBaseActionHelper.getYear(HttpSession)
Error The constructor java.util.Locale(java.lang.String) is undefined StrutsCXBaseActionHelper.java StrutsCX/Java Source/com/cappuccinonet/strutscx/action line 607 in StrutsCXBaseActionHelper.loadResourcePropertiesFiles(ServletConfig, Document)
-> same JDK problem
Only changed the last error
Locale locale_ =
new Locale(locale);to
Locale locale_ =
new Locale(locale, "");
Same in
com.cappuccinonet.strutscx.util.StrutsCXHelper5. Warnings in Server log
[7/18/03 23:26:49:470 CEST] 3ced5903 SystemErr R log4j:WARN [StrutsCXLog4jInitPlugIn] StrutsCX Log4j successfully configured!!
[7/18/03 23:26:49:690 CEST] 3ced5903 SystemErr R log4j:WARN No appenders could be found for logger (com.cappuccinonet.strutscx).
[7/18/03 23:26:49:690 CEST] 3ced5903 SystemErr R log4j:WARN Please initialize the log4j system properly.
Unclear problem yet.
StrutsCX is using jdom-b9.jar, which added a zero argument constructor for Document() compared to older versions. WebSphere 5.0.0.1 is using an older version of jdom.jar (without this constructor)
When using this old version of jdom, you get the compile time error
The constructor org.jdom.Document is not visibleHaving the new version jdom-b9.jar (same effect with b8) in the war file of StrutsCX causes a problem with StrutsCX at runtime:
IllegalAccessError: StrutsCXXMLReader tried to access method org/jdom/Document.This is due to class loader problem with the internal version of jdom in WAS and the one in the Web project.()V
There are two solutions, but both of them are not elegant:
a) Modify StrutsCX not using the empty constructor of Document()
b) Replace jdom.jar in $WSAD/runtimes/base_v5/lib with the latest jdom-b9.jar from jdom.org (or the war file of strutscx 0.9.3)