小编use*_*266的帖子

Spring数据cassandra - 创建名为'cassandraSession'的bean时出错:init方法的调用失败

我正在尝试使用Spring Data Cassandra

我在使用Spring Data Cassandra时收到了堆栈跟踪中显示的以下错误.你能帮忙解决这个错误

我的pom.xml就是这样..

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.sap.icn</groupId>
  <artifactId>sample-cassandra-data</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <name>sample-cassandra-data</name>

    <properties>
        <spring.framework.version>3.2.8.RELEASE</spring.framework.version>
    </properties>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.8</source>
          <target>1.8</target>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-cassandra</artifactId>
        <version>1.4.0.RC1</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.12</version>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>1.7.12</version>
    </dependency>
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.17</version>
    </dependency>

  </dependencies>
</project>
Run Code Online (Sandbox Code Playgroud)

堆栈跟踪:

2016-05-20 20:04:42 INFO  ClassPathXmlApplicationContext:578 - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@1324409e: startup date [Fri May 20 20:04:42 SGT 2016]; root of context hierarchy
2016-05-20 20:04:42 INFO  XmlBeanDefinitionReader:317 …
Run Code Online (Sandbox Code Playgroud)

cassandra spring-data-cassandra

6
推荐指数
1
解决办法
4415
查看次数

mysql如何选择列的最大值作为结果集中的另一列

我的桌子是这样的

ID  VALUE  
1   4  
2   6  
3   12  
Run Code Online (Sandbox Code Playgroud)

我想在mysql中以这种格式获得输出,你能为我提供相应的sql吗?

ID   VALUE  MAX_VALUE DIV_BY_MAX_VALUE  
1       4     12         0.33  
2       6     12         0.5   
3      12     12         1.0
Run Code Online (Sandbox Code Playgroud)

mysql sql

3
推荐指数
1
解决办法
242
查看次数

标签 统计

cassandra ×1

mysql ×1

spring-data-cassandra ×1

sql ×1