環境
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
を追加することでそれ以降のプロジェクトと同じエラーが出るようになりました。
回答1件
あなたの回答
tips
プレビュー