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

[AEM Gems Webinar] Accelerating Experience Manager as a Cloud Service development with Rapid Development Environments

AEM 6.2 Session refresh issue

Avatar

Level 2

HI All,

We have started getting the following exception all of a sudden and instance shutting down after 4 minutes. please help

07.12.2016 16:18:49.769 *WARN* [sling-default-1-com.day.cq.rewriter.linkchecker.impl.LinkInfoStorageImpl.1446] 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:

 

Thanks,

Phani

0 Replies

Avatar

Level 4
        Could you please share the complete log file. As this is just a warning not a error, there should be some other error message .

Avatar

Level 2

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.<init>(RefreshStrategy.java:169)
        at org.apache.jackrabbit.oak.jcr.repository.RepositoryImpl.login(RepositoryImpl.java:277)

Avatar

Level 6

I am seeing the same errors in logs and i am using aem 6.3, any solution for this ? any configuration changes that i need to do?

Avatar

Level 2

Hi Scott,

This is the below code i am using

private Session session = null;

private ResourceResolver resourceResolver = null;

try {

resourceResolver = resolverFactory.getServiceResourceResolver(null);

session = resourceResolver.adaptTo(Session.class);

//do some processing

} catch (Exception ex) {

} finally {

if (resourceResolver != null) {

resourceResolver.close();

}

}