Error while calling method from the jsp. | Community
Skip to main content
Level 2
October 16, 2015
Solved

Error while calling method from the jsp.

  • October 16, 2015
  • 2 replies
  • 736 views

Hello,

I have a storeLocator class created which installed fine as a part of the bundle.

I imported the package to my jsp and instantiated the class.

While trying to call the the method of this class from the jsp,it gives following error

Caused by: org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 21 in the generated java file
Only a type can be imported. com.svu.privatebrands.components.servlets.StoreLocatorServlet resolves to a package

 I am currently on AEM 6.1.

Cannot see anything in the code that might be causing an issue to find the required method.

Please help.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by edubey

Although replying after 5 months, hope it helps someone in future:

Make sure you are exporting this package or added this in export package list.

2 replies

edubey
edubeyAccepted solution
Level 10
February 16, 2016

Although replying after 5 months, hope it helps someone in future:

Make sure you are exporting this package or added this in export package list.

Feike_Visser1
Adobe Employee
Adobe Employee
February 16, 2016

And that the bundle is active.