Hi,

I'm trying to use Jackrabbit with JBoss. I have the latest versions of both - that means Jackrabbit 2.0.0, and JBoss 6.0.0.M2. That version of JBoss is kindasorta a beta - JBoss is no longer doing betas, but 'milestones', which are supposed to be more solid than betas. I'm running with Sun's java 1.6.0_16-b01 on linux.

Zeroth question: should i expect to be able to get this to work?

I started by following the JackrabbitOnJBoss instructions at:

http://wiki.apache.org/jackrabbit/JackrabbitOnJBoss

Making one minor deviation (putting the API jar in the server's lib
directory, rather than the global one), and working round the one error
that seems to be in those instructions ("Change the homeDir property" -
there is no homeDir property, so i created one).

So far, what i've done can be summed up as (where JACKRABBIT_HOME is the
place i downloaded the jars to):

cd $JBOSS_HOME/server
cp -r default/ jackrabbit-on-jboss
cp $JACKRABBIT_HOME/jackrabbit-jca-2.0.0.rar jackrabbit-on-jboss/deploy/
cp $JACKRABBIT_HOME/jcr-2.0.jar jackrabbit-on-jboss/lib/
wget 
http://svn.apache.org/repos/asf/jackrabbit/trunk/jackrabbit-jca/deploy/jboss/jcr-ds.xml
 -O jackrabbit-on-jboss/deploy/jcr-ds.xml
sed -i 
's#<rar-name>jackrabbit-jca.rar</rar-name>#<rar-name>jackrabbit-jca-2.0.0.rar</rar-name>#'
 jackrabbit-on-jboss/deploy/jcr-ds.xml
sed -i 's#</tx-connection-factory>#<config-property name="homeDir" 
type="java.lang.String">jackrabbit-test</config-property></tx-connection-factory>#' 
jackrabbit-on-jboss/deploy/jcr-ds.xml

First question: the wiki page refers to "the homeDir property", but there
is nothing with that name in the jcr-ds.xml file i downloaded. I assumed
that this refers to a config-property entry, with that name, and of type
java.lang.String. Is that correct?

Second question: i defined that property, but didn't create any
corresponding directory on disk; i'm assuming Jackrabbit will create it.
Is that correct?

If i then start JBoss with the server i've just defined, i get two errors
in the output written to the console, each repeated a few times. Neither
occurs if i start a copy of the default server without the Jackrabbit
parts.

The first is this:

19:19:30,293 WARN [ClassLoaderManager] Unexpected error during load 
of:org.apache.commons.collections.DoubleOrderedMap$1$1: 
java.lang.IllegalAccessError: 
classorg.apache.commons.collections.DoubleOrderedMap$1$1 cannot access its 
superclass 
org.apache.commons.collections.DoubleOrderedMap$DoubleOrderedMapIterator
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
         at 
org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:70)
         at 
org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:668)
         at 
org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:627)
         at java.security.AccessController.doPrivileged(Native Method)
         at 
org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:626)

That looks like some kind of classloader problem related to
commons-collections.

Third question: is this is a known problem? What's the solution?

I haven't the faintest idea what it means myself - going by the J2EE
classloader architecture, could it be that the superclass is being loaded
by the server-level classloader, but the subclass is being loaded by a
more rootward classloader, and so there's a visibility problem? Or is this
because i'm using java 1.6, and some of the code was compiled with 1.5,
and there have been changes in the member access rules?

The second error is this:

19:25:23,479 ERROR [AbstractKernelController] Error installing to Start: 
name=jboss.jca:name=jcr/local,service=ConnectionFactoryBinding state=Create 
mode=ManualrequiredState=Installed: 
org.jboss.deployers.spi.DeploymentException: Could not create ConnectionFactory 
for adapter: jboss.jca:service=TxCM,name=jcr/local
         at 
org.jboss.resource.connectionmanager.ConnectionFactoryBindingService.createConnectionFactory(ConnectionFactoryBindingService.java:145)
         at 
org.jboss.resource.connectionmanager.ConnectionFactoryBindingService.startService(ConnectionFactoryBindingService.java:70)
         at 
org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:355)
Caused by: javax.resource.ResourceException: Property 'configFile' not set
         at 
org.apache.jackrabbit.jca.JCAManagedConnectionFactory.createRepository(JCAManagedConnectionFactory.java:284)
         at 
org.apache.jackrabbit.jca.JCAManagedConnectionFactory.createConnectionFactory(JCAManagedConnectionFactory.java:124)
         at 
org.jboss.resource.connectionmanager.ConnectionFactoryBindingService.createConnectionFactory(ConnectionFactoryBindingService.java:141)

Followed by this:

19:25:26,288 ERROR 
[org.jboss.system.server.profileservice.ProfileServiceBootstrap] Failed to load 
profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS IN ERROR:
   Deployment 
"vfsfile:/opt/jboss/jboss-6.0.0.20100216-M2/server/jackrabbit-on-jboss/deploy/jcr-ds.xml"
 is in error due to the following reason(s): javax.resource.ResourceException: Property 
'configFile' not set

That seems to be saying that i need to define a configFile property in the
jcr-ds.xml. There's no mention of that on the wiki page.

Fourth question: do i need to define a configFile property, and if so,
what should its type and value be?

Thanks in advance,
tom

--
Tom Anderson                |            e2x Ltd, 8 Elder Street, London E1 6BT
(e) [email protected]  |  (m) +44 (7960) 989794  |  (f) +44 (20) 7194 8016

Reply via email to