0

現在の GA バージョン 1.2.1 を使用すると、次の例外が発生します。私のサンプル コードでは、リポジトリ オブジェクトが自動接続されています。

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cassandraTemplate' defined in class path resource [com/vmware/vrack/CassandraConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.core.CassandraAdminOperations]: Factory method 'cassandraTemplate' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/cassandra/core/Cancellable
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1119)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1014)
    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.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
    ... 37 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.cassandra.core.CassandraAdminOperations]: Factory method 'cassandraTemplate' threw exception; nested exception is java.lang.NoClassDefFoundError: org/springframework/cassandra/core/Cancellable
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
    ... 46 more
Caused by: java.lang.NoClassDefFoundError: org/springframework/cassandra/core/Cancellable
    at org.springframework.data.cassandra.config.java.AbstractCassandraConfiguration.cassandraTemplate(AbstractCassandraConfiguration.java:85)
    at mine.samples.CassandraConfiguration$$EnhancerBySpringCGLIB$$831105a6.CGLIB$cassandraTemplate$5(<generated>)
    at mine.samples.CassandraConfiguration$$EnhancerBySpringCGLIB$$831105a6$$FastClassBySpringCGLIB$$2a9e6652.invoke(<generated>)
    at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
    at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:309)
    at mine.samples.CassandraConfiguration$$EnhancerBySpringCGLIB$$831105a6.cassandraTemplate(<generated>)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
    ... 47 more
Caused by: java.lang.ClassNotFoundException: org.springframework.cassandra.core.Cancellable
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at org.springframework.boot.loader.LaunchedURLClassLoader.doLoadClass(LaunchedURLClassLoader.java:170)
    at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:136)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 58 more

これに対する修正または回避策はありますか?

4

2 に答える 2

0

spring-data-cassandra 1.1.3 リリースには、この問題はありません。物事を実行する必要がある場合は、元に戻すことができます。

(私もこの問題を監視して、修正されるかどうかを確認しています。)

于 2015-07-09T20:47:33.033 に答える