Expand my Community achievements bar.

SOLVED

aem 6.2 warning

Avatar

Level 4

Hi,

I installed aem 6.2 . In error.log file, following warning occur:

What is it? is  it normal? or any error

22.09.2016 17:40:51.981 *WARN* [sling-default-3-com.day.cq.rewriter.linkchecker.impl.LinkInfoStorageImpl.2107] 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)
    at com.adobe.granite.repository.impl.CRX3RepositoryImpl.login(CRX3RepositoryImpl.java:94)
    at org.apache.jackrabbit.oak.jcr.repository.RepositoryImpl.login(RepositoryImpl.java:219)
    at org.apache.jackrabbit.oak.jcr.session.SessionImpl.impersonate(SessionImpl.java:274)
    at org.apache.sling.jcr.base.AbstractSlingRepository2.createServiceSession(AbstractSlingRepository2.java:182)
    at com.adobe.granite.repository.impl.SlingRepositoryImpl.createServiceSession(SlingRepositoryImpl.java:124)
    at org.apache.sling.jcr.base.AbstractSlingRepository2.loginService(AbstractSlingRepository2.java:331)
    at com.day.cq.rewriter.linkchecker.impl.LinkInfoStorageImpl.activate(LinkInfoStorageImpl.java:163)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
    at org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
    at org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
    at org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
    at org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
    at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)
    at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:113)
    at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:866)
    at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:833)
    at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:774)
    at org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:347)
    at org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:247)
    at org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:344)
    at org.apache.felix.framework.Felix.getService(Felix.java:3699)
    at org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)
    at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:72)
    at org.apache.felix.scr.impl.helper.BindMethod.getServiceObject(BindMethod.java:646)
    at org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2137)
    at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1651)
    at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:1636)
    at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeBindMethod(SingleComponentManager.java:370)
    at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:319)
    at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:295)
    at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1215)
    at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1136)
    at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:945)
    at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:881)
    at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1167)
    at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:120)
    at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:991)
    at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:839)
    at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:546)
    at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4557)
    at org.apache.felix.framework.Felix.registerService(Felix.java:3549)
    at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:348)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:869)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:857)
    at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:133)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:915)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:715)
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:399)
    at org.apache.felix.scr.impl.config.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:676)
    at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:339)
    at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:360)
    at org.apache.felix.scr.impl.Activator.access$000(Activator.java:53)
    at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:260)
    at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)
    at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)
    at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482)
    at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415)
    at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)
    at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
    at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:916)
    at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:835)
    at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:517)
    at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4541)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:2172)
    at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)
    at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
    at java.lang.Thread.run(Unknown Source) 

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi,

this just means, that a session is open for more than 1 minute. In this case the startup of LinkInfoStorage takes time (for whatever reason). It's not a problem, but rather a hint, that something is "slow".

Jörg

View solution in original post

11 Replies

Avatar

Correct answer by
Employee Advisor

Hi,

this just means, that a session is open for more than 1 minute. In this case the startup of LinkInfoStorage takes time (for whatever reason). It's not a problem, but rather a hint, that something is "slow".

Jörg

Avatar

Level 4

Jörg Hoh wrote...

Hi,

this just means, that a session is open for more than 1 minute. In this case the startup of LinkInfoStorage takes time (for whatever reason). It's not a problem, but rather a hint, that something is "slow".

Jörg

 

how to resolve it?

Avatar

Administrator

The warning indicates that the session is old and you are about to
access potentially outdated information.

See
http://jackrabbit.apache.org/oak/docs/differences.html#Session_state_and_refresh_behaviour
about how sessions behave in Oak in contrast to Jackrabbit 2. There is specific mention of the warning you encounter.

 

Source:- http://oak-dev.jackrabbit.apache.narkive.com/ub3nm9AM/idle-oak-jcr-sessions-in-aem-6-1

~kautuk



Kautuk Sahni

Avatar

Employee

As jeers hinted, It is a warning and not an exception, so can be ignored. It should be reviewed if it occurs again, especially if it is thrown from custom code. But for now, this instance of the warning can be ignored.

Regards,

Opkar

Avatar

Level 5

Any chance that Adobe will implement a hotfix for this? I know it's just a warning but seeing it pop up all the time bothers me.

I honestly don't know enough about Oak to know for sure, but it seems this was addressed with OAK-4139[1]?

[1] https://issues.apache.org/jira/browse/OAK-4139

Avatar

Level 7

I am seeing same warnings in application error logs about session idle for so and so minutes.

Is there any fix for this ?

Either code solution or hot fix?

I do not want to get confused with actual errors with these kind of warnings/exceptions

Thanks,

Sri

Avatar

Employee Advisor

What version of Oak are you using? OAK-4139 only fixes a warning, where the should not be one.

As far as I understand Oak, you get the message "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." only in one case: When you open a session and there is more than 1 minute between repository access (reads or writes).

This warning has the idea to help you to identify long-running sessions, which cause problems with MVCC (and which has been quite a pattern with CQ5, where there was no MVCC). If you open a session and to a lot of repository activities, you won't trigger this warning.

Checking the code, OAK-4139 seems to be the cause of the issue reported by the thread opener. But it isn't necessarily the cause of the message you are facing. If you have AEM 6.0 to AEM 6.2, you *could* be affected. If you see this with AEM 6.3, it's a different one.

Avatar

Level 7

Thanks for the reply. AEM 6.3 is the version number.

Do you think it is because of application code? If so, any best practice suggestions around this.

Thanks,

Sri

Avatar

Employee Advisor

Well, if your code has opened such a session and that code appears in the stacktrace as above, then it's very likely, that this code keeps the session open for a long time, causing potential problems [1].

[1] AEM anti pattern: Long running sessions | Things on a content management system

Avatar

Level 1

Usually right above that message, I see this message:

27.02.2018 19:52:03.597 *WARN* [qtp1870993565-145] org.apache.jackrabbit.oak.jcr.session.ItemImpl Item#refresh invokes Session#refresh!

This might be the actual issue.

Avatar

Employee Advisor

>Item#refresh invokes Session#refresh!

is just a warning in the code about the usage of an deprecated API. This specific message is not indicating any problem.

Actually I hunted down a number of these occurrences sometimes last year in Sling. In AEM there shouldn't be any of these anymore.