我使用的是WSO2安装程序,而没有以MSSQL作为数据源进行群集。 我正在遵循此文档进行WSO2IS群集。我被困在这一步。
repository / conf / registry.xml
<!--I Edited this line to reflect to sharedRegistry instaed of wso2registry-->
<currentDBConfig>sharedregistry</currentDBConfig>
<readOnly>false</readOnly>
<enableCache>true</enableCache>
<registryRoot>/</registryRoot>
<!--<dbConfig name="wso2registry">
<dataSource>jdbc/WSO2CarbonDB</dataSource>
</dbConfig>-->
<dbConfig name="sharedregistry">
<dataSource>jdbc/WSO2CarbonDB</dataSource>
</dbConfig>
<remoteInstance url="https://localhost:9443/registry">
<id>sharedregistry</id>
<dbConfig>sharedregistry</dbConfig>
<readOnly>false</readOnly>
<enableCache>true</enableCache>
<registryRoot>/</registryRoot>
<cacheId>jdbc:sqlserver://<dbip:port>;databaseName=<name>;SendStringParametersAsUnicode=false</cacheId>
</remoteInstance>
<mount path="/_system/config" overwrite="true">
<instanceId>sharedregistry</instanceId>
<targetPath>/_system/config</targetPath>
</mount>
<mount path="/_system/governance" overwrite="true">
<instanceId>sharedregistry</instanceId>
<targetPath>/_system/governance</targetPath>
</mount>
repository / conf / datasources / master-datasources.xml
<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:sqlserver://<ip:port>;databaseName=<name>;SendStringParametersAsUnicode=false</url>
<username>wso2user</username>
<password>wso2user</password>
<driverClassName>com.microsoft.sqlserver.jdbc.SQLServerDriver</driverClassName>
<maxActive>50</maxActive>
<maxWait>60000</maxWait>
<testOnBorrow>true</testOnBorrow>
<validationQuery>SELECT 1</validationQuery>
<validationInterval>30000</validationInterval>
<defaultAutoCommit>false</defaultAutoCommit>
</configuration>
</definition>
</datasource>
当我尝试重新启动WSO2服务时,这是我得到的错误和堆栈跟踪。
TID:[-1234] [] [2019-05-21 14:34:32,987]错误 {org.wso2.carbon.registry.core.utils.RegistryUtils}-失败 构造connectionId。 java.sql.SQLException:PooledConnection 已经关闭了。 在org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:86) 在com.sun.proxy。$ Proxy18.getMetaData(未知来源) 在org.wso2.carbon.registry.core.utils.RegistryUtils.getConnectionId(RegistryUtils.java:185) 在org.wso2.carbon.registry.core.jdbc.dataaccess.JDBCDatabaseTransaction $ ManagedRegistryConnection.getConnectionId(JDBCDatabaseTransaction.java:1133) 在org.wso2.carbon.registry.core.jdbc.dataaccess.JDBCDatabaseTransaction $ ManagedRegistryConnection.commit(JDBCDatabaseTransaction.java:1212) 在org.wso2.carbon.registry.core.jdbc.dataaccess.JDBCTransactionManager.commitTransaction(JDBCTransactionManager.java:167) 在org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.commitTransaction(EmbeddedRegistry.java:452) 在org.wso2.carbon.registry.core.jdbc.EmbeddedRegistry.resourceExists(EmbeddedRegistry.java:666)