Browsing H2 Database in Play 2 Application – News To Me

This one got me for a loop.  It just so happens that both the h2 browser AND the play app should run from the same console.  Otherwise, you end up running app and its database as one instance and new instance of ‘a’ database in another instance.

Do as I say and not as I do!

Image

1. From shell, start play app. Do NOT type ‘play run’, just ‘play’.

2. Type ‘h2-browser’ next, The H2 Console should load up in the browser.

3. Now, type ‘run’ (or ‘~run’ for compile on save) to start your app.

Bingo! You should be able to now see your database.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s