Jiminy
Jiminy

Reputation: 605

Error Running Sonar connected to SQL Server 2005. SONAR.dbo.rules for column description

When I start Sonar (StartSonar.bat), I get the following error in the log file.

Wrong column type in SONAR.dbo.rules for column description.
Found: ntext, expected: nvarchar(max)

Looking at the column in SQL Server Management Studio it is nvarchar(max)

I'm running:

Tried these drivers:

My MSSQL Properties:

I'm using a user name and password (SQL Authentication) to connect the DB

Note to self: When trying to connect to MSSQL remember to Enable TCP/IP. This is found in the SQL Sever Configuration Manager;SQL Server 2005 Network Configuration;Protocols for MSSQLSERVER;TCP/IP

I thought it might be a driver issue, but I'm not sure

Anyone else seen this?

Upvotes: 1

Views: 3195

Answers (1)

Jiminy
Jiminy

Reputation: 605

I wasn't able to solve this via the sqljdbc drivers so I took some advise from another post and fell back to the jTDS driver http://jtds.sourceforge.net/index.html

The post I used was Sonar MsSql Database Issue

My Setup:

  • Sonar 2.11 unzipped to C:\Sonar\sonar-2.11

The steps I made (paraphrased)

  1. Download jTDS drivers from jTDS Drivers Unzip it somewhere, I suggest C:\jDST
  2. Add the DLL to the system path. (C:\jDST\jtds-1.2.5-dist\x64\SSO)
  3. Copy the jar file (C:\jDST\jtds-1.2.5-dist\jtds-1.2.5.jar) to the extensions folder (C:\Sonar\sonar-2.11\extensions\jdbc-driver\mssql)
  4. Update the sonar.properties

    • sonar.jdbc.url: jdbc:jtds:sqlserver://localhost:1433/SONAR
    • sonar.jdbc.driverClassName: net.sourceforge.jtds.jdbc.Driver
    • sonar.jdbc.validationQuery: select 1
    • sonar.jdbc.dialect: mssql

Note: in case you connect to the named instance, this must be specified explicitly in the connection URL: jdbc:jtds:sqlserver://localhost/SONAR;instance=SQLEXPRESS

Run the bat file StartSonar.bat (C:\Sonar\sonar-2.11\bin\windows-x86-64\StartSonar.bat)

Check your logs and go to the site http:// localhost:9000

Upvotes: 3

Related Questions