Reputation: 3
When upgrading sonar from version 3.5.1 to version 3.6.2 I'm getting the following SQL error:
java.sql.SQLException: Can't infer the SQL type to use for an instance of java.util.Date. Use setObject() with an explicit Types value to specify the type to use.
Query:
INSERT INTO issues(kee, component_id, root_component_id, rule_id, severity, manual_severity, message, line, effort_to_fix, status, resolution, checksum, reporter, assignee, action_plan_key, issue_attributes,issue_creation_date, issue_update_date, created_at, updated_at)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Parameters: [
[f6b5d911-d074-4f3e-ad99-536bd7c7bcdb, 38278, 38266, 130, MAJOR, false, Returning 'content' may expose an internal array., 42, null, OPEN, null, d442c91479410f76c84b872da6aae139, null, null, null, null, 2011-11-02 08:36:34.126, 2011-11-02 08:36:34.126, 2011-11-02 08:36:34.126, 2011-11-02 08:36:34.126]
...
As a result the upgrade fails and the database is left in a state-unusable. Obviously something is going wrong in inferring the type of the new fields (issues is a new table) but I am not sure if it is database specific or not. I have seen some other problem reports with the migration of 'violations to issues' in 3.6 but none similar to mine. Any ideas?
Some information on my sonar installation (from System Info):
Upvotes: 0
Views: 497
Reputation: 5136
Thanks for the feedback and sorry for the inconvenience. This issue will be fixed in version 3.7, to be released in the next few days.
The ticket is http://jira.codehaus.org/browse/SONAR-4542
Upvotes: 1