Posted: Fri Jan 16, 2004 12:03 pm Post subject: createTopicConnection throws ClassCastException in applet
Apprentice
Joined: 04 Apr 2002 Posts: 33
Hi,
I am trying to run the following code as a signed java applet on a local browser, but I keep getting the Exception that follows the code. Any ideas?? - Any help is greatly appreciated.
CODE
m_mqTopicfactory = new MQTopicConnectionFactory();
//Set using client mode connection
m_mqTopicfactory.setTransportType( C.MQJMS_TP_CLIENT_MQ_TCPIP );
// Set host name for the broker
m_mqTopicfactory.setHostName( "PLAP32" );
// Set port for the MQ listener for the broker
m_mqTopicfactory.setPort( 1414 );
// Set the MQ channel for the broker
m_mqTopicfactory.setChannel( "SYSTEM.DEF.SVRCONN" );
// Indicate that this is a v2 broker
m_mqTopicfactory.setBrokerVersion( JMSC.MQJMS_BROKER_V2 );
// Set Queue Manager for the connection
m_mqTopicfactory.setQueueManager( "WMQIV5" );
// Indicate that the broker is to be the subscription store
m_mqTopicfactory.setSubscriptionStore(JMSC.MQJMS_SUBSTORE_BROKER);
// Create the Connection
m_connection = m_mqTopicfactory.createTopicConnection();
// Start the connection with the Broker
m_connection.start();
// Create a session with the broker.
subSession = m_connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
// Create a topic for subscribing upon
Topic subTopic = subSession.createTopic("rfidtaglist");
((MQTopic)subTopic).setBrokerVersion(JMSC.MQJMS_BROKER_V2);
subscriber = subSession.createSubscriber( subTopic );
END CODE
EXCEPTION
java.lang.ClassCastException: com/ibm/mq/jms/services/NullTraceAdapter
at com/ibm/mq/jms/services/Trace.checkForTurnTracingOn
at com/ibm/mq/jms/MQConnection.<init>
at com/ibm/mq/jms/MQTopicConnection.<init>
at com/ibm/mq/jms/MQTopicConnection.<init>
at com/ibm/mq/jms/MQTopicConnectionFactory.createMQTopicConnection
at com/ibm/mq/jms/MQTopicConnectionFactory.createTopicConnection
at com/promenix/rfid/RFIDJMSSubscriber.initialise
at com/promenix/rfid/RFIDJMSSubscriber.start
at com/ms/applet/AppletPanel.securedCall0
at com/ms/applet/AppletPanel.securedCall
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run
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