Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

How to deal with Repository Corruption?

Help
2009-07-25
2013-04-05
  • I am trying to upgrade my Artifactory installation, but am running into a snag:  It would seem that I have a repository corruption!

    I know which artifact is causing a problem.  I can't expand it using the User Interface -- it gives an error.  I looked at the log files and traced the problem to:

    2009-07-24 18:52:19,897 [ERROR] (RequestCycle.java:1328{10})     - Failed to retrieve file node's last modified.
    java.lang.RuntimeException: Failed to retrieve file node's last modified.
        at org.artifactory.jcr.JcrFile.lastModified(JcrFile.java:86)
        at org.artifactory.resource.SimpleRepoResource.<init>(SimpleRepoResource.java:48)
        at org.artifactory.resource.ArtifactResource.<init>(ArtifactResource.java:63)
        at org.artifactory.webapp.wicket.browse.BrowseRepoPanel.calculateTooltip(BrowseRepoPanel.java:333)
        at org.artifactory.webapp.wicket.browse.BrowseRepoPanel.access$400(BrowseRepoPanel.java:65)
        at org.artifactory.webapp.wicket.browse.BrowseRepoPanel$1.getResponse(BrowseRepoPanel.java:207)
        at org.artifactory.webapp.wicket.behavior.AbstractStringResponseAjaxBehavior.onRequest(AbstractStringResponseAjaxBehavior.java:45)
        at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:100)
        at org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:90)
        at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1094)
        at org.apache.wicket.RequestCycle.step(RequestCycle.java:1169)
        at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1245)
        at org.apache.wicket.RequestCycle.request(RequestCycle.java:489)
        at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354)
        at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:194)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.artifactory.webapp.servlet.RepoFilter.doFilterInternal(RepoFilter.java:170)
        at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:95)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.artifactory.webapp.servlet.AccessFilter.doFilterInternal(AccessFilter.java:83)
        at org.artifactory.webapp.servlet.ArtifactoryFilter.doFilter(ArtifactoryFilter.java:95)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
        at java.lang.Thread.run(Unknown Source)
    Caused by: javax.jcr.PathNotFoundException: jcr:lastModified
        at org.apache.jackrabbit.core.NodeImpl.getProperty(NodeImpl.java:2555)
        at org.artifactory.jcr.JcrFile.lastModified(JcrFile.java:83)
        ... 34 more

    I tried to remove the offending artifact using the user interface, but that also creates an error.

    I am unable to Export the repository because it trips over this issue.

    How can I work around this?  Abandoning the entire repository is not an option.

     
    • Yoav Landman
      Yoav Landman
      2009-07-25

      Try using the artadmin dump command from a 2.0.x Artifactory version to dump the content of your old repository. The command works directly at the storage level and should create a good export suitable for importing into 2.x. You can read more about the use of artadmin here: http://wiki.jfrog.org/confluence/display/RTF/Upgrading+Artifactory ("Upgrading Using the artadmin Tool").