Handling Java warnings

To see all warnings that were generated during translation, type the following command before you start the scan phase:

sourceanalyzer -b <build_id> -show-build-warnings

Java translation warnings

You might see the following warnings in the Java code translation.

Warning Resolution
Unable to resolve type...
Unable to resolve function...
Unable to resolve field...
Unable to locate import...
Unable to resolve symbol...

These warnings are typically caused by missing resources. For example, some of the .jar and .class files required to build the application might not have been specified.

To resolve these warnings, make sure that you include all the required files that your application uses.

Multiple definitions found for class...

This warning is typically caused by duplicate classes in the Java files.

To resolve these warnings, make sure that the source files displayed in the warning are not duplicates of the same file included several times in the sources to translate (for example if it contains two versions of the same project). If a duplicate exists, remove one of them from the files to translate. Then OpenText SAST can determine which version of the class to use.

This warning can also indicate that classes are missing. To resolve this, make sure to add all required JAR files to the classpath.