How to solve JSP Error unable to find class on Liferay Portal’s ext environment

My friend had a little problem when he developed portlet using ext-environment with Liferay 5.0.0 and tomcat 6.0. The problem is, after deploying all files to tomcat ( using ant deploy on ext ), the jsp files seem unable to find the classes. The error message is this :

An error occured at line: 195 in the generated java file
Only a type can be imported. com.ext.portlet.firm.model.Firm resolves to a package

Stractrace:11:12:07,206 ERROR [IncludeTag:52] org.apache.jasper.JasperException: Unable to compile class for JSP:

(As you can see from the image above as well).

This is how to solve it :

1. Open $tomcat_home/conf/

2. Fine a line which is like this :


and change it to become like this.


We need to modify build-parent.xml (line 79) under ext-impl folder to become like this

               <copy todir="classes">
                       <fileset dir="src">
                               <include name="*/dependencies/**" />
                               <include name="content/**" />
                               <include name="META-INF/.xml" />

to make sure that folder content and META-INF/*.xml copied to ext-impl.jar. (Credit to Abdul Malik for build-parent.xml modification)
Tested on Liferay 5.0.0 with Tomcat 6.0. Thanks to Abdul Malik for the image.

No comments yet

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: