Brady Haden
Brady Haden

Reputation: 225

Cannot connect to H2 Database with given route from Jhipster

enter image description here

I have a Java Spring project that is running the H2 database, and after running it with mvnw, and going to http://localhost:8080/h2-console, the above image is what I see.

Other people on my team said it works just fine for them, and we are on the same code repo and on master.

I have tried in Chrome, Edge, and Firefox with the same results. I have also double checked that JavaScript is turned on and working.

The only thing logged to the console is when I have spring security logging set to DEBUG and then this is what is shown:

----------------------------------------------------------
2020-10-19 16:14:18.376 DEBUG 13932 --- [  XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher  : Request 'GET /h2-console/login.jsp' doesn't match 'OPTIONS /*
*'
2020-10-19 16:14:18.376 DEBUG 13932 --- [  XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher  : Checking match of request : '/h2-console/login.jsp'; against
'/app/**/*.{js,html}'
2020-10-19 16:14:18.376 DEBUG 13932 --- [  XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher  : Checking match of request : '/h2-console/login.jsp'; against
'/i18n/**'
2020-10-19 16:14:18.377 DEBUG 13932 --- [  XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher  : Checking match of request : '/h2-console/login.jsp'; against
'/content/**'
2020-10-19 16:14:18.377 DEBUG 13932 --- [  XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher  : Checking match of request : '/h2-console/login.jsp'; against
'/h2-console/**'
2020-10-19 16:14:18.377 DEBUG 13932 --- [  XNIO-1 task-1] o.s.security.web.FilterChainProxy        : /h2-console/login.jsp has an empty filter list
2020-10-19 16:14:18.409 DEBUG 13932 --- [  XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher  : Request 'GET /h2-console/stylesheet.css' doesn't match 'OPTIO
NS /**'
2020-10-19 16:14:18.409 DEBUG 13932 --- [  XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher  : Checking match of request : '/h2-console/stylesheet.css'; aga
inst '/app/**/*.{js,html}'
2020-10-19 16:14:18.409 DEBUG 13932 --- [  XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher  : Checking match of request : '/h2-console/stylesheet.css'; aga
inst '/i18n/**'
2020-10-19 16:14:18.409 DEBUG 13932 --- [  XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher  : Checking match of request : '/h2-console/stylesheet.css'; aga
inst '/content/**'
2020-10-19 16:14:18.409 DEBUG 13932 --- [  XNIO-1 task-1] o.s.s.w.u.matcher.AntPathRequestMatcher  : Checking match of request : '/h2-console/stylesheet.css'; aga
inst '/h2-console/**'
2020-10-19 16:14:18.410 DEBUG 13932 --- [  XNIO-1 task-1] o.s.security.web.FilterChainProxy        : /h2-console/stylesheet.css has an empty filter list

What could be the cause of this?

Thanks!

Upvotes: 3

Views: 388

Answers (2)

Mike K.
Mike K.

Reputation: 608

add unsafe inline to the code, where you set CSP headers

Upvotes: 3

prostý člověk
prostý člověk

Reputation: 939

Looks like Java script is not enabled in your chrome browser, could you please try the below details?

https://www.whatismybrowser.com/guides/how-to-enable-javascript/chrome

Upvotes: 0

Related Questions