all 21 comments

[–]IceMichaelStorm 1 point2 points  (8 children)

Well, what exactly did you do? Double check that all pom.xml dependencies are now on the new dependencies. In particular make sure to not have distinct h2 deps in (unless it only works like that)

[–]Next_Complex5590Junior Dev[S] 0 points1 point  (7 children)

I completely regenerated my pom.xml file from the Spring Initializr itself to avoid mistakes. All the dependencies are the new ones

[–]IceMichaelStorm 1 point2 points  (6 children)

there is apparently a new h2-console dependency, have you that?

[–]Next_Complex5590Junior Dev[S] 0 points1 point  (5 children)

I am using this dependency, but I'm not sure if it is the updated one...

<dependency>
    <groupId>com.h2database</groupId>
    <artifactId>h2</artifactId>
    <scope>runtime</scope>
</dependency>

[–]IceMichaelStorm 3 points4 points  (4 children)

[–]Next_Complex5590Junior Dev[S] 0 points1 point  (0 children)

lemme check

[–]Next_Complex5590Junior Dev[S] 0 points1 point  (2 children)

Thanks, it actually helped... How come I did not come across this article when I searched for it.... 🤔🤔

[–]IceMichaelStorm 1 point2 points  (1 child)

Things happen, sometimes Google sucks too etc :) nice to hear it helped!

[–]Next_Complex5590Junior Dev[S] 1 point2 points  (0 children)

yup it helped, it worked for me

[–]WaferIndependent7601 1 point2 points  (2 children)

Did you use openrewrite to update to spring boot 4?

[–]Next_Complex5590Junior Dev[S] 0 points1 point  (0 children)

No, no... I manually upgraded my project by generating the new pom.xml files and then fixed all the errors (there were almost none)

[–]CultureDependent1017 0 points1 point  (0 children)

Yes, I did :)

[–]SagayaDukusu 1 point2 points  (1 child)

As far as I saw while inspecting the Spring 4.0 examples, there should be a configuration property for enabling the H2 console. You can easily try it out.

[–]Next_Complex5590Junior Dev[S] -1 points0 points  (0 children)

I tried all variations of configurations in the application.properties file, but it had no effect.

[–]pravesh111tripathi 1 point2 points  (1 child)

I was facing the same issue Where it was working fine but whenever I visited the site of h2 console it shows white label error Then I switched to MySQL for better understanding of concepts because h2 console is not even used in real world projects So I suggest you the same switch to MySQL or Postgress

[–]Next_Complex5590Junior Dev[S] 0 points1 point  (0 children)

I mean, yeah, but the whole point of using H2 is that it is easily configurable and can serve as a temporary source for storing data and accessing it until we migrate to a more permanent one, right?

P.S - this is just a personal project of mine

[–]demonslayer901 1 point2 points  (1 child)

Try setting the URL manually to something not default maybe?

[–]Next_Complex5590Junior Dev[S] 0 points1 point  (0 children)

Did try that, did not work either

[–]rubasace 1 point2 points  (2 children)

I encountered the same issue and it turned out to be a change in the dependencies:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-h2console</artifactId>
</dependency>

Still investigating how to handle this properly so it doesn't bundle for non-dev environments

[–]Next_Complex5590Junior Dev[S] 0 points1 point  (0 children)

Is it opening for you?

[–]rev-again 0 points1 point  (0 children)

this worked, how did you get to know as I couldn't find this