Expand my Community achievements bar.

SOLVED

JSP loader could not find classes

Avatar

Level 1

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.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

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

 

Thanks,

Peter

View solution in original post

7 Replies

Avatar

Level 10

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

Avatar

Correct answer by
Community Advisor

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

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

 

Thanks,

Peter

Avatar

Level 1

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

Avatar

Level 10

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

Avatar

Level 2

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

Avatar

Employee Advisor

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

Avatar

Level 2

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