Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
10 replies Latest Post - ‏2013-02-11T22:22:39Z by SystemAdmin
iamravinder
iamravinder
4 Posts
ACCEPTED ANSWER

Pinned topic ClassCastException: com.ibm.mq.connector.outbound.ConnectionFactoryImpl

‏2010-09-09T08:47:42Z |
Hi,

I have installed the WebSphere MQ 7 and JBoss 5.1.

I have done all the WebSphere MQ resource adaptor configuration on JBoss server.

I am getting the below Exception when i try to get the QueueConnectionFactory.

==========================================================================
14:02:39,293 ERROR STDERR java.lang.ClassCastException: com.ibm.mq.connector.outbound.ConnectionFactoryImpl cannot be cast to javax.jms.QueueConnectionFactory
14:02:39,293 ERROR STDERR at com.mq.servlet.MQTestServlet.doGet(MQTestServlet.java:57)
14:02:39,293 ERROR STDERR at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
14:02:39,293 ERROR STDERR at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
14:02:39,293 ERROR STDERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
14:02:39,293 ERROR STDERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
14:02:39,293 ERROR STDERR at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
14:02:39,293 ERROR STDERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
14:02:39,293 ERROR STDERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
14:02:39,293 ERROR STDERR at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
14:02:39,293 ERROR STDERR at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
14:02:39,465 ERROR STDERR at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
14:02:39,465 ERROR STDERR at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
14:02:39,465 ERROR STDERR at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
14:02:39,465 ERROR STDERR at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
14:02:39,465 ERROR STDERR at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
14:02:39,465 ERROR STDERR at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
14:02:39,465 ERROR STDERR at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
14:02:39,465 ERROR STDERR at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
14:02:39,465 ERROR STDERR at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
14:02:39,465 ERROR STDERR at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
14:02:39,465 ERROR STDERR at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
14:02:39,465 ERROR STDERR at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
14:02:39,465 ERROR STDERR at java.lang.Thread.run(Unknown Source)
==========================================================================

Configuration Details:
======================

1) wmq.jmsra-ds:

<?xml version="1.0" encoding="UTF-8"?>

<connection-factories>
<!-- connection factory definition -->
<tx-connection-factory>

<jndi-name>IVTCF</jndi-name>
<xa-transaction />
<rar-name>wmq.jmsra.rar</rar-name>

<connection-definition>
javax.jms.ConnectionFactory
</connection-definition>

<config-property name="channel" type="java.lang.String">
S_QM_HYDHTC47964D
</config-property>
<config-property name="hostName" type="java.lang.String">
172.21.215.76
</config-property>
<config-property name="port" type="java.lang.String">
1414
</config-property>
<config-property name="queueManager" type="java.lang.String">
QM_HYDHTC47964D
</config-property>

<!--
<config-property name="transportType" type="java.lang.String">
CLIENT
</config-property>
-->
<!-- <security-domain-and-application>JmsXARealm</security-domain-and-application> -->

</tx-connection-factory>

<!-- admin object definition -->
<mbean code="org.jboss.resource.deployment.AdminObject"
name="jboss.jca:service=WASDestination,name=default">

<attribute name="JNDIName">
default
</attribute>
<depends optional-attribute-name="RARName">
jboss.jca:service=RARDeployment,name='wmq.jmsra.rar'
</depends>
<attribute name="Type">javax.jms.Queue</attribute>

<attribute name="Properties">
baseQueueManagerName=QM_HYDHTC47964D
baseQueueName=SYSTEM.DEFAULT.LOCAL.QUEUE
</attribute>
</mbean>
</connection-factories>

2) copied the wmq.jmsra.rar into the jboss deploy folder.

3) code snippet:

Context ctxt = new InitialContext();

QueueConnectionFactory factory = (QueueConnectionFactory) ctxt.lookup("java:IVTCF");

System.out.println("Before queue connection");

QueueConnection connection = factory.createQueueConnection();
System.out.println("After queue connection:" + connection);

// create a new session
QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);

// get the response queue
Queue responseQueue = (Queue) ctxt.lookup("default");

// create a message sender and send the message
QueueSender sender = session.createSender(responseQueue);

// make a new (text) message containing the XML message
TextMessage response1 = session.createTextMessage("Hello Msg");

// send the message
sender.send(response1);

sender.close();
session.close();
connection.close();
Any help greatly appreciated.

Thanks
Ravi
Updated on 2013-02-11T22:22:39Z at 2013-02-11T22:22:39Z by SystemAdmin
  • iamravinder
    iamravinder
    4 Posts
    ACCEPTED ANSWER

    Re: ClassCastException: com.ibm.mq.connector.outbound.ConnectionFactoryImpl

    ‏2010-09-09T12:28:47Z  in response to iamravinder
    I have changed the ConnectionFactory to QueueConnectionFactory in wmq.jmsra-ds.xml

    Still there was a different exeception.

    ==========================================================================
    com.ibm.mq.connector.DetailedResourceException: MQJCA1012: Failed to create a JMS connection factory., error code: MQJCA1012 A JCA ManagedConnectionFactory object was not able to create a WebSphere MQ classes for JMS ConnectionFactory object. Check the properties of the ConnectionFactory object.
    at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:124)
    at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:100)
    at com.ibm.mq.connector.outbound.ManagedQueueConnectionFactoryImpl.createConnection(ManagedQueueConnectionFactoryImpl.java:161)
    at com.ibm.mq.connector.outbound.ManagedConnectionImpl.<init>(ManagedConnectionImpl.java:131)
    at com.ibm.mq.connector.outbound.ManagedQueueConnectionImpl.<init>(ManagedQueueConnectionImpl.java:66)
    at com.ibm.mq.connector.outbound.ManagedQueueConnectionFactoryImpl.createManagedConnection(ManagedQueueConnectionFactoryImpl.java:138)
    at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:633)
    at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:267)
    at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:659)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
    at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
    at com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createManagedJMSConnection(ConnectionFactoryImpl.java:189)
    at com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createConnectionInternal(ConnectionFactoryImpl.java:148)
    at com.ibm.mq.connector.outbound.QueueConnectionFactoryImpl.createQueueConnection(QueueConnectionFactoryImpl.java:132)
    at com.ibm.mq.connector.outbound.QueueConnectionFactoryImpl.createQueueConnection(QueueConnectionFactoryImpl.java:123)
    at com.mq.servlet.MQTestServlet.doGet(MQTestServlet.java:68)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Unknown Source)
    Caused by: com.ibm.msg.client.jms.DetailedJMSException: JMSCC0005: The specified value '
    SYSTEM.DEF.RECEIVER
    ' is not allowed for 'XMSC_WMQ_CHANNEL'. The given value is not allowed for the property specified. Change the value to a value that is supported for the property.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:313)
    at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:390)
    at com.ibm.msg.client.jms.internal.JmsErrorUtils.createException(JmsErrorUtils.java:104)
    at com.ibm.msg.client.jms.internal.JmsPropertyContextImpl.setObjectPropertyInternal(JmsPropertyContextImpl.java:482)
    at com.ibm.msg.client.jms.internal.JmsPropertyContextImpl.setObjectProperty(JmsPropertyContextImpl.java:636)
    at com.ibm.msg.client.jms.internal.JmsPropertyContextImpl.setStringProperty(JmsPropertyContextImpl.java:678)
    at com.ibm.mq.connector.ConnectionFactoryBuilder.setV6CrossDomainProperties(ConnectionFactoryBuilder.java:400)
    at com.ibm.mq.connector.ConnectionFactoryBuilder.createConnectionFactory(ConnectionFactoryBuilder.java:138)
    at com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl.createConnectionFactory(ManagedConnectionFactoryImpl.java:431)
    at com.ibm.mq.connector.outbound.ManagedQueueConnectionFactoryImpl.createConnection(ManagedQueueConnectionFactoryImpl.java:157)
    ... 37 more
    17:50:50,463 ERROR STDERR com.ibm.msg.client.jms.DetailedJMSException: MQJCA0002: An exception occurred in the WebSphere MQ layer. See the linked exception for details. A call to WebSphere MQ classes for Java(tm) caused an exception to be thrown. See the linked exception for details of the failure.
    17:50:50,463 ERROR STDERR at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:141)
    17:50:50,463 ERROR STDERR at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:100)
    17:50:50,463 ERROR STDERR at com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createManagedJMSConnection(ConnectionFactoryImpl.java:225)
    17:50:50,463 ERROR STDERR at com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createConnectionInternal(ConnectionFactoryImpl.java:148)
    17:50:50,463 ERROR STDERR at com.ibm.mq.connector.outbound.QueueConnectionFactoryImpl.createQueueConnection(QueueConnectionFactoryImpl.java:132)
    17:50:50,463 ERROR STDERR at com.ibm.mq.connector.outbound.QueueConnectionFactoryImpl.createQueueConnection(QueueConnectionFactoryImpl.java:123)
    17:50:50,463 ERROR STDERR at com.mq.servlet.MQTestServlet.doGet(MQTestServlet.java:68)
    17:50:50,463 ERROR STDERR at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    17:50:50,463 ERROR STDERR at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    17:50:50,463 ERROR STDERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    17:50:50,463 ERROR STDERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    17:50:50,463 ERROR STDERR at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    17:50:50,463 ERROR STDERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    17:50:50,463 ERROR STDERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    17:50:50,463 ERROR STDERR at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
    17:50:50,463 ERROR STDERR at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    17:50:50,463 ERROR STDERR at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
    17:50:50,463 ERROR STDERR at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
    17:50:50,463 ERROR STDERR at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
    17:50:50,463 ERROR STDERR at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
    17:50:50,463 ERROR STDERR at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    17:50:50,463 ERROR STDERR at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    17:50:50,463 ERROR STDERR at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
    17:50:50,463 ERROR STDERR at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    17:50:50,463 ERROR STDERR at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
    17:50:50,463 ERROR STDERR at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
    17:50:50,463 ERROR STDERR at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
    17:50:50,463 ERROR STDERR at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    17:50:50,463 ERROR STDERR at java.lang.Thread.run(Unknown Source)
    17:50:50,463 ERROR STDERR Caused by: com.ibm.mq.connector.DetailedResourceException: MQJCA1012: Failed to create a JMS connection factory., error code: MQJCA1012 A JCA ManagedConnectionFactory object was not able to create a WebSphere MQ classes for JMS ConnectionFactory object. Check the properties of the ConnectionFactory object.
    17:50:50,463 ERROR STDERR at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:124)
    17:50:50,463 ERROR STDERR at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:100)
    17:50:50,463 ERROR STDERR at com.ibm.mq.connector.outbound.ManagedQueueConnectionFactoryImpl.createConnection(ManagedQueueConnectionFactoryImpl.java:161)
    17:50:50,463 ERROR STDERR at com.ibm.mq.connector.outbound.ManagedConnectionImpl.<init>(ManagedConnectionImpl.java:131)
    17:50:50,463 ERROR STDERR at com.ibm.mq.connector.outbound.ManagedQueueConnectionImpl.<init>(ManagedQueueConnectionImpl.java:66)
    17:50:50,463 ERROR STDERR at com.ibm.mq.connector.outbound.ManagedQueueConnectionFactoryImpl.createManagedConnection(ManagedQueueConnectionFactoryImpl.java:138)
    17:50:50,463 ERROR STDERR at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:633)
    17:50:50,463 ERROR STDERR at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:267)
    17:50:50,463 ERROR STDERR at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:659)
    17:50:50,463 ERROR STDERR at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
    17:50:50,463 ERROR STDERR at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)
    17:50:50,463 ERROR STDERR at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
    17:50:50,463 ERROR STDERR at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
    17:50:50,463 ERROR STDERR at com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createManagedJMSConnection(ConnectionFactoryImpl.java:189)
    17:50:50,463 ERROR STDERR ... 26 more
    17:50:50,463 ERROR STDERR Caused by: com.ibm.msg.client.jms.DetailedJMSException: JMSCC0005: The specified value '
    SYSTEM.DEF.RECEIVER
    ' is not allowed for 'XMSC_WMQ_CHANNEL'. The given value is not allowed for the property specified. Change the value to a value that is supported for the property.
    17:50:50,463 ERROR STDERR at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    17:50:50,463 ERROR STDERR at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    17:50:50,463 ERROR STDERR at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    17:50:50,463 ERROR STDERR at java.lang.reflect.Constructor.newInstance(Unknown Source)
    17:50:50,463 ERROR STDERR at com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:313)
    17:50:50,463 ERROR STDERR at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:390)
    17:50:50,463 ERROR STDERR at com.ibm.msg.client.jms.internal.JmsErrorUtils.createException(JmsErrorUtils.java:104)
    17:50:50,463 ERROR STDERR at com.ibm.msg.client.jms.internal.JmsPropertyContextImpl.setObjectPropertyInternal(JmsPropertyContextImpl.java:482)
    17:50:50,463 ERROR STDERR at com.ibm.msg.client.jms.internal.JmsPropertyContextImpl.setObjectProperty(JmsPropertyContextImpl.java:636)
    17:50:50,463 ERROR STDERR at com.ibm.msg.client.jms.internal.JmsPropertyContextImpl.setStringProperty(JmsPropertyContextImpl.java:678)
    17:50:50,463 ERROR STDERR at com.ibm.mq.connector.ConnectionFactoryBuilder.setV6CrossDomainProperties(ConnectionFactoryBuilder.java:400)
    17:50:50,463 ERROR STDERR at com.ibm.mq.connector.ConnectionFactoryBuilder.createConnectionFactory(ConnectionFactoryBuilder.java:138)
    17:50:50,463 ERROR STDERR at com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl.createConnectionFactory(ManagedConnectionFactoryImpl.java:431)
    17:50:51,931 ERROR STDERR at com.ibm.mq.connector.outbound.ManagedQueueConnectionFactoryImpl.createConnection(ManagedQueueConnectionFactoryImpl.java:157)
    17:50:51,931 ERROR STDERR ... 37 more
    ==========================================================================

    Am i missing any configuration related to connection factory?
    or anything else?

    Thanks
    Ravi
  • mbw
    mbw
    50 Posts
    ACCEPTED ANSWER

    Re: ClassCastException: com.ibm.mq.connector.outbound.ConnectionFactoryImpl

    ‏2010-09-09T15:21:48Z  in response to iamravinder
    Try making sure that in the XML description you have <tag>value</tag> with no spaces or new lines.
    • fjb_saper
      fjb_saper
      169 Posts
      ACCEPTED ANSWER

      Re: ClassCastException: com.ibm.mq.connector.outbound.ConnectionFactoryImpl

      ‏2010-09-10T18:23:17Z  in response to mbw
      
      Caused by: com.ibm.msg.client.jms.DetailedJMSException: JMSCC0005: The specified value 
      ' SYSTEM.DEF.RECEIVER 
      ' is not allowed for 'XMSC_WMQ_CHANNEL
      '. The given value is not allowed for the property specified. Change the value to a value that is supported for the property.
      

      says it all
  • iamravinder
    iamravinder
    4 Posts
    ACCEPTED ANSWER

    Re: ClassCastException: com.ibm.mq.connector.outbound.ConnectionFactoryImpl

    ‏2010-09-13T10:33:35Z  in response to iamravinder
    Hi,

    I have removed the spaces and new lines in the xml description.

    Still there are some execeptions.

    XML:
    =================================================================================
    <?xml version="1.0" encoding="UTF-8"?>
    <connection-factories>
    <tx-connection-factory>
    <jndi-name>IVTCF</jndi-name>
    <xa-transaction/>
    <rar-name>wmq.jmsra.rar</rar-name>
    <connection-definition>javax.jms.QueueConnectionFactory</connection-definition>
    <config-property name="channel" type="java.lang.String">SYSTEM.DEF.RECEIVER</config-property>
    <config-property name="hostName" type="java.lang.String">172.21.215.76</config-property>
    <config-property name="port" type="java.lang.String">1414</config-property>
    <config-property name="queueManager" type="java.lang.String">QM_HYDHTC47964D</config-property>
    </tx-connection-factory>
    <mbean code="org.jboss.resource.deployment.AdminObject" name="jboss.jca:name=default">
    <attribute name="JNDIName">default</attribute>
    <depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='wmq.jmsra.rar'</depends>
    <attribute name="Type">javax.jms.Queue</attribute>
    <attribute name="Properties">baseQueueName=SYSTEM.DEFAULT.LOCAL.QUEUE</attribute>
    </mbean>
    </connection-factories>
    =================================================================================
    Stack trace:
    com.ibm.mq.connector.DetailedResourceException: MQJCA1011: Failed to allocate a JMS connection., error code: MQJCA1011 An internal error caused an attempt to allocate a connection to fail. See the linked exception for details of the failure.
    at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:124)
    at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:100)
    at com.ibm.mq.connector.ConnectionBuilder.createConnection(ConnectionBuilder.java:191)
    at com.ibm.mq.connector.outbound.ManagedQueueConnectionFactoryImpl.createConnection(ManagedQueueConnectionFactoryImpl.java:167)
    at com.ibm.mq.connector.outbound.ManagedConnectionImpl.<init>(ManagedConnectionImpl.java:131)
    at com.ibm.mq.connector.outbound.ManagedQueueConnectionImpl.<init>(ManagedQueueConnectionImpl.java:66)
    at com.ibm.mq.connector.outbound.ManagedQueueConnectionFactoryImpl.createManagedConnection(ManagedQueueConnectionFactoryImpl.java:138)
    at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:633)
    at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:267)
    at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:659)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
    at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
    at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
    at com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createManagedJMSConnection(ConnectionFactoryImpl.java:189)
    at com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createConnectionInternal(ConnectionFactoryImpl.java:148)
    at com.ibm.mq.connector.outbound.QueueConnectionFactoryImpl.createQueueConnection(QueueConnectionFactoryImpl.java:132)
    at com.ibm.mq.connector.outbound.QueueConnectionFactoryImpl.createQueueConnection(QueueConnectionFactoryImpl.java:123)
    at com.mq.servlet.MQTestServlet.doGet(MQTestServlet.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
    at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
    at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    at java.lang.Thread.run(Unknown Source)
    Caused by: com.ibm.msg.client.jms.DetailedJMSException: JMSFMQ6312: An exception occurred in the Java(tm) MQI. The Java(tm) MQI has thrown an exception describing the problem. See the linked exception for further information.
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:313)
    at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:390)
    at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createV7ProviderConnection(WMQXAConnectionFactory.java:175)
    at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:6204)
    at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createProviderXAConnection(WMQXAConnectionFactory.java:102)
    at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createXAConnectionInternal(JmsConnectionFactoryImpl.java:371)
    at com.ibm.mq.jms.MQXAQueueConnectionFactory.createXAQueueConnection(MQXAQueueConnectionFactory.java:166)
    at com.ibm.mq.connector.ConnectionBuilder.createConnection(ConnectionBuilder.java:158)
    ... 38 more
    Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2195;AMQ9546: Error return code received. [1=java.lang.NoSuchMethodExceptionhttp://com.ibm.mq.jmqi.remote.internal.RemoteFAP.<init>(com.ibm.mq.jmqi.JmqiEnvironment, int)],3=Class.getConstructor0
    at com.ibm.mq.jmqi.JmqiEnvironment.getInstance(JmqiEnvironment.java:752)
    at com.ibm.mq.jmqi.JmqiEnvironment.getMQI(JmqiEnvironment.java:605)
    at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createV7ProviderConnection(WMQXAConnectionFactory.java:167)
    ... 43 more
    Caused by: java.lang.NoSuchMethodException: com.ibm.mq.jmqi.remote.internal.RemoteFAP.<init>(com.ibm.mq.jmqi.JmqiEnvironment, int)
    at java.lang.Class.getConstructor0(Unknown Source)
    at java.lang.Class.getConstructor(Unknown Source)
    at com.ibm.mq.jmqi.JmqiEnvironment.getInstance(JmqiEnvironment.java:665)
    ... 45 more
    15:52:42,376 ERROR STDERR com.ibm.msg.client.jms.DetailedJMSException: MQJCA0002: An exception occurred in the WebSphere MQ layer. See the linked exception for details. A call to WebSphere MQ classes for Java(tm) caused an exception to be thrown. See the linked exception for details of the failure.
    15:52:42,376 ERROR STDERR at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:141)
    15:52:42,376 ERROR STDERR at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:100)
    15:52:42,454 ERROR STDERR at com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createManagedJMSConnection(ConnectionFactoryImpl.java:225)
    15:52:42,454 ERROR STDERR at com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createConnectionInternal(ConnectionFactoryImpl.java:148)
    15:52:42,454 ERROR STDERR at com.ibm.mq.connector.outbound.QueueConnectionFactoryImpl.createQueueConnection(QueueConnectionFactoryImpl.java:132)
    15:52:42,454 ERROR STDERR at com.ibm.mq.connector.outbound.QueueConnectionFactoryImpl.createQueueConnection(QueueConnectionFactoryImpl.java:123)
    15:52:42,454 ERROR STDERR at com.mq.servlet.MQTestServlet.doGet(MQTestServlet.java:70)
    15:52:42,454 ERROR STDERR at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
    15:52:42,454 ERROR STDERR at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    15:52:42,454 ERROR STDERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    15:52:42,454 ERROR STDERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    15:52:42,454 ERROR STDERR at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
    15:52:42,454 ERROR STDERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    15:52:42,454 ERROR STDERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    15:52:42,454 ERROR STDERR at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
    15:52:42,454 ERROR STDERR at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    15:52:42,454 ERROR STDERR at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
    15:52:42,454 ERROR STDERR at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
    15:52:42,454 ERROR STDERR at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
    15:52:42,454 ERROR STDERR at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
    15:52:42,454 ERROR STDERR at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    15:52:42,454 ERROR STDERR at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    15:52:42,454 ERROR STDERR at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
    15:52:42,454 ERROR STDERR at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    15:52:42,454 ERROR STDERR at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
    15:52:42,454 ERROR STDERR at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
    15:52:42,454 ERROR STDERR at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
    15:52:42,454 ERROR STDERR at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    15:52:42,454 ERROR STDERR at java.lang.Thread.run(Unknown Source)
    15:52:42,454 ERROR STDERR Caused by: com.ibm.mq.connector.DetailedResourceException: MQJCA1011: Failed to allocate a JMS connection., error code: MQJCA1011 An internal error caused an attempt to allocate a connection to fail. See the linked exception for details of the failure.
    15:52:42,454 ERROR STDERR at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:124)
    15:52:42,454 ERROR STDERR at com.ibm.mq.connector.services.JCAExceptionBuilder.buildException(JCAExceptionBuilder.java:100)
    15:52:42,454 ERROR STDERR at com.ibm.mq.connector.ConnectionBuilder.createConnection(ConnectionBuilder.java:191)
    15:52:42,454 ERROR STDERR at com.ibm.mq.connector.outbound.ManagedQueueConnectionFactoryImpl.createConnection(ManagedQueueConnectionFactoryImpl.java:167)
    15:52:42,454 ERROR STDERR at com.ibm.mq.connector.outbound.ManagedConnectionImpl.<init>(ManagedConnectionImpl.java:131)
    15:52:42,454 ERROR STDERR at com.ibm.mq.connector.outbound.ManagedQueueConnectionImpl.<init>(ManagedQueueConnectionImpl.java:66)
    15:52:42,454 ERROR STDERR at com.ibm.mq.connector.outbound.ManagedQueueConnectionFactoryImpl.createManagedConnection(ManagedQueueConnectionFactoryImpl.java:138)
    15:52:42,454 ERROR STDERR at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.createConnectionEventListener(InternalManagedConnectionPool.java:633)
    15:52:42,454 ERROR STDERR at org.jboss.resource.connectionmanager.InternalManagedConnectionPool.getConnection(InternalManagedConnectionPool.java:267)
    15:52:42,454 ERROR STDERR at org.jboss.resource.connectionmanager.JBossManagedConnectionPool$BasePool.getConnection(JBossManagedConnectionPool.java:659)
    15:52:42,454 ERROR STDERR at org.jboss.resource.connectionmanager.BaseConnectionManager2.getManagedConnection(BaseConnectionManager2.java:404)
    15:52:42,454 ERROR STDERR at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManager.java:381)
    15:52:42,454 ERROR STDERR at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:496)
    15:52:42,454 ERROR STDERR at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:941)
    15:52:42,454 ERROR STDERR at com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createManagedJMSConnection(ConnectionFactoryImpl.java:189)
    15:52:42,454 ERROR STDERR ... 26 more
    15:52:42,454 ERROR STDERR Caused by: com.ibm.msg.client.jms.DetailedJMSException: JMSFMQ6312: An exception occurred in the Java(tm) MQI. The Java(tm) MQI has thrown an exception describing the problem. See the linked exception for further information.
    15:52:42,454 ERROR STDERR at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    15:52:42,454 ERROR STDERR at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    15:52:42,454 ERROR STDERR at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    15:52:42,454 ERROR STDERR at java.lang.reflect.Constructor.newInstance(Unknown Source)
    15:52:42,454 ERROR STDERR at com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:313)
    15:52:42,454 ERROR STDERR at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:390)
    15:52:42,454 ERROR STDERR at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createV7ProviderConnection(WMQXAConnectionFactory.java:175)
    15:52:42,454 ERROR STDERR at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:6204)
    15:52:42,454 ERROR STDERR at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createProviderXAConnection(WMQXAConnectionFactory.java:102)
    15:52:42,454 ERROR STDERR at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createXAConnectionInternal(JmsConnectionFactoryImpl.java:371)
    15:52:42,454 ERROR STDERR at com.ibm.mq.jms.MQXAQueueConnectionFactory.createXAQueueConnection(MQXAQueueConnectionFactory.java:166)
    15:52:42,454 ERROR STDERR at com.ibm.mq.connector.ConnectionBuilder.createConnection(ConnectionBuilder.java:158)
    15:52:42,454 ERROR STDERR ... 38 more
    15:52:42,454 ERROR STDERR Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2195;AMQ9546: Error return code received. [1=java.lang.NoSuchMethodExceptionhttp://com.ibm.mq.jmqi.remote.internal.RemoteFAP.<init>(com.ibm.mq.jmqi.JmqiEnvironment, int)],3=Class.getConstructor0
    15:52:42,454 ERROR STDERR at com.ibm.mq.jmqi.JmqiEnvironment.getInstance(JmqiEnvironment.java:752)
    15:52:42,454 ERROR STDERR at com.ibm.mq.jmqi.JmqiEnvironment.getMQI(JmqiEnvironment.java:605)
    15:52:42,454 ERROR STDERR at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createV7ProviderConnection(WMQXAConnectionFactory.java:167)
    15:52:42,454 ERROR STDERR ... 43 more
    15:52:42,454 ERROR STDERR Caused by: java.lang.NoSuchMethodException: com.ibm.mq.jmqi.remote.internal.RemoteFAP.<init>(com.ibm.mq.jmqi.JmqiEnvironment, int)
    15:52:42,454 ERROR STDERR at java.lang.Class.getConstructor0(Unknown Source)
    15:52:42,454 ERROR STDERR at java.lang.Class.getConstructor(Unknown Source)
    15:52:42,454 ERROR STDERR at com.ibm.mq.jmqi.JmqiEnvironment.getInstance(JmqiEnvironment.java:665)
    15:52:42,454 ERROR STDERR ... 45 more
  • iamravinder
    iamravinder
    4 Posts
    ACCEPTED ANSWER

    Re: ClassCastException: com.ibm.mq.connector.outbound.ConnectionFactoryImpl

    ‏2010-09-15T13:19:32Z  in response to iamravinder
    Hi,

    I found the solution.

    There was a jar file issue.

    Thanks for your reploy!
    • quboo
      quboo
      1 Post
      ACCEPTED ANSWER

      Re: ClassCastException: com.ibm.mq.connector.outbound.ConnectionFactoryImpl

      ‏2011-05-27T16:27:06Z  in response to iamravinder
      Hello,

      We have got the same problem. Please, could you explain how you have solved it?
      • SystemAdmin
        SystemAdmin
        8523 Posts
        ACCEPTED ANSWER

        Re: ClassCastException: com.ibm.mq.connector.outbound.ConnectionFactoryImpl

        ‏2013-02-09T15:39:23Z  in response to quboo
        Maybe the problem was related to having the "native" (BINDING type) com.ibm.mqbind.jar library in the classpath, while the com.ibm.mqjms.jar should be fine for CLIENT type connections?

        Just a guess though, but probably easy to test.
  • SystemAdmin
    SystemAdmin
    8523 Posts
    ACCEPTED ANSWER

    Re: ClassCastException: com.ibm.mq.connector.outbound.ConnectionFactoryImpl

    ‏2011-03-17T19:17:00Z  in response to iamravinder
    Can you tell mw how the problem is resolved?
    • mbw
      mbw
      50 Posts
      ACCEPTED ANSWER

      Re: ClassCastException: com.ibm.mq.connector.outbound.ConnectionFactoryImpl

      ‏2013-02-11T11:45:46Z  in response to SystemAdmin
      There certainly was a issue a while ago that had the extra spaces in property names. I think there might have been an update to the WMQ Resource Adapter that helped. But not certain.. Either change the xml or try updating to a the latest RA.

      Please don't pull in the WMQ JARs but use the RA instead.. The mqjbnd.jar file hasn't been used since WMQ 5.3

      Matthew B Whitehttp://about.me/matthewbwhite
      • SystemAdmin
        SystemAdmin
        8523 Posts
        ACCEPTED ANSWER

        Re: ClassCastException: com.ibm.mq.connector.outbound.ConnectionFactoryImpl

        ‏2013-02-11T22:22:39Z  in response to mbw
        > <connection-definition>javax.jms.QueueConnectionFactory</connection-definition>
        > <config-property name="channel" type="java.lang.String">SYSTEM.DEF.RECEIVER</config-property>
        > <config-property name="hostName" type="java.lang.String">172.21.215.76</config-property>
        > <config-property name="port" type="java.lang.String">1414</config-property>
        > <config-property name="queueManager" type="java.lang.String">QM_HYDHTC47964D</config-property>

        In most corners of the woods SYSTEM.DEF.RECEIVER is not a SVRCONN type channel.... I can't see how this would ever work as a Client mode connection to MQ.