RE: Issue with Setting up Liferay DXP with MS SQL Server

maria pavlova, modified 8 Years ago. New Member Posts: 6 Join Date: 5/6/13 Recent Posts
Hello,

I am trying out Liferay DXP and having trouble connecting to my local SQL Server 2008 (SQLEXpress). I tried using both jtds and sqljdbc driver and the final error in both cases is 'Dialect Not found'.
The local SQL Server does have TCP/IP enabled and port 1433 open, and i have no problems connecting to it using Liferay 6.2.

I tried all possible variations of jdbc url, ie.: jdbc:sqlserver://localhost:1433;databaseName=Liferay7;instance=SQLEXPRESS;
and all give the same error.
Here is the stack trace:

00:42:18,297 ERROR [http-nio-8080-exec-8][DialectDetector:137] com.microsoft.sql
server.jdbc.SQLServerException: The TCP/IP connection to the host localhost, por
t 1433 has failed. Error: "Connection refused: no further information. Verify th
e connection properties. Make sure that an instance of SQL Server is running on
the host and accepting TCP/IP connections at the port. Make sure that TCP connec
tions to the port are not blocked by a firewall.".
com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the ho
st localhost, port 1433 has failed. Error: "Connection refused: no further infor
mation. Verify the connection properties. Make sure that an instance of SQL Serv
er is running on the host and accepting TCP/IP connections at the port. Make sur
e that TCP connections to the port are not blocked by a firewall.".
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(S
QLServerException.java:191)
at com.microsoft.sqlserver.jdbc.SQLServerException.ConvertConnectExcepti
onToSQLServerException(SQLServerException.java:242)

00:42:18,482 ERROR [http-nio-8080-exec-8][status_jsp:903] No dialect found


Does anyone know what is happening here?
thank you
thumbnail
David H Nebinger, modified 8 Years ago. Liferay Legend Posts: 14933 Join Date: 9/2/06 Recent Posts
Check local firewall for access.

Also make sure that you're not stuck on windows auth less you provide appropriate windows authentication.










Come meet me at Devcon 2017 or 2017 LSNA!
maria pavlova, modified 8 Years ago. New Member Posts: 6 Join Date: 5/6/13 Recent Posts
I dont see anything wrong with firewall, also since I can connect to the same SQL Server with Liferay 6.2 it should not be that.

I am using a regular SQL auth user set up on the db used by 6.2 and now on this new DB (to which i can connect outside of liferay ok).
thumbnail
Jorge Díaz, modified 8 Years ago. Liferay Master Posts: 753 Join Date: 1/9/14 Recent Posts
SQL Server is only supported in Liferay DXP, the enterprise version of Liferay 7

You have information about configuring SQL Server in customer portal (only for enterprise customers)

If you are using Liferay DXP and you are an enterprise customer, you can also open a ticket in LESA and ask for help.
maria pavlova, modified 8 Years ago. New Member Posts: 6 Join Date: 5/6/13 Recent Posts
I am using DXP Trial version (we dont have subscription to it yet).
All my settings seem to be correct. There is something curious in Fixpack 12
"Resolution: Use the driver automatically loaded by Liferay through jdbc.default.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver, instead of the "

I dont see a 'automatically loaded' driver in DXP for sql server - i installed one from msdn.
Vishnu S Kumar, modified 6 Years ago. Regular Member Posts: 131 Join Date: 7/28/17 Recent Posts
Make sure your TCP/IP connections are enabled in the SQL Server. It's disabled by default.

Go to SQL Server Configuration Manager -> SQL Server Network Configuration ->  Select 'Protocols on MSSQLServer' -> enable TCP/IP connections