I'm trying to create an ActiveMQSslConnection. I have the truststore file (.jks) as part of a distributed jar. However, ActiveMQ is not able to read the file and throws FileNotFoundException. I verified the jar file and I do see the corresponding file, as in below structure.
I ran the program in debug mode and see that ActiveMQ not able to find the file in jar. I changed the file path to outside jar and can read the file. To be precise it is at this below location in org.apache.activemq.ActiveMQSslConnectionFactory
Try to add a debug System.out.println() as the very first line in this method and post it. My first guess is that it maybe either incorrect or not supported format.
Also: Why not have the keystore unpacked? A getResourceAsStream only works from within the same classloader. So, it can also maybe an issue that both classes are loaded by different classloaders.
Lookout! Runaway whale! Hide behind this tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book