JSP not compiling due to: "Only a type can be imported. [class name] resolves to a package"
(Doc ID 1510199.1)
Last updated on DECEMBER 21, 2022
Applies to:
Oracle WebCenter Sites - Version 11.1.1.6.0 and laterInformation in this document applies to any platform.
Symptoms
A custom JSP does not compile, and the following type of error is seen in the logs:
"[fatwire.logging.cs.request] Exception including resource /jsp/cs_deployed/<jsp_path_and_file_name>.jsp
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: [line #] in the generated java file
Only a type can be imported. [class name] resolves to a package"
For example:
[fatwire.logging.cs.request] Exception including resource /jsp/cs_deployed/Sample/Test/Example.jsp
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 29 in the generated java file
Only a type can be imported. com.test.examples.SampleClass resolves to a package
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |