0

我需要从 Mule 订阅 JBOSS 5.1 主题。这是我正在使用的配置。

<jms:connector name="jMSConnector"    jndiInitialFactory="org.jnp.interfaces.NamingContextFactory"    connectionFactoryJndiName="/ClusteredConnectionFactory"   jndiProviderUrl="jnp://localhost:1099"
jndiDestinations="true" forceJndiDestinations="true" specification="1.1"   doc:name="JMS"/>
<flow name="testFlow1" doc:name="testFlow1">
   <jms:inbound-endpoint doc:name="JMS" connector-ref="jMSConnector" topic="jms/topic/testtopic"/>
   <logger message="#[message.payload]" level="INFO" doc:name="Logger"/>
</flow>

我在类路径中包含了以下 jar: concurrent.jar jboss-aop-client.jar jboss-common-core.jar jboss-logging-spi.jar jboss-mdr.jar jboss-messaging-client.jar jboss-remoting.jar jnp -client.jar trove.jar

尝试运行应用程序时出现以下错误。有人可以告诉我应该使用的确切依赖 jar 吗?

java.lang.NoSuchMethodError: org.jboss.logging.Logger.getLoggerPlugin()Lorg/jboss/logging/LoggerPlugin;
at org.jboss.aop.util.logging.AOPLogger.<init>(AOPLogger.java:63)
at org.jboss.aop.util.logging.AOPLogger.getLogger(AOPLogger.java:44)
at org.jboss.aop.AspectManager.<clinit>(AspectManager.java:109)
at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate.<clinit>(ClientClusteredConnectionFactoryDelegate.java)
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:140)
at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1057)
at java.lang.reflect.Field.getFieldAccessor(Field.java:1038)
at java.lang.reflect.Field.getLong(Field.java:591)
at java.io.ObjectStreamClass.getDeclaredSUID(ObjectStreamClass.java:1663)
at java.io.ObjectStreamClass.access$700(ObjectStreamClass.java:72)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:480)
at java.io.ObjectStreamClass$2.run(ObjectStreamClass.java:468)
at java.security.AccessController.doPrivileged(Native Method)
at java.io.ObjectStreamClass.<init>(ObjectStreamClass.java:468)
at java.io.ObjectStreamClass.lookup(ObjectStreamClass.java:365)
at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:602)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1622)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
at java.rmi.MarshalledObject.get(MarshalledObject.java:159)
at org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:72)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:769)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
at javax.naming.InitialContext.lookup(InitialContext.java:411)
at org.mule.transport.jms.jndi.SimpleJndiNameResolver.lookup(SimpleJndiNameResolver.java:31)
at org.mule.transport.jms.JmsConnector.createConnectionFactory(JmsConnector.java:282)
at org.mule.transport.jms.JmsConnector.createConnection(JmsConnector.java:404)
at org.mule.transport.jms.JmsConnector.doConnect(JmsConnector.java:515)
at org.mule.transport.AbstractConnector$5.doWork(AbstractConnector.java:1556)
at org.mule.retry.policies.AbstractPolicyTemplate.execute(AbstractPolicyTemplate.java:67)
at org.mule.transport.AbstractConnector.connect(AbstractConnector.java:1616)
at org.mule.transport.jms.JmsConnector.connect(JmsConnector.java:458)
at org.mule.transport.AbstractConnector.start(AbstractConnector.java:428)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.mule.lifecycle.phases.DefaultLifecyclePhase.applyLifecycle(DefaultLifecyclePhase.java:225)
at org.mule.lifecycle.RegistryLifecycleManager$RegistryLifecycleCallback.onTransition(RegistryLifecycleManager.java:276)
at org.mule.lifecycle.RegistryLifecycleManager.invokePhase(RegistryLifecycleManager.java:155)
at org.mule.lifecycle.RegistryLifecycleManager.fireLifecycle(RegistryLifecycleManager.java:126)
at org.mule.registry.AbstractRegistryBroker.fireLifecycle(AbstractRegistryBroker.java:80)
at org.mule.registry.MuleRegistryHelper.fireLifecycle(MuleRegistryHelper.java:120)
at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:94)
at org.mule.lifecycle.MuleContextLifecycleManager$MuleContextLifecycleCallback.onTransition(MuleContextLifecycleManager.java:90)
at org.mule.lifecycle.MuleContextLifecycleManager.invokePhase(MuleContextLifecycleManager.java:72)
at org.mule.lifecycle.MuleContextLifecycleManager.fireLifecycle(MuleContextLifecycleManager.java:64)
at org.mule.DefaultMuleContext.start(DefaultMuleContext.java:255)
at org.mule.module.launcher.application.DefaultMuleApplication.start(DefaultMuleApplication.java:147)
at org.mule.module.launcher.application.ApplicationWrapper.start(ApplicationWrapper.java:107)
at org.mule.module.launcher.DefaultMuleDeployer.deploy(DefaultMuleDeployer.java:48)
at org.mule.tooling.server.application.ApplicationDeployer.run(ApplicationDeployer.java:58)
at org.mule.tooling.server.application.ApplicationDeployer.main(ApplicationDeployer.java:91)
4

2 回答 2

0

当我从 Mule CE 3.4.0 运行时中删除 jboss-logging-3.0.0.Beta5.jar 时,这个问题得到了解决。但不知道会不会引起其他问题。还想弄清楚。

于 2014-04-18T18:13:40.363 回答
0

如果您使用的是 Maven,之前我只使用了以下依赖项:

    <dependency>
        <groupId>org.jboss.jbossas</groupId>
        <artifactId>jboss-as-client</artifactId>
        <type>pom</type>
        <version>5.1.0.GA</version>
    </dependency>

编辑 添加以下存储库:

<repositories>
        <repository>
            <id>jboss-maven2</id>
            <url>http://repository.jboss.org/nexus/content/groups/public-jboss/</url>
        </repository>
        <repository>
                    <id>jboss-deprecated-repository</id>
                    <name>JBoss Deprecated Maven Repository</name>
                    <url>https://repository.jboss.org/nexus/content/repositories/deprecated/</url>
                    <layout>default</layout>
                    <releases>
                        <enabled>true</enabled>
                        <updatePolicy>never</updatePolicy>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                        <updatePolicy>never</updatePolicy>
                    </snapshots>
                </repository>
    </repositories>
于 2014-04-15T20:16:00.443 回答