Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 252940

GemFire Not Reading gemfire.properties As Expected

$
0
0

Hello,

I'm working with the SpringTrader reference application and am having trouble getting it to read the gemfire.properties file.

 

Environment : CentOS 6.3, tcServer 2.7.2 (tomcat 7), jdk 1.6.0_38

 

The initial problem was the gemfire.properties contained within a jar in the deployed war took precedence. I had to remove gemfire.propertes from the jar for it to use an external gemfire.properties. This was a pain because the SpringTrader tests use gemfire and without the properties file, the tests fail. So I had to comment out the tests to create a war file.

 

The only way I could get it to recognize an external gemfire.properties was to specify the directory containing the file on the CLASSPATH. I tried to specify it on the command via -DgemfirePropertyFile=<absolution path to file>/gemfire.properites to no avail. Here the command, an "ls" proving the file exists and the stack trace from the log file indicating the file cannot be found. What am I missing?

 

root     42417     1 44 09:53 pts/1    00:00:30 /usr/java/latest/bin/java -Djava.util.logging.config.file=/opt/vmware/vfabric-tc-server-standard/springtrader/conf/logging.properties -DgemfirePropertyFile=/opt/vmware/vfabric-tc-server-standard/springtrader/conf/gemfire.properties -Xmx1024m -Xss192K -XX:MaxPermSize=192m -Djava.util.logging.manager=com.springsource.tcserver.serviceability.logging.TcServerLogManager -Djava.endorsed.dirs=/opt/vmware/vfabric-tc-server-standard/tomcat-7.0.30.A.RELEASE/endorsed -classpath /opt/vmware/vfabric-tc-server-standard/tomcat-7.0.30.A.RELEASE/bin/bootstrap.jar:/opt/vmware/vfabric-tc-server-standard/tomcat-7.0.30.A.RELEASE/bin/tomcat-juli.jar -Dcatalina.base=/opt/vmware/vfabric-tc-server-standard/springtrader -Dcatalina.home=/opt/vmware/vfabric-tc-server-standard/tomcat-7.0.30.A.RELEASE -Djava.io.tmpdir=/opt/vmware/vfabric-tc-server-standard/springtrader/temp org.apache.catalina.startup.Bootstrap start

 

[root@nanodbserver vfabric-tc-server-standard]# ls /opt/vmware/vfabric-tc-server-standard/springtrader/conf/gemfire.properties

/opt/vmware/vfabric-tc-server-standard/springtrader/conf/gemfire.properties

Caused by: java.io.FileNotFoundException: class path resource [gemfire.properties] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:157)
at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:181)
at org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:161)
at org.springframework.beans.factory.config.PropertiesFactoryBean.createInstance(PropertiesFactoryBean.java:113)
at org.springframework.beans.factory.config.PropertiesFactoryBean.createProperties(PropertiesFactoryBean.java:98)
at org.springframework.beans.factory.config.PropertiesFactoryBean.afterPropertiesSet(PropertiesFactoryBean.java:69)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1452)
... 49 more

Viewing all articles
Browse latest Browse all 252940

Trending Articles