Hey everyone,
I have an AEM project where a utility class is found in the core module and is referenced in the apps module in an asset.jsp overlay. However, whenever I attempt to bring up the page in AEM which uses the overlay I am getting an exception that the overlay could not be compiled because this the module reference class could not be found.
Any help would be appreciated.
Error Log
==> error.log <==
09.04.2020 00:18:38.206 *ERROR* [0:0:0:0:0:0:0:1 [1586416718199] GET /mnt/overlay/dam/gui/content/assets/jcr:content/views/list.0.40.html/content/dam/site/aem/jobnumber/assetfolder 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: 7 in the generated java file
Only a type can be imported. com.site.assets.core.utils.statusutil resolves to a package
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 org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.prepareServlet(JspServletWrapper.java:427)
at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:486)
at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:449)
at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java:346)
at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.java:101)
site.core POM
<plugins>
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>maven-sling-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Import-Package>!com.csvreader.*,javax.inject;version=0.0.0,*</Import-Package>
<Sling-Model-Packages>
com.site.assets.core
</Sling-Model-Packages>
</instructions>
</configuration>
</plugin>
</plugins>
asset.jsp Imports
<%@page import="org.apache.sling.api.resource.Resource"%>
<%@page import="com.site.assets.core.utils.statusutil"%>
<%@taglib prefix="cq" uri="http://www.day.com/taglibs/cq/1.0"%>
<%@include file="/libs/dam/gui/coral/components/admin/contentrenderer/base/init/assetBase.jsp"%>
<%@include file="/libs/dam/gui/coral/components/admin/contentrenderer/base/insightBase.jsp"%>
<%@include file="/libs/dam/gui/coral/components/admin/contentrenderer/row/common/common.jsp"%>