提交阶段总是失败并出现以下错误:
Committing Deployment Failed
Phase: Deployment Prepare Commit Phase failed, Unable to prepare transaction: tcm:0515104-66560,
org.hibernate.exception.JDBCConnectionException: Cannot open connection,
org.hibernate.exception.JDBCConnectionException: Cannot open connection, Unable to prepare transaction: tcm:0-515104-66560,
org.hibernate.exception.JDBCConnectionException: Cannot open connection,
org.hibernate.exception.JDBCConnectionException: Cannot open connection
这是适用于具有默认实例 (DEV/UAT) 的数据库的配置:
<Storage Type="persistence" Id="brokerdb" dialect="MSSQL" Class="com.tridion.storage.persistence.JPADAOFactory">
<Pool Type="jdbc" Size="5" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120" />
<DataSource Class="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
<Property Name="serverName" Value="ourServerName" />
<Property Name="portNumber" Value="1433" />
<Property Name="databaseName" Value="Tridion_Broker" />
<Property Name="user" Value="TridionBrokerUser" />
<Property Name="password" Value="xxxxxxxxpassxx" />
</DataSource>
</Storage>
但是,对于我们的生产,使用命名实例是不可避免的。所以我们尝试了这个配置来传递实例的名称,但无济于事;我们仍然得到错误。
<Storage Type="persistence" Class="com.tridion.storage.persistence.JPADAOFactory"
Id="brokerdb"
Url="jdbc:sqlserver://ourServerName/Tridion_Broker;instanceName=THE_INSTANCE_NAME;domain=DOMAIN_NAME"
Username="TridionBrokerUser"
Password="xxxxxxxxpassxx"
Driver="com.microsoft.sqlserver.jdbc.SQLServerDataSource">
<Pool Type="jdbc" Size="5" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120"/>
</Storage>
连接字符串有什么问题吗?或者有没有办法使用第一个模式传递实例名称;比如说<Property Name="instanceName" Value="THE_INSTANCE_NAME" />
?