Expand my Community achievements bar.

http://localhost:4502/assets.html/content/dam/project is not loading the assets or content fragments

Avatar

Level 2

shwethar9638050_0-1585656226313.png

 

http://localhost:4502/assets.html/content/dam/exampleproject

 

The Assets/contentfragments are not getting loaded for any projects inside the DAM, kindly help me out in resolving the issue, Below is the stack trace

 

<html>
<head><title>500 Unable to compile class for JSP:

An error occurred at line: 10 in the generated java file
Only a type can be imported. com.day.cq.dam.commons.util.StockUtil resolves to a package

An error occurred at line: 136 in the generated java file
Only a type can be imported. com.day.cq.dam.commons.util.StockUtil resolves to a package

An error occurred at line: 517 in the jsp file: /libs/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp
StockUtil cannot be resolved
514: boolean isSnippetTemplate = this.isSnippetTemplate(resource);
515: request.setAttribute(IS_SNIPPET_TEMPLATE, isSnippetTemplate);
516: // Adobe Stock Assets
517: boolean isStockAsset = StockUtil.isStockAsset(resource);
518: boolean isStockAssetLicensed = false;
519: boolean isStockAccessible = false;
520: request.setAttribute(IS_STOCK_ASSET, isStockAsset);


An error occurred at line: 522 in the jsp file: /libs/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp
StockUtil.PN_STOCK_ID cannot be resolved to a type
519: boolean isStockAccessible = false;
520: request.setAttribute(IS_STOCK_ASSET, isStockAsset);
521: if (isStockAsset) {
522: String stockId = ResourceUtil.getValueMap(metadataResc).get(StockUtil.PN_STOCK_ID, &quot;&quot;);
523: String stockPath = StockUtil.STOCK_ROOT_PATH + &quot;/&quot; + stockId;
524: metaAttrs.addOther(&quot;stock-asset&quot;, String.valueOf(isStockAsset));
525: metaAttrs.addOther(&quot;stock-id&quot;, stockId);


An error occurred at line: 523 in the jsp file: /libs/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp
StockUtil.STOCK_ROOT_PATH cannot be resolved to a type
520: request.setAttribute(IS_STOCK_ASSET, isStockAsset);
521: if (isStockAsset) {
522: String stockId = ResourceUtil.getValueMap(metadataResc).get(StockUtil.PN_STOCK_ID, &quot;&quot;);
523: String stockPath = StockUtil.STOCK_ROOT_PATH + &quot;/&quot; + stockId;
524: metaAttrs.addOther(&quot;stock-asset&quot;, String.valueOf(isStockAsset));
525: metaAttrs.addOther(&quot;stock-id&quot;, stockId);
526: metaAttrs.addOther(&quot;stock-path&quot;, stockPath);


An error occurred at line: 528 in the jsp file: /libs/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp
StockUtil cannot be resolved
525: metaAttrs.addOther(&quot;stock-id&quot;, stockId);
526: metaAttrs.addOther(&quot;stock-path&quot;, stockPath);
527: // License State
528: isStockAssetLicensed = StockUtil.isStockAssetLicensed(resource);
529: request.setAttribute(IS_STOCK_ASSET_LICENSED, isStockAssetLicensed);
530: metaAttrs.addOther(&quot;stock-asset-licensed&quot;, String.valueOf(isStockAssetLicensed));
531: // License Permissions


An error occurred at line: 532 in the jsp file: /libs/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp
StockUtil cannot be resolved
529: request.setAttribute(IS_STOCK_ASSET_LICENSED, isStockAssetLicensed);
530: metaAttrs.addOther(&quot;stock-asset-licensed&quot;, String.valueOf(isStockAssetLicensed));
531: // License Permissions
532: isStockAccessible = StockUtil.isStockAccessible(resource.getResourceResolver());
533: request.setAttribute(STOCK_ACCESSIBLE, isStockAccessible);
534: }
535:
</title></head>
<body>
<h1>Unable to compile class for JSP:

An error occurred at line: 10 in the generated java file
Only a type can be imported. com.day.cq.dam.commons.util.StockUtil resolves to a package

An error occurred at line: 136 in the generated java file
Only a type can be imported. com.day.cq.dam.commons.util.StockUtil resolves to a package

An error occurred at line: 517 in the jsp file: /libs/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp
StockUtil cannot be resolved
514: boolean isSnippetTemplate = this.isSnippetTemplate(resource);
515: request.setAttribute(IS_SNIPPET_TEMPLATE, isSnippetTemplate);
516: // Adobe Stock Assets
517: boolean isStockAsset = StockUtil.isStockAsset(resource);
518: boolean isStockAssetLicensed = false;
519: boolean isStockAccessible = false;
520: request.setAttribute(IS_STOCK_ASSET, isStockAsset);


An error occurred at line: 522 in the jsp file: /libs/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp
StockUtil.PN_STOCK_ID cannot be resolved to a type
519: boolean isStockAccessible = false;
520: request.setAttribute(IS_STOCK_ASSET, isStockAsset);
521: if (isStockAsset) {
522: String stockId = ResourceUtil.getValueMap(metadataResc).get(StockUtil.PN_STOCK_ID, &quot;&quot;);
523: String stockPath = StockUtil.STOCK_ROOT_PATH + &quot;/&quot; + stockId;
524: metaAttrs.addOther(&quot;stock-asset&quot;, String.valueOf(isStockAsset));
525: metaAttrs.addOther(&quot;stock-id&quot;, stockId);


An error occurred at line: 523 in the jsp file: /libs/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp
StockUtil.STOCK_ROOT_PATH cannot be resolved to a type
520: request.setAttribute(IS_STOCK_ASSET, isStockAsset);
521: if (isStockAsset) {
522: String stockId = ResourceUtil.getValueMap(metadataResc).get(StockUtil.PN_STOCK_ID, &quot;&quot;);
523: String stockPath = StockUtil.STOCK_ROOT_PATH + &quot;/&quot; + stockId;
524: metaAttrs.addOther(&quot;stock-asset&quot;, String.valueOf(isStockAsset));
525: metaAttrs.addOther(&quot;stock-id&quot;, stockId);
526: metaAttrs.addOther(&quot;stock-path&quot;, stockPath);


An error occurred at line: 528 in the jsp file: /libs/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp
StockUtil cannot be resolved
525: metaAttrs.addOther(&quot;stock-id&quot;, stockId);
526: metaAttrs.addOther(&quot;stock-path&quot;, stockPath);
527: // License State
528: isStockAssetLicensed = StockUtil.isStockAssetLicensed(resource);
529: request.setAttribute(IS_STOCK_ASSET_LICENSED, isStockAssetLicensed);
530: metaAttrs.addOther(&quot;stock-asset-licensed&quot;, String.valueOf(isStockAssetLicensed));
531: // License Permissions


An error occurred at line: 532 in the jsp file: /libs/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp
StockUtil cannot be resolved
529: request.setAttribute(IS_STOCK_ASSET_LICENSED, isStockAssetLicensed);
530: metaAttrs.addOther(&quot;stock-asset-licensed&quot;, String.valueOf(isStockAssetLicensed));
531: // License Permissions
532: isStockAccessible = StockUtil.isStockAccessible(resource.getResourceResolver());
533: request.setAttribute(STOCK_ACCESSIBLE, isStockAccessible);
534: }
535:
</h1>
<p>Cannot serve request to /mnt/overlay/dam/gui/content/assets/jcr:content/views/card.0.20.html/content/dam/airport in /libs/dam/gui/coral/components/admin/contentrenderer/card/asset/asset.jsp</p>

<h3>Exception:</h3>
<pre>
org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 10 in the generated java file
Only a type can be imported. com.day.cq.dam.commons.util.StockUtil resolves to a package

An error occurred at line: 136 in the generated java file
Only a type can be imported. com.day.cq.dam.commons.util.StockUtil resolves to a package

An error occurred at line: 517 in the jsp file: /libs/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp
StockUtil cannot be resolved
514: boolean isSnippetTemplate = this.isSnippetTemplate(resource);
515: request.setAttribute(IS_SNIPPET_TEMPLATE, isSnippetTemplate);
516: // Adobe Stock Assets
517: boolean isStockAsset = StockUtil.isStockAsset(resource);
518: boolean isStockAssetLicensed = false;
519: boolean isStockAccessible = false;
520: request.setAttribute(IS_STOCK_ASSET, isStockAsset);


An error occurred at line: 522 in the jsp file: /libs/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp
StockUtil.PN_STOCK_ID cannot be resolved to a type
519: boolean isStockAccessible = false;
520: request.setAttribute(IS_STOCK_ASSET, isStockAsset);
521: if (isStockAsset) {
522: String stockId = ResourceUtil.getValueMap(metadataResc).get(StockUtil.PN_STOCK_ID, &quot;&quot;);
523: String stockPath = StockUtil.STOCK_ROOT_PATH + &quot;/&quot; + stockId;
524: metaAttrs.addOther(&quot;stock-asset&quot;, String.valueOf(isStockAsset));
525: metaAttrs.addOther(&quot;stock-id&quot;, stockId);


An error occurred at line: 523 in the jsp file: /libs/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp
StockUtil.STOCK_ROOT_PATH cannot be resolved to a type
520: request.setAttribute(IS_STOCK_ASSET, isStockAsset);
521: if (isStockAsset) {
522: String stockId = ResourceUtil.getValueMap(metadataResc).get(StockUtil.PN_STOCK_ID, &quot;&quot;);
523: String stockPath = StockUtil.STOCK_ROOT_PATH + &quot;/&quot; + stockId;
524: metaAttrs.addOther(&quot;stock-asset&quot;, String.valueOf(isStockAsset));
525: metaAttrs.addOther(&quot;stock-id&quot;, stockId);
526: metaAttrs.addOther(&quot;stock-path&quot;, stockPath);


An error occurred at line: 528 in the jsp file: /libs/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp
StockUtil cannot be resolved
525: metaAttrs.addOther(&quot;stock-id&quot;, stockId);
526: metaAttrs.addOther(&quot;stock-path&quot;, stockPath);
527: // License State
528: isStockAssetLicensed = StockUtil.isStockAssetLicensed(resource);
529: request.setAttribute(IS_STOCK_ASSET_LICENSED, isStockAssetLicensed);
530: metaAttrs.addOther(&quot;stock-asset-licensed&quot;, String.valueOf(isStockAssetLicensed));
531: // License Permissions


An error occurred at line: 532 in the jsp file: /libs/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp
StockUtil cannot be resolved
529: request.setAttribute(IS_STOCK_ASSET_LICENSED, isStockAssetLicensed);
530: metaAttrs.addOther(&quot;stock-asset-licensed&quot;, String.valueOf(isStockAssetLicensed));
531: // License Permissions
532: isStockAccessible = StockUtil.isStockAccessible(resource.getResourceResolver());
533: request.setAttribute(STOCK_ACCESSIBLE, isStockAccessible);
534: }
535:

at org.apache.sling.scripting.jsp.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:93)
at org.apache.sling.scripting.jsp.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
at org.apache.sling.scripting.jsp.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:136)
at org.apache.sling.scripting.jsp.jasper.compiler.Compiler.compile(Compiler.java:304)
at org.apache.sling.scripting.jsp.jasper.compiler.Compiler.compile(Compiler.java:282)
at org.apache.sling.scripting.jsp.jasper.compiler.Compiler.compile(Compiler.java:269)
at org.apache.sling.scripting.jsp.jasper.JspCompilationContext.compile(JspCompilationContext.java:501)
at

.....................

........................

<hr>
<address>ApacheSling/2.6 (jetty/9.3.22.v20171030, Java HotSpot(TM) 64-Bit Server VM 1.8.0_221, Windows Server 2008 R2 6.1 amd64)</address>
</body>
</html>

 

0 Replies