JSP loader could not find classes | Community
Skip to main content
October 16, 2015
Solved

JSP loader could not find classes

  • October 16, 2015
  • 7 replies
  • 2436 views

Migrating to AEM 6.1. The module is build and deployed without errors and seen among OSGi packages in web console in active state; Its class is found by dependency finder with <scope>provided</scope>.

But when trying to load page with JSP it shows the error:

java.lang.Error: Unresolved compilation problems:

        Only a type can be imported. com.myorg.MyClass resolves to a package

There are few classes from same package unresolved in this JSP. During previous tryout of 6.0 SP2 given JSP was loaded fine.

Is something in class loader has been changed since 6.0 SP2? And any idea how to resolve the issue?

By the search I seen similar questions but no actual solution. Most "auto-resolved" after few days. 

The author instance have been restarted.

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 Peter_Puzanovs

Clear /var/classes/org/apache/jsp/apps/your_app

Restart org.apache.scripting.jsp, org.apache.scripting.jst

 

Thanks,

Peter

7 replies

Lokesh_Shivalingaiah
October 16, 2015

do you see this service 'MyClass' listed in your bundle ?

Peter_Puzanovs
Community Advisor
Peter_PuzanovsCommunity AdvisorAccepted solution
Community Advisor
October 16, 2015

Clear /var/classes/org/apache/jsp/apps/your_app

Restart org.apache.scripting.jsp, org.apache.scripting.jst

 

Thanks,

Peter

October 16, 2015

Peter, appreciate your advise. After cleaning class cache and restarting the author instance JSP loaded properly.

FYI The package manager still buggy: just to upload ZIP with "force" checked is not sufficient event it shows a green installed state. To make content available I have to "reinstall" it manually.

-s

smacdonald2008
October 16, 2015

If you think there is a bug - please open a ticket. 

January 26, 2016

I am having the same problem in the 6.1 publish environment.  My custom java bundle is active.  I can see my custom class in depfinder but the jsps cannot seem to find it.

There is no /var/classes to clear and I don't see org.apache.scripting.jsp, org.apache.scripting.jst anywhere.

My bundle is #456 but when I go to crx-quickstart/launchpad/felix/bundle456 there is no data directory to clear.

Do you have any other recommendations?

Thank you,

Mary

joerghoh
Adobe Employee
Adobe Employee
January 26, 2016

Hi,

please note that in AEM 6.0 SP3 and AEM 6.1 (GA release) the compiled JSPs are no longer stored in /var/classes in the repository, but rather in the filesystem (using the fsclassloader bundle). You can force the recompilation by cleaning the JSP cache (/system/console/slingjsp).

kind regards,
Jörg

January 26, 2016

Jorg,

Thank you for your response.  I have already tried that but it did not resolve the problem.  Can you recommend anything else to try?

Mary