Expand my Community achievements bar.

s7PublishStatus cannot be resolved to a variable in overlayed JSP file

Avatar

Level 4

We have overlayed a jsp file to customize the touchUI, but some of the unaltered code from the overlayed jsp file is throwing an unexpected error:

 

05.09.2024 13:52:40.181 *ERROR* [10.1.204.145 [1725569559794] GET /mnt/overlay/dam/gui/content/assets/jcr:content/views/list.0.html/content/dam/my-dam/photography HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Uncaught SlingException
org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 176 in the jsp file: /apps/dam/gui/coral/components/admin/contentrenderer/row/asset/asset.jsp
s7PublishStatus cannot be resolved to a variable
173: if (showDMPublishCol){
174: //s7 publish status does a s7config lookup for every resource
175: //no need to get s7 publish status if DM publish columns is not to be shown
176: s7PublishStatus = resource.adaptTo(Scene7PublishStatus.class);
177: }
178: if (s7PublishStatus != null) {
179: //should this only be when mode is selective publish


An error occurred at line: 178 in the jsp file: /apps/dam/gui/coral/components/admin/contentrenderer/row/asset/asset.jsp
s7PublishStatus cannot be resolved to a variable
175: //no need to get s7 publish status if DM publish columns is not to be shown
176: s7PublishStatus = resource.adaptTo(Scene7PublishStatus.class);
177: }
178: if (s7PublishStatus != null) {
179: //should this only be when mode is selective publish
180: dmPublishDate = s7PublishStatus.getPublishTimestamp();
181: dmPublishPrincipal = s7PublishStatus.getPublishedBy();


An error occurred at line: 180 in the jsp file: /apps/dam/gui/coral/components/admin/contentrenderer/row/asset/asset.jsp
s7PublishStatus cannot be resolved
177: }
178: if (s7PublishStatus != null) {
179: //should this only be when mode is selective publish
180: dmPublishDate = s7PublishStatus.getPublishTimestamp();
181: dmPublishPrincipal = s7PublishStatus.getPublishedBy();
182: dmPublishPublishedBy = dmPublishPrincipal!=null ? AuthorizableUtil.getFormattedName(resource.getResourceResolver(), dmPublishPrincipal) : "";
183: if (Scene7Constants.PV_S7_PUBLISH_COMPLETE.equals(s7PublishStatus.getPublishAction())){


An error occurred at line: 181 in the jsp file: /apps/dam/gui/coral/components/admin/contentrenderer/row/asset/asset.jsp
s7PublishStatus cannot be resolved
178: if (s7PublishStatus != null) {
179: //should this only be when mode is selective publish
180: dmPublishDate = s7PublishStatus.getPublishTimestamp();
181: dmPublishPrincipal = s7PublishStatus.getPublishedBy();
182: dmPublishPublishedBy = dmPublishPrincipal!=null ? AuthorizableUtil.getFormattedName(resource.getResourceResolver(), dmPublishPrincipal) : "";
183: if (Scene7Constants.PV_S7_PUBLISH_COMPLETE.equals(s7PublishStatus.getPublishAction())){
184: dmPublishIcon = "assetsPublished";


An error occurred at line: 183 in the jsp file: /apps/dam/gui/coral/components/admin/contentrenderer/row/asset/asset.jsp
s7PublishStatus cannot be resolved
180: dmPublishDate = s7PublishStatus.getPublishTimestamp();
181: dmPublishPrincipal = s7PublishStatus.getPublishedBy();
182: dmPublishPublishedBy = dmPublishPrincipal!=null ? AuthorizableUtil.getFormattedName(resource.getResourceResolver(), dmPublishPrincipal) : "";
183: if (Scene7Constants.PV_S7_PUBLISH_COMPLETE.equals(s7PublishStatus.getPublishAction())){
184: dmPublishIcon = "assetsPublished";
185: }
186: else if (dmPublishDate != null ){

 

We do not use scene7 and I am unfamiliar with that aspect of aem, so I am wondering what could be causing this issue. I used this post as a guide when making my overlay and changes to the jsp file: http://experience-aem.blogspot.com/2018/03/aem-6310-show-custom-banners-in-card-list-column-views-to... . Nothing in my custom code is throwing any errors. What could be causing this issue? I have tried forced recompiling the jsp files to no avail.

4 Replies

Avatar

Community Advisor

HI @DNest19 ,

Do you still see these errors when you revert back your overlaid files?
If yes, then probably try to recompile jsp files:

  • Go to CRXDE and delete all subfolder from /var/clientlibs and /var/classes. NOTE: Do not delete /var/clientlibs/rep:policy
  • From OSGI go to http://<host>:<port>/system/console/slingjsp and "Recompile all JSPs"

 

-Tarun

Avatar

Level 4

Hi Tarun,

The slingjsp address you gave returned me the following message: The requested page was not found. If you are not forwarded in 3 seconds to the Web Console, please click here.

 

I am using AEM 6.5

Avatar

Level 4

@TarunKumar Could you look at my other reply and let me know if there's a different url I should be using.

Avatar

Community Advisor

Hi @DNest19 ,

Yes, this URL has been changed please use below one:

<host>:<port>/system/console/fsclassloader

 

 

-Tarun