ekambaram_kr Absent Member.
Absent Member.
4758 views

IMPORT Cannot be resolved

Jump to solution

Hi,

I am getting following error when verifying the JAVA source file.

The IMPORT.COM.PAYLESS.ARCH cannot be resolved

I have installed JAVA ADD ON. Is any more settings required for JAVA source?

Regards,

Ek..

0 Likes
1 Solution

Accepted Solutions
ekambaram_kr Absent Member.
Absent Member.

RE: IMPORT Cannot be resolved

Jump to solution

Hi,

It seems we have found a possible solution for the above issue. Not sure if this is due to the version that we are using(3.4).

We need to compile all the JAVA source, which creates a new set of CLASS files and these are added to CLASSPATH.

Doing above has resolved, the IMPORT failure.

Earlier we were referring the CLASS files that were generated in development machine and shared to us.

Let us know if you have any comments.

Regards,

Ek..

0 Likes
11 Replies
PriyaRC Absent Member.
Absent Member.

RE: IMPORT Cannot be resolved

Jump to solution

You will have to provide references to all the .jar files referred by your application. You can give this under Workspace options --> Verification --> Settings --> JAVA file - Enter classpath to JAR Files and/or path to external Java file root directories.

If you still get the error, the other thing to check for is, how you added the files to the workspace. Since there are multiple folders typically involved in a JAVA application (the way in which the source files are stored), you can copy the parent folder (ctrl+c) and paste in the EA project (ctrl+v). This will ensure the same folder structure is captured in EA as well.

0 Likes
ekambaram_kr Absent Member.
Absent Member.

RE: IMPORT Cannot be resolved

Jump to solution

Hi,

we have referred to the .JAR files in both Workspace options and Project options under - Enter Classpath to JAR files and /or path to external Java file root directories.

Also, we have added the files to the workspace by using "Preserve folder structure" and attached in the workspace. We have cross verified under the SOURCE/JAVA FILE in workspace too.

Still the IMPORT is not getting resolved.

Any suggestions pls.

Regards,

Ek..

0 Likes
PriyaRC Absent Member.
Absent Member.

RE: IMPORT Cannot be resolved

Jump to solution

It probably means the file that contains the definition for this import is missing.

0 Likes
ekambaram_kr Absent Member.
Absent Member.

RE: IMPORT Cannot be resolved

Jump to solution

Hi,

We have checked that the reported Missing file is available but the tool is unable to refer it to the JAR file.

Could we be able to get where it is referring? meaning the path it is referring for JAR file.

We checked in the .CLASSPATH and .PROJECT under workspace it is pointing to correctly.

Regards,

Ek..

0 Likes
ekambaram_kr Absent Member.
Absent Member.

RE: IMPORT Cannot be resolved

Jump to solution

Hi,

We are trying to analyze and generate report for a JAVA application but are facing issues in IMPORT statements.

eg: IMPORT com.abcd.xyz.cal  CANNOT BE RESOLVED

We have added the source with both options as described below

* With PRESERVE FOLDER STRUCTURE

* Without PRESERVE FOLDER STRUCTURE

The JAR file added in the PROJECT OPTIONS - VERIFICATION - SETTINGS under ADD JAR FILE contains the project "com.abcd.xyz.cal" which is reportedly showing as CANNOT BE RESOLVED.

Can you please help us in understanding where we are going wrong.

Your help in above issue will be highly appreciated.

PS:  Using Micro Focus Enterprise Analyzer 3.4 with JAVA Add-on 3.3

Regards,

Ekambaram

0 Likes
PriyaRC Absent Member.
Absent Member.

RE: IMPORT Cannot be resolved

Jump to solution

Hi, Please see if this is a known issue and is fixed by any of the hotfixes released for EA 3.4. The latest is otFix9 i believe. You can check the release notes to see if there is any JAVA verification issue that is addressed by this patch. If yes, you can install it, upgrade your workspace and check if the error still exists. Thanks, Priya R C

0 Likes
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

RE: IMPORT Cannot be resolved

Jump to solution

Hi,

                as Priya suggests, looking to see if the latest Hot Fix for your version of EA is a good start. If that does not help to resolve the issue, then you should raise this as an incident with support line.

With this type of situation, we would need copies of the source code, information about the error (ie what is not being resolved), together with a list of the java jar files that you have already included.

It could be that you have not included one of the java sdk jar files and by doing that it may mean that resolves the issue.

Adrian Bean
Support Engineer, EMEA SupportLine

Micro Focus

0 Likes
Highlighted
ekambaram_kr Absent Member.
Absent Member.

RE: IMPORT Cannot be resolved

Jump to solution

Hi,

We have tried with HF9 but still the issue persists.

Between, this is a basic error (Import not getting resolved) so i do no think it has something to do with version or hotfix. I feel, we are missing somewhere in the setup are have understood the process incorrectly and executing.

If you have any suggestions, pls let us know.

ps: We are planning to test in EA 3.5

Regards,

Ek..

0 Likes
PriyaRC Absent Member.
Absent Member.

RE: IMPORT Cannot be resolved

Jump to solution

Hi, I would suggest what Adrian had mentioned yesterday. You can either a) share your inventory with support so they can try and recreate the problem you are getting or b) setup a livemeeting or webex and invite MF support to analyze what is going wrong. Before installing EA 3.5 its better ti check the release notes to see if any of your errors are getting addressed by it. Thanks.

0 Likes
neils1 Absent Member.
Absent Member.

RE: IMPORT Cannot be resolved

Jump to solution

I agree, it sounds as if something in the configuration is not right rather it being a version question. If you have entered the classpath folder in the workspace or project settings AND checked the box below that says "Include Jar/Zip Files From Directories", then there is no reason this should not work. The EA Java parser in 3.4 is essentially the Eclipse Java compiler so if the file compiles in Eclipse then it should parse in EA.

0 Likes
ekambaram_kr Absent Member.
Absent Member.

RE: IMPORT Cannot be resolved

Jump to solution

Hi,

It seems we have found a possible solution for the above issue. Not sure if this is due to the version that we are using(3.4).

We need to compile all the JAVA source, which creates a new set of CLASS files and these are added to CLASSPATH.

Doing above has resolved, the IMPORT failure.

Earlier we were referring the CLASS files that were generated in development machine and shared to us.

Let us know if you have any comments.

Regards,

Ek..

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.