WSO2- esb 5.0.0无法创建JMS端点 - javax.naming.NoInitialContextException

时间:2017-05-15 10:59:29

标签: wso2 jms activemq

我在设置JMS入站端点时遇到问题,尽管我已按照WSO2文档中的所有步骤进行操作:

我在WSO2 esb 5.0.0和ActiveMQ 5.13

这是我的JMS端点配置:

    <?xml version="1.0" encoding="UTF-8"?>
<inboundEndpoint name="TestInboundEP" protocol="jms"
    suspend="false" xmlns="http://ws.apache.org/ns/synapse">
    <parameters>
        <parameter name="sequential">true</parameter>
        <parameter name="coordination">true</parameter>
        <parameter name="transport.jms.CacheLevel">3</parameter>
        <parameter name="transport.jms.SessionAcknowledgement">AUTO_ACKNOWLEDGE</parameter>
        <parameter name="transport.jms.SessionTransacted">false</parameter>
        <parameter name="transport.jms.ConnectionFactoryType">queue</parameter>
        <parameter name="transport.jms.ConnectionFactoryJNDIName">myQueueConnectionFactory</parameter>
        <parameter name="java.naming.provider.url">tcp://localhost:61616</parameter>
        <parameter name="java.naming.factory.initial">org.apache.activemq.jndi.ActiveMQInitialContextFactory
        </parameter>
        <parameter name="transport.jms.UserName">admin</parameter>
        <parameter name="transport.jms.Password">admin</parameter>
        <parameter name="transport.jms.Destination">test</parameter>
    </parameters>
</inboundEndpoint>

我不断从ESB控制台收到以下错误:

    ERROR - JMSConnectionFactory NamingException while obtaining initial context. Failed to create InitialContext using factory specified in hash table.
javax.naming.NoInitialContextException: Failed to create InitialContext using factory specified in hash table. [Root exception is java.lang.ClassNotFoundException: class org.apache.activemq.jndi.ActiveMQInitialContextFactory
         not found]
    at org.wso2.carbon.context.internal.CarbonContextDataHolder$CarbonInitialJNDIContextFactoryBuilder.createInitialContextFactory(CarbonContextDataHolder.java:491)
    at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:681)
    at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:313)
    at javax.naming.InitialContext.init(InitialContext.java:244)
    at javax.naming.InitialContext.<init>(InitialContext.java:216)
    at org.wso2.carbon.inbound.endpoint.protocol.jms.factory.JMSConnectionFactory.<init>(JMSConnectionFactory.java:79)
    at org.wso2.carbon.inbound.endpoint.protocol.jms.factory.CachedJMSConnectionFactory.<init>(CachedJMSConnectionFactory.java:38)
    at org.wso2.carbon.inbound.endpoint.protocol.jms.JMSPollingConsumer.<init>(JMSPollingConsumer.java:62)
    at org.wso2.carbon.inbound.endpoint.protocol.jms.JMSProcessor.init(JMSProcessor.java:88)
    at org.apache.synapse.inbound.InboundEndpoint.init(InboundEndpoint.java:79)
    at org.apache.synapse.deployers.InboundEndpointDeployer.deploySynapseArtifact(InboundEndpointDeployer.java:57)
    at org.apache.synapse.deployers.AbstractSynapseArtifactDeployer.deploy(AbstractSynapseArtifactDeployer.java:194)
    at org.wso2.carbon.application.deployer.synapse.SynapseAppDeployer.deployArtifacts(SynapseAppDeployer.java:131)
    at org.wso2.carbon.application.deployer.internal.ApplicationManager.deployCarbonApp(ApplicationManager.java:263)
    at org.wso2.carbon.application.deployer.CappAxis2Deployer.deploy(CappAxis2Deployer.java:72)
    at org.apache.axis2.deployment.repository.util.DeploymentFileData.deploy(DeploymentFileData.java:136)
    at org.apache.axis2.deployment.DeploymentEngine.doDeploy(DeploymentEngine.java:807)
    at org.apache.axis2.deployment.repository.util.WSInfoList.update(WSInfoList.java:144)
    at org.apache.axis2.deployment.RepositoryListener.update(RepositoryListener.java:377)
    at org.apache.axis2.deployment.RepositoryListener.checkServices(RepositoryListener.java:254)
    at org.apache.axis2.deployment.RepositoryListener.startListener(RepositoryListener.java:371)
    at org.apache.axis2.deployment.scheduler.SchedulerTask.checkRepository(SchedulerTask.java:59)
    at org.apache.axis2.deployment.scheduler.SchedulerTask.run(SchedulerTask.java:67)
    at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.runAxisDeployment(CarbonDeploymentSchedulerTask.java:93)
    at org.wso2.carbon.core.deployment.CarbonDeploymentSchedulerTask.run(CarbonDeploymentSchedulerTask.java:138)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

非常感谢您提前。我是WSO2社区的新手!

0 个答案:

没有答案