0

I have implemented GemFire server-side event handler (CacheLoader) using Spring Boot as I will have to call multiple external services to load data.

When i tried to deploy the JAR (Spring Boot FAT JAR) in GemFire, I am getting the error message below:

gfsh>deploy --jar=C:\GIT\client-cache\build\libs\client-cache.jar
Response was null for: "deploy --jar=C:\GIT\client-cache\build\libs\client- 
cache.jar". (gfsh.isConnected=true)

Could not read command response.  Error occurred while executing "deploy -- 
jar=C:\GIT\client-cache\build\libs\client-cache.jar" on manager. Please check 
manager logs for error.

Can anyone please help with this issue?

John Blum
  • 7,381
  • 1
  • 20
  • 30
Kabilan B
  • 11
  • 1

1 Answers1

0

In a nutshell, Gfsh's deploy command cannot handle FAT JAR deployments uploaded to the GemFire cluster. Even if it could, there would be nothing to bootstrap the Spring ApplicationContext to construct, configure and initialize your GemFire CacheLoader (I suspect a Spring bean so that you can inject with multiple managed (other beans in the Spring context) data sources (services)??), and then register the CacheLoader with the Region.

There are really only a few options here:

  1. Use Spring [Boot] to configure and bootstrap Pivotal GemFire. I have written a whole section on this in the Spring Boot for Pivotal GemFire (& Apache Geode) Reference Guide Appendix, here.

  2. Use Gfsh's --spring-xml-location option to the start server command to configure and bootstrap Pivotal GemFire with Spring (by default XML, but you could use a small snippet of XML to enable annotation config and use Spring @Configuration classes in your FAT JAR from there on).

  3. A third way to handle this is to use the SDG's SpringContextBootstrappingInitializer. More details can be found here.

Either way, you need to ensure that the Spring container is bootstrapped somehow either directly or indirectly by GemFire.

This should get you started with a few ideas.

John Blum
  • 7,381
  • 1
  • 20
  • 30