Only a type can be imported. xxxxxx resolves to a package - AEM/Adobe CQ5
We were receiving the following error in run time due to this the pages got broken. The same scenario was working fine earlier and broken without any code or config change to the server.We have tried multiple options as follows without any luck
- Re-deploying the code to affected server
- Restarting the server
- Removing run time class files - /var/classes/org/apache
- Recompile/Clear the JSP classes - http://www.albinsblog.com/2016/04/how-to-clearrecompile-jsp-classes-in-AEM-6.1.html
We could not able to identify the root cause but as a work around manually added a space to the component and saved through CRXDE and that helped to fix the issue.
This comment has been removed by the author.
ReplyDeleteHi Albin,
ReplyDeleteThis will happen as while Uploading/Installing the project Bundle/Jar in to AEM, you will have to refresh all the bundles too along with refreshing only one Jar the has to be Uploaded( Wait for 5-10 sec after clicking on refresh of all bundles).
This should resolve the issue.
Thanks Sumanth.
DeleteThis happened all of sudden, we did not uploaded/installed any bundle/jar to the server.
Looks to be a strange issue.
Thanks
Albin I
This comment has been removed by the author.
DeleteThanks Albin,
ReplyDeleteI always face this issue when I upload/Install a bundle and access a Page(In turn jsp/component) while its still restarting.
While this happens the package is still not available for jsp and the compiled jsp class gets stored under ~crx-quickstart\launchpad\felix\bundleNo\data\apps folder. I either just modify something in the jsp to make the jsp compile again or delete the compiled classes from bundle folder I mentioned earlier and it will resolve the issue for me.
Thanks,
Sumanth
Thank you for taking the time to provide us with your valuable information. We strive to provide our candidates with excellent care and we take your comments to heart.As always, we appreciate your confidence and trust in us.
ReplyDeleteSAP training in Chennai
Hi Albin,
ReplyDeleteIf this is not resolved yet. Please try the below approach of increasing service ranking to max value.
for example:
@Property(name = "service.ranking", intValue = Integer.MAX_VALUE, propertyPrivate = true)
Hope this helpss!!!
Sumanth
Hi Albin,
ReplyDeleteUse below code to import your service in jsp or fiddle in AEM.
SlingBindings bindings = (SlingBindings) req.getAttribute(SlingBindings.class.getName());
SlingScriptHelper scriptHelper = bindings.getSling();
MyService service = scriptHelper.getService(MyService.class);
This is totally working code.
Hope this helpss-
Amogh
http://:<AEM PORT/system/console/slingjsp
ReplyDeleteforces all you jsp to recompile when installing bundles, fixes most of the dumb publish app issues when replicating / installing bundles.
This worked for me.
Deletethis worked for me too, Thanks
ReplyDelete