Skip to main content


developerWorks  >  WebSphere  >

J2EE Code Validation Preview for WebSphere Studio Installation Guide and Release Notes

developerWorks

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

  1. Download the "Downloadable zip" from www.ibm.com/websphere/developer/downloads/j2ee_code_validation.html.
  2. Unzip the downloaded file to a temporary directory on your machine.
  3. Launch WebSphere Studio Application Developer Version 5.1
  4. Selected Help => Software Updates => Update Manager.
  5. In the Feature Updates view, expand My Computer to the temporary directory where you unzipped the file that you downloaded.
  6. Click J2EE Code Validation Preview for WebSphere Studio 5.1.0. The Preview page opens.
  7. Click the Install Now button.
  8. The installation wizard appears.
  9. Click the Next button.
  10. Accept the License Agreement and click Next.
  11. Select the installation location and click Finish.
  12. 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:

  1. 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).
  2. From the WS_Instdir\wstools\eclipse\features directory, delete all the plug-ins that follow this naming convention:
    com.ibm.etools.saber.*.
  3. 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

  1. 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.
  2. 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.
  3. 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.
  4. Web services Limitations

    Code related to web services will not be analyzed.

Known problems

  1. 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:

    1. Select the project.
    2. From its pop-up menu, select Properties.
    3. From the list on the left, select J2EE Code Validator.
    4. On the J2EE Components notebook page, make sure that all the listed servlets are selected.
    5. Click OK.

  2. 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:

    1. Select the project.
    2. From its pop-up menu, select Properties.
    3. From the list on the left, select J2EE Code Validator. The J2EE Components notebook page opens.
    4. Clear the Include JSPs in analysis check box.
    5. Click OK.

    To exclude dependent JAR files altogether:

    1. Open the J2EE Code Validator Preferences page (Window=> Preferences => Validation => J2EE Code Validator).
    2. Make sure that the Include dependent JAR files check box is not selected.
    3. Click OK.

    To include specific dependent JAR files:

    1. Open the J2EE Code Validator Preferences page (Window => Preferences => Validation => J2EE Code Validator).
    2. Make sure that the Include dependent JAR files check box is selected.
    3. Then, open the properties page for your project: Select the project, and from its pop-up menu, select Properties.
    4. From the list on the left, select J2EE Code Validator.
    5. Select the Dependent JAR file tab.
    6. From the list, select the dependent JAR files that you want analyzed.
    7. Click OK.
  3. 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


Please take a moment to complete this form to help us better serve you.



YesNoDon't know
 


 


12345
Not
useful
Extremely
useful
 


Back to top


Document options

Document options requiring JavaScript are not displayed


My developerWorks needs you!

Connect to your technical community


Rate this content

Help us improve this content