Sling rendering fails after a few builds | Community
Skip to main content
Level 2
May 27, 2021 3:25 PM UTC

Sling rendering fails after a few builds

I am a developer and I have a local instance I use for building and testing. My system is using the Java 11 JDK. After some number of builds, I haven't counted but the instance is fine for a bit then fails. The builds are successful and deploy fine. The issue I'm running into is that something happens where the pages I have created no longer render. In fact, neither do the WE Retail pages. The response to the request to the page is an empty document. The only way I have been able to fix it is by deleting the entire crx-quickstart tree then rebuilding the instance. This is time consuming and painful. I loose all of my configurations and changes that aren't backed up in a package, those that are, require me to then load the package after the instance has rebuilt. I have tried compacting the indexes and forcing them to rebuild but that doesn't work.

 

Has anyone else had a similar issue and if you were able to fix it, how did you do so?

    This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

    12 replies

    Asutosh_Jena_
    New Participant
    May 28, 2021 4:11 AM UTC

    Hi @robertinfosys 

     

    This is a known issue with AEM 6.5 running on JDK 11. This issue is due to the fact that CXF packages have been removed from AEM and you have to install those externally while running on JDK 11.

    You will need to replace the below line in sling.properties file present inside crx-quickstart/conf

     

    sling.bootdelegation.sun=sun.*,com.sun.*
    with
    sling.bootdelegation.sun=sun.*,com.sun.*,jdk.internal.reflect,jdk.internal.reflect.*
     
    Restart the instance. You will never face the issue again and all the pages will render fine.
     
     
    Thanks!
    Translate
    Level 2
    May 28, 2021 1:10 PM UTC
    First attempt. Stopped the instance, changed the property, restarted, the authentication service failed. Couldn't log into anything so I had to delete the crx-quickstart folder and start over. I changed the property after the instance was recreated and restarted. I'll see if this fixes it and report back.
    Translate
    Level 3
    May 27, 2021 6:06 PM UTC

    This happened with me as well on AEM 6.5 with Java 11. Couldnt find solution and end up using Java 8 

    Translate
    Level 2
    May 27, 2021 6:11 PM UTC
    That was kind of my guess. However, the specifications say that 6.5 is supposed to be compatible with Java 11 and because of security from where I'm working, downloading and installing Java 8 isn't easy to do.
    Translate
    Prince_Shivhare
    New Participant
    May 27, 2021 4:51 PM UTC

    Can you please check error.log?

    which can help us to find the exact error.

    Translate
    Level 2
    May 27, 2021 5:23 PM UTC
    I had checked the logs before and it didn't provide much help. I searched based on the exception. I don't remember but it was something with the Sling Default Servlet.
    Translate
    Level 2
    May 27, 2021 3:46 PM UTC
    Additional information: this project was created from the aem-project-archetype version 27 and using the 6.5 version of the runtime jar. 6.5.0 uber-jar.
    Translate