This week's book giveaway is in the Artificial Intelligence and Machine Learning forum.
We're giving away four copies of Transfer Learning for Natural Language Processing (MEAP) and have Paul Azunre on-line!
See this thread for details.
Win a copy of Transfer Learning for Natural Language Processing (MEAP) this week in the Artificial Intelligence and Machine Learning forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Paul Clapham
  • Devaka Cooray
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Knute Snortum
  • Liutauras Vilda
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Piet Souris
Bartenders:
  • salvin francis
  • Carey Brown
  • Frits Walraven

ActiveMQ not able to read .jks file from jar

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All

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

 
Ranch Foreman
Posts: 95
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic