Re: QueueConnectionFactory returned from JNDI not castable - Websphere

This is a discussion on Re: QueueConnectionFactory returned from JNDI not castable - Websphere ; OK, I figured it out. When the .RAR was loaded, JBoss used a certain ClassLoader. When my WAR file was loaded, JBoss used a +different+ ClassLoader. Identical interfaces loaded with different, unrelated ClassLoaders are +not+ the same interface to Java. ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Re: QueueConnectionFactory returned from JNDI not castable

  1. Re: QueueConnectionFactory returned from JNDI not castable

    OK, I figured it out.

    When the .RAR was loaded, JBoss used a certain ClassLoader.

    When my WAR file was loaded, JBoss used a +different+ ClassLoader.

    Identical interfaces loaded with different, unrelated ClassLoaders are +not+ the same interface to Java.

    Did some digging around and discovered that our app had Geronimo's JMS.jar included in our WAR. I removed it from our project, changed the ANT build script to look for JMS.jar outside of the project and voila! Everything's happy.

  2. Re: QueueConnectionFactory returned from JNDI not castable

    TNaran

    I'm starting with JBoss 5, and I'm trying to deploy an application that puts messages into a queue in a Websphere MQ 7 qm.
    I've installed the WMQ Resource Adapter and the IVT works fine.

    Deploy works fine too, but when I try to send messages I get:

    java.lang.ClassCastException: com.ibm.mq.connector.outbound.ConnectionFactoryImp l cannot be cast to javax.jms.QueueConnectionFactory

    Take in account:
    - No JMS.jar in the WAR
    - It could be a ClassLoader related problem anyway?
    - I'm using "org.jnp.interfaces.NamingContextFactory" as the initial context factory class. It's that correct?
    - I'm a GeneXus developer, not an advanced Java programmer.

    Any sugestion?

  3. Re: QueueConnectionFactory returned from JNDI not castable

    Did you find a solution to this?

+ Reply to Thread