Comments (14)
What version of AEM are your running on (including SP/CFP)? Are all bundles started?
from aem-sample-we-retail.
We are running AEM 6.3 with Service Pack 1 (6.3.1). All bundles are started.
It appears that AEM cannot compile /apps/weretail/components/structure/footer/Footer.java because it cannot resolve we.retail.core.util.UrlHelper or we.retail.core.util.WeRetailHelper referenced in that class. Is there a place in the JCR where I can see the compiled classes (/var/classes is empty in crxde).
from aem-sample-we-retail.
I found the compiled class in the F.S. here are the contents:
$cat ./crx-quickstart/launchpad/felix/bundle473/data/classes/apps/weretail/components/structure/footer/Footer.class | strings
0apps/weretail/components/structure/footer/Footer
com/adobe/cq/sightly/WCMUsePojo
items
Ljava/util/List;
Signature
+Ljava/util/List<Lcom/day/cq/wcm/api/Page;>;
currentYear
Code
java/lang/Error
Unresolved compilation problems:
Only a type can be imported. we.retail.core.util.UrlHelper resolves to a package
Only a type can be imported. we.retail.core.util.WeRetailHelper resolves to a package
WeRetailHelper cannot be resolved
UrlHelper cannot be resolved
(Ljava/lang/String;)V
LineNumberTable
LocalVariableTable
this
2Lapps/weretail/components/structure/footer/Footer;
activate
Exceptions
java/lang/Exception
!Unresolved compilation problem:
populateItems
cUnresolved compilation problems:
WeRetailHelper cannot be resolved
UrlHelper cannot be resolved
getItems
()Ljava/util/List;
-()Ljava/util/List<Lcom/day/cq/wcm/api/Page;>;
getCurrentYear
SourceFile
Footer.java
from aem-sample-we-retail.
We Retail bundle in OSGi console:
from aem-sample-we-retail.
Odd, the reported bundle version is 2.0.4
but the bundle location is we.retail.core-2.0.2.jar
.
I suspect the old version is still active, could you try to remove it and install 2.0.4
?
from aem-sample-we-retail.
I deleted the /apps/weretail/install/we.retail.com-2.0.2.jar and also deleted the running bundle in the OSGi console. Then I ran mvn clean install -PautoInstallBundle. The 2.0.4 bundle is running now, but I am still seeing unresolved compilation errors:
25.05.2018 12:38:57.708 ERROR [0:0:0:0:0:0:0:1 [1527266337204] GET /content/we-retail/us/en.html HTTP/1.1] com.day.cq.wcm.core.impl.WCMDeveloperModeFilter Error during include of SlingRequestPathInfo: path='/conf/we-retail/settings/wcm/templates/hero-page/structure/jcr:content/root/header', selectorString='null', extension='html', suffix='null'
java.lang.Error: Unresolved compilation problems:
Only a type can be imported. we.retail.core.util.WeRetailHelper resolves to a package
WeRetailHelper cannot be resolved
at apps.weretail.components.structure.header.Header.<init>(Header.java:35)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.apache.sling.scripting.sightly.impl.engine.SightlyJavaCompilerService.getInstance(SightlyJavaCompilerService.java:105)
at org.apache.sling.scripting.sightly.impl.engine.SightlyJavaCompilerService.getInstance(SightlyJavaCompilerService.java:121)
at org.apache.sling.scripting.sightly.impl.engine.extension.use.JavaUseProvider.provide(JavaUseProvider.java:131)
at org.apache.sling.scripting.sightly.impl.engine.extension.use.UseRuntimeExtension.call(UseRuntimeExtension.java:72)
at org.apache.sling.scripting.sightly.impl.engine.runtime.RenderContextImpl.call(RenderContextImpl.java:75)
at org.apache.sling.scripting.sightly.apps.weretail.components.structure.header.include_html.render(include_html.java:41)
at org.apache.sling.scripting.sightly.java.compiler.RenderUnit.render(RenderUnit.java:48)
at org.apache.sling.scripting.sightly.impl.engine.SightlyCompiledScript.eval(SightlyCompiledScript.java:61)
at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:386)
at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:184)
at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:491)
at com.adobe.cq.sightly.WCMScriptHelper.includeScript(WCMScriptHelper.java:222)
at com.adobe.cq.sightly.internal.extensions.IncludeExtension.call(IncludeExtension.java:73)
at org.apache.sling.scripting.sightly.impl.engine.runtime.RenderContextImpl.call(RenderContextImpl.java:75)
at org.apache.sling.scripting.sightly.apps.weretail.components.structure.header.header_html.render(header_html.java:45)
at org.apache.sling.scripting.sightly.java.compiler.RenderUnit.render(RenderUnit.java:48)
at org.apache.sling.scripting.sightly.impl.engine.SightlyCompiledScript.eval(SightlyCompiledScript.java:61)
at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:386)
at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:184)
at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:491)
at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552)
at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:77)
at com.day.cq.wcm.core.impl.WCMDeveloperModeFilter.doFilterWithErrorHandling(WCMDeveloperModeFilter.java:164)
at com.day.cq.wcm.core.impl.WCMDeveloperModeFilter.doFilter(WCMDeveloperModeFilter.java:135)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilterWithErrorHandling(WCMDebugFilter.java:192)
at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:159)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:278)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at com.day.cq.personalization.impl.TargetComponentFilter.doFilter(TargetComponentFilter.java:96)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:68)
at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282)
at org.apache.sling.engine.impl.SlingRequestProcessorImpl.dispatchRequest(SlingRequestProcessorImpl.java:322)
at org.apache.sling.engine.impl.request.SlingRequestDispatcher.dispatch(SlingRequestDispatcher.java:211)
at org.apache.sling.engine.impl.request.SlingRequestDispatcher.include(SlingRequestDispatcher.java:104)
at com.day.cq.wcm.core.impl.WCMComponentFilter$ForwardRequestDispatcher.include(WCMComponentFilter.java:516)
at com.adobe.cq.sightly.WCMScriptHelper.includeResource(WCMScriptHelper.java:179)
at com.adobe.cq.sightly.internal.extensions.ResourceExtension.call(ResourceExtension.java:138)
at org.apache.sling.scripting.sightly.impl.engine.runtime.RenderContextImpl.call(RenderContextImpl.java:75)
at org.apache.sling.scripting.sightly.libs.wcm.foundation.components.responsivegrid.responsivegrid_html.render(responsivegrid_html.java:97)
from aem-sample-we-retail.
Update: I touched /apps/weretail/components/structure/header/Header.java in crxde and now the page loads without errors. It looks like the issue was the old /apps/weretail/install/we.retail.com-2.0.2.jar. You may want to update the readme page with instructions to delete this old jar before a maven deployment.
Thanks @vladbailescu
from aem-sample-we-retail.
@vladbailescu A mismatch between the version as displayed in the location and the actual version is not a problem, see https://issues.apache.org/jira/browse/SLING-4747
from aem-sample-we-retail.
@joerghoh, the compilation error seemed to indicate some classes from the We.Retail bundle were not available in the classpath. Most probably the bundle was not correctly started and the console was reporting the wrong status. I'll try to investigate next week if this reproduces consistently or it was just a fluke.
from aem-sample-we-retail.
Hi,
When i installed the AEM 6.3 in my system. The sample page i.e. http://localhost:6304/editor.html/content/we-retail/ca/en/men.html was showing up correctly.
After i create my sample project and installed it. The sample page stopped showing. Then i found this discussion, i figured out there is some issue with we.retail.com-2.0.2.jar. And i checked it was all true so i went ahead and deleted the jar and installed 2.0.4 jar as suggested. The osgi bundle is installed but i am still facing following issue.
Error during include of component '/apps/weretail/components/structure/page'
Error Message:
org.apache.sling.scripting.sightly.SightlyException: Cannot find a file corresponding to class com.adobe.cq.wcm.core.components.models.Page in the repository.
Processing Info:
Page = /content/we-retail/ca/en/men
Resource Path = /content/we-retail/ca/en/men/jcr:content
Cell = page
Cell Search Path = page
Component Path =/apps/weretail/components/structure/page
Please let me what needs to be done. To fix the issue.
from aem-sample-we-retail.
@PriyamDash If I understand correctly you observed an issue after having introduced some custom code: unfortunately we cannot help here. Instead you should contact Adobe Support so they can help investigate the custom code. If you observe an issue with the out-of-the-box code of We.Retail, please create a new issue and describe your setup (CQ version, FP version, …) and the steps to reproduce it. We will look into it. Thx!
from aem-sample-we-retail.
@PriyamDash Try stopping the 2.0.2 jar in OSGI and then deleting the jar from install/ folder in crxde before deploying the new jar. I also touched one of the .java files in crxde to trigger a compilation.
from aem-sample-we-retail.
@jckautzmann : Thanks for the reply.
Step to reporduce :
- Create the custom project using AEM DEVELOPER TOOL
- Use AEM ARCHTYPE 13 for creating sample project
- Run maven command > mvn clean install -P autoInstallPackage
- Try to open the sample created page or any we retail page. It will start throwing error.
Reply to this statement "If I understand correctly you observed an issue after having introduced some custom code: unfortunately we cannot help here". The thing is sample project code is refers to "/apps/weretail/components/structure/page" component which refers to "/apps/core/wcm/components/page/v1/page" . And then that moment it throws error.
Conclusion: The issues arrives if we create sample project using maven aem-archtype 13.
@boxymoron: Thanks for the reply.I will try the step what you said. BTW you said something about touching any .java file. Can you please let me know, what i need to do.
from aem-sample-we-retail.
@PriyamDash Thx for the detailed steps. How does your setup look like (AEM version, FP, CFP)? I tried with AEM 6.3 + SP2 + we.retail.all-2.0.4.zip and the page displayed fine.
from aem-sample-we-retail.
Related Issues (20)
- Unable to build from scratch: Too many files with unapproved license error HOT 2
- Default dispatcher config doesnt work with We.retail HOT 1
- CategoryTeaser invalid href HOT 1
- Remove /etc/replication from project HOT 2
- OrderHistoryModelTest may fail based on timezone HOT 2
- Error running autoInstallPackage HOT 4
- autoInstallPackage does not deploy bundle HOT 2
- We.Retail does not support core components v2 HOT 1
- Thread Safety issue in CountriesFormOptionsDataSource HOT 2
- Test fail at Unparseable date: "Mon Dec 12 2016 16:42:15 GMT+0100" HOT 3
- Page Header is not Dispatcher compatible
- We.Retail pages do not load correctly inside the Target Visual Experience Composer (VEC) HOT 3
- Package matrix HOT 5
- Social Links HOT 1
- Carousel and Tabs component HOT 1
- Question: XF body.html contains <!DOCTYPE html> HOT 2
- Wrong blueprint configuration and MSM "Create Site" functionality HOT 6
- [List Component] Shows list images in Content Tree HOT 1
- When editing a template, deleting the navigation component within the 'We.Retail Page Footer/Header' creates a loop HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aem-sample-we-retail.