Wednesday, November 27, 2013

How to access the H2 database of the WSO2 API Manager

1. Go to <APIM HOME>\repository\conf and open the carbon.xml

2. Enable the following configurations as shown below:-

<H2DatabaseConfiguration>
        <property name="web" />
        <property name="webPort">8082</property>
        <property name="webAllowOthers" />
        <!--property name="webSSL" />
        <property name="tcp" />
        <property name="tcpPort">9092</property>
        <property name="tcpAllowOthers" />
        <property name="tcpSSL" />
        <property name="pg" />
        <property name="pgPort">5435</property>
        <property name="pgAllowOthers" />
        <property name="trace" />
        <property name="baseDir">${carbon.home}</property-->
    </H2DatabaseConfiguration>

3. The start the server

4. Go to http://localhost:8082 where you can see the login page for the H2 database



5. Type jdbc:h2:repository/database/WSO2AM_DB as JDBC URL and wso2carbon as username and password.



3 comments:

Unknown said...

Hi Umesha,

I did the mentioned steps and when api manager starts it gives an exception.
i guess it cannot connect to h2 embedded database.

Please find the root cause

Caused by: org.h2.jdbc.JdbcSQLException: IO Exception: "D:\SoftwaresInstalled\apim\wso2am-1.9.0\wso2am-1.9.0\SoftwaresInstalledapimwso2am-1.9.0wso2am-1.9.0bin..\repository\database\WSO2CARBON_DB outside

Umesha Gunasinghe said...

Hi Isuru,

Above steps works for APIM 1.9.0 without any issue. Please re check your configurations in the carbon.xml under .

Thanks..!!!

Unknown said...

the user name must be admin/admin

Post a Comment