启动liferay tomcat 6.1.1 ga2服务器与sql server数据库

时间:2014-07-21 10:31:29

标签: sql-server database tomcat liferay liferay-6

我现在正在尝试使用sqlserver数据库启动liferay 6.1.1 ga2服务器。 我使用windows命令行“sqlcmd -S localhost”创建了用户和数据库,如下所示:

1> create database liferayportal;
2> create login lrUser with password='abc123';
3> create user lrUser for login lrUser;
4> exec  sp_addrolemember 'liferayportal' , 'lrUser';

portal-ext.properties:

jdbc.default.driverClassName=net.sourceforge.jtds.jdbc.Driver
jdbc.default.url=jdbc:jtds:sqlserver://localhost/liferayportal
jdbc.default.username=lrUser
jdbc.default.password=abc123

这是stacktrace

的摘要
09:28:36,657 WARN  [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#1][BasicResourcePool:1841] com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@6245a4 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (3). Last acquisition attempt exception: 
java.sql.SQLException: Network error IOException: Connection refused: connect
    at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:410)

.
.
.
09:28:36,702 WARN  [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#0][BasicResourcePool:1841] com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@c8aeb3 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (3). Last acquisition attempt exception: 
java.sql.SQLException: Network error IOException: Connection refused: connect
    at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:410)

.
.09:28:36,717 WARN  [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#7][BasicResourcePool:1841] com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@fab5b1 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (3). Last acquisition attempt exception: 
java.sql.SQLException: Network error IOException: Connection refused: connect
    at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:410)
.
.
.

09:28:36,743 WARN  [com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread-#4][BasicResourcePool:1841] com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@12524b0 -- Acquisition Attempt Failed!!! Clearing pending acquires. While trying to acquire a needed new resource, we failed to succeed more than the maximum number of allowed acquisition attempts (3). Last acquisition attempt exception: 
java.sql.SQLException: Network error IOException: Connection refused: connect
    at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:410)
.
.
.

1 个答案:

答案 0 :(得分:0)

我会检查服务器是否有与MSSQL相关的端口进行远程访问(通常端口是1433),如果没有,你应该设置MSSQL在该端口上工作,并允许远程访问并验证你的防火墙允许访问该端口。