 | Dec 2006 J2EE Code Validation Preview for IBM® WebSphere® Studio is a tool that
automatically detects common error patterns and violations of best practices in
Web applications. It enables you to validate your application to
detect code defects prior to application deployment.
This document contains the following sets of information:
Notes:
- This release of the J2EE Code Validation Preview for WebSphere Studio is
English-only.
- Once you have installed the J2EE Code Validation Preview for WebSphere
Studio, the feature that you should look for within the WebSphere Studio
workbench that will enable you to use the tool is the J2EE Code Validator,
the validator of choice for this technology preview, as described in the
online documentation.
Installation of the J2EE Code Validation Preview for
WebSphere Studio
Installing the J2EE Code Validation Preview for WebSphere
Studio
- Download the "Downloadable zip" from www.ibm.com/websphere/developer/downloads/j2ee_code_validation.html.
- Unzip the downloaded file to a temporary directory on your machine.
- Launch WebSphere Studio Application Developer Version 5.1
- Selected Help => Software Updates => Update Manager.
- In the Feature Updates view, expand My Computer to the temporary
directory where you unzipped the file that you downloaded.
- Click J2EE Code Validation Preview for WebSphere Studio 5.1.0. The
Preview page opens.
- Click the Install Now button.
- The installation wizard appears.
- Click the Next button.
- Accept the License Agreement and click Next.
- Select the installation location and click Finish.
- Restart the workbench.
Reinstalling the J2EE Code Validation Preview for WebSphere Studio
In case some of the files got corrupted for any reason or you want to
install the preview, follow these steps:
- From the
WS_Instdir\wstools\eclipse\plugins directory,
delete all the plug-ins that follow this naming convention:
com.ibm.etools.saber.*.
(where WS_Instdir is the directory in which you installed
WebSphere Studio Application Developer).
- From the
WS_Instdir\wstools\eclipse\features directory,
delete all the plug-ins that follow this naming convention:
com.ibm.etools.saber.*.
- Follow the steps as in the section on Installing the
J2EE Code Validation Preview for WebSphere Studio.
Uninstalling the J2EE Code Validation Preview for WebSphere Studio
From the WS_Instdir\wstools\eclipse\plugins as well as the
WS_Instdir\wstools\eclipse\features directory, delete all the
plug-ins that follow this naming convention: com.ibm.etools.saber.*.
Known problems and limitations of the J2EE Code Validation
Preview for WebSphere Studio
Limitations
- The J2EE Code Validation Preview for WebSphere Studio does not support
analysis of the following items:
-
Enterprise Java Beans
Any code in these beans or code that is reachable only from these beans
is not analyzed.
-
Certain types of reflection
The J2EE Code Validation Preview for WebSphere Studio only supports
reflection such as newInstance() and classForname(). Reflection calls such
as method.invoke() are not supported. So, any code reachable only from
these methods is not analyzed.
-
Struts
Any code in struts or code only reachable from struts is not analyzed.
-
Standalone Java applications
Any code that contains main() is not analyzed.
- Recommended message limit for the J2EE Code Validation Preview for
WebSphere Studio
It is recommended that the maximum number of messages be set to 100.
- Logging
The J2EE Code Validation Preview for WebSphere Studio
sends log entries to two log files. Assuming that
the workspace is located at C:\myWorkspace, the following
files may contain information from the validator:
C:\myWorkspace\.metadata\LoggingUtil.log and C:\myWorkspace\.metadata\com.ibm.etools.saber.log.xml.
- Web services Limitations
Code related to web services will not be analyzed.
Known problems
-
Servlet selection
If servlets are not explicitly selected in your project's properties, the
J2EE Code Validator may not include any servlets in the analysis. If this
occurs, analysis of your application will stop at the call graph construction
step and you will not see progress beyond that step in the Status view.
Workaround:
- Select the project.
- From its pop-up menu, select Properties.
- From the list on the left, select J2EE Code Validator.
- On the J2EE Components notebook page, make sure that all the
listed servlets are selected.
- Click OK.
-
Selection of JSPs and dependent JAR files
A large number of JSPs (600 or more) will result in performance
problems on a machine with 1GB memory. Similarly, inclusion of framework-related
JAR files (for example, xerces.jar) will also cause performance problems.
Workaround: You can conduct the analysis on the rest of your
application by choosing to exclude JSPs and dependent JAR files from your
analysis.
To exclude JSPs:
- Select the project.
- From its pop-up menu, select Properties.
- From the list on the left, select J2EE Code Validator. The
J2EE Components notebook page opens.
- Clear the Include JSPs in analysis check box.
- Click OK.
To exclude dependent JAR files altogether:
- Open the J2EE Code Validator Preferences page (Window=> Preferences
=> Validation => J2EE Code Validator).
- Make sure that the Include dependent JAR files check box is
not selected.
- Click OK.
To include specific dependent JAR files:
- Open the J2EE Code Validator Preferences page (Window => Preferences
=> Validation => J2EE Code Validator).
- Make sure that the Include dependent JAR files check box is
selected.
- Then, open the properties page for your project: Select the project,
and from its pop-up menu, select Properties.
- From the list on the left, select J2EE Code Validator.
- Select the Dependent JAR file tab.
- From the list, select the dependent JAR files that you want analyzed.
- Click OK.
-
Incorrect errors reported against WSDL-generated code
The J2EE Code Validator incorrectly identifies WSDL-generated
implementations of equals(), hashCode() and compareTo() as errors when in
fact, they are not.
Rate this content
|  | |  |