neo
neo

Reputation: 45

Cannot browse the h2 database from a web browser in WSO2 api manager

I am trying to browse local H2 db for WSO2 api manager. I made the change in the WSO2_HOME/repository/conf/carbon.xml. I added below configuration.

<H2DatabaseConfiguration>
    <property name="web"/>
    <property name="webPort">8082</property>
    <property name="webAllowOthers"/>       
</H2DatabaseConfiguration>

After I restart WSO2 api server the change in the file WSO2_HOME/repository/conf/carbon.xml gets lost. As a result I am not able to connect to H2 db. I am working on version WSO2 3.0.0.

Upvotes: 2

Views: 562

Answers (2)

Akshay Vijay Jain
Akshay Vijay Jain

Reputation: 15975

In addition to Bee's answer it is important to mention that we also need to provide proper jdbc URL for that

  1. copy the location of the <API_Manager_home>/repository/database/[databaseName] (here do not copy .mv part i.e extension part)

for me the JDBC URL was jdbc:h2:/Users/akshay/code/w/98/98_base_1/repository/database/WSO2AM_DB

  1. default username and password is wso2carbon/wso2carbon

Upvotes: 0

Bee
Bee

Reputation: 12512

In WSO2 APIM 3.0.0, the configuration model is different. You need to add the following to ../repository/conf/deployment.toml

[database_configuration]
enable_h2_console = true

Ref: https://apim.docs.wso2.com/en/latest/Reference/ConfigCatalog/#enabling-the-h2-database-console

Upvotes: 2

Related Questions