Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-919

java.nio.channels.OverlappingFileLockException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 1.3
    • None
    • jackrabbit-core
    • None
    • WINDOWS XP/JDK1.6/Tomacat Apache

    Description

      I am running Tomcat apache 6.0 in windows XP. I am trying to access Transient repository.

      In very first run, I am able to open and close session for Transient repository. but in the next run, it always throws exception "java.nio.channels.OverlappingFileLockException".

      To resolve that issue(workaround) I have to restart the apache server. In case of very first run, I am able to read/write from/to repository.

      code snippet used: ( wrapper calls to class to session open and close)

      import java.io.OutputStream;
      import javax.jcr.Repository;
      import javax.jcr.Session;
      import javax.jcr.SimpleCredentials;
      import org.apache.jackrabbit.core.TransientRepository;
      public class jackrabbitPlugin
      {
      public static Session session;
      public static int SUCCESS =0;
      public static int FAILURE =-1;
      private int isOpened = 0;
      public String errMsg;
      private Repository repository = null;

      public String logout()
      {
      String retValue = "SUCCESS";
      try

      { session.logout(); }

      catch(Exception exp)

      { retValue = "Exception:" + exp; }

      return retValue;
      }
      public String login (String user,String password, String RepositoryPath,String workspaceName)
      {
      String retValue = "SUCCESS";
      if(workspaceName.compareTo("")==0)

      { workspaceName="default"; }

      try
      {
      if(IsSessionOpen()==false)
      {
      System.setProperty("org.apache.jackrabbit.repository.home",RepositoryPath);
      repository = new TransientRepository();
      session = repository.login(new SimpleCredentials(user,password.toCharArray()),workspaceName);
      if(session!=null)

      { retValue = "SUCCESS"; isOpened = 1; }

      }
      }
      catch (Exception exp)

      { String errMsg = "Exception:" + exp; retValue = errMsg; System.out.println(errMsg); ((TransientRepository)repository).shutdown(); logout(); this.errMsg = errMsg; }

      return retValue;
      }

      }

      Attachments

        Issue Links

          Activity

            People

              stefan@jira Stefan Guggisberg
              chandan Chandan Singh
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: