altran / _Whydah-UserIdentityBackend

The vault of users and applications. The UserIdentytyBackend module of the Whydah IAM/SSO
Other
0 stars 3 forks source link

Creation of database tables on fresh prod DB fails #25

Closed StigLau closed 10 years ago

StigLau commented 10 years ago

When using a fresh DB for starting UIB, UIB does not automatically create the necessary DB tables. Note however that UIB has a failsafe mechanism that requires import.enabled=true

StigLau commented 10 years ago

13:58:36.732 [main] INFO n.w.i.dataimport.DatabaseHelper - Creating UserPropertyAndRole tables. 13:58:37.767 [main] INFO n.w.i.dataimport.ApplicationImporter - importApplications from applicationsSource=applications.csv Exception in thread "main" java.lang.NullPointerException at java.io.Reader.(Reader.java:78) at java.io.InputStreamReader.(InputStreamReader.java:97) at net.whydah.identity.dataimport.ApplicationImporter.parseApplications(ApplicationImporter.java:60) at net.whydah.identity.dataimport.ApplicationImporter.importApplications(ApplicationImporter.java:38) at net.whydah.identity.dataimport.IamDataImporter.importIamData(IamDataImporter.java:38) at net.whydah.identity.Main.importUsersAndRoles(Main.java:106) at net.whydah.identity.Main.main(Main.java:81) 13:58:37.769 [Thread-1] INFO net.whydah.identity.Main - Stopping http server and embedded Apache DS.

StigLau commented 10 years ago

prodInitData/applications.csv was in an erronous format, resulting in the above fault message.

StigLau commented 10 years ago

15:57:22.806 [main] INFO n.w.i.dataimport.RoleMappingImporter - importRoleMapping from roleMappingSource=prodInitData/rolemappings.csv Exception in thread "main" net.whydah.identity.user.role.DatastoreException: java.sql.SQLException: Data truncated for column 'RoleID' at row 1 Query: INSERT INTO UserRoles (RoleID, UserID, AppID, OrganizationName, RoleName, RoleValues) values (?, ?, ?, ?, ?, ?) Parameters: [1a177656-f32a-458e-86f8-c23d301cafb1, useradmin, 1, Support, WhydahUserAdmin, 1] at net.whydah.identity.user.role.UserPropertyAndRoleRepository.addUserPropertyAndRole(UserPropertyAndRoleRepository.java:100) at net.whydah.identity.dataimport.RoleMappingImporter.saveRoleMapping(RoleMappingImporter.java:105) at net.whydah.identity.dataimport.RoleMappingImporter.importRoleMapping(RoleMappingImporter.java:42) at net.whydah.identity.dataimport.IamDataImporter.importIamData(IamDataImporter.java:44) at net.whydah.identity.Main.importUsersAndRoles(Main.java:106) at net.whydah.identity.Main.main(Main.java:81) Caused by: java.sql.SQLException: Data truncated for column 'RoleID' at row 1 Query: INSERT INTO UserRoles (RoleID, UserID, AppID, OrganizationName, RoleName, RoleValues) values (?, ?, ?, ?, ?, ?) Parameters: [1a177656-f32a-458e-86f8-c23d301cafb1, useradmin, 1, Support, WhydahUserAdmin, 1] at org.apache.commons.dbutils.QueryRunner.rethrow(QueryRunner.java:542) at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:599) at org.apache.commons.dbutils.QueryRunner.update(QueryRunner.java:655) at net.whydah.identity.user.role.UserPropertyAndRoleRepository.addUserPropertyAndRole(UserPropertyAndRoleRepository.java:91)