wildfly不使用的自定义JCR模块

时间:2014-05-24 13:23:50

标签: module wildfly

我试图在wildfly 8.0服务器上运行jackrabbit 2.6.4作为JCA。它已经在Jboss 7.1上运行了。长耳兔的一个重要要求是JCR 2.0 api(jcr-2.0.jar)。 我把它配置为一个自定义模块,注意结构“modules \ javax \ jcr \ main”,包括“module.xml”文件

在我的wildfly配置中,我以这种方式配置JCR:

<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>

启动时出现的错误是:

    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

因此我认为没有正确找到/使用JCR模块,因为类“javax.jcr.RepositoryException”在模块jar中。 我怎么能告诉wildfly这个模块必须使用? 有没有解决方法? 非常感谢您提供任何帮助

亲切的问候,

肖恩

1 个答案:

答案 0 :(得分:0)

我按照链接下的指南进行操作 Jackrabbit on JBoss 7

在我的情况下,问题是,我没有修改rar里面的清单 我不得不添加一行

Dependencies: javax.jcr export,org.slf4j

祝你好运 沙恩