1

A webapp is using following configuration to store some data in DB:

spring.datasource.continueOnError=true
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.url=jdbc:h2:mem:mydb

I was trying to reach this DB using H2 Console, but something is wrong. There are no tables even though I know they were created. I can also access any made up JDBC:URL like jdbc:h2:mem:fakeXYZ just as well with same result. What is goning on here? How can I see this DB tables and data?

enter image description here

jarosik
  • 4,136
  • 10
  • 36
  • 53

1 Answers1

1

Your JDBC URL specifies a named in-memory database which by default only will be available for connections from within the same virtual machine.

You can either change the URL to use a file-based database, or you will have to start a TCP server to allow for connections from other processes.

Per Huss
  • 4,755
  • 12
  • 29