0

当我在 spring xd 分布式模式下使用 xd-shell 的命令行开始执行时

:bin# xd-shell

 **Getting following STACKTRACE Error:**
 2015-06-07 10:41:37,443 1.1.0.RELEASE  WARN main annotation.AnnotationConfigApplicationContext - Exception encountered during context initialization - cancelling refresh attempt
    org.springframework.beans.factory.UnsatisfiedDependencyException: **Error creating bean with name 'redisTemplate' defined in class path resource** [org/springframework/boot/autoconfigure/redis/RedisAutoConfiguration$RedisConfiguration.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type** [org.springframework.data.redis.connection.RedisConnectionFactory]: : **Error creating bean with name 'redisConnectionFactory' defined in class path resource** [org/springframework/boot/autoconfigure/redis/RedisAutoConfiguration$RedisPooledConnectionConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NullPointerException; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisConnectionFactory' defined in class path resource [org/springframework/boot/autoconfigure/redis/RedisAutoConfiguration$RedisPooledConnectionConfiguration.class]

更多错误日志在这里

----Invocation of init method failed; nested exception is java.lang.NullPointerException
                            at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749)
                            at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:464)
                            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1111)
                            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1006)
                            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:504)
                            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
                            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
                            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
                            at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
                            at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
                            at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:762)
                            at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
                            at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
                            at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691)
                            at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
                            at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:139)
                            at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:129)
                            at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:129)
                            at org.springframework.xd.dirt.server.AdminServerApplication.run(AdminServerApplication.java:89)----

依次出现更多错误日志

----Error creating bean with name 'redisConnectionFactory' defined in class path resource 
                    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'redisConnectionFactory' defined in class path resource [org/springframework/boot/autoconfigure/redis/RedisAutoConfiguration$RedisPooledConnectionConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NullPointerException
                            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1566)
                            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
                            at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
                            at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
                            at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
                            at

org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)----

任何帮助将非常感激。

4

1 回答 1

0

看起来像一个环境/配置问题。您是否在您的环境中为 redis(或 redis 池配置)设置了任何特定属性?

于 2015-06-09T01:51:31.673 回答