How to connect to storage - h2 db

Running mvn -P -Drepo.path=storage/storage generate a storage inside my project, its a h2 db. How do i connect to that?

by default, the storage location is set to the target directory, but you can manually specify a location using the method you’ve described in your comment.
The profile will automatically connect to that db, no need to explicitly connect to it after the fact.
this location is defined via the PersistenceManager param in the workspace.xml in your target directory.
Your like might look something like this:

<param name="url" value="jdbc:h2:file:${wsp.home}/db"/>

It looks like you’re setting the repo.path to be storage/storage (a storage subfolder under “storage” folder in your project root dir). is that your intention?

yes. The storage is a subfooder
I dont know if I am able to connect via the browser like i did with other h2 db, see plese the example below:

How can I connect to this h2 db

Thanks in advance

I guess the JDBC URL should indeed be something like jdbc:h2:/path/to/storage but what is your goal here? The database schema is very generic, mostly keys + blobs, so you wouldn’t be able to see anything good there. The JCR repository layer knows how to make nodes/properties out of it, I advice you to look into /console or /repository/ to inspect the JCR.


Thank you Jeroen for your answer, I was wondering about to connect with h2 because I see when I delete the storage some stuff from hcm-content(not bootstrap) is also gone. So would like to check what Im deleting from that storage and what rebuilding when I start application again.

Good suggestion about to get a look into the repository via th cms but I could not find any good example how to query here

If you can provide me some queries example, that would be nice

Thank in advance

Hi Jeroen,

How do I inspect JCR here?

In the console where?
Thanks in advance

Both the repository servlet as the console app show the JCR. So you can already browse and inspect the JCR nodes and properties here.

Regarding queries, repository servlet supports that, we have some documentation at Query the Content Repository - Bloomreach Experience Manager (PaaS/Self-Hosted) - The Fast and Flexible Headless CMS