Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
mehmet tasar
Liferay 6.1 tomcat 6 sql_server express connection
March 28, 2012 7:48 AM
Answer

mehmet tasar

Rank: Junior Member

Posts: 49

Join Date: March 6, 2011

Recent Posts

Hello,

1hibernate.dialect=org.hibernate.dialect.SQLServerDialect
2    jdbc.default.driverClassName=net.sourceforge.jtds.jdbc.Driver
3    jdbc.default.url=jdbc:jtds:sqlserver://localhost:1433
4    jdbc.default.username=try
5    jdbc.default.password=try


I wrote this in portal-ext.properties. and created db as try.
By the way try user is owner of this db.

I got this error when tomcat 6 started.

 114:33:41,602 WARN  [BasicResourcePool:1841] com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask@95ab88 -- 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:
 2java.sql.SQLException: Network error IOException: Connection refused: connect
 3    at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:410)
 4    at net.sourceforge.jtds.jdbc.ConnectionJDBC3.<init>(ConnectionJDBC3.java:50)
 5    at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184)
 6    at com.mchange.v2.c3p0.DriverManagerDataSource.getConnection(DriverManagerDataSource.java:134)
 7    at com.mchange.v2.c3p0.WrapperConnectionPoolDataSource.getPooledConnection(WrapperConnectionPoolDataSource.java:182)
 8    at com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool$1PooledConnectionResourcePoolManager.acquireResource(C3P0PooledConnectionPool.java:148)
 9    at com.mchange.v2.resourcepool.BasicResourcePool.doAcquire(BasicResourcePool.java:1014)
10    at com.mchange.v2.resourcepool.BasicResourcePool.access$800(BasicResourcePool.java:32)
11    at com.mchange.v2.resourcepool.BasicResourcePool$AcquireTask.run(BasicResourcePool.java:1810)
12    at com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
13Caused by: java.net.ConnectException: Connection refused: connect
14    at java.net.DualStackPlainSocketImpl.connect0(Native Method)
15    at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:69)
16    at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
17    at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
18    at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
19    at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:157)
20    at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:391)
21    at java.net.Socket.connect(Socket.java:579)
22    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
23    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
24    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
25    at java.lang.reflect.Method.invoke(Method.java:601)
26    at net.sourceforge.jtds.jdbc.SharedSocket.createSocketForJDBC3(SharedSocket.java:307)
27    at net.sourceforge.jtds.jdbc.SharedSocket.<init>(SharedSocket.java:257)
28    at net.sourceforge.jtds.jdbc.ConnectionJDBC2.<init>(ConnectionJDBC2.java:311)
29    ... 9 more


where the error may?
David H Nebinger
RE: Liferay 6.1 tomcat 6 sql_server express connection
March 28, 2012 8:02 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11770

Join Date: September 1, 2006

Recent Posts

For our url, we use:

jdbc.default.url=jdbc:jtds:sqlserver://<ip address>/<database name>

I think your URL is not correct.
mehmet tasar
RE: Liferay 6.1 tomcat 6 sql_server express connection
March 28, 2012 8:10 AM
Answer

mehmet tasar

Rank: Junior Member

Posts: 49

Join Date: March 6, 2011

Recent Posts

1hibernate.dialect=org.hibernate.dialect.SQLServerDialect
2   
3    jdbc.default.driverClassName=net.sourceforge.jtds.jdbc.Driver
4    jdbc.default.url=jdbc:jtds:sqlserver://localhost:1433/try
5    jdbc.default.username=try
6    jdbc.default.password=try


give same error.
David H Nebinger
RE: Liferay 6.1 tomcat 6 sql_server express connection
March 28, 2012 8:15 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11770

Join Date: September 1, 2006

Recent Posts

Is 'try' the database name? Database name and user name are two different animals...
mehmet tasar
RE: Liferay 6.1 tomcat 6 sql_server express connection
March 28, 2012 8:24 AM
Answer

mehmet tasar

Rank: Junior Member

Posts: 49

Join Date: March 6, 2011

Recent Posts

1hibernate.dialect=org.hibernate.dialect.SQLServerDialect
2   
3    jdbc.default.driverClassName=net.sourceforge.jtds.jdbc.Driver
4    jdbc.default.url=jdbc:jtds:sqlserver://localhost:1433/lportal
5    jdbc.default.username=try
6    jdbc.default.password=try


error continues to.

Network error IOException: Connection refused: connect
David H Nebinger
RE: Liferay 6.1 tomcat 6 sql_server express connection
March 28, 2012 8:40 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11770

Join Date: September 1, 2006

Recent Posts

Well, the error is what it is. Liferay is trying to connect to the localhost database, and is unable to.
Hitoshi Ozawa
RE: Liferay 6.1 tomcat 6 sql_server express connection
March 30, 2012 11:16 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7949

Join Date: March 23, 2010

Recent Posts

Have you seen the following thread?

http://www.liferay.com/community/forums/-/message_boards/message/5495026