Expand my Community achievements bar.

SOLVED

WKND tutorial AEM 6.4 part 6

Avatar

Level 2

Hi guys,

I have been trying to find out a problem I found on part 6 on the tutorial. For some reason I'm getting this error when deploying the code (to try I actually took the master branch code from the tutorial Getting Started with AEM Sites Part 6 - Sling Models and Card Component

The Maven build goes fine but when open the page either with the editor.html or on preview I get the following errors?

org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.api.SlingException: Cannot get DefaultSlingScript: org.apache.sling.scripting.sightly.SightlyException: Compilation errors in org/apache/sling/scripting/sightly/apps/wknd/components/content/card/card_html.java: Line 28, column 1270 : Only a type can be imported. com.adobe.aem.guides.wknd.core.components.Card resolves to a package Line 46, column 2020 : Card cannot be resolved to a type

Cannot serve request to /content/wknd/en.html on this server

ApacheSling/2.6 (jetty/9.3.22.v20171030, Java HotSpot(TM) 64-Bit Server VM 1.8.0_171, Mac OS X 10.13.5 x86_64)

Home_and_Untitled-1__modified___Project__aem-guides-wknd__and_aem-guides-wknd_—_-bash_—_219×58.png

At first I thought I did something wrong but then I started from a brand new AEM 6.4 install and got the clean code from the repo and build and also added the content packages provided by the tutorial and still got the errors.

Please advise,

Juan

1 Accepted Solution

Avatar

Correct answer by
Level 10

I am going through the artilce and all the code seems to work and compile.

View solution in original post

13 Replies

Avatar

Level 10

Ratna Kumar​ - when you get a chance - can you please test this section. If there is a problem - let Danial and Sean know.

Avatar

Level 10

I will also look into this as well and see if i can reproduce the issue.

Avatar

Level 2

Hey guys, I found something strange. I tried this on a Mac but then later that night I went to try the same on a Linux box and this time I didn't get the error, so I'll try again, on a completely clean environment and will report my results.

Avatar

Correct answer by
Level 10

I am going through the artilce and all the code seems to work and compile.

Avatar

Level 2

Hi smacdonald2008​,

Well as I was explaining I had no problems with the compiling at all but it was from the home page.

Now what I just tried was to get a new clone from the master and it did work and the same does from the part/6-custom-sling-model branch, so perhaps my previous copy of the code had the problem and it was giving me that error.

Sorry for bothering you guys and thank you so much for your great support! :-)

Avatar

Level 10

Posting questions on the AEM community is never a bother. We are here to help and answer questions. I checked this whole artilce and it works nicely:

E44.png

Its a nice one that shows use of SLing Models and LESS.

Avatar

Level 2

That tutorial is really awesome and is going to be very useful for an implementation we are doing so tell me something, where I can see more documentation about integrating AEM with more front end resources, besides bootstrap and less ? And to understand how that works and gets compiled?

I also have seen previous configurations done using nodeJs and grunt but it was a bit less clean than what they show on this tutorial.

Please advice

Avatar

Level 10

We have a lot of Sling Model examples - some do use BootStrap as that is a nice lib to use to style components. Here are few component ones:

Creating an Experience Manager Responsive Banner Component (built with HTL and BootStrap)

Creating a custom Touch UI Grid Component for Adobe Experience Manager (A custom layout component)

Adobe Experience Manager Help | Creating a HTL Repeating Data Set 6.3 Component that uses Sling Mode... (Sling Models and MF)

Creating a Tab layout component for Adobe Experience Manager  (Shows use of JS API)

These use Maven (like the WKND ones use - but build via the command line (which is what Eclipse does behind the scenes). These are a few more to look at.

PS - i am not aware of any Adobe docs  that shows use of node.js and grunt to build AEM apps.

Avatar

Level 2

Hey thanks a lot for the info I'll check that out

And yes the stuff I have found so far doesn't come from Adobe like these:

aem - npm search

GitHub - wcm-io-frontend/grunt-aem-clientlib-generator: Grunt task that generates configuration file...

Using Grunt In An AEM Maven Build - Blog - 6D Global

Making Sling Grunt or How to Integrate Modern Front-End Development with AEM/Sling - Schedule - adap...

Using Front-end Technologies like Node, Grunt, and Sass with AEM – Digital Experience Platforms

And a few others I found and even a project I worked on previously but what they did on that Wknd tutorial is just so neat and well organized and clean that I will try to add additional vendor libraries and experiment with things then I guess

Avatar

Level 10

Yeah - AEM has a lot of outside AEM authors - which is great!

You can find Adobe HELPX articles here: Adobe Experience Manager Help | AEM Community Articles (Tutorials and How To Articles)

Here is a listing of Ask the AEM Community Experts that we have given over past 3-4 years - a lot of useful content -- AEM Ask the AEM Community Expert

Avatar

Level 10

Also - all content my team does - i post to my blog here -- Scott's Digital Community

Avatar

Level 2

I really appreciate your great support

Avatar

Level 1

hey,

I am getting the same issue. How did you resolve it?

Thanks