gpt4 book ai didi

javax.servlet.ServletException : Error creating bean - Invocation of init method failed; nested exception is javax. 持久性.PersistenceException

转载 作者:太空宇宙 更新时间:2023-11-04 13:28:14 25 4
gpt4 key购买 nike

为什么我在 Apache 服务器上托管的 Java/Hibernate 应用程序上遇到 javax.servlet.ServletException: javax.servlet.ServletException: javax.servlet.ServletException: Error create bean

我总是通过重新启动整个网站来修复它。有什么建议吗?

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: javax.servlet.ServletException: javax.servlet.ServletException: Error creating bean with name 'categoryRepository': Invocation of init method failed; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:122)
com.dpp.web.platform.LocaleFilter.doFilter(LocaleFilter.java:210)
root cause

javax.servlet.ServletException: javax.servlet.ServletException: Error creating bean with name 'categoryRepository': Invocation of init method failed; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:122)
com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:108)
com.dpp.web.platform.LocaleFilter.doFilter(LocaleFilter.java:210)
root cause

javax.servlet.ServletException: Error creating bean with name 'categoryRepository': Invocation of init method failed; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
javax.faces.webapp.FacesServlet.service(FacesServlet.java:325)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:100)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:188)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:109)
org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:116)
com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:108)
com.dpp.web.platform.LocaleFilter.doFilter(LocaleFilter.java:210)

最佳答案

我想,您使用的连接池不好。当连接丢失时,您的连接池不会尝试重新建立连接。

确保您的数据库始终可用。

关于javax.servlet.ServletException : Error creating bean - Invocation of init method failed; nested exception is javax. 持久性.PersistenceException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32443649/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com