|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
"com.ibm.mqjms.jar" MQQueue issue in MQ7 (from MQ6 |
« View previous topic :: View next topic » |
Author |
Message
|
isaw |
Posted: Thu Jun 30, 2011 6:25 am Post subject: "com.ibm.mqjms.jar" MQQueue issue in MQ7 (from MQ6 |
|
|
Apprentice
Joined: 09 May 2007 Posts: 45
|
Hi guys,
Having trouble upgrading an existing Spring3 JMS app from MQ6 to MQ7. The problem comes from the jar file : com.ibm.mqjms.jar. Everything worked fine in MQ6 but once referencing the MQ7 jar com.ibm.mqjms.jar it fails.
The Spring context initialisation is failing when it gets to this bean ref in the spring config :
Code: |
<bean id="MyQueue" class="com.ibm.mq.jms.MQQueue">
<property name="baseQueueManagerName">
<value>${my.queue.manager}</value>
</property>
<property name="baseQueueName">
<value>
${my.queue.name}
</value>
</property>
</bean>
|
The error message looks like this :
Code: |
[ERROR ] 2011-06-30 14:49:10.118 TriggerFileMain.main:90 -- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'BPFMGProcessQueues': Cannot resolve reference to bean 'MyQueue' while setting bean property 'sourceMap' with key [TypedStringValue: value [MyQueue], target type [null]]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'MyQueue' defined in file [C:\test\spring.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'baseQueueName' threw exception; nested exception is com.ibm.msg.client.jms.DetailedJMSException: JMSCC0005: The specified value '
MY.TEST.QUEUE
' is not allowed for 'XMSC_DESTINATION_NAME'. The given value is not allowed for the property specified. Change the value to a value that is supported for the property.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'BPFMGProcessQueues': Cannot resolve reference to bean 'MyQueue' while setting bean property 'sourceMap' with key [TypedStringValue: value [MyQueue], target type [null]]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'MyQueue' defined in file [C:\test\spring.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'baseQueueName' threw exception; nested exception is com.ibm.msg.client.jms.DetailedJMSException: JMSCC0005: The specified value '
MY.TEST.QUEUE
' is not allowed for 'XMSC_DESTINATION_NAME'. The given value is not allowed for the property specified. Change the value to a value that is supported for the property.
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:378)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:161)
...
|
Specifically this bit :
Code: |
Property 'baseQueueName' threw exception; nested exception is com.ibm.msg.client.jms.DetailedJMSException: JMSCC0005: The specified value '
MY.TEST.QUEUE
' is not allowed for 'XMSC_DESTINATION_NAME'. The given value is not allowed for the property specified. Change the value to a value that is supported for the property. |
I've been trying to compare the MQQueue class definition in the IBM Infocentre for both MQ 6 and 7 and I'm not seeing anything that appears wrong. I mean, whlie ref'ing the MQ7 com.ibm.mqjms.jar file and checking the setters/getters of MQQueue, I can still see "setBaseQueueName(String arg)".
Can someone help me out? |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Jun 30, 2011 2:46 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Which version of MQ V7 are you using.
I hope V7.0.1.5... Anything else has too many APARS in JMS to get you up to speed.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
isaw |
Posted: Thu Jun 30, 2011 11:13 pm Post subject: |
|
|
Apprentice
Joined: 09 May 2007 Posts: 45
|
Ahh. I'm on 7.0.1.3. That might explain it.
Ok, I'll get the updates and try again.
Thanks for the heads up, fjb_saper. |
|
Back to top |
|
 |
isaw |
Posted: Fri Jul 01, 2011 2:07 am Post subject: |
|
|
Apprentice
Joined: 09 May 2007 Posts: 45
|
I've applied the fix pack and I'm on 7.0.1.5 and sadly, the same error happens.
I recall reading that one of the changes to the IBM JMS packages were how some of the props were set on the objects. So in stead of using a typical setter, it was a generic "setField(int, String)" where the int was a constant that represented a specific field and the String being the value.
However, going through the InfoCentre, it says the same thing for the class MQQueue on property "BaseQueueName" :
Code: |
BaseQueueName property
Read-only. The queue name to which the alias resolves.
Valid only for alias queues.
Defined in: MQQueue class
Data Type: String of 48 characters
Syntax: To get: baseqname$ = MQQueue.BaseQueueName
|
And the class still has the physical setter/getter methods to set the baseQueueName property in the latest com.ibm.mqjms.jar file for MQQueue.
I *really* do not want to include the MQ 6 com.ibm.mqjms.jar file. |
|
Back to top |
|
 |
isaw |
Posted: Fri Jul 01, 2011 2:56 am Post subject: |
|
|
Apprentice
Joined: 09 May 2007 Posts: 45
|
Fixed.
Instead of :
Code: |
<bean id="MyQueue" class="com.ibm.mq.jms.MQQueue">
<property name="baseQueueManagerName">
<value>${my.queue.manager}</value>
</property>
<property name="baseQueueName">
<value>
${my.queue.name}
</value>
</property>
</bean>
|
It should have been :
Code: |
<bean id="MyQueue" class="com.ibm.mq.jms.MQQueue">
<constructor-arg value="${my.queue.name}" />
</bean>
|
Still would be nice to know what exactly changed between Mq6 and Mq7 such that the MQQueue object wouldn't/won't let me manually set the baseQueueName manually.
Anyhow, resolved. |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|