3

安装 wso2 ei 后,我下载 sql server jdbc 驱动程序并将其复制到 wso2home/lib 中,我想通过 sql 查询创建服务,所以我定义以下数据服务:

<data name="BankDB" transports="http https local">
<config enableOData="false" id="sql">
  <property name="dataSourceClassName">com.microsoft.sqlserver.jdbc.SQLServerDriver</property>
  <property name="dataSourceProps">
     <property name="url">jdbc:sqlserver://x.x.x.x:1433/databaseName=ApiDB</property>
     <property name="username">username</property>
     <property name="password">password</property>
  </property>
</config>
<query id="MappedFaults" useConfig="sql">
  <sql>select BankCode from ApiDB.dbo.MappedFaults</sql>
  <result element="BankCode" rowName="">
     <element column="BankCode" name="BankCode" namespace="BankCode" xsdType="string"/>
  </result>
</query>
<operation name="select">
  <call-query href="MappedFaults"/>
</operation>
</data>

但我收到此错误:

DS Fault Message: Error creating JDBC Pool SQL Config: Error in creating external data source: Setter method for property 'password' cannot be found DS Code: UNKNOWN_ERROR Source Data Service:- Name: BankDB Location: \BankDB.dbs Description: N/A Default Namespace: http://ws.wso2.org/dataservice Nested Exception:- org.wso2.carbon.ndatasource.common.DataSourceException: Error in creating external data source: Setter method for property 'password' cannot be found at org.wso2.carbon.dataservices.core.JDBCPoolSQLConfig.getDataSource(JDBCPoolSQLConfig.java:66) at
4

0 回答 0