2 Replies Latest reply on Jun 19, 2014 7:04 AM by malcomtom

    JCR 2.0 module not loaded by wildfly

    malcomtom Newbie

      I am trying to run jackrabbit 2.6.4 as JCA on a wildfly 8.0 Final server. It was already running on Jboss 7.1. One important requirement of jackrabbit is JCR 2.0 api (jcr-2.0.jar).

      I configured this as a custom module with taking care the structure "modules\javax\jcr\main" including the "module.xml" file

      inside my wildfly configuration i configured JCR in this this way:

      <subsystem xmlns="urn:jboss:domain:resource-adapters:1.0">

              <resource-adapters>

                  <resource-adapter id="jackrabbit-jca-2.6.4.rar">

                      <archive>

                          jackrabbit-jca-2.6.4.rar

                      </archive>

                      <transaction-support>XATransaction</transaction-support>

                      <connection-definitions>

                          <connection-definition class-name="org.apache.jackrabbit.jca.JCAManagedConnectionFactory" jndi-name="jcrJCA" enabled="true" use-java-context="true" pool-name="jackrabbit-jca-x.x.x_rar-Pool" use-ccm="true">

                              <config-property name="configFile">

                                  E:\jackrabbit\repository.xml

                              </config-property>

                              <config-property name="bindSessionToTransaction">

                                  true

                              </config-property>

                              <config-property name="homeDir">

                                  E:\jackrabbit\repository

                              </config-property>

                          </connection-definition>

                      </connection-definitions>

                  </resource-adapter>

              </resource-adapters>

          </subsystem>


      The Error that appears during startup is:

      15:17:22,880 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 52) MSC000001: Failed to start service jboss.ra.deployer."jackrabbit-jca

      -2.6.4.rar": org.jboss.msc.service.StartException in service jboss.ra.deployer."jackrabbit-jca-2.6.4.rar": JBAS010446: Failed to start RA deployment [

      jackrabbit-jca-2.6.4.rar]

              at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService$1.run(ResourceAdapterDeploymentService.java:15

      7)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]

              at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

              at org.jboss.threads.JBossThread.run(JBossThread.java:122)

      Caused by: org.jboss.jca.deployers.common.DeployException: IJ020056: Deployment failed: file:/E:/wildfly-8.0.0.Final/standalone/tmp/vfs/temp/t

      emp3f670452d6c2c4d4/jackrabbit-jca-2.6.4.rar-420b5a12409fe1b4/contents/

              at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:2611) [iron

      jacamar-deployers-common-1.1.3.Final.jar:1.1.3.Final]

              at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1171) [iron

      jacamar-deployers-common-1.1.3.Final.jar:1.1.3.Final]

              at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService$AS7RaDeployer.doDeploy(ResourceAdapterDeployme

      ntService.java:209)

              at org.jboss.as.connector.services.resourceadapters.deployment.ResourceAdapterDeploymentService.start(ResourceAdapterDeploymentService.java:11

      8)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)

              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]

              at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]

      Caused by: java.lang.NoClassDefFoundError: javax/jcr/RepositoryException

              at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_45]

              at java.lang.Class.forName(Class.java:270) [rt.jar:1.7.0_45]

              at org.jboss.jca.validator.ValidateClass.<init>(ValidateClass.java:88) [ironjacamar-validator-1.1.3.Final.jar:1.1.3.Final]

              at org.jboss.jca.deployers.common.AbstractResourceAdapterDeployer.createObjectsAndInjectValue(AbstractResourceAdapterDeployer.java:1938) [iron

      jacamar-deployers-common-1.1.3.Final.jar:1.1.3.Final]

              ... 8 more

      Caused by: java.lang.ClassNotFoundException: javax.jcr.RepositoryException from [Module "deployment.jackrabbit-jca-2.6.4.rar:main" from Service Module

      Loader]

              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:197) [jboss-modules.jar:1.3.0.Final]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:443) [jboss-modules.jar:1.3.0.Final]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:431) [jboss-modules.jar:1.3.0.Final]

              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:373) [jboss-modules.jar:1.3.0.Final]

              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:118) [jboss-modules.jar:1.3.0.Final]

              ... 12 more

       

      Therefore i suppose that the JCR module ist not found/used correctly because the class "javax.jcr.RepositoryException" is inside the module jar. How could i tell wildfly that this module has to be used? Is there any workaround? Thanking you very much in advance for any help

      kind regards,

      malcom