Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Warning: org.apache.jackrabbit.oak.session.RefreshStrategy

manpreetk
Level 3
Level 3

Hi All, We have a client requirement in AEM 6.4 for alphabetically arranging the Asset folders in card view. In List view we can achieve this by adding the sortable property for the list node but for card view, I am able to sort the folders for card view by overlaying masonry.jsp at path- /apps/granite/ui/components/coral/foundation/masonry/masonry.jsp. from libs. In this jsp file I have written a logic to sort the folders by name and able to successfully implement with it. After implementation In the error.log, I am getting  the below error. 08.02.2019 18:36:51.127 *WARN* [sling-oak-observation-15] org.apache.jackrabbit.oak.jcr.session.RefreshStrategy This session has been idle for 1 minutes and might be out of date. Consider using a fresh session or explicitly refresh the session. java.lang.Exception: The session was created here: at org.apache.jackrabbit.oak.jcr.session.RefreshStrategy$LogOnce.(RefreshStrategy.java:170) [org.apache.jackrabbit.oak-jcr:1.8.7] at org.apache.jackrabbit.oak.jcr.repository.RepositoryImpl.login(RepositoryImpl.java:285) [org.apache.jackrabbit.oak-jcr:1.8.7] at com.adobe.granite.repository.impl.CRX3RepositoryImpl.login(CRX3RepositoryImpl.java:150) [com.adobe.granite.repository:1.4.88] at com.adobe.granite.repository.impl.CRX3RepositoryImpl.login(CRX3RepositoryImpl.java:241) [com.adobe.granite.repository:1.4.88] at com.adobe.granite.repository.impl.SlingRepositoryImpl$4.run(SlingRepositoryImpl.java:177) [com.adobe.granite.repository:1.4.88] at com.adobe.granite.repository.impl.SlingRepositoryImpl$4.run(SlingRepositoryImpl.java:174) [com.adobe.granite.repository:1.4.88] at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAsPrivileged(Unknown Source) at com.adobe.granite.repository.impl.SlingRepositoryImpl.createServiceSession(SlingRepositoryImpl.java:174) [com.adobe.granite.repository:1.4.88] at org.apache.sling.jcr.base.AbstractSlingRepository2.createServiceSession(AbstractSlingRepository2.java:166) [org.apache.sling.jcr.base:3.0.4] at org.apache.sling.jcr.base.AbstractSlingRepository2.loginService(AbstractSlingRepository2.java:381) [org.apache.sling.jcr.base:3.0.4] at org.apache.sling.jcr.resource.internal.helper.jcr.JcrProviderStateFactory.createProviderState(JcrProviderStateFactory.java:116) [org.apache.sling.jcr.resource:3.0.8] Please let me know if any one has idea about this session error. Thanks, Manpreet

5 Replies
smacdonald2008
Level 10
Level 10

This is only a warning and does not even look related. See Joerg's explanation here - aem 6.2 warning

manpreetk
Level 3
Level 3

Hi Scott,

Thanks for the reply.

Will that create any issue in the logic which i modified for masonry.jsp? Because after writing the sorting logic in masonry.jsp the folders are getting sorted alphabetically.

Below is the code. I have modified it at line 332 after overlaying the /libs/granite/ui/components/coral/foundation/masonry/masonry.jsp file.

if (size != null) {

    ArrayList<Resource> list = new ArrayList<Resource>();

Map<String, Resource> nameResource = new HashMap<>();

log.info("inside");

    while (items.hasNext() && list.size() < size) {

Resource item = items.next();

        //list.add(items.next());

nameResource.put(item.getName(),item);

    }

Set<String> itemNames = nameResource.keySet();

List<Sttring> listOfNames = new ArrayList(itemNames);

Collections.sort(listOfNames);

for(String name : listOfNames)

{

list.add(nameResource.get(name));

}

    hasMore = items.hasNext();

    items = list.iterator();

}

After this logic the folders are getting sorted , but the issue which i am facing is when i create a new folder , the folders structure is creating an issue.Is there anything which i am missing ? Can you please guide me on this. How can we arrange the folders in card view alphabetically.

Thanks,

Manpreet

smacdonald2008
Level 10
Level 10

I will check within Adobe to see if anyone has an example to organize CARDS based on alphabetical order. I have personally never seen such an example.

suniln13212398
Level 2
Level 2

Hi manpreetk,

I have the same requirement it would be help full, if you let me know how you could achieve for column and list view for alphabetically arranging. Also any update on your question for card view. Thank you in advance.