如何在WSO2EMM中配置oracle数据库

时间:2015-07-04 17:51:20

标签: java android oracle wso2-emm

我在本地系统中安装了wso2emm产品。它的工作正常。 WSO2EMM包含默认服务器(碳服务器)和数据库(h2database)。现在我尝试将h2database更改为oracle数据库,因此我修改了master_datasources.xml文件并创建了oracle db脚本。但是我收到了以下错误

error
[2015-07-04 22:34:30,403] ERROR {org.wso2.carbon.apimgt.interceptor.valve.APIMan
agerInterceptorValve} -  Failed to retrieve the API Context
java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist

        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:450)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:399)
        at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1017)
        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:655)
        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:249)
        at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:566)
        at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.
java:215)
        at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.
java:58)
        at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPrepare
dStatement.java:776)
        at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStateme
nt.java:897)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
nt.java:1034)
        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePrep
aredStatement.java:3820)
        at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePrepare
dStatement.java:3867)
        at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(Oracle
PreparedStatementWrapper.java:1502)
        at org.wso2.carbon.apimgt.interceptor.valve.APIManagerInterceptorValve.g
etAPIResourceArtifact(APIManagerInterceptorValve.java:202)
        at org.wso2.carbon.apimgt.interceptor.valve.APIManagerInterceptorValve.i
nvoke(APIManagerInterceptorValve.java:72)
        at org.wso2.carbon.apimgt.interceptor.valve.APIManagerInterceptorValve.i
nvoke(APIManagerInterceptorValve.java:75)
        at org.wso2.carbon.apimgt.interceptor.valve.APIManagerInterceptorValve.i
nvoke(APIManagerInterceptorValve.java:75)
        at org.wso2.carbon.apimgt.interceptor.valve.APIManagerInterceptorValve.i
nvoke(APIManagerInterceptorValve.java:75)
        at org.wso2.carbon.apimgt.interceptor.valve.APIManagerInterceptorValve.i
nvoke(APIManagerInterceptorValve.java:75)
        at org.wso2.carbon.apimgt.interceptor.valve.APIManagerInterceptorValve.i
nvoke(APIManagerInterceptorValve.java:75)
        at org.wso2.carbon.apimgt.interceptor.valve.APIManagerInterceptorValve.i
nvoke(APIManagerInterceptorValve.java:75)
        at org.wso2.carbon.apimgt.interceptor.valve.APIManagerInterceptorValve.i
nvoke(APIManagerInterceptorValve.java:75)
        at org.wso2.carbon.apimgt.interceptor.valve.APIManagerInterceptorValve.i
nvoke(APIManagerInterceptorValve.java:75)
        at org.wso2.carbon.apimgt.interceptor.valve.APIManagerInterceptorValve.i
nvoke(APIManagerInterceptorValve.java:75)
        at org.wso2.carbon.apimgt.interceptor.valve.APIManagerInterceptorValve.i
nvoke(APIManagerInterceptorValve.java:75)
        at org.wso2.carbon.apimgt.interceptor.valve.APIManagerInterceptorValve.i
nvoke(APIManagerInterceptorValve.java:75)
        at org.wso2.carbon.apimgt.interceptor.valve.APIManagerInterceptorValve.i
nvoke(APIManagerInterceptorValve.java:75)
        at org.wso2.carbon.apimgt.interceptor.valve.APIManagerInterceptorValve.i
nvoke(APIManagerInterceptorValve.java:75)
        at org.wso2.carbon.tomcat.ext.valves.TomcatValveContainer.invokeValves(T
omcatValveContainer.java:47)
        at org.wso2.carbon.tomcat.ext.valves.CompositeValve.invoke(CompositeValv
e.java:141)
        at org.wso2.carbon.tomcat.ext.valves.CarbonStuckThreadDetectionValve.inv
oke(CarbonStuckThreadDetectionValve.java:156)
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
936)
        at org.wso2.carbon.tomcat.ext.valves.CarbonContextCreatorValve.invoke(Ca
rbonContextCreatorValve.java:52)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
ve.java:118)  

这是我的xml配置文件
主datasources.xml

<datasources-configuration xmlns:svns="http://org.wso2.securevault/configuration">
<providers>
<provider>org.wso2.carbon.ndatasource.rdbms.RDBMSDataSourceReader</provider>
</providers>
<datasources>
    <datasource>
        <name>WSO2_EMM_DB</name>
        <description>The datasource used for EMM</description>
        <jndiConfig>
            <name>jdbc/WSO2EMMDB</name>
        </jndiConfig>
        <definition type="RDBMS">
           <configuration>
                <url>jdbc:oracle:thin:@//localhost:1522/xe</url>
                <username>db</username>
                <password>db</password>
                                         <driverClassName>oracle.jdbc.driver.OracleDriver</driverClassName>
                <maxActive>50</maxActive>
                <maxWait>60000</maxWait>
                <testOnBorrow>true</testOnBorrow>
                <validationQuery>SELECT 1</validationQuery>
                <validationInterval>30000</validationInterval>
            </configuration>
        </definition>
    </datasource>

    <datasource>
        <name>WSO2_CARBON_DB</name>
        <description>The datasource used for registry and user manager</description>
        <jndiConfig>
            <name>jdbc/WSO2CarbonDB</name>
        </jndiConfig>
        <definition type="RDBMS">
           <configuration>
                <url>jdbc:oracle:thin:@//localhost:1522/xe</url>
                <username>db</username>
                <password>db</password>
                <driverClassName>oracle.jdbc.driver.OracleDriver</driverClassName>
                <maxActive>50</maxActive>
                <maxWait>60000</maxWait>
                <testOnBorrow>true</testOnBorrow>
                <validationQuery>SELECT 1</validationQuery>
                <validationInterval>30000</validationInterval>
            </configuration>
        </definition>
    </datasource>

    <datasource>
        <name>WSO2_IDENTITY_DB</name>
        <description>The datasource used for Identity configurations</description>
        <jndiConfig>
            <name>jdbc/WSO2IdentityDB</name>
        </jndiConfig>
        <definition type="RDBMS">
            <configuration>
                <url>jdbc:oracle:thin:@//localhost:1522/xe</url>
                <username>db</username>
                <password>db</password>
                <driverClassName>oracle.jdbc.driver.OracleDriver</driverClassName>
                <maxActive>50</maxActive>
                <maxWait>60000</maxWait>
                <testOnBorrow>true</testOnBorrow>
                 <validationQuery>SELECT 1</validationQuery>
                <validationInterval>30000</validationInterval>
            </configuration>
        </definition>
    </datasource>

    <datasource>
        <name>SOCIAL_CACHE</name>
        <description>The datasource used for storing the cached social objects.</description>
        <jndiConfig>
            <name>jdbc/test</name>
        </jndiConfig>
        <definition type="RDBMS">
             <configuration>
                <url>jdbc:oracle:thin:@//localhost:1522/xe</url>
                <username>db</username>
                <password>db</password>
                <driverClassName>oracle.jdbc.driver.OracleDriver</driverClassName>
                <maxActive>50</maxActive>
                <maxWait>60000</maxWait>
                <testOnBorrow>true</testOnBorrow>
                 <validationQuery>SELECT 1</validationQuery>
                <validationInterval>30000</validationInterval>
            </configuration>
        </definition>
    </datasource>

    <datasource>
        <name>SOCIAL_CASSANDRA_DB</name>
        <description>The cassandra  datasource used for storing social activities</description>
        <definition type="RDBMS">
            <configuration>
                <url>jdbc:cassandra://localhost:9160/EVENT_KS</url>
                <username>admin@admin.com</username>
                <password>admin</password>
                <driverClassName>org.apache.cassandra.cql.jdbc.CassandraDriver</driverClassName>
            </configuration>
        </definition>
    </datasource> 

    <datasource>
        <name>WSO2AM_DB</name>
        <description>The datasource used for API Manager database</description>
        <jndiConfig>
            <name>jdbc/WSO2AM_DB</name>
        </jndiConfig>
        <definition type="RDBMS">
            <configuration>
                <url>jdbc:oracle:thin:@//localhost:1522/xe</url>
                <username>db</username>
                <password>db</password>
                <driverClassName>oracle.jdbc.driver.OracleDriver</driverClassName>
                <maxActive>50</maxActive>
                <maxWait>60000</maxWait>
                <testOnBorrow>true</testOnBorrow>
               <validationQuery>SELECT 1</validationQuery>
                <validationInterval>30000</validationInterval>
            </configuration>
        </definition>
    </datasource>

    <datasource>
        <name>JAGH2</name>
        <description>The datasource used for by the Jaggery Storage Manager</description>
        <jndiConfig>
            <name>jdbc/test</name>
        </jndiConfig>
        <definition type="RDBMS">
             <configuration>
                <url>jdbc:oracle:thin:@//localhost:1522/xe</url>
                <username>db</username>
                <password>db</password>
                <driverClassName>oracle.jdbc.driver.OracleDriver</driverClassName>
                <maxActive>50</maxActive>
                <maxWait>60000</maxWait>
                <testOnBorrow>true</testOnBorrow>
                 <validationQuery>SELECT 1</validationQuery>
                <validationInterval>30000</validationInterval>
            </configuration>
        </definition>
    </datasource>
</datasources>

0 个答案:

没有答案