Skip to content

DataSourceBuilder no longer invokes setUser on org.h2.jdbcx.JdbcDataSource #25263

Closed
@gtsh

Description

@gtsh

Up to Spring Boot 2.3.8, we used H2 as a stand in for our Oracle DB in local development.
When needing to look into the tables, we used /h2-console, without any problems.

This is no longer working starting with 2.4.x. Every attempt to log in fails with "Wrong userid or password 280000-200".

If tried back and forth a bit, tried to debug, but so far no luck, the only difference obvious to me being the Spring Boot version.

I cross checked by using the command line shell of H2, and there is exactly the same problem:
Login succeeds for a database, that was created by a 2.3.x service, but fails for a 2.4.x service.
I switched sequence, by deleting the database, and recreating it using the H2 shell, which forces the user to specify the new password - with the result I already suspected: in this case the server startup fails for the 2.4.x service, because now the service can not connect to the database.

My impression is, that the password somehow gets garbled in unpredictable, but consistent way, when Spring Boot passes it to H2.

It doesn't matter, whether I go with the default admin user "sa"/"" (empty password), or force my own password, e,g. "sa"/"sa".

Are there any debug switches that may highlight, what happens to the password?
Or any smart location for a break point to set?

Regards,
Thomas

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: regressionA regression from a previous release

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions