And to make things easier here are my different config files:
server.xml
<Resource name="jcr/davrepo"
auth="Container"
type="javax.jcr.Repository"
factory="org.apache.jackrabbit.core.jndi.BindableRepositoryFactory"
configFilePath="/Users/warnero/repository.xml"
repHomeDir="/Users/warnero/test-repo"/>
[app1].xml
<Context antiJARLocking="true" path="/app1">
<ResourceLink name="jcr/extrepository"
global="jcr/davrepo"
type="javax.jcr.Repository"/>
</Context>
[app2].xml
<Context antiJARLocking="true" path="/app2">
<ResourceLink name="jcr/repository"
global="jcr/davrepo"
type="javax.jcr.Repository"/>
</Context>
I used different names for the resources because I wasn't sure if they
would conflict or not.
And here are the ads to the specific web.xml files
app1
<resource-env-ref>
<description>Content Repository</description>
<resource-env-ref-name>jcr/extrepository</resource-env-ref-name>
<resource-env-ref-type>javax.jcr.Repository</resource-env-ref-type>
</resource-env-ref>
app2
<resource-env-ref>
<description>Content Repository</description>
<resource-env-ref-name>jcr/repository</resource-env-ref-name>
<resource-env-ref-type>javax.jcr.Repository</resource-env-ref-type>
</resource-env-ref>
Help is greatly appreciated (we are trying to do a demo by tomorrow
and this is the last piece).
-warner
On Aug 28, 2008, at 9:31 AM, Warner Onstine wrote:
Forgot a few that I had added to get around errors:
commons-collections-3.2
concurrent-1.3.4
derby-10.2.16
-warner
On Aug 28, 2008, at 9:14 AM, Warner Onstine wrote:
I think I finally found it, still not sure as I'm getting an error
I got earlier but got rid of and has now returned on both of my
servlets.
I'm now getting this
ava.lang.ClassCastException:
org.apache.jackrabbit.core.jndi.BindableRepository
com.vms.adsite.util.WebDAVUtils.getRepo(WebDAVUtils.java:20)
com
.vms.adsite.webDAV.WebDAVServlet.getRepository(WebDAVServlet.java:
12)
org
.apache
.jackrabbit
.webdav
.simple
.SimpleWebdavServlet.getDavSessionProvider(SimpleWebdavServlet.java:
317)
org
.apache
.jackrabbit
.webdav
.server.AbstractWebdavServlet.service(AbstractWebdavServlet.java:
204) javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
Which I know is related to not having the jar files in the common/
lib folder. Here are the jar files I have in there:
jcr-1.0-api
jackrabbit-api-1.4
jackrabbit-core-1.4
jackrabbit-jcr-commons-1.4
jackrabbit-spi-1.4
jackrabbit-spi-commons-1.4
jackrabbit-text-extractors-.1.4
slf4j-log4j-12-1.3.0
slf4j-api-1.3.0
log4j-1.2.13
If there are other jar files that need to go in there let me know
(or if they should be in different directories (like server/shared
or something) let me know.
Thanks.
-warner
On Aug 28, 2008, at 1:28 AM, Alexander Klimetschek wrote:
On Thu, Aug 28, 2008 at 1:47 AM, Warner Onstine <[EMAIL PROTECTED]
> wrote:
Ok, I have now setup my repo as outlined here:
http://jackrabbit.apache.org/shared-j2ee-resource-howto.html
I have one webapp that has setup the repo for access through
WebDAV. I have
another application that only needs read-only access to the repo.
The WebDAV
seems to be working just fine, but the second webapp has
constantly been
having problems gaining access to the repo.
I am getting this error:
org.apache.naming.NamingContext lookup
WARNING: Unexpected exception resolving reference
javax.jcr.RepositoryException: The repository home /Users/warnero/
test-repo
appears to be in use since the file named .lock is locked by
another
process.
This means that another Jackrabbit instances is still running and
using the same repository home directory, which is not possible,
hence
this lock mechanism. Maybe you have another JVM with j2ee or
Jackrabbit configured? Or accidentally configured two Jackrabbits in
your container?
Regards,
Alex
--
Alexander Klimetschek
[EMAIL PROTECTED]