2016-05-20 21 views
1

私は新しい春のブートプロジェクトがあり、いくつかの依存関係が含まれています。最初の実行では、 'rest'と 'jpa'の依存関係は正常に動作していますが、2回目には大きなエラーが発生しています。春のブート依存関係のエラーが発生しました

dependencies { 
compile('org.springframework.boot:spring-boot-starter-cache') 
compile("org.springframework.boot:spring-boot-starter-data-rest") 
compile('org.springframework.boot:spring-boot-starter-data-jpa') 
compile('org.springframework.boot:spring-boot-starter-hateoas') 
compile('org.springframework.boot:spring-boot-starter-mail') 
compile('org.springframework.boot:spring-boot-starter-remote-shell') 
compile('org.springframework.boot:spring-boot-starter-social-facebook') 
compile('org.springframework.boot:spring-boot-starter-social-twitter') 
compile('org.springframework.boot:spring-boot-starter-web') 
runtime('mysql:mysql-connector-java') 
testCompile('org.springframework.boot:spring-boot-starter-test') 
} 

それが次のエラーメッセージ(ここではそれを貼り付けるには余りにも大きかった): error msg

私は、このスタックから重要なエラーメッセージIntelijのIDEAに2016年1月1日

答えて

3

を使用していますトレースは次のようになります。

Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active) 

使用するデータベース(どのような場所にあるか)は定義されていません。 私はあなたが同じように、あなたのapplication.propertiesファイルにいくつかのプロパティを追加する必要が推測:あなたはこれを使用してメモリデータベース内のH2を使用することができ

spring.datasource.url = (URL to your data source) 
spring.datasource.driverClassName = (fully qualified class name of your datasource driver) 

:あなたはまた、依存関係を含める必要が

spring.datasource.url=jdbc:h2:mem:databaseName;DB_CLOSE_ON_EXIT=FALSE 
spring.datasource.driverClassName=org.h2.Driver 

注意あなたのGradle依存関係へのデータベース用に(H2の場合はcompile('com.h2database:h2'))。

0

このようなjava-errorsでは、Caused by:で始まる行がたくさんあることがわかります。これは、コード内にコードが例外をキャッチして再度スローした場所が多いためです。私は、問題自体はあなたが与えた情報とは何かと言うことはできません

Cannot determine embedded database driver class for database type NONE. If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (no profiles are currently active). 


は、あなたが最後Caused by -entryを見てみる必要がある本当の問題を見つけるために。しかし、このメッセージを処理するstackoverflowにsome other threadsがあります。

関連する問題