You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Daryl Jensen <Da...@hansoninc.com> on 2009/12/23 17:42:25 UTC

Migrating old jackrabbit from websphere to tomcat - I/O error while reading locks

Just as the subject says. I compared my code to the reference code in the new 1.6 war from the downloads page. As far as I can tell it is the same. I have the following:

            RepositoryConfig config = RepositoryConfig.create(new InputSource(in), repositoryHome.getAbsolutePath());
            repository =  RepositoryImpl.create(config);
            repository.login(new SimpleCredentials("username", "password".toCharArray()));

I searched for my error in the archives but didn't seem to find much. I get the same thing using the 1.3 jars or the 1.6 jars from the new webapp libs. It creates a lock file every time, even if I delete the old lock file and restart Tomcat. I was hoping someone might have some tips I can use for migrating this application to Tomcat.

javax.jcr.RepositoryException: I/O error while reading locks from '/locks': error while reading locks file: error while reading locks file
                at org.apache.jackrabbit.core.lock.LockManagerImpl.<init>(LockManagerImpl.java:177)
                at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getLockManager(RepositoryImpl.java:1819)
                at org.apache.jackrabbit.core.RepositoryImpl.getLockManager(RepositoryImpl.java:907)
                at org.apache.jackrabbit.core.WorkspaceImpl.getInternalLockManager(WorkspaceImpl.java:545)
                at org.apache.jackrabbit.core.XASessionImpl.getLockManager(XASessionImpl.java:183)
                at org.apache.jackrabbit.core.XASessionImpl.init(XASessionImpl.java:134)
                at org.apache.jackrabbit.core.XASessionImpl.<init>(XASessionImpl.java:107)
                at org.apache.jackrabbit.core.RepositoryImpl.createSessionInstance(RepositoryImpl.java:1517)
                at org.apache.jackrabbit.core.RepositoryImpl.createSession(RepositoryImpl.java:964)
                at org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1395)
                at org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:53)

http://www.mail-archive.com/search?l=users%40jackrabbit.apache.org&q=I%2FO+error+while+reading+locks

Thanks,
Daryl

Re: Migrating old jackrabbit from websphere to tomcat - I/O error while reading locks

Posted by Thomas Müller <th...@day.com>.
Hi,

> Btw, my problem really was a bug in the Microsoft sql driver. Using jtds and it works fine now.

Good to know... If you still have that information, could you tell us
the root cause of the problem, so we can document it?

Regards,
Thomas

RE: Migrating old jackrabbit from websphere to tomcat - I/O error while reading locks

Posted by Daryl Jensen <Da...@hansoninc.com>.
Btw, my problem really was a bug in the Microsoft sql driver. Using jtds and it works fine now.

-----Original Message-----
From: Daryl Jensen [mailto:Daryl.Jensen@hansoninc.com] 
Sent: Wednesday, December 23, 2009 11:42 AM
To: users@jackrabbit.apache.org
Subject: Migrating old jackrabbit from websphere to tomcat - I/O error while reading locks

Just as the subject says. I compared my code to the reference code in the new 1.6 war from the downloads page. As far as I can tell it is the same. I have the following:

            RepositoryConfig config = RepositoryConfig.create(new InputSource(in), repositoryHome.getAbsolutePath());
            repository =  RepositoryImpl.create(config);
            repository.login(new SimpleCredentials("username", "password".toCharArray()));

I searched for my error in the archives but didn't seem to find much. I get the same thing using the 1.3 jars or the 1.6 jars from the new webapp libs. It creates a lock file every time, even if I delete the old lock file and restart Tomcat. I was hoping someone might have some tips I can use for migrating this application to Tomcat.

javax.jcr.RepositoryException: I/O error while reading locks from '/locks': error while reading locks file: error while reading locks file
                at org.apache.jackrabbit.core.lock.LockManagerImpl.<init>(LockManagerImpl.java:177)
                at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.getLockManager(RepositoryImpl.java:1819)
                at org.apache.jackrabbit.core.RepositoryImpl.getLockManager(RepositoryImpl.java:907)
                at org.apache.jackrabbit.core.WorkspaceImpl.getInternalLockManager(WorkspaceImpl.java:545)
                at org.apache.jackrabbit.core.XASessionImpl.getLockManager(XASessionImpl.java:183)
                at org.apache.jackrabbit.core.XASessionImpl.init(XASessionImpl.java:134)
                at org.apache.jackrabbit.core.XASessionImpl.<init>(XASessionImpl.java:107)
                at org.apache.jackrabbit.core.RepositoryImpl.createSessionInstance(RepositoryImpl.java:1517)
                at org.apache.jackrabbit.core.RepositoryImpl.createSession(RepositoryImpl.java:964)
                at org.apache.jackrabbit.core.RepositoryImpl.login(RepositoryImpl.java:1395)
                at org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:53)

http://www.mail-archive.com/search?l=users%40jackrabbit.apache.org&q=I%2FO+error+while+reading+locks

Thanks,
Daryl