Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quest creation not possible #216

Closed
Christoph-Meyer opened this issue Apr 24, 2019 · 3 comments
Closed

Quest creation not possible #216

Christoph-Meyer opened this issue Apr 24, 2019 · 3 comments
Assignees
Labels
bug An error that needs to be fixed

Comments

@Christoph-Meyer
Copy link
Collaborator

Reproduce:

  1. Create a world as admin, call issues from SonarQube
  2. Assign players and a gm
  3. Try to create a quest as a gm with a story more then 255 Chars long - EXCEPTION

See log:

2019-04-24 16:37:35.295 ERROR [sQ,01165232567f5def,01165232567f5def,false] 8084 --- [nio-8080-exec-3] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; nested exception is org.hibernate.exception.DataException: could not execute statement] with root cause

org.h2.jdbc.JdbcSQLException: Wert zu gross / lang f├╝r Feld "STORY VARCHAR(256)": "STRINGDECODE('Der Tag ist sch\u00f6n, die V\u00f6gel singen und in der kleinen Hafenstadt Laies am Langen Meer d\u00fcmpeln die ... (315)"
Value too long for column "STORY VARCHAR(256)": "STRINGDECODE('Der Tag ist sch\u00f6n, die V\u00f6gel singen und in der kleinen Hafenstadt Laies am Langen Meer d\u00fcmpeln die ... (315)"; SQL statement:
insert into event (id, headline, image, state, story, timestamp, title, type, user_id, world_id) values (null, ?, ?, ?, ?, ?, ?, ?, ?, ?) [22001-197]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:357) ~[h2-1.4.197.jar!/:na]
at org.h2.message.DbException.get(DbException.java:179) ~[h2-1.4.197.jar!/:na]
at org.h2.table.Column.validateConvertUpdateSequence(Column.java:398) ~[h2-1.4.197.jar!/:na]
at org.h2.table.Table.validateConvertUpdateSequence(Table.java:798) ~[h2-1.4.197.jar!/:na]
at org.h2.command.dml.Insert.insertRows(Insert.java:177) ~[h2-1.4.197.jar!/:na]
at org.h2.command.dml.Insert.update(Insert.java:134) ~[h2-1.4.197.jar!/:na]
at org.h2.command.CommandContainer.update(CommandContainer.java:102) ~[h2-1.4.197.jar!/:na]
(snip)

@Christoph-Meyer Christoph-Meyer added the bug An error that needs to be fixed label Apr 24, 2019
@Christoph-Meyer
Copy link
Collaborator Author

@CINO-DE I would recommend cutting the quest text to 250 Chars when inserting into "Events" and adding a few "..." in the end. Thoughts?

@fkoehne
Copy link
Contributor

fkoehne commented Apr 25, 2019

What about the http://www.h2database.com/html/datatypes.html#clob_type?

@Christoph-Meyer
Copy link
Collaborator Author

CLOB could be a possibility, but I do not like the thought of the events getting too big. The "real" event descriptions are inserted into the chat-like area and thus should encourage to open the matching "item", like the quest in the quest view.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An error that needs to be fixed
Projects
None yet
Development

No branches or pull requests

3 participants