這是我在這裏的第一篇文章。我通常會盡力自己找到所有的東西,但我覺得我已經擊中了每一堵牆。我很抱歉,如果我不夠具體,但希望有人在這裏可以幫助我。 我剛開始使用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:運行會關閉上面列出的錯誤,這與僅嘗試運行Java應用程序相同。只是要注意我也嘗試使用Eclipse的相同錯誤。如果有人需要更多的信息來幫助我解決這個錯誤,我會非常樂意提供任何必要的細節。我可以弄清楚在獲取應用程序運行後應該做什麼,但是無法達到這一點。如果任何人都可以得到任何幫助,我將不勝感激。感謝大家!
com.zaxxer.hikari.pool.PoolInitializationException連接到本地主機:5432拒絕。檢查主機名和端口是否正確,postmaster是否接受TCP/IP連接可能是問題的根源 –
'Connection to localhost:5432 refused'是您本地的postgre實例是否正常運行? –
所以我從來沒有意識到我需要一個運行在我的機器上的postgres實例(初學者的錯誤),現在將安裝它,看看是否解決了這個問題! – mpgrahov