[英]HTTP ERROR: 503 Reason: Service Unavailable powered by jetty
我正在尝试使用Java开发Web应用程序。 我正在关注Broadleaf Commerce的教程[ http://www.broadleafcommerce.com/docs/core/current/getting-started] 。
一开始,我可以运行我的演示站点。 但是在遵循了切换到MySql的文档后[ http://www.broadleafcommerce.com/docs/core/current/tutorials/getting-started-tutorials/switch-to-mysql-tutorial] ,我无法运行现场。
我在浏览器中遇到以下错误
HTTP错误:503
问题访问/。 原因:
Service Unavailable
由Jetty://提供技术支持
Eclipse控制台的进度:
[artifact:mvn] [ERROR] 14:59:03 ContextLoader - Context initialization failed
[artifact:mvn] org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection
[artifact:mvn] 2014-11-18 14:59:03.673:INFO:oejs.AbstractConnector:Started SelectChannelConnector@0.0.0.0:8080
[artifact:mvn] 2014-11-18 14:59:03.939:INFO:oejus.SslContextFactory:Enabled Protocols [SSLv2Hello, SSLv3, TLSv1] of [SSLv2Hello, SSLv3, TLSv1]
....
...
[artifact:mvn] [INFO] Started Jetty Server
[artifact:mvn] 2014-11-18 14:59:03.950:INFO:oejs.AbstractConnector:Started SslSelectChannelConnector@0.0.0.0:8443
[artifact:mvn] [ WARN] 14:59:08 SqlExceptionHelper - SQL Error: 0, SQLState: null
[artifact:mvn] [ERROR] 14:59:08 SqlExceptionHelper - Cannot create PoolableConnectionFactory (Communications link failure
[artifact:mvn] The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
[artifact:mvn] [ERROR] 14:59:08 JobRunShell - Job DEFAULT.rebuildIndexJobDetail threw an unhandled Exception:
[artifact:mvn] org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'rebuildIndex' on target class [class org.broadleafcommerce.core.search.service.solr.SolrSearchServiceImpl] failed; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Could not open connection
web.xml中
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" id="WebApp_ID">
<servlet>
<servlet-name>heatclinic</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:/applicationContext-servlet-cms-contentClient.xml
/WEB-INF/applicationContext-servlet.xml
</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>heatclinic</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>RESTApiServlet</servlet-name>
<url-pattern>/api/v1/*</url-pattern>
</servlet-mapping>
</web-app>
看起来它无法连接到MySQL。 仔细检查您的MySQL连接设置,并确认MySQL服务实际上已启动。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.