Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
1.3
-
None
-
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
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)
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)
}
}
catch (Exception exp)
return retValue;
}
}
Attachments
Issue Links
- duplicates
-
JCR-912 OverlappingFileLockException with JRE 1.6
- Closed