connect to h2 db

277 views
Skip to first unread message

twong...@gmail.com

unread,
Jan 27, 2015, 5:19:10 PM1/27/15
to hippo-c...@googlegroups.com
just installed the community edition of the hippo and wondering if it is possible to connect to the h2 db and browse the content of the database? If so, could you please provide basic instructions? Thanks. 

William Borg Barthet

unread,
Jan 28, 2015, 9:10:26 AM1/28/15
to hippo-c...@googlegroups.com
Hi there,

Hippo uses Apache Jackrabbit to persist its data. Jackrabbit then manages the reading and writing of data to the persistence layer (h2, mysql, etc). If you do open up the h2 or mysql database you will see a lot of binary blobs that aren't very useful for humans to read. Locally, the h2 database should be located at /your-project-root-dir/target/storage/workspaces/default/db.h2.db.

I think it would probably be much more useful for you to browse through the JCR nodes in the console view at http://localhost:8080/cms/console. But it's not clear to me what you are trying to do.

Thanks!

William

On 27 January 2015 at 17:19, <twong...@gmail.com> wrote:
just installed the community edition of the hippo and wondering if it is possible to connect to the h2 db and browse the content of the database? If so, could you please provide basic instructions? Thanks. 

--
Hippo Community Group: The place for all discussions and announcements about Hippo CMS (and HST, repository etc. etc.)
 
To post to this group, send email to hippo-c...@googlegroups.com
RSS: https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
---
You received this message because you are subscribed to the Google Groups "Hippo Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hippo-communi...@googlegroups.com.
Visit this group at http://groups.google.com/group/hippo-community.
For more options, visit https://groups.google.com/d/optout.



--
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Boston - 745 Atlantic Avenue, Boston, MA 02111
 
US +1 877 414 4776 (toll free)
Europe +31(0)20 522 4466
www.onehippo.com

Woonsan Ko

unread,
Jan 28, 2015, 9:57:04 AM1/28/15
to hippo-c...@googlegroups.com
Hi,

Good question. Let me brief example steps to access the local test h2
db. However, please beware that h2 local file db is not designed to work
with multi-process client accesses, and so you should do these after
stopping the Hippo repository process (e.g, stop the -Pcargo.run) only
to understand how the database looks like.

If you run `mvn -Pcargo.run', then you will see target/storage/ folder.
The default workspace database is stored at
target/storage/workspaces/default/db.h2.db.
And the default version database is stored at
target/storage/version/db.h2.db.

Now, here's how-to to see the internal with h2 client tool:
1. Download the latest h2 here:
- http://www.h2database.com/html/download.html
2. Extract the archive file and move to h2/bin/directory.
3. Run `sh h2.sh' or 'h2.bat' or 'h2w.bat', depending on your OS.
The command will launch FireFox browser.
4. In the connection pane, enter/select the following:
- Setting: Generic H2 (Embedded)
- Driver Class: org.h2.Driver
- JDBC URL:
jdbc:h2:/home/tester/myhippoproject/target/storage/workspaces/default/db
(Assuming your project root is /home/tester/myhippoproject.)
- Leave User Name and Password empty.
5. Click on Connect button.
6. Select 'DEFAULT_BUNDLE' on the left and try to run.
7. See how it looks like encrypted. ;-)

Cheers,

Woonsan
> --
> Hippo Community Group: The place for all discussions and announcements
> about Hippo CMS (and HST, repository etc. etc.)
>
> To post to this group, send email to hippo-c...@googlegroups.com
> RSS:
> https://groups.google.com/group/hippo-community/feed/rss_v2_0_msgs.xml?num=50
> ---
> You received this message because you are subscribed to the Google
> Groups "Hippo Community" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hippo-communi...@googlegroups.com
> <mailto:hippo-communi...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/hippo-community.
> For more options, visit https://groups.google.com/d/optout.


--
w....@onehippo.com www.onehippo.com
Boston - 745 Atlantic Ave, 8th Floor, Boston MA 02111
Amsterdam - Oosteinde 11, 1017 WT Amsterdam
Reply all
Reply to author
Forward
0 new messages