Problem

This page describes the solution to the following warnings that you may encounter,when analyzing java source.

Warning MODULMSG ; Job execution JAVA142: unable to find or to use archive "S:\Sources\JAVA_CODE\maven-buildcentral\org\java_test\javatest-complete\1.4.0JTEST\jtest-complete-1.4.0JTEST.jar". Archive 'S:\Sources\JAVA_CODE\maven-buildcentral\org\java_test\javatest-complete\1.4.0JTEST\jtest-complete-1.4.0JTEST.jar' is not in .ZIP format.

Warning MODULMSG ; Job execution JAVA142: unable to find or to use archive "S:\Sources\JAVA_CODE\maven-buildcentral\org\java_test\javatest-complete\1.4.0JTEST\jtest-complete-1.4.0JTEST.jar". Archive 'S:\Sources\JAVA_CODE\maven-buildcentral\org\java_test\javatest-complete\1.4.0JTEST\jtest-complete-1.4.0JTEST.jar' is not in .ZIP format.

Observed in CAST Extension

Release

Yes/No

JEE 1.1.x(tick)
JEE 1.0.x(tick)
Observed on RDBMS
RDBMS
Yes/No
Oracle Server(tick)
Microsoft SQL Server(tick)
CSS(tick)
Step by Step Scenario
  1. Package the Java source code.
  2. Deliver and accept the delivery.
  3. Run the analysis, check in the analysis log.
Impact on Analysis Results and Dashboard

The jar files would not be inflated and hence the object resolution would be proper which could lead to missing links

Action Plan
According to the Warnings in the log file follow the below steps :
  1. Open the analysis log.
  2. Go to to the warning and see which .jar/.zip file it is referring to and navigate to the .jar/.zip file.
  3. Check if the .jar file is corrupt or fine by unzipping the jar file using 7z.
    a. While unzipping the jar file if you get the below error, the jar file is corrupt and user has to get a good jar file:

    b. If the .jar file is corrupt check if the jar is àpplication related jar or third party open source jar. If it is third party open source you can download the jar from internet and run the analysis. If the jar is application related ask the user to get a good jar and then replace it and run the analysis.
  4. Check if the .zip file is corrupt or fine by unzipping it using 7z.
    a. While unzipping the zip file if you get any error message like above, the zip file is corrupt ask for new file.
    b. If you are able to open the zip file then check the structure of the unzipped folder. The structure should match with jar file structure. It should have .class files like jar has. If you have jars or xml files inside the unzipped zip file then these type of zip file is not supported. If the jars present in the zip file are used in the application you need to extract it and place the jars in the classpath.
  5. If the jar file is very large and you have increased the amount of memory available on the system to try to deal with this and still are having the issue, then you may need to do the following workaround:
    1. Follow the below steps to unjar the jar file to some folder like  D:\CAST\Deploy\<application>\Unjarred. Please do not change the file structure after un-jarring the files
      1. Open a command prompt window
      2. Move to the directory to unjar, in this case D:\CAST\Deploy\<application>\Unjarred
      3. Run the command: jar xvf <path_to_jarfile>
      4. If above jar command is not found, you may need to run: <path to bin directory for JAVA jdk>\jar xvf <path_to_jarfile>
    2. Remove the problem jar file from the deployed area
    3. Add a Class root folder in the classpath area to point to the folder D:\CAST\Deploy\<application>\Unjarred:
    4. If the setup is correct analyzer will pick up the references directly from .class files.
  6. If the jar file is unzipped without any error and the jar file is not large then contact CAST Technical Support with the Relevant Input to reproduce issue.

Relevant Input

  1. Sherlock (CAST Support Tool (CST) - alias Sherlock) : Export Cast Database (Management Base and Local Base only), Export logs, Export Configuration Files, Export source code
  2. Explanation about the problem and supporting screenshots
Impact of the Solution

No Impact on the analysis and the dashboard.

Notes/comments
 Ticket #14287, 28264