You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thanks for sharing this project, it's great.
I simply noticed when running the application that there was a minor bug when trying to insert the users:
Hello, Stephan:
First of all, thanks for sharing this project, it's great.
I simply noticed when running the application that there was a minor bug when trying to insert the users:
2016-05-20 10:52:51.939 INFO 42707 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000227: Running hbm2ddl schema export 2016-05-20 10:52:51.970 ERROR 42707 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000388: Unsuccessful: INSERT INTO USER (ID, USERNAME, PASSWORD, FIRSTNAME, LASTNAME, ENABLED, LASTPASSWORDRESETDATE) VALUES (1, 'admin', '$2a$08$lDnHPz7eUkSi6ao14Twuau08mzhWrL4kyZGGU5xfiGALO/Vxd5DOi', 'admin', 'admin', 1, PARSEDATETIME('01-JAN-2016','dd-MMM-yyyy')) 2016-05-20 10:52:51.970 ERROR 42707 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaExport : Error interpretando "01-JAN-2016" Error parsing "01-JAN-2016"; SQL statement: INSERT INTO USER (ID, USERNAME, PASSWORD, FIRSTNAME, LASTNAME, ENABLED, LASTPASSWORDRESETDATE) VALUES (1, 'admin', '$2a$08$lDnHPz7eUkSi6ao14Twuau08mzhWrL4kyZGGU5xfiGALO/Vxd5DOi', 'admin', 'admin', 1, PARSEDATETIME('01-JAN-2016','dd-MMM-yyyy')) [90014-191] 2016-05-20 10:52:51.971 ERROR 42707 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000388: Unsuccessful: INSERT INTO USER (ID, USERNAME, PASSWORD, FIRSTNAME, LASTNAME, ENABLED, LASTPASSWORDRESETDATE) VALUES (2, 'user', '$2a$08$UkVvwpULis18S19S5pZFn.YHPZt3oaqHZnDwqbCW9pft6uFtkXKDC', 'user', 'user', 1, PARSEDATETIME('01-JAN-2016','dd-MMM-yyyy')) 2016-05-20 10:52:51.971 ERROR 42707 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaExport : Error interpretando "01-JAN-2016" Error parsing "01-JAN-2016"; SQL statement: INSERT INTO USER (ID, USERNAME, PASSWORD, FIRSTNAME, LASTNAME, ENABLED, LASTPASSWORDRESETDATE) VALUES (2, 'user', '$2a$08$UkVvwpULis18S19S5pZFn.YHPZt3oaqHZnDwqbCW9pft6uFtkXKDC', 'user', 'user', 1, PARSEDATETIME('01-JAN-2016','dd-MMM-yyyy')) [90014-191] 2016-05-20 10:52:51.972 ERROR 42707 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000388: Unsuccessful: INSERT INTO USER (ID, USERNAME, PASSWORD, FIRSTNAME, LASTNAME, ENABLED, LASTPASSWORDRESETDATE) VALUES (3, 'disabled', '$2a$08$UkVvwpULis18S19S5pZFn.YHPZt3oaqHZnDwqbCW9pft6uFtkXKDC', 'user', 'user', 0, PARSEDATETIME('01-JAN-2016','dd-MMM-yyyy')) 2016-05-20 10:52:51.972 ERROR 42707 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaExport : Error interpretando "01-JAN-2016" Error parsing "01-JAN-2016"; SQL statement: INSERT INTO USER (ID, USERNAME, PASSWORD, FIRSTNAME, LASTNAME, ENABLED, LASTPASSWORDRESETDATE) VALUES (3, 'disabled', '$2a$08$UkVvwpULis18S19S5pZFn.YHPZt3oaqHZnDwqbCW9pft6uFtkXKDC', 'user', 'user', 0, PARSEDATETIME('01-JAN-2016','dd-MMM-yyyy')) [90014-191] 2016-05-20 10:52:51.979 ERROR 42707 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000388: Unsuccessful: INSERT INTO USER_AUTHORITY (USER_ID, AUTHORITY_ID) VALUES (1, 1) 2016-05-20 10:52:51.980 ERROR 42707 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaExport : Violación de una restricción de Integridad Referencial: "FK_5LOSSCGU02YAEJ7PRAP7O6G5S: PUBLIC.USER_AUTHORITY FOREIGN KEY(USER_ID) REFERENCES PUBLIC.USER(ID) (1)" Referential integrity constraint violation: "FK_5LOSSCGU02YAEJ7PRAP7O6G5S: PUBLIC.USER_AUTHORITY FOREIGN KEY(USER_ID) REFERENCES PUBLIC.USER(ID) (1)"; SQL statement: INSERT INTO USER_AUTHORITY (USER_ID, AUTHORITY_ID) VALUES (1, 1) [23506-191] 2016-05-20 10:52:51.985 ERROR 42707 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000388: Unsuccessful: INSERT INTO USER_AUTHORITY (USER_ID, AUTHORITY_ID) VALUES (1, 2) 2016-05-20 10:52:51.985 ERROR 42707 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaExport : Violación de una restricción de Integridad Referencial: "FK_5LOSSCGU02YAEJ7PRAP7O6G5S: PUBLIC.USER_AUTHORITY FOREIGN KEY(USER_ID) REFERENCES PUBLIC.USER(ID) (1)" Referential integrity constraint violation: "FK_5LOSSCGU02YAEJ7PRAP7O6G5S: PUBLIC.USER_AUTHORITY FOREIGN KEY(USER_ID) REFERENCES PUBLIC.USER(ID) (1)"; SQL statement: INSERT INTO USER_AUTHORITY (USER_ID, AUTHORITY_ID) VALUES (1, 2) [23506-191] 2016-05-20 10:52:51.986 ERROR 42707 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000388: Unsuccessful: INSERT INTO USER_AUTHORITY (USER_ID, AUTHORITY_ID) VALUES (2, 1) 2016-05-20 10:52:51.986 ERROR 42707 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaExport : Violación de una restricción de Integridad Referencial: "FK_5LOSSCGU02YAEJ7PRAP7O6G5S: PUBLIC.USER_AUTHORITY FOREIGN KEY(USER_ID) REFERENCES PUBLIC.USER(ID) (2)" Referential integrity constraint violation: "FK_5LOSSCGU02YAEJ7PRAP7O6G5S: PUBLIC.USER_AUTHORITY FOREIGN KEY(USER_ID) REFERENCES PUBLIC.USER(ID) (2)"; SQL statement: INSERT INTO USER_AUTHORITY (USER_ID, AUTHORITY_ID) VALUES (2, 1) [23506-191] 2016-05-20 10:52:51.987 ERROR 42707 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000388: Unsuccessful: INSERT INTO USER_AUTHORITY (USER_ID, AUTHORITY_ID) VALUES (3, 1) 2016-05-20 10:52:51.987 ERROR 42707 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaExport : Violación de una restricción de Integridad Referencial: "FK_5LOSSCGU02YAEJ7PRAP7O6G5S: PUBLIC.USER_AUTHORITY FOREIGN KEY(USER_ID) REFERENCES PUBLIC.USER(ID) (3)" Referential integrity constraint violation: "FK_5LOSSCGU02YAEJ7PRAP7O6G5S: PUBLIC.USER_AUTHORITY FOREIGN KEY(USER_ID) REFERENCES PUBLIC.USER(ID) (3)"; SQL statement: INSERT INTO USER_AUTHORITY (USER_ID, AUTHORITY_ID) VALUES (3, 1) [23506-191] 2016-05-20 10:52:51.987 INFO 42707 --- [ost-startStop-1] org.hibernate.tool.hbm2ddl.SchemaExport : HHH000230: Schema export complete
I simply modified the first 3 SQL statements in the file 'import.sql' to use a valid DATE format:
INSERT INTO USER (ID, USERNAME, PASSWORD, FIRSTNAME, LASTNAME, ENABLED, LASTPASSWORDRESETDATE) VALUES (1, 'admin', '$2a$08$lDnHPz7eUkSi6ao14Twuau08mzhWrL4kyZGGU5xfiGALO/Vxd5DOi', 'admin', 'admin', 1, PARSEDATETIME('01-01-2016','dd-MM-yyyy')); INSERT INTO USER (ID, USERNAME, PASSWORD, FIRSTNAME, LASTNAME, ENABLED, LASTPASSWORDRESETDATE) VALUES (2, 'user', '$2a$08$UkVvwpULis18S19S5pZFn.YHPZt3oaqHZnDwqbCW9pft6uFtkXKDC', 'user', 'user', 1, PARSEDATETIME('01-01-2016','dd-MM-yyyy')); INSERT INTO USER (ID, USERNAME, PASSWORD, FIRSTNAME, LASTNAME, ENABLED, LASTPASSWORDRESETDATE) VALUES (3, 'disabled', '$2a$08$UkVvwpULis18S19S5pZFn.YHPZt3oaqHZnDwqbCW9pft6uFtkXKDC', 'user', 'user', 0, PARSEDATETIME('01-01-2016','dd-MM-yyyy'));
...and it worked fine, so then I was able to check the authorization for the three users.
Thanks again and good job!
The text was updated successfully, but these errors were encountered: