mina-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Frank Arico <frank.ar...@gmail.com>
Subject Loading bogus cert fails when running Spring version of ServerMain
Date Tue, 14 May 2013 23:07:02 GMT
I have created a maven jar with dependencies using the assembly plugin. The
jar just contains the spring main and some filters, endpoints and
StorageProviderRegistries I subclassed.
I am including vysper-core 0.7 as a dependency,


The bogus cert file is at the root of the jar but when I run the jar I get
the following exception

Exception in thread "main"
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'server' defined in class path resource [spring-config.xml]:
Error setting property values; nested exception is
org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property
'certificateFile' threw exception; nested exception is
java.io.FileNotFoundException: class path resource [bogus_mina_tls.cert]
cannot be resolved to absolute file path because it does not reside in the
file system:
jar:file:/Users/farico200/projects/vysper/homesecurity-listener/target/hsxmpp-jar-with-dependencies.jar!/bogus_mina_tls.cert
 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1361)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086)
 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
 at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
 at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
 at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
 at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
 at
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
at
com.comcast.homesecurity.vysper.spring.HomeSecurityXMPP.main(HomeSecurityXMPP.java:18)
Caused by: org.springframework.beans.PropertyBatchUpdateException; nested
PropertyAccessExceptions (1) are:
PropertyAccessException 1:
org.springframework.beans.MethodInvocationException: Property
'certificateFile' threw exception; nested exception is
java.io.FileNotFoundException: class path resource [bogus_mina_tls.cert]
cannot be resolved to absolute file path because it does not reside in the
file system:
jar:file:/Users/farico200/projects/vysper/homesecurity-listener/target/hsxmpp-jar-with-dependencies.jar!/bogus_mina_tls.cert
 at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:102)
at
org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:58)
 at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1358)
... 13 more


The cert property is unchanged in the spring config file

        <property name="certificateFile" value=
"classpath:bogus_mina_tls.cert" />

        <property name="certificatePassword" value="boguspw" />

-- 
Frank Arico
frank.arico@gmail.com
 Home: 610-902-0950
Cell: 610-212-5476

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message