2016-01-06 2 views
1

это мое первое сообщение здесь. Я вообще пытаюсь найти все сам, но чувствую, что я ударил по всей возможной стене. Прошу прощения, если я не достаточно конкретный, но надеюсь, что кто-то здесь может мне помочь. Я только начал использовать jHipster и успешно сгенерировал проект, а также добавил его в IntelliJ IDEA (используя пробную версию). К сожалению, я не смог запустить приложение. Я по-прежнему получать эту ошибку (пришлось вырубить, чтобы вписаться в ограничения символов):Начиная с JHipster

2016-01-06 11:46:58.838 ERROR 8188 --- [ost-startStop-1] 
o.a.c.c.C.[Tomcat].[localhost].[/]  : Exception starting filter 
springSecurityFilterChain 
org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 
'org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration': 
Injection of autowired dependencies failed; 2016-01-06 11:46:58.841 
ERROR 8188 --- [ost-startStop-1] 
o.apache.catalina.core.StandardContext : One or more Filters failed 
to start. Full details will be found in the appropriate container log 
file 2016-01-06 11:46:58.843 ERROR 8188 --- [ost-startStop-1] 
o.apache.catalina.core.StandardContext : Context [] startup failed 
due to previous errors 2016-01-06 11:46:59.897 ERROR 8188 --- [ 
restartedMain] o.s.boot.SpringApplication    : Application 
startup failed 
org.springframework.beans.factory.UnsatisfiedDependencyException: 
Error creating bean with name 'liquibase' defined in class path 
resource [com/contactapp/config/DatabaseConfiguration.class]: 
Unsatisfied dependency expressed through constructor argument with 
index 0 of type [javax.sql.DataSource]: : Error creating bean with 
name 'dataSource' defined in class path resource 
[com/contactapp/config/DatabaseConfiguration.class]: Bean 
instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to 
instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw 
exception; nested exception is 
com.zaxxer.hikari.pool.PoolInitializationException: Exception during 
pool initialization: Connection to localhost:5432 refused. Check that 
the hostname and port are correct and that the postmaster is accepting 
TCP/IP connections.; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'dataSource' defined in class path resource 
[com/contactapp/config/DatabaseConfiguration.class]: Bean 
instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to 
instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw 
exception; nested exception is 
com.zaxxer.hikari.pool.PoolInitializationException: Exception during 
pool initialization: Connection to localhost:5432 refused. Check that 
the hostname and port are correct and that the postmaster is accepting 
TCP/IP connections. 2016-01-06 11:46:59.907 WARN 8188 --- [ 
restartedMain] o.s.boot.SpringApplication    : Error 
handling failed (Error creating bean with name 
'delegatingApplicationListener' defined in class path resource 
[org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: 
BeanPostProcessor before instantiation of bean failed; nested 
exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 
'org.springframework.cache.annotation.ProxyCachingConfiguration': 
Initialization of bean failed; nested exception is 
org.springframework.beans.factory.NoSuchBeanDefinitionException: No 
bean named 
'org.springframework.context.annotation.ConfigurationClassPostProcessor.importRegistry' 
is defined) 

Process finished with exit code 1 

Это только начало ошибок, которые я получил. Я выполнил все процедуры настройки, перечисленные на веб-сайте jHipster, включая установку node.js, npm, bower, yo, grunt, maven, git. Я пытаюсь использовать Java 8 для этого, но не понимаю, в чем проблема: я не могу запустить неизменный сгенерированный проект без ошибок. Я следовал инструкциям, чтобы добавить Spring в структуру проекта модуля, но безрезультатно. Проект будет составлять и компилироваться, но не запускаться. Запуск «grunt serve» запускает пустой сервер и использует mvn spring-boot: run закрывается с перечисленными выше ошибками, что аналогично простому запуску приложения Java. Просто отметить, что я также попытался использовать Eclipse с теми же ошибками. Если кому-то нужна дополнительная информация, помогая мне с этой ошибкой, я был бы более чем счастлив предоставить любые необходимые детали. Я могу понять, что делать после запуска приложения, но просто не могу понять это. Если кто-нибудь может оказать какую-либо помощь, я бы более чем признателен. Всем спасибо!

+0

com.zaxxer.hikari.pool.PoolInitializationException: Исключение при инициализации пула: Подключение к локальной машине: 5432 отказался. Убедитесь, что имя хоста и порт верны и что почтмейстер принимает соединения TCP/IP, вероятно, является корнем вашей проблемы. –

+0

'Соединение с localhost: 5432 отказано? Ваш локальный экземпляр postgre работает правильно? –

+0

Итак, я никогда не понимал, что мне нужен экземпляр postgres, который работает на моей машине (ошибка новичка), и теперь будет устанавливать его, чтобы проверить, устраняет ли это проблему! – mpgrahov

ответ

1

Похоже, что ошибка связана с подключением к вашему серверу postgres. Убедитесь, что у вас есть postgres, работающий с именем базы данных, как определено в application.yml. Если вы не хотите использовать postgres, вы можете настроить jHipster на использование встроенной базы данных H2.

Это сегмент следа ошибки, которая имеет отношение:

com.zaxxer.hikari.pool.PoolInitializationException: Exception during 
pool initialization: Connection to localhost:5432 refused. Check that 
the hostname and port are correct and that the postmaster is accepting 
TCP/IP connections. 
Смежные вопросы