Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.lang.ClassCastException

902706Nov 29 2011
Hi,

Please help me out...

My Code :

Properties properties1 = new Properties();
properties1.put(Context.INITIAL_CONTEXT_FACTORY,
"com.tibco.tibjms.naming.TibjmsInitialContextFactory");
properties1.put(Context.PROVIDER_URL, "tibjmsnaming://localhost:7222");
InitialContext iniCtx = new InitialContext(properties1);

Object tmp = iniCtx.lookup("QueueConnectionFactory");
QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;
QueueConnection conn = qcf.createQueueConnection();
this.connection = conn;
Queue que = (Queue) iniCtx.lookup("interface_num_1_req");
session = conn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);


Getting the below error:

com.tibco.tibjms.naming.TibjmsFederatedQueueConnectionFactory cannot be cast to javax.jms.QueueConnectionFactory
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 27 2011
Added on Nov 29 2011
0 comments
1,068 views