Я использую JHipster 5.8.1 на Manjaro Linux Intel i7 (x64), и у меня возникла проблема с моим приложением Jhipster.То есть я создал проект, правильно импортировал свои jdl-сущности и настроил приложение в файле application-dev.yml, но при запуске mvn spring-boot:run
JHipster печатает несколько строк журнала, и программа застревает в одной из них и долго зависаетвремя в строке
2019-02-04 19:30:01.448 DEBUG 13716 --- [ restartedMain] i.g.j.c.apidoc.SwaggerAutoConfiguration : Started Swagger in 13ms
до тех пор, пока не будет сгенерировано исключение SQLEx, так как он не может получить блокировку
Например, я пыталсяпроверьте сгенерированный бэкэнд-код, измените spring.profiles.active с dev
на:
spring: profile: active: dev, fast
Вот полный журнал:
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------< br.ufpa.labes.spm:spm >------------------------
[INFO] Building Spm 0.0.1-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:2.0.8.RELEASE:run (default-cli) > test-compile @ spm >>>
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:copy-resources (default-resources) @ spm ---
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources) @ spm ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] Copying 342 resources
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0-M2:enforce (enforce-versions) @ spm ---
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.2:prepare-agent (pre-unit-tests) @ spm ---
[INFO] argLine set to -javaagent:/home/arjuna/.m2/repository/org/jacoco/org.jacoco.agent/0.8.2/org.jacoco.agent-0.8.2-runtime.jar=destfile=/home/arjuna/Documentos/Algoritmos/JHipster/spm/target/test-results/coverage/jacoco/jacoco.exec -Djava.security.egd=file:/dev/./urandom -Xmx256m
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:compile (default-compile) @ spm ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 868 source files to /home/arjuna/Documentos/Algoritmos/JHipster/spm/target/classes
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:testResources (default-testResources) @ spm ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.0:testCompile (default-testCompile) @ spm ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< spring-boot-maven-plugin:2.0.8.RELEASE:run (default-cli) < test-compile @ spm <<<
[INFO]
[INFO]
[INFO] --- spring-boot-maven-plugin:2.0.8.RELEASE:run (default-cli) @ spm ---
[INFO] Attaching agents: []
The Class-Path manifest attribute in /home/arjuna/.m2/repository/org/liquibase/liquibase-core/3.5.5/liquibase-core-3.5.5.jar referenced one or more files thatdo not exist: file:/home/arjuna/.m2/repository/org/liquibase/liquibase-core/3.5.5/lib/snakeyaml-1.13.jar
██╗ ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗
██║ ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
██║ ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝
██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║
╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗
╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝
:: JHipster ? :: Running Spring Boot 2.0.8.RELEASE ::
:: https://www.jhipster.tech ::
2019-02-05 23:32:04.146 DEBUG 15146 --- [ restartedMain] b.u.labes.spm.config.AsyncConfiguration : Creating Async Task Executor
2019-02-05 23:32:06.359 DEBUG 15146 --- [ restartedMain] c.ehcache.core.Ehcache-usersByLogin : Initialize successful.
//Database tables initializing
c.e.c.E.u.labes.spm.domain.UserPlugin : Initialize successful.
2019-02-05 23:32:08.407 DEBUG 15146 --- [ restartedMain] b.u.l.spm.config.LiquibaseConfiguration : Configuring Liquibase
2019-02-05 23:32:09.603 ERROR 15146 --- [ restartedMain] com.zaxxer.hikari.pool.HikariPool : Hikari - Exception during pool initialization.
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:990)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:342)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2197)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2230)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2025)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:778)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:386)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:117)
at com.zaxxer.hikari.util.DriverDataSource.getConnection(DriverDataSource.java:123)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:365)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:194)
at com.zaxxer.hikari.pool.HikariPool.createPoolEntry(HikariPool.java:460)
at com.zaxxer.hikari.pool.HikariPool.checkFailFast(HikariPool.java:534)
at com.zaxxer.hikari.pool.HikariPool.<init>(HikariPool.java:115)
at
// ...stacktrace methods catches
at
org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:211)
at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:301)
... 147 common frames omitted
2019-02-05 23:32:15.950 DEBUG 15146 --- [ restartedMain] br.ufpa.labes.spm.config.WebConfigurer : Registering CORS filter
2019-02-05 23:32:16.067 INFO 15146 --- [ restartedMain] br.ufpa.labes.spm.config.WebConfigurer : Web application configuration, using profiles: dev
2019-02-05 23:32:16.068 INFO 15146 --- [ restartedMain] br.ufpa.labes.spm.config.WebConfigurer : Web application fully configured
2019-02-05 23:32:16.489 DEBUG 15146 --- [ restartedMain] b.u.l.spm.security.jwt.TokenProvider : Using a Base64-encoded JWT secret key
2019-02-05 23:32:31.019 DEBUG 15146 --- [ restartedMain] i.g.j.c.apidoc.SwaggerAutoConfiguration : Starting Swagger
2019-02-05 23:32:31.034 DEBUG 15146 --- [ restartedMain] i.g.j.c.apidoc.SwaggerAutoConfiguration : Started Swagger in 15
Возможная причина: mysql отказывается от соединений по неизвестной причине.Я ожидаю, что Jhipster запустит приложение и покажет ссылки для доступа к приложению, работающему как на бэкэнде, так и на фронтенде.
Спасибо за помощь!