2

I'm trying to execute this example program, but I am getting the following class not found exception:

javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.qpid.amqp_1_0.jms.jndi.PropertiesFileInitialContextFactory [Root exception is java.lang.ClassNotFoundException: org.apache.qpid.amqp_1_0.jms.jndi.PropertiesFileInitialContextFactory]
    at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
    at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
    at javax.naming.InitialContext.init(Unknown Source)
    at javax.naming.InitialContext.<init>(Unknown Source)
    at filternet.SimpleSenderReceiver.<init>(SimpleSenderReceiver.java:30)
    at filternet.SimpleSenderReceiver.main(SimpleSenderReceiver.java:60)
Caused by: java.lang.ClassNotFoundException: org.apache.qpid.amqp_1_0.jms.jndi.PropertiesFileInitialContextFactory*

I have included the following dependency in my pom file:

 <dependency> <groupId>org.apache.qpid</groupId>
 <artifactId>qpid-jms-client</artifactId> </dependency>

But I can't find PropertiesFileInitialContextFactory class file nor any jndi directories in the local maven repository.

geofrey rainey
  • 232
  • 1
  • 12
  • I have figured out that the class-file PropertiesFileInitialContextFactory.class is in the qpid-amqp-1-0-client-jms-0.18.jar which is neither in my repository, part of the project, nor part of the pom.xml file. I am not familiar with this problem really, but I think I might need to add this external jar to the maven project? – geofrey rainey Jun 14 '15 at 04:30

1 Answers1

0

Solved by downloading the jars separately and installing them into the Maven repository according to this document:

How to add local jar files in maven project?

Then adding the pom definitions from the jar installs into the project's pom.xml file.

Community
  • 1
  • 1
geofrey rainey
  • 232
  • 1
  • 12