안녕하십니까 StackOverflow 커뮤니티,JNDI를 사용하여 Websphere MQ에 연결할 수 없습니다
현재 대기열에 연결하는 데 Spring을 사용하고 있습니다. 나는 우리의 테스트 대 UAT 환경에서 연결할 수있는 공급자를 구성 할 수 있기를 원합니다. UAT에서는 IBM WMQ 7을 사용합니다. Test에서는 ActiveMQ를 사용하고 있습니다.
우리는 또한 두 경우 모두 SSL 연결을 사용하고 있습니다.
<bean id="jmsFactory" name="jmsFactory" class="com.ibm.mq.jms.MQConnectionFactory">
<property name="queueManager" value="${UM_MQ_QM}" />
<property name="hostName" value="${UM_MQ_HOST}" />
<property name="channel" value="${UM_MQ_CHANNEL}" />
<property name="port" value="${UM_MQ_PORT}" />
<property name="transportType" value="1" />
<property name="SSLCipherSuite" value="${SSL_CIPHER_SUITE}" />
</bean>
JNDI를 사용하여, 내가 ActiveMQ를 연결할 수 있어요 :
현재, 우리는 WMQ 7에 연결하기 위해 작동하는 다음과 같은 구성을 가지고있다. 그러나 공급자 클래스를 전환 할 때 다음 예외가 발생합니다.
봄 JNDI 구성 :
<bean id="jmsFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="QueueConnectionFactory" />
<property name="jndiTemplate" ref="jndiTemplate" />
</bean>
<bean id="jndiTemplate" class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop key="java.naming.factory.initial">com.ibm.mq.jms.context.WMQInitialContextFactory</prop>
<prop key="java.naming.provider.url">${UM_MQ_HOST}:${UM_MQ_PORT}/${UM_MQ_CHANNEL}</prop>
</props>
</property>
</bean>
예외 :
- 우리는 명시 적으로 권한을 설정하지 않습니다 :이 중 2 가지로 인해 의심
Caused by: javax.naming.NamingException: Caught an Exception trying to create the admin queue. Exception was: com.ibm.mq.pcf.PCFException: MQJE001: Completion Code '2', Reason '2035'. [Root exception is com.ibm.mq.pcf.PCFException: MQJE001: Completion Code '2', Reason '2035'.] at com.ibm.mq.jms.context.MQContext.<init>(MQContext.java:294) at com.ibm.mq.jms.context.WMQInitialContextFactory.getInitialContext(WMQInitialContextFactory.java:29) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.<init>(InitialContext.java:197) at org.springframework.jndi.JndiTemplate.createInitialContext(JndiTemplate.java:136) at org.springframework.jndi.JndiTemplate.getContext(JndiTemplate.java:103) at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:85) at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152) at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:178) at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95) at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:105) at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:201) at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:187) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1545) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483) ... 109 more Caused by: com.ibm.mq.pcf.PCFException: MQJE001: Completion Code '2', Reason '2035'. at com.ibm.mq.pcf.PCFMessageAgent.send(PCFMessageAgent.java:241) at com.ibm.mq.jms.context.MQContext.<init>(MQContext.java:273) ... 125 more
위에서 설명한 JMS 관리 대기열
- 암호 설정이에서 작동하지 않습니다. 봄 구성
어떤 지침을 제공 할 수 있습니까? 이전에이 문제에 직면 한 경우 해결책은 무엇입니까?
나는
호세
나는 이걸 보았다고 믿는다. http://stackoverflow.com/questions/12889953/unable-to-connect-to-queue-manager-in-websphere-mq-7-1 – Ashish