尝试在m子应用中使用Twitter连接器时出现以下错误。
我的依附关系(和耳朵)已经有了m子核心。实际上,我的依赖关系看起来还不错。
<dependency>
<groupId>org.mule</groupId>
<artifactId>mule-core</artifactId>
<version>3.4.0</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-twitter</artifactId>
<version>LATEST</version>
</dependency>
等..等
这是堆栈:
Caused by: java.lang.NoClassDefFoundError: org/mule/api/ConnectionException
13:44:06,985 ERROR [stderr] ([].BATCH.stage1.02) at org.mule.twitter.connectivity.TwitterConnectorConnectionFactory.makeObject(TwitterConnectorConnectionFactory.java:37)
13:44:06,985 ERROR [stderr] ([].BATCH.stage1.02) at org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:1220)
13:44:06,985 ERROR [stderr] ([].BATCH.stage1.02) at org.mule.twitter.connectivity.TwitterConnectorConnectionManager.acquireConnection(TwitterConnectorConnectionManager.java:315)
13:44:06,986 ERROR [stderr] ([].BATCH.stage1.02) at org.mule.twitter.connectivity.TwitterConnectorConnectionManager.acquireConnection(TwitterConnectorConnectionManager.java:34)
13:44:06,986 ERROR [stderr] ([].BATCH.stage1.02) at org.mule.twitter.process.ManagedConnectionProcessInterceptor.execute(ManagedConnectionProcessInterceptor.java:60)
13:44:06,986 ERROR [stderr] ([].BATCH.stage1.02) at org.mule.twitter.process.ManagedConnectionProcessInterceptor.execute(ManagedConnectionProcessInterceptor.java:21)
13:44:06,987 ERROR [stderr] ([].BATCH.stage1.02) at org.mule.twitter.process.RetryProcessInterceptor.execute(RetryProcessInterceptor.java:69)
13:44:06,987 ERROR [stderr] ([].BATCH.stage1.02) at org.mule.twitter.connectivity.ManagedConnectionProcessTemplate.execute(ManagedConnectionProcessTemplate.java:35)
13:44:06,987 ERROR [stderr] ([].BATCH.stage1.02) at org.mule.twitter.processors.UpdateStatusMessageProcessor.process(UpdateStatusMessageProcessor.java:150)
13:44:06,988 ERROR [stderr] ([].BATCH.stage1.02) at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27)
13:44:06,988 ERROR [stderr] ([].BATCH.stage1.02) at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:61)
13:44:06,988 ERROR [stderr] ([].BATCH.stage1.02) at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:47)
13:44:06,989 ERROR [stderr] ([].BATCH.stage1.02) at org.mule.processor.chain.DefaultMessageProcessorChain.doProcess(DefaultMessageProcessorChain.java:95)
...
Caused by: java.lang.ClassNotFoundException: org.mule.api.ConnectionException
最佳答案
org.mule.api.ConnectionException
位于:
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-devkit-support</artifactId>
<version>3.4.0</version>
</dependency>
您的POM中有这种依赖吗?