Gemfire integration

wxlund

New member
I followed Graeme's tutorial and it worked the first time. I've since rebooted STS and now I can't launch the web app. The error is:

2011-07-07 10:35:23,942 [Thread-23] ERROR context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'springDatastore' while setting bean property 'datastore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springDatastore': FactoryBean threw exception on object creation; nested exception is org.springframework.datastore.mapping.model.DatastoreConfigurationException: Failed to configure Gemfire cache and regions: com.gemstone.gemfire.cache.NoSubscriptionServersAvailableException: Could not initialize a primary queue on startup. No queue servers available.
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:680)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'springDatastore' while setting bean property 'datastore'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springDatastore': FactoryBean threw exception on object creation; nested exception is org.springframework.datastore.mapping.model.DatastoreConfigurationException: Failed to configure Gemfire cache and regions: com.gemstone.gemfire.cache.NoSubscriptionServersAvailableException: Could not initialize a primary queue on startup. No queue servers available.
... 5 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'springDatastore': FactoryBean threw exception on object creation; nested exception is org.springframework.datastore.mapping.model.DatastoreConfigurationException: Failed to configure Gemfire cache and regions: com.gemstone.gemfire.cache.NoSubscriptionServersAvailableException: Could not initialize a primary queue on startup. No queue servers available.
... 5 more
Caused by: org.springframework.datastore.mapping.model.DatastoreConfigurationException: Failed to configure Gemfire cache and regions: com.gemstone.gemfire.cache.NoSubscriptionServersAvailableException: Could not initialize a primary queue on startup. No queue servers available.
at org.grails.plugins.gemfire.GemfireDatastoreFactoryBean.getObject(GemfireDatastoreFactoryBean.groovy:58)
at org.grails.plugins.gemfire.GemfireDatastoreFactoryBean.getObject(GemfireDatastoreFactoryBean.groovy)
... 5 more
Caused by: com.gemstone.gemfire.cache.NoSubscriptionServersAvailableException: com.gemstone.gemfire.cache.NoSubscriptionServersAvailableException: Could not initialize a primary queue on startup. No queue servers available.
at com.gemstone.gemfire.cache.client.internal.QueueManagerImpl.getAllConnections(QueueManagerImpl.java:177)
at com.gemstone.gemfire.cache.client.internal.OpExecutorImpl.executeOnQueuesAndReturnPrimaryResult(OpExecutorImpl.java:272)
at com.gemstone.gemfire.cache.client.internal.PoolImpl.executeOnQueuesAndReturnPrimaryResult(PoolImpl.java:673)
at com.gemstone.gemfire.cache.client.internal.RegisterInterestOp.execute(RegisterInterestOp.java:52)
at com.gemstone.gemfire.cache.client.internal.ServerRegionProxy.registerInterest(ServerRegionProxy.java:364)
at com.gemstone.gemfire.internal.cache.LocalRegion.processSingleInterest(LocalRegion.java:3025)
at com.gemstone.gemfire.internal.cache.LocalRegion.registerInterest(LocalRegion.java:3115)
at com.gemstone.gemfire.internal.cache.LocalRegion.registerInterest(LocalRegion.java:2934)
at com.gemstone.gemfire.internal.cache.LocalRegion.registerInterest(LocalRegion.java:2928)
at com.gemstone.gemfire.internal.cache.LocalRegion.registerInterest(LocalRegion.java:2924)
... 7 more

Can anyone help with this?

I've tried from within STS and cmdline with the same results. Any pointers on what's up?

Thanks,

Wayne
 

wxlund

New member
Fixed the problem

I started over and didn't not see that problem again. I was migrating the petclinic demo over to gemfire but when I added PetType and Specialty I got the following:


2011-07-07 17:31:46,099 [main] ERROR context.GrailsContextLoader - Error executing bootstraps: Error creating bean with name 'messageSource': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.HibernateException: Error while accessing enum.values(): class petclinic.PetType
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messageSource': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.HibernateException: Error while accessing enum.values(): class petclinic.PetType
at org.grails.tomcat.TomcatServer.start(TomcatServer.groovy:212)
at grails.web.container.EmbeddableServer$start.call(Unknown Source)
at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy:158)
at _GrailsRun_groovy$_run_closure5_closure12.doCall(_GrailsRun_groovy)
at _GrailsSettings_groovy$_run_closure10.doCall(_GrailsSettings_groovy:280)
at _GrailsSettings_groovy$_run_closure10.call(_GrailsSettings_groovy)
at _GrailsRun_groovy$_run_closure5.doCall(_GrailsRun_groovy:149)
at _GrailsRun_groovy$_run_closure5.call(_GrailsRun_groovy)
at _GrailsRun_groovy.runInline(_GrailsRun_groovy:116)
at _GrailsRun_groovy.this$4$runInline(_GrailsRun_groovy)
at _GrailsRun_groovy$_run_closure1.doCall(_GrailsRun_groovy:59)
at RunApp$_run_closure1.doCall(RunApp.groovy:33)
at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:427)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:415)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.executeTargets(Gant.groovy:590)
at gant.Gant.executeTargets(Gant.groovy:589)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'transactionManager': Cannot resolve reference to bean 'sessionFactory' while setting bean property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.HibernateException: Error while accessing enum.values(): class petclinic.PetType
... 23 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory': Invocation of init method failed; nested exception is org.hibernate.HibernateException: Error while accessing enum.values(): class petclinic.PetType
... 23 more
Caused by: org.hibernate.HibernateException: Error while accessing enum.values(): class petclinic.PetType
... 23 more
Caused by: java.lang.IllegalAccessException: Class org.hibernate.type.EnumType can not access a member of class petclinic.PetType with modifiers "public static"
... 23 more

My enum type looks like:


enum PetType {

Dog, Cat, Lizard, Snake, Bird, Hamster
}

Why is it generating an org.hibernate.type.EnumType when I'm running with Gemfire? When I take the enums out it works fine.
 
Top