5/30/2011

Only a type can be imported. XYZ resolves to a package

If you receive an error like this while doing a JSP for Liferay:

An error occurred at line: 8 in the generated java file
Only a type can be imported. com.example.XYZClass resolves to a package.

Most of the time it means "your jar file is missing !". So take a look at your servers lib directory, rebuild your hooks and it should work.



If you like this post it would be very nice, if you could click on some of the google ads you see on the right side. It helps me run this block and motivates me ;)

If you have any questions, feel free to leave a comment.