Expand my Community achievements bar.

SOLVED

Accessing repositry issue in cq5.4..

Avatar

Level 3

Hi,

I tried to access repository by using repo.loginadminstratuive(null); When i want to save something means by using session.save(), i am getting the below error in my logs can anybody help on this..


15.10.2013 05:38:55.870 *ERROR* [27.251.211.42 [1381833528920] GET /bin/siteaction.html HTTP/1.1] com.ttis.common.utils.SiteCreationServiceImpl Error during page creation. javax.jcr.RepositoryException: Unable to getNode: org.apache.jackrabbit.core.state.ItemStateException: Failed to read bundle: 95db0451-65aa-435e-9e58-940106f6f847: java.io.IOException: File not found: 5330
    at org.apache.jackrabbit.core.version.NodeStateEx.getNode(NodeStateEx.java:456)
    at org.apache.jackrabbit.core.version.InternalVersionManagerBase.getParentNode(InternalVersionManagerBase.java:545)
    at org.apache.jackrabbit.core.version.InternalVersionManagerBase.getVersionHistory(InternalVersionManagerBase.java:310)
    at org.apache.jackrabbit.core.version.InternalXAVersionManager.getVersionHistory(InternalXAVersionManager.java:56)
    at org.apache.jackrabbit.core.ItemSaveOperation.initVersionHistories(ItemSaveOperation.java:788)
    at org.apache.jackrabbit.core.ItemSaveOperation.perform(ItemSaveOperation.java:236)
    at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200)
    at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)
    at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:329)
    at org.apache.jackrabbit.core.session.SessionSaveOperation.perform(SessionSaveOperation.java:42)
    at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200)
    at org.apache.jackrabbit.core.SessionImpl.perform(SessionImpl.java:355)
    at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:758)
    at com.day.crx.core.CRXSessionImpl.save(CRXSessionImpl.java:126)
    at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.apache.sling.jcr.base.SessionProxyHandler$SessionProxyInvocationHandler.invoke(SessionProxyHandler.java:109)
    at $Proxy0.save(Unknown Source) 
    at org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:268)
    at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:139)
    at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:344)
    at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:375)
    at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:529)
    at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45)
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:64)
    at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:146)
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
    at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:308)
    at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:141)
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
    at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:269)
    at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49)
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:64)
    at com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter.doFilter(RedirectFilter.java:185)
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
    at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:59)
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
    at com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet.doFilter(FormsHandlingServlet.java:220)
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
    at com.day.cq.theme.impl.ThemeResolverFilter.doFilter(ThemeResolverFilter.java:67)
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
    at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:96)
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
    at com.day.cq.wcm.core.impl.WCMRequestFilter.doFilter(WCMRequestFilter.java:119)
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
    at org.apache.sling.rewriter.impl.RewriterFilter.doFilter(RewriterFilter.java:84)
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
    at org.apache.sling.portal.container.internal.request.PortalFilter.doFilter(PortalFilter.java:76)
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
    at org.apache.sling.bgservlets.impl.BackgroundServletStarterFilter.doFilter(BackgroundServletStarterFilter.java:135)
    at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
    at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processRequest(SlingRequestProcessorImpl.java:161)
    at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:183)
    at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96)
    at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
    at org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42)
    at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
    at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
    at org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
    at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
    at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.felix.http.proxy.ProxyServlet.service(ProxyServlet.java:60)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.sling.launchpad.base.webapp.SlingServletDelegate.service(SlingServletDelegate.java:277)
    at org.apache.sling.launchpad.webapp.SlingServlet.service(SlingServlet.java:148)
    at com.day.j2ee.servletengine.ServletRuntimeEnvironment.service(ServletRuntimeEnvironment.java:228)
    at com.day.j2ee.servletengine.RequestDispatcherImpl.doFilter(RequestDispatcherImpl.java:315)
    at com.day.j2ee.servletengine.FilterChainImpl.doFilter(FilterChainImpl.java:74)
    at com.day.crx.launchpad.filters.CRXLaunchpadLicenseFilter.doFilter(CRXLaunchpadLicenseFilter.java:96)
    at com.day.j2ee.servletengine.FilterChainImpl.doFilter(FilterChainImpl.java:72)
    at com.day.j2ee.servletengine.RequestDispatcherImpl.service(RequestDispatcherImpl.java:334)
    at com.day.j2ee.servletengine.RequestDispatcherImpl.service(RequestDispatcherImpl.java:378)
    at com.day.j2ee.servletengine.ServletHandlerImpl.execute(ServletHandlerImpl.java:315)
    at com.day.j2ee.servletengine.DefaultThreadPool$DequeueThread.run(DefaultThreadPool.java:134)
    at java.lang.Thread.run(Thread.java:662)
15.10.2013 05:38:55.871 *INFO* [27.251.211.42 [1381833528920] GET /bin/siteaction.html HTTP/1.1] com.ttis.common.utils.SiteCreationServlet --------------------------> Site Created <-----------------------
15.10.2013 05:39:03.926 *ERROR* [27.251.211.42 [1381833528920] GET /bin/siteaction.html HTTP/1.1] com.ttis.common.utils.SiteCreationServlet ------------------------------Exception1----------------Unable to getNode: org.apache.jackrabbit.core.state.ItemStateException: Failed to read bundle: 95db0451-65aa-435e-9e58-940106f6f847: java.io.IOException: File not found: 5330
15.10.2013 05:39:11.916 *INFO* [27.251.211.42 [1381833551913] GET /favicon.ico HTTP/1.1] org.apache.sling.engine.impl.SlingRequestProcessorImpl service: Resource /favicon.ico not found
15.10.2013 05:39:11.917 *INFO* [27.251.211.42 [1381833551913] GET /favicon.ico HTTP/1.1] apps.sling.servlet.errorhandler.404$jsp 
Looking for a 404 page at /404
15.10.2013 05:39:11.917 *INFO* [27.251.211.42 [1381833551913] GET /favicon.ico HTTP/1.1] apps.sling.servlet.errorhandler.404$jsp 
Looking for a 404 page at 
15.10.2013 05:39:11.918 *WARN* [27.251.211.42 [1381833551913] GET /favicon.ico HTTP/1.1] org.apache.sling.servlets.get.impl.RedirectServlet RedirectServlet: Servlet is included, not redirecting

 

It is an high priority on ..pls help me..

Sony C.

1 Accepted Solution

Avatar

Correct answer by
Level 10
  • Grep the error.log to find the missing tar file numbers:

grep "^java.io.IOException: File not found:" error.log* | awk '{ print $5 }' | sort –u

  • From your nightly backups Recover and place missing tar file "Data*.tar" at repository/workspace/crx.default/
  • Start CRX / CQ with the following system property:

java -Dcom.day.crx.persistence.tar.IndexMergeDelay=0

Note: Unfortunately, if you do not restore the missing tar file then you may lose some data.

Once the instance is fine please apply latest crx hotfix

View solution in original post

2 Replies

Avatar

Level 10

Also -- we recommend that you use this code to obtain a Session to query the AEM JCR as opposed to repo.loginadminstratuive(null):

 

//Invoke the adaptTo method to create a Session used to create a QueryManager
    ResourceResolver resourceResolver = resolverFactory.getAdministrativeResourceResolver(null);
    session = resourceResolver.adaptTo(Session.class);
 

 

See this community article for details:
http://helpx.adobe.com/adobe-cq/using/querying-experience-manager-data-using.html

Avatar

Correct answer by
Level 10
  • Grep the error.log to find the missing tar file numbers:

grep "^java.io.IOException: File not found:" error.log* | awk '{ print $5 }' | sort –u

  • From your nightly backups Recover and place missing tar file "Data*.tar" at repository/workspace/crx.default/
  • Start CRX / CQ with the following system property:

java -Dcom.day.crx.persistence.tar.IndexMergeDelay=0

Note: Unfortunately, if you do not restore the missing tar file then you may lose some data.

Once the instance is fine please apply latest crx hotfix