Path: csiph.com!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Andreas Leitgeb 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: Tue, 1 Feb 2022 14:25:19 -0000 (UTC) Organization: A noiseless patient Spider Lines: 30 Message-ID: References: <52e745d1-7c61-4e8c-a211-dc1b941a18b9n@googlegroups.com> Reply-To: avl@logic.at Injection-Date: Tue, 1 Feb 2022 14:25:19 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="d509ee38c1148eff9113974475cf0a76"; logging-data="10817"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18q6genJNJlAY9nG+/TArfL" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:BF72YL2cs18tdSn5UIeQ/+a8fa8= Xref: csiph.com comp.lang.java.programmer:39729 Andreas Leitgeb wrote: > Surendra K wrote: >> 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 )]" > > Looks like you configured "com.rabbitmq.jms.admin.RMQObjectFactory" as > value for some property within the application-context, but that property > should have the name of a different class. > > The the correct class's name likely ends with *ContextFactory, rather > than with *ObjectFactory. > > You might open the rabbitMQ-jarfile as a zip-file and list its contents. > Maybe some class in it even has a name like "RMQContextFactory". I googled some more, and found page: https://docs.parasoft.com/display/SVC20201/JMS+Provider+Configuration (search for RabbitMQ within that page) that seems to suggest: com.sun.jndi.fscontext.RefFSContextFactory as the initial context factory. Not sure if "com.sun.*" classes even exist any more... but maybe thats the starting point for another search, for the replacement.