[英]Starting with JHipster
這是我在這里的第一篇文章。 我通常會嘗試自己找到所有東西,但我覺得自己碰到了所有可能的障礙。 如果我不夠具體,我深表歉意,但希望這里有人可以幫助我。 我剛剛開始使用jHipster,並成功生成了一個項目,並將其添加到IntelliJ IDEA中(使用試用版)。 不幸的是,我無法使該應用程序運行。 我繼續收到此錯誤(必須縮小以適合字符限制):
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。 如果有人需要更多信息來幫助我解決此錯誤,我將非常樂意提供任何必要的詳細信息。 我可以弄清楚在使應用程序運行之后該怎么辦,但無法做到這一點。 如果有人可以提供任何幫助,我將不勝感激。 感謝大家!
看來錯誤是與連接到您的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.
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.