Wednesday, March 2, 2011

WAS7 - "enum cannot be resolved to a type” error when deploying the module on WAS7

When deploying an EAR file including source code, you may see the error "enum cannot be resolved to a type" error  and the EAR file failed to deploy.

for solve this issue:

(1) In RAD, select the EAR project, then click "Project"->"Properties", click "Java Compiler" , make sure "Compiler compliance level" is 1.6

(2) export the EAR file with the option "Export source files"

when deploying the EAR file from WebSphere Administrative console, you have to specify the "JDK Compliance Level" as "6.0" , see the following screenshot


After specified the JDK Compliance level correctly, the error should be gone.

No comments:

Post a Comment