无法在openshift中运行web项目

时间:2015-06-20 18:50:06

标签: mysql openshift

我创建了一个新的 Java Web Project ,并将其部署在 Openshift 中。但它不起作用。这是状态。有人帮助我。

  

错误:连接到MySQL服务器的失败尝试次数。

我的休眠配置:

<hibernate-configuration>

   <session-factory>
        <!-- Database connection settings -->
        <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
        <property name="connection.url">jdbc:mysql://OPENSHIFT_MYSQL_DB_HOST:OPENSHIFT_MYSQL_DB_PORT/Data_web</property>
        <property name="connection.username">OPENSHIFT_MYSQL_DB_USERNAME</property>
        <property name="connection.password">OPENSHIFT_MYSQL_DB_PASSWORD</property>

        <!-- JDBC connection pool (use the built-in) -->
        <property name="connection.pool_size">1</property>

        <!-- SQL dialect -->
        <property name="dialect">org.hibernate.dialect.MySQLDialect</property>

        <!-- Echo all executed SQL to stdout -->
        <property name="show_sql">true</property>
        <property name="format_sql">true</property>

        <property name="hbm2ddl.auto">create</property>
        <property name="hibernate.hbm2ddl.auto">update</property>
        <property name="hbm2ddl.auto">validate</property>

        <property name="hibernate.current_session_context_class">thread</property>

        <!-- Mapping files -->

    </session-factory>

</hibernate-configuration>

0 个答案:

没有答案