Glassfish v3: Can't Deploy MessageDriven Bean - Missing Destination JNDI Name

。_饼干妹妹 提交于 2019-12-06 04:34:43

I replaced the slf4j logging with simple System.out statement to eliminate that as an issue. I got a different error with this root cause:

Caused by: java.lang.IllegalArgumentException: MQJMSRA_AS4001: setDestination:Invalid destination name=jms/FileUploadedQueue

This issue was because I set the "Physical Destination Name" to "jms/FileUploadedQueue" (same as JNDI name). However, the destination name has greater restrictions on valid characters. Changing it to simply "FileUploadedQueue" allowed it to be deployed. From http://markmail.org/message/zetfwrp2hlesynje:

Yes - the failure is due to the "queue/myDestination" being 'Illegal' syntax for the particular JMS provider's physical destination naming syntax - which is provider dependent and not standardized. In this case, GF includes Sun Java System Message Queue and the rules for legal destination names are set by JMQ. Unfortunately, this is not easy to find in the docs - but if you look hard enough, you'll find the following in the MQ Admin Guide on physical destination names.

The physical destination name. The naming rules are as follows:

The name must contain only alphanumeric characters. It cannot contain spaces. * The name can begin with an alphabetic character, the underscore character (_ ) or the dollar sign ($)."

I got the same error. The problem was:

@ActivationConfigProperty(propertyName = "destination", propertyValue = "jms/SampleTopic")

This need to be

@ActivationConfigProperty(propertyName = "destination", propertyValue = "SampleTopic")

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!