{"action":"created","issue":{"url":"https://api.github.com/repos/dotCMS/core/issues/9382","repository_url":"https://api.github.com/repos/dotCMS/core","labels_url":"https://api.github.com/repos/dotCMS/core/issues/9382/labels{/name}","comments_url":"https://api.github.com/repos/dotCMS/core/issues/9382/comments","events_url":"https://api.github.com/repos/dotCMS/core/issues/9382/events","html_url":"https://github.com/dotCMS/core/issues/9382","id":166583357,"number":9382,"title":"Integrity Checker: Wrong Data type of IR tables on SQL Server clients ","user":{"login":"joseorsini","id":1717110,"avatar_url":"https://avatars.githubusercontent.com/u/1717110?v=3","gravatar_id":"","url":"https://api.github.com/users/joseorsini","html_url":"https://github.com/joseorsini","followers_url":"https://api.github.com/users/joseorsini/followers","following_url":"https://api.github.com/users/joseorsini/following{/other_user}","gists_url":"https://api.github.com/users/joseorsini/gists{/gist_id}","starred_url":"https://api.github.com/users/joseorsini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joseorsini/subscriptions","organizations_url":"https://api.github.com/users/joseorsini/orgs","repos_url":"https://api.github.com/users/joseorsini/repos","events_url":"https://api.github.com/users/joseorsini/events{/privacy}","received_events_url":"https://api.github.com/users/joseorsini/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-07-20T13:38:26Z","updated_at":"2016-10-04T20:35:40Z","closed_at":null,"body":"Reproduced on upgraded clients from 2.5.x to 3.3\r\n\r\nTicket details: \r\nhttps://my.dotcms.com/tickets/detail.dot?id=552be6cd-5756-4f3b-915b-7c8ba67471da\r\nhttps://my.dotcms.com/tickets/detail.dot?id=83ce5832-ab09-43d0-9670-d0761339d465\r\n\r\nDescription: \r\nWe have noticed that Integrity Checker does not work properly on upgraded clients running on SQL Server Databases. Even after applying the fixes on https://github.com/dotCMS/core/issues/8559 and https://github.com/dotCMS/core/issues/8586, we're still having ClassCastException messages like the following: \r\n\r\n```\r\n[19/07/16 13:26:50:525 CDT] ERROR rest.IntegrityResource: Error checking integrity\r\njava.lang.Exception: Error running the Folders Integrity Check\r\n\tat com.dotcms.integritycheckers.FolderIntegrityChecker.generateIntegrityResults(FolderIntegrityChecker.java:210) ~[dotcms_3.3_1bbd913.jar:?]\r\n\tat com.dotcms.integritycheckers.IntegrityUtil.completeCheckIntegrity(IntegrityUtil.java:559) ~[dotcms_3.3_1bbd913.jar:?]\r\n\tat com.dotcms.rest.IntegrityResource$2.run(IntegrityResource.java:332) [IntegrityResource$2.class:?]\r\nCaused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long\r\n\tat com.dotmarketing.common.db.DotConnect.getRecordCount(DotConnect.java:925) ~[dotcms_3.3_1bbd913.jar:?]\r\n\tat com.dotcms.integritycheckers.FolderIntegrityChecker.generateIntegrityResults(FolderIntegrityChecker.java:208) ~[dotcms_3.3_1bbd913.jar:?]\r\n\t... 2 more \r\n```\r\n\r\nAfter inspecting the https://github.com/dotCMS/core/blob/master-3.6/src/com/dotmarketing/startup/runonce/Task03065AddHtmlPageIR.java task, it creates a language_id column with a datatype of numeric(19), however, on clean startups of 3.x (see https://github.com/dotCMS/core/blob/master-3.6/src-conf/mssql.sql#L2735)  it creates the same column as bigint. This difference in the datatype is causing issues for these upgraded clients. \r\n\r\nAs a workaround, we have provided scripts to clients that will recreate the table with the right data type. An upgrade task must take care of this issue. \r\n\r\n-- \r\n\r\nWe inspected the https://github.com/dotCMS/core/issues/7806 ticket, where Files were added to the Integrity Checker, and it seems the issue is not affecting the fileassets_ir table. "},"comment":{"url":"https://api.github.com/repos/dotCMS/core/issues/comments/251505242","html_url":"https://github.com/dotCMS/core/issues/9382#issuecomment-251505242","issue_url":"https://api.github.com/repos/dotCMS/core/issues/9382","id":251505242,"user":{"login":"joseorsini","id":1717110,"avatar_url":"https://avatars.githubusercontent.com/u/1717110?v=3","gravatar_id":"","url":"https://api.github.com/users/joseorsini","html_url":"https://github.com/joseorsini","followers_url":"https://api.github.com/users/joseorsini/followers","following_url":"https://api.github.com/users/joseorsini/following{/other_user}","gists_url":"https://api.github.com/users/joseorsini/gists{/gist_id}","starred_url":"https://api.github.com/users/joseorsini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joseorsini/subscriptions","organizations_url":"https://api.github.com/users/joseorsini/orgs","repos_url":"https://api.github.com/users/joseorsini/repos","events_url":"https://api.github.com/users/joseorsini/events{/privacy}","received_events_url":"https://api.github.com/users/joseorsini/received_events","type":"User","site_admin":false},"created_at":"2016-10-04T20:35:40Z","updated_at":"2016-10-04T20:35:40Z","body":"Commit attempts to fix data type for fileassets_ir and htmlpages_ir tables, which are created with numeric data type, however on SQL scripts, create table scripts set language_id column as bigint."}}
{"actor":{"display_login":"joseorsini"}}