2016-11-17 40 views
0

私はTeradataデータベースを使用して簡単なSpringアプリケーションを作成しようとしています。SpringブートとTeradata UnsatisfiedDependencyException

これは、MySQLデータベースとドライバで働いていたが、Teradataのドライバ/データベース化に変更した後、私は次の例外受け取る:私は春、あなたの問題だと思う

spring.datasource.url =jdbc:teradata://servername/db 
spring.datasource.username = dbc 
spring.datasource.password = dbc 
spring.datasource.driverClassName=com.ncr.teradata.TeraDriver 

答えて

1

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration': Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Tomcat.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.tomcat.jdbc.pool.DataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalArgumentException: URL must start with 'jdbc' 

アプリケーションのプロパティをコンストラクタで@Autowireを使用している可能性がありますが、春はその名前のクラスを挿入できません。この問題を解決するには、コンテキスト内でDataSourceを定義します。その時点で、SpringはBeanを挿入してコンテキストを正しくブートストラップできます。

関連する問題