I am using an application context file to setup SSL so as to connect to a queue using Spring JMS. I do this leveraging the MethodInvokingFactoryBean:
<bean
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject">
<bean
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetClass" value="java.lang.System" />
<property name="targetMethod" value="getProperties" />
</bean>
</property>
<property name="targetMethod" value="putAll" />
<property name="arguments">
<util:properties>
<prop key="javax.net.ssl.trustStore">src\main\resources\META-INF\spring\ssl\truststore.jks
</prop>
<prop key="javax.net.ssl.trustStorePassword">******</prop>
<prop key="javax.net.ssl.keyStore">src\main\resources\META-INF\spring\ssl\keystore.jks
</prop>
<prop key="javax.net.ssl.keyStorePassword">******</prop>
<prop key="javax.net.ssl.keyStoreType">jks</prop>
</util:properties>
</property>
</bean>
This works within eclipse without any issue. However when run with IDEA it doesn't seem to find the keyStore file and hence can't connect causing an SSL Handshake failure.
Caused by: java.io.FileNotFoundException: src\main\resources\META-INF\spring\ssl\keystore.jks (The system cannot find the path specified)
The project is a standard maven project. Both Eclipse and IDEA are using the same JRE and have the resources folder included in the build path. Any help as to why this is happening is appreciated. Also if any other info is required let me know.