-
I've just realized TigaseCustomAuth should throw a UserExistsException if a SQLIntegrityConstraintViolationException occurs. So the problem could actually be inside the mysql driver. I'm using version 6.0.5, "reverting" (the official latest version is prior to that) to 5.1.43 did not fix the issue.
I'll do some more research on the matter.
-
Andrzej Wójcik wrote:
This log entry never mentioned that it is unable to find an exception class, but it mentions that exception was not declared as being thrown by a method. This issue was introduced by a recent change in database access layer.
Oh, I didn't get that (never have seen the exception before). Thanks for your feedback!
-
I've found that exceptions thrown with a call to methods using reflection in
PreparedStatementInvocationHandler
were not properly unwrapped and as a result exceptions unhandled in our code were being thrown. As a result unhandled exceptions were thrown and proper logic of exception handling was not executed.This issue is fixed in the recent commit to
stable
andmaster
branch and will be part of the next snapshot build for versions7.1.1.
and @7.2.0@.
Type |
Bug
|
Priority |
Major
|
Assignee | |
RedmineID |
5859
|
Version |
tigase-server-7.1.1
|
Spent time |
0
|
I use Docker with Tigase to build my instance and when I call DBSchemaLoader to initialize/upgrade my schema, I also add -adminJID/-adminJIDpass to automatically create an admin account if it doesn't exist. I know I could extend my Docker scripts to connect to the database preemptively, but it would be good if the DBSchemaLoader would just issue a warning and skip creation of the admin account because it already exists, instead of just throwing an error:
Although the exception is somewhat strange... MySQL for Java is indeed in the classpath (otherwise connection wouldn't have worked, besides the stacktrace clearly shows mysql driver packages). Honestly I don't understand what it's complaining about. It can't find the exception class however a few lines later the exception class is in java.sql and it's been present since Java 1.6.