質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Windows 10

Windows 10は、マイクロソフト社がリリースしたOSです。Modern UIを標準画面にした8.1から、10では再びデスクトップ主体に戻され、UIも変更されています。PCやスマホ、タブレットなど様々なデバイスに幅広く対応していることが特徴です。

Java

Javaは、1995年にサン・マイクロシステムズが開発したプログラミング言語です。表記法はC言語に似ていますが、既存のプログラミング言語の短所を踏まえていちから設計されており、最初からオブジェクト指向性を備えてデザインされています。セキュリティ面が強力であることや、ネットワーク環境での利用に向いていることが特徴です。Javaで作られたソフトウェアは基本的にいかなるプラットフォームでも作動します。

Spring

Spring Framework は、Javaプラットフォーム向けのオープンソースアプリケーションフレームワークです。 Java Platform上に、 Web ベースのアプリケーションを設計するための拡張機能が数多く用意されています。

Q&A

解決済

1回答

5108閲覧

Maven installのビルド失敗

javava

総合スコア19

Windows 10

Windows 10は、マイクロソフト社がリリースしたOSです。Modern UIを標準画面にした8.1から、10では再びデスクトップ主体に戻され、UIも変更されています。PCやスマホ、タブレットなど様々なデバイスに幅広く対応していることが特徴です。

Java

Javaは、1995年にサン・マイクロシステムズが開発したプログラミング言語です。表記法はC言語に似ていますが、既存のプログラミング言語の短所を踏まえていちから設計されており、最初からオブジェクト指向性を備えてデザインされています。セキュリティ面が強力であることや、ネットワーク環境での利用に向いていることが特徴です。Javaで作られたソフトウェアは基本的にいかなるプラットフォームでも作動します。

Spring

Spring Framework は、Javaプラットフォーム向けのオープンソースアプリケーションフレームワークです。 Java Platform上に、 Web ベースのアプリケーションを設計するための拡張機能が数多く用意されています。

0グッド

0クリップ

投稿2019/07/13 08:39

編集2019/07/15 01:11

環境
windows10
sts-4.3.0
java-12

maven installをするとビルドエラーになります。
さらに第一プロジェクトのエラー文とそれ以降のプロジェクトのエラー文が違います。

第一のプロジェクト

console [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 5.032 s <<< FAILURE! - in com.example.demo.DemoApplicationTests [ERROR] contextLoads(com.example.demo.DemoApplicationTests) Time elapsed: 0.015 s <<< ERROR! java.lang.IllegalStateException: Failed to load ApplicationContext Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] Caused by: org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set [INFO] [INFO] Results: [INFO] [ERROR] Errors: [ERROR] DemoApplicationTests.contextLoads ≫ IllegalState Failed to load ApplicationCon... [INFO] [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0 [INFO] [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 7.829 s [INFO] Finished at: 2019-07-13T17:05:14+09:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project demo: There are test failures. [ERROR] [ERROR] Please refer to C:\Users\naoto\Documents\demo\target\surefire-reports for the individual test results. [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream. [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

それ以降のプロジェクト(共通)

console . ____ _ __ _ _ /\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ / _` | \ \ \ \ \/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.1.6.RELEASE) 2019-07-13 17:36:42.831 INFO 8120 --- [ main] com.example.demo.Demo1ApplicationTests : Starting Demo1ApplicationTests on DESKTOP-G9M5LEN with PID 8120 (started by naoto in C:\Users\naoto\Documents\demo-1) 2019-07-13 17:36:42.831 INFO 8120 --- [ main] com.example.demo.Demo1ApplicationTests : No active profile set, falling back to default profiles: default 2019-07-13 17:36:43.784 INFO 8120 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.ws.config.annotation.DelegatingWsConfiguration' of type [org.springframework.ws.config.annotation.DelegatingWsConfiguration$$EnhancerBySpringCGLIB$$49f8c470] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2019-07-13 17:36:43.819 INFO 8120 --- [ main] .w.s.a.s.AnnotationActionEndpointMapping : Supporting [WS-Addressing August 2004, WS-Addressing 1.0] 2019-07-13 17:36:43.819 INFO 8120 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.hateoas.config.HateoasConfiguration' of type [org.springframework.hateoas.config.HateoasConfiguration$$EnhancerBySpringCGLIB$$24e14ca3] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) 2019-07-13 17:36:44.710 INFO 8120 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor' 2019-07-13 17:36:45.303 INFO 8120 --- [ main] com.example.demo.Demo1ApplicationTests : Started Demo1ApplicationTests in 2.675 seconds (JVM running for 3.274) [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.354 s - in com.example.demo.Demo1ApplicationTests 2019-07-13 17:36:45.683 INFO 8120 --- [ Thread-1] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor' [INFO] [INFO] Results: [INFO] [INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 [INFO] [INFO] [INFO] --- asciidoctor-maven-plugin:1.5.3:process-asciidoc (generate-docs) @ demo-1 --- WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.jruby.util.io.ChannelDescriptor (file:/C:/Users/naoto/.m2/repository/org/jruby/jruby-complete/1.7.23/jruby-complete-1.7.23.jar) to method sun.nio.ch.SelChImpl.getFD() WARNING: Please consider reporting this to the maintainers of org.jruby.util.io.ChannelDescriptor WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations WARNING: All illegal access operations will be denied in a future release io/console not supported; tty will not be manipulated [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 8.008 s [INFO] Finished at: 2019-07-13T17:36:48+09:00 [INFO] ------------------------------------------------------------------------ [WARNING] The requested profile "pom.xml" could not be activated because it does not exist. [ERROR] Failed to execute goal org.asciidoctor:asciidoctor-maven-plugin:1.5.3:process-asciidoc (generate-docs) on project demo-1: Error copying resources: Source 'C:\Users\naoto\Documents\demo-1\src\main\asciidoc' does not exist -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

試みた方法

・Refresh→maven clean→maven install
・ビルドの実行対象をJREからJDKへ移行
・ユーザー/.m2/repository配下の全消去→maven project update→maven install
・terminalを開きjavac -versionの確認
・javaのversionを8まで順にダウングレードして試す

以上を試してもダメでした。
ご教授お願いします。

追記

第一プロジェクトは
application propertiesに
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQLDialect
を追加することでそれ以降のプロジェクトと同じエラーが出るようになりました。

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

退会済みユーザー

退会済みユーザー

2019/07/13 09:36

テストが通ってないものが成功するわけがないじゃないか
退会済みユーザー

退会済みユーザー

2019/07/13 09:37

通常実行もできないよね。パラメーター無しで > 'hibernate.dialect' not set
javava

2019/07/13 11:24

つまり、どうするのが正解ということですか?
退会済みユーザー

退会済みユーザー

2019/07/13 11:30

出力されたエラーをよく読むことだね 読まずに maven error で検索した結果を当たってもうまくいくはずがない
javava

2019/07/14 07:12

DemoApplicationTests.contextLoads がエラーとなっているのでDemoApplicationTestsのcontextLoadsメソッドを見たのですが空のメソッドでした。 どうすればいいでしょうか?
javava

2019/07/15 01:14

第一プロジェクトのエラーはそれ以降のエラーと一緒になりました。 ただWARNINGの解釈が難しく苦戦してます。
guest

回答1

0

自己解決

エラー文のwarningを無視して実行すればちゃんと表示できたので。
一応今回は解決ということにします。

javaのversionが1.8ではないと出てしまうエラー文だそうです。
(2019/7.15)

投稿2019/07/15 02:42

javava

総合スコア19

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問