You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Markus Gallmetzer <ma...@googlemail.com> on 2010/11/08 19:32:28 UTC

Jackrabbit JCA on JBoss

Hi,

i tried to deploy jackrabbit to JBoss with JCA on Mac OS X and followed almost literally the instructions provided in the wiki (http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss).

Versions:
	Jackrabbit-jca-2.1.2.rar
	jboss-6.0.0-20100911-M5

The following steps repeat what i've done so far:
1.) Download & unzip the JCR-2.0 specification from the specified link.
2.) Moved the jar-file from lib/jcr-2.0.jar to $JBOSS_HOME/common/lib/jcr-2.0.jar
3.) Downloaded jackrabbit-jca-2.1.2.rar and placed it into $JBOSS_HOME/server/default/deploy/
4.) Downloaded the jcr-ds.xml template from the specified link and edited the file:
	4.1) changed the value of "rar-name" element to <rar-name>jackrabbit-jca-2.1.2.rar</rar-name> 
	4.2) Added <config-property name="homeDir" type="java.lang.String">/Users/myuser/Documents/Jackrabbit-Workspace</config-property>
	4.3) And finally deployed jcr-ds.xml to $JBOSS_HOME/server/default/deploy/
5.) Start jboss: $JBOSS_HOME/bin/run.sh

Starting jboss results in a lot of exceptions being thrown. The following error appears at last:

DEPLOYMENTS IN ERROR:
  Deployment "jboss.jca:name='jackrabbit-jca-2.1.2.rar',service=RARDeployment" is in error due to the following reason(s): ** NOT FOUND Depends on 'jboss.jca:name='jackrabbit-jca-2.1.2.rar',service=RARDeployment' **
  Deployment "vfs:///Users/myuser/Applications/jboss-6.0.0.20100911-M5/server/default/deploy/jackrabbit-jca-2.1.2.rar" is in error due to the following reason(s): java.lang.IllegalAccessError: class org.apache.commons.collections.DoubleOrderedMap$2$1 cannot access its superclass org.apache.commons.collections.DoubleOrderedMap$DoubleOrderedMapIterator

I searched the web and unfortunately found only similar but unresolved errors. My questions are:
a) I seem to miss a required library (maybe jackrabbit-jca-2.1.2.rar alone is not enough), do i?
b) Are jackrabbit-jca-2.1.2.rar and jboss-as-6.0.0-20100911-M5 compatible, i.e. usable together?

Thank you all in advance

Markus

Re: Jackrabbit JCA on JBoss

Posted by Markus Gallmetzer <ma...@googlemail.com>.
Hi,

sorry for my late reply. This indeed solves that problem (at least no error
messages). I didn't like the idea of removing required libraries from the
jca-archive at first but as i couldn't get it to work with classloading.xml
(maybe it is possible though) it is a quick workaround.

Thank you all for your help,

Markus

2010/11/15 Sverker Abrahamsson <sv...@abrahamsson.com>

> Hi,
> I haven't read all mails in this thread and haven't tried to run jackrabbit
> on jboss6 yet, but the symptoms you describe below are usually because of
> conflicts in the class loading. Test to remove the commons-collections jar
> from jackrabbit-jca package.
> /Sverker
>
> > -----Original Message-----
> > From: Markus Gallmetzer [mailto:markus.gallmetzer@googlemail.com]
> > Sent: den 8 november 2010 7:32
> > To: users@jackrabbit.apache.org
> > Subject: Jackrabbit JCA on JBoss
> >
> > Hi,
> >
> > i tried to deploy jackrabbit to JBoss with JCA on Mac OS X and followed
> > almost literally the instructions provided in the wiki
> > (http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss).
> >
> > Versions:
> >       Jackrabbit-jca-2.1.2.rar
> >       jboss-6.0.0-20100911-M5
> >
> > The following steps repeat what i've done so far:
> > 1.) Download & unzip the JCR-2.0 specification from the specified link.
> > 2.) Moved the jar-file from lib/jcr-2.0.jar to
> > $JBOSS_HOME/common/lib/jcr-2.0.jar
> > 3.) Downloaded jackrabbit-jca-2.1.2.rar and placed it into
> > $JBOSS_HOME/server/default/deploy/
> > 4.) Downloaded the jcr-ds.xml template from the specified link and
> > edited the file:
> >       4.1) changed the value of "rar-name" element to <rar-
> > name>jackrabbit-jca-2.1.2.rar</rar-name>
> >       4.2) Added <config-property name="homeDir"
> > type="java.lang.String">/Users/myuser/Documents/Jackrabbit-
> > Workspace</config-property>
> >       4.3) And finally deployed jcr-ds.xml to
> > $JBOSS_HOME/server/default/deploy/
> > 5.) Start jboss: $JBOSS_HOME/bin/run.sh
> >
> > Starting jboss results in a lot of exceptions being thrown. The
> > following error appears at last:
> >
> > DEPLOYMENTS IN ERROR:
> >   Deployment "jboss.jca:name='jackrabbit-jca-
> > 2.1.2.rar',service=RARDeployment" is in error due to the following
> > reason(s): ** NOT FOUND Depends on 'jboss.jca:name='jackrabbit-jca-
> > 2.1.2.rar',service=RARDeployment' **
> >   Deployment "vfs:///Users/myuser/Applications/jboss-6.0.0.20100911-
> > M5/server/default/deploy/jackrabbit-jca-2.1.2.rar" is in error due to
> > the following reason(s): java.lang.IllegalAccessError: class
> > org.apache.commons.collections.DoubleOrderedMap$2$1 cannot access its
> > superclass
> > org.apache.commons.collections.DoubleOrderedMap$DoubleOrderedMapIterato
> > r
> >
> > I searched the web and unfortunately found only similar but unresolved
> > errors. My questions are:
> > a) I seem to miss a required library (maybe jackrabbit-jca-2.1.2.rar
> > alone is not enough), do i?
> > b) Are jackrabbit-jca-2.1.2.rar and jboss-as-6.0.0-20100911-M5
> > compatible, i.e. usable together?
> >
> > Thank you all in advance
> >
> > Markus
>
>

RE: Jackrabbit JCA on JBoss

Posted by Sverker Abrahamsson <sv...@abrahamsson.com>.
Hi,
I haven't read all mails in this thread and haven't tried to run jackrabbit
on jboss6 yet, but the symptoms you describe below are usually because of
conflicts in the class loading. Test to remove the commons-collections jar
from jackrabbit-jca package.
/Sverker

> -----Original Message-----
> From: Markus Gallmetzer [mailto:markus.gallmetzer@googlemail.com]
> Sent: den 8 november 2010 7:32
> To: users@jackrabbit.apache.org
> Subject: Jackrabbit JCA on JBoss
> 
> Hi,
> 
> i tried to deploy jackrabbit to JBoss with JCA on Mac OS X and followed
> almost literally the instructions provided in the wiki
> (http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss).
> 
> Versions:
> 	Jackrabbit-jca-2.1.2.rar
> 	jboss-6.0.0-20100911-M5
> 
> The following steps repeat what i've done so far:
> 1.) Download & unzip the JCR-2.0 specification from the specified link.
> 2.) Moved the jar-file from lib/jcr-2.0.jar to
> $JBOSS_HOME/common/lib/jcr-2.0.jar
> 3.) Downloaded jackrabbit-jca-2.1.2.rar and placed it into
> $JBOSS_HOME/server/default/deploy/
> 4.) Downloaded the jcr-ds.xml template from the specified link and
> edited the file:
> 	4.1) changed the value of "rar-name" element to <rar-
> name>jackrabbit-jca-2.1.2.rar</rar-name>
> 	4.2) Added <config-property name="homeDir"
> type="java.lang.String">/Users/myuser/Documents/Jackrabbit-
> Workspace</config-property>
> 	4.3) And finally deployed jcr-ds.xml to
> $JBOSS_HOME/server/default/deploy/
> 5.) Start jboss: $JBOSS_HOME/bin/run.sh
> 
> Starting jboss results in a lot of exceptions being thrown. The
> following error appears at last:
> 
> DEPLOYMENTS IN ERROR:
>   Deployment "jboss.jca:name='jackrabbit-jca-
> 2.1.2.rar',service=RARDeployment" is in error due to the following
> reason(s): ** NOT FOUND Depends on 'jboss.jca:name='jackrabbit-jca-
> 2.1.2.rar',service=RARDeployment' **
>   Deployment "vfs:///Users/myuser/Applications/jboss-6.0.0.20100911-
> M5/server/default/deploy/jackrabbit-jca-2.1.2.rar" is in error due to
> the following reason(s): java.lang.IllegalAccessError: class
> org.apache.commons.collections.DoubleOrderedMap$2$1 cannot access its
> superclass
> org.apache.commons.collections.DoubleOrderedMap$DoubleOrderedMapIterato
> r
> 
> I searched the web and unfortunately found only similar but unresolved
> errors. My questions are:
> a) I seem to miss a required library (maybe jackrabbit-jca-2.1.2.rar
> alone is not enough), do i?
> b) Are jackrabbit-jca-2.1.2.rar and jboss-as-6.0.0-20100911-M5
> compatible, i.e. usable together?
> 
> Thank you all in advance
> 
> Markus


Re: Jackrabbit JCA on JBoss

Posted by Markus Gallmetzer <ma...@googlemail.com>.
Hi,

I added

	      export-all="NON_EMPTY"
             import-all="true"

as attributes to the <classloading> element. Same Error as before (IllegalAccess...).

Markus


> I added the file jboss-classloading.xml to the META-INF/ directory of the RAR file with the following contents:
> 
> <classloading xmlns="urn:jboss:classloading:1.0"
>              parent-first="false">
> </classloading>
> 
> I'm sorry, this is NOT the solution, it only changes the error/exception (ClassNotFoundException et.al. =>  I think that the xml above restricts the classloader too much.) and increases the number ;-). I have not  understood the possibilities offered by jboss-classloading.xml though.
> 
> Thank you all,
> 
> Markus


Re: Jackrabbit JCA on JBoss

Posted by Markus Gallmetzer <ma...@googlemail.com>.
Hi, thanks for your replies.

>       add *<module-order>strict</module-order>* in *jboss-app.xml* and add
> *<module>
> <connector>jackrabbit-jca-2.0.0.rar</connector>
> </module> *
> at the end of *application.xml*
I have no own application yet, but i want to create one ;-). Therefor, I want to deploy jackrabbit-jca to jboss  and already this step fails.


>> This looks like a classloading conflict. I'm no expert on JBoss classloading, but there should be an option to always look for classes first in the rar archive before checking the shared libraries. Try enabling that option.

I tried the following:

I added the file jboss-classloading.xml to the META-INF/ directory of the RAR file with the following contents:

<classloading xmlns="urn:jboss:classloading:1.0"
              parent-first="false">
</classloading>

I'm sorry, this is NOT the solution, it only changes the error/exception (ClassNotFoundException et.al. =>  I think that the xml above restricts the classloader too much.) and increases the number ;-). I have not  understood the possibilities offered by jboss-classloading.xml though.

Thank you all,

Markus

Re: Jackrabbit JCA on JBoss

Posted by sreekanthsnair <sr...@hotmail.co.uk>.
Hi...
        add *<module-order>strict</module-order>* in *jboss-app.xml* and add
*<module>
<connector>jackrabbit-jca-2.0.0.rar</connector>
</module> *
at the end of *application.xml*

regards
srikanth

On 12-11-2010 06:10 PM, Jukka Zitting wrote:
> Hi,
>
> From: Markus Gallmetzer [mailto:markus.gallmetzer@googlemail.com]
>> DEPLOYMENTS IN ERROR:
>>    Deployment "jboss.jca:name='jackrabbit-jca-
>> 2.1.2.rar',service=RARDeployment" is in error due to the following
>> reason(s): ** NOT FOUND Depends on 'jboss.jca:name='jackrabbit-jca-
>> 2.1.2.rar',service=RARDeployment' **
>>    Deployment "vfs:///Users/myuser/Applications/jboss-6.0.0.20100911-
>> M5/server/default/deploy/jackrabbit-jca-2.1.2.rar" is in error due to
>> the following reason(s): java.lang.IllegalAccessError: class
>> org.apache.commons.collections.DoubleOrderedMap$2$1 cannot access its
>> superclass
>> org.apache.commons.collections.DoubleOrderedMap$DoubleOrderedMapIterato
>> r
> This looks like a classloading conflict. I'm no expert on JBoss classloading, but there should be an option to always look for classes first in the rar archive before checking the shared libraries. Try enabling that option.
>
> BR,
>
> Jukka Zitting


RE: Jackrabbit JCA on JBoss

Posted by Jukka Zitting <jz...@adobe.com>.
Hi,

From: Markus Gallmetzer [mailto:markus.gallmetzer@googlemail.com]
> DEPLOYMENTS IN ERROR:
>   Deployment "jboss.jca:name='jackrabbit-jca-
> 2.1.2.rar',service=RARDeployment" is in error due to the following
> reason(s): ** NOT FOUND Depends on 'jboss.jca:name='jackrabbit-jca-
> 2.1.2.rar',service=RARDeployment' **
>   Deployment "vfs:///Users/myuser/Applications/jboss-6.0.0.20100911-
> M5/server/default/deploy/jackrabbit-jca-2.1.2.rar" is in error due to
> the following reason(s): java.lang.IllegalAccessError: class
> org.apache.commons.collections.DoubleOrderedMap$2$1 cannot access its
> superclass
> org.apache.commons.collections.DoubleOrderedMap$DoubleOrderedMapIterato
> r

This looks like a classloading conflict. I'm no expert on JBoss classloading, but there should be an option to always look for classes first in the rar archive before checking the shared libraries. Try enabling that option.

BR,

Jukka Zitting

Re: Jackrabbit JCA on JBoss

Posted by Markus Gallmetzer <ma...@googlemail.com>.
Hi,

btw. same error under linux (ubuntu server 10.04).

2010/11/8 Markus Gallmetzer <ma...@googlemail.com>

> Hi,
>
> i tried to deploy jackrabbit to JBoss with JCA on Mac OS X and followed
> almost literally the instructions provided in the wiki (
> http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss).
>
> Versions:
>        Jackrabbit-jca-2.1.2.rar
>        jboss-6.0.0-20100911-M5
>
> The following steps repeat what i've done so far:
> 1.) Download & unzip the JCR-2.0 specification from the specified link.
> 2.) Moved the jar-file from lib/jcr-2.0.jar to
> $JBOSS_HOME/common/lib/jcr-2.0.jar
> 3.) Downloaded jackrabbit-jca-2.1.2.rar and placed it into
> $JBOSS_HOME/server/default/deploy/
> 4.) Downloaded the jcr-ds.xml template from the specified link and edited
> the file:
>        4.1) changed the value of "rar-name" element to
> <rar-name>jackrabbit-jca-2.1.2.rar</rar-name>
>        4.2) Added <config-property name="homeDir"
> type="java.lang.String">/Users/myuser/Documents/Jackrabbit-Workspace</config-property>
>        4.3) And finally deployed jcr-ds.xml to
> $JBOSS_HOME/server/default/deploy/
> 5.) Start jboss: $JBOSS_HOME/bin/run.sh
>
> Starting jboss results in a lot of exceptions being thrown. The following
> error appears at last:
>
> DEPLOYMENTS IN ERROR:
>  Deployment
> "jboss.jca:name='jackrabbit-jca-2.1.2.rar',service=RARDeployment" is in
> error due to the following reason(s): ** NOT FOUND Depends on
> 'jboss.jca:name='jackrabbit-jca-2.1.2.rar',service=RARDeployment' **
>  Deployment
> "vfs:///Users/myuser/Applications/jboss-6.0.0.20100911-M5/server/default/deploy/jackrabbit-jca-2.1.2.rar"
> is in error due to the following reason(s): java.lang.IllegalAccessError:
> class org.apache.commons.collections.DoubleOrderedMap$2$1 cannot access its
> superclass
> org.apache.commons.collections.DoubleOrderedMap$DoubleOrderedMapIterator
>
> I searched the web and unfortunately found only similar but unresolved
> errors. My questions are:
> a) I seem to miss a required library (maybe jackrabbit-jca-2.1.2.rar alone
> is not enough), do i?
> b) Are jackrabbit-jca-2.1.2.rar and jboss-as-6.0.0-20100911-M5 compatible,
> i.e. usable together?
>
> Thank you all in advance
>
> Markus