0

我收到以下错误:

应用程序 EBS_Calc#EBS_Calc_EJB.jar#MBIntegrations 有一个 useJNDI,在 ResourceAdapter 单元格/USWSA0102235Node01Cell/ 的 ActivationSpec 类 jms/ASQueue(com.ibm.ws.sib.api.jmsra.impl.JmsJcaActivationSpecImpl) 上没有相应的属性节点/USWSA0102235Node01/servers/server1/resources.xml#J2CResourceAdapter_1364909976437。该属性将被忽略。这可能会产生不良影响。

ActivationSpe W J2CA0161W: 提供的目标 JNDI 名称所引用的对象类型错误。该对象必须实现 javax.jms.destination。目标 JNDI 名称为:jms/ASQueue。提供的对象类是:{1}

ActivationSpe E J2CA0137E: ActivationSpec validate() 方法失败并出现 InvalidPropertyException。ActivationSpec为jms/ASQueue(com.ibm.ws.sib.api.jmsra.impl.JmsJcaActivationSpecImpl),属于已安装的ResourceAdapter单元格/USWSA0102235Node01Cell/nodes/USWSA0102235Node01/servers/server1/resources.xml#J2CResourceAdapter_1364909976437并关联使用 MDB 应用程序 EBS_Calc#EBS_Calc_EJB.jar#MBIntegrations。请参阅以下失败属性列表及其值:

destination  null
destination  null

...

CWSJR1181E: JMS 激活规范具有无效值 - 未能验证 JMS 激活规范的原因是:[CWSJR1188E: 必须为 JMS 激活规范上的目标指定一个值,CWSJR1192E: 使用目标类型的 JMS 激活规范队列的目的地必须是 [com.ibm.websphere.sib.api.jms.JmsQueue] 类型的目的地,但传递的目的地是 [null] 类型的]

我已经相应地配置了 websphere 中的队列、总线和目的地

我的 java 代码如下所示:

    @MessageDriven(mappedName = "jms/ASQueue", activationConfig = {
        @ActivationConfigProperty(propertyName = "connectionFactoryJndiName", propertyValue = "jms/CalcConnectionFactory"),         
@ActivationConfigProperty(propertyName = "destinationName", propertyValue = "jms/calcInQueue"),
    @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")        })

    @Resources ({
      @Resource(name="jms/CalcConnectionFactory",        
                mappedName="jms/CalcConnectionFactory",   // External JNDI name 
                type=javax.jms.ConnectionFactory.class)
     })


    public class MBIntegrations implements MessageListener {

    private static final String CONNECTION_FACTORY_NAME = "jms/CalcConnectionFactory";
    private static final String DESTINATION_NAME = "jms/calcInQueue";

    @Resource
    private MessageDrivenContext mdc;

    private static final Logger logger = Logger.getLogger(MBIntegrations.class);

    public void onMessage(Message inMessage) {

        TextMessage msg = null;

        try {
            if (inMessage instanceof TextMessage) {
                msg = (TextMessage) inMessage;
                logger.info("MESSAGE BEAN: Message received: " + msg.getText());
            } else {
                logger.warn("Message of wrong type: "
                        + inMessage.getClass().getName());
            }

        } catch (JMSException e) {
            e.printStackTrace();
            mdc.setRollbackOnly();
        } catch (Throwable te) {
            te.printStackTrace();
        }

    }

}

和 IBM 活页夹

<message-driven name="MBIntegrations">
        <jca-adapter activation-spec-binding-name="jms/ASQueue"
        destination-binding-name="jms/ASQueue" />
        <resource-ref name="jms/CalcConnectionFactory"
        binding-name="jms/CalcConnectionFactory" />
        <resource-ref name="jdbc/OracleDS" binding-name="jdbc/ORACLE" />
    </message-driven>

我不确定我做错了什么,有人可以帮忙吗?

4

2 回答 2

1

查阅后发现binder中的问题: http ://pic.dhe.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=%2Fcom.ibm.websphere.ejbfep.multiplatform.doc%2Finfo%2Fae% 2Fae%2Fcejb_bindingsejbfp.html

那里说:

<jca-adapter activation-spec-binding-name=
 "jms/InternalProviderSpec" 
 destination-binding-name="jms/ServiceQueue"/>

所以在我的情况下是:

 ... destination-binding-name="jms/calcInQueue" />
于 2013-05-02T16:58:57.970 回答
0

转到 WebSphere 管理控制台

激活规范 - 打开您的激活规范

目标 JNDI 名称 - 可能是错误的。如果是主题,请确保您提供了主题 jndi 名称。

于 2015-05-12T21:40:07.797 回答