Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Eric Sosman Newsgroups: comp.lang.java.programmer Subject: Re: Rabbit MQ JMS Client 2.3.0, JMS Queue connection error javax.naming.NoInitialContextException: Cannot instantiate class: com.rabbitmq.jms.admin.RMQObjectFactory [Root exception is java.lang.ClassCastException: com.rabbitmq.jms.admin.RMQObjectFactory Date: Mon, 31 Jan 2022 15:03:56 -0500 Organization: A noiseless patient Spider Lines: 33 Message-ID: References: <52e745d1-7c61-4e8c-a211-dc1b941a18b9n@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Mon, 31 Jan 2022 20:03:56 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="5774aa1f967a8cc872d002d5018d2033"; logging-data="18869"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+J2cgPuI+9Fee0bDHYCUvn" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.5.1 Cancel-Lock: sha1:iN+XduStStHeTRMCf5GmXCaTiUU= In-Reply-To: <52e745d1-7c61-4e8c-a211-dc1b941a18b9n@googlegroups.com> Content-Language: en-US Xref: csiph.com comp.lang.java.programmer:39725 On 1/31/2022 1:21 PM, Surendra K wrote: > Hi Experts, > > We recently deployed RabbitMQ JMS client 2.3.0 jar and its dependences jar slf4j-api-2.0.0-alpha5.jar > amqp-client-5.14.0.jar > rabbitmq-jms-2.3.0-sources.jar > > into our SAP PI/PO system. > > After succesfull deployment and communication channel configuration we are unable to reach or connect JMS queue and we are getting following error. > > " EXCEPTION] > javax.naming.NoInitialContextException: Cannot instantiate class: com.rabbitmq.jms.admin.RMQObjectFactory [Root exception is java.lang.ClassCastException: com.rabbitmq.jms.admin.RMQObjectFactory (loaded by library:com.sap.aii.adapter.lib.jms20@69499 com.sap.engine.boot.loader.ResourceMultiParentClassLoader) cannot be cast to javax.naming.spi.InitialContextFactory (loaded by )]" > > > kindly Suggest. The immediate Java problem is that the RMQObjectFactory class does does not implement the InitialContextFactory interface, so an RMQOF instance cannot be cast to ICF. ... which is no help at all: It's like saying "The reason this man can't walk is that he has no legs," and not addressing how he lost his legs nor why the legless man is trying to walk in the first place. Although I personally have no experience with RabbitMQ (nor with anything JNDI, for that matter), it appears to me you should seek Rabbit advice rather than Java advice. A quick look around the Web finds several Rabbit-oriented sites; maybe some of them can help you. -- esosman@comcast-dot-net.invalid Look on my code, ye Hackers, and guffaw!