1

まず、私は ESB WSO2 の初心者です。

MySQL データベースに接続したいのですが、「エラー DB メディエーター データソース: null.Registry entry defined with key: com.mysql.jdbc.Driver not found」というエラーが表示されます 「DataSource: 指定された JNDI プロパティに対して null が初期化されませんでした」

これは私のコードです:

<?xml version="1.0" encoding="UTF-8"?>
<api context="/api/dbtask" name="api.dbtask" xmlns="http://ws.apache.org/ns/synapse">
    <resource methods="GET">
        <inSequence>
            <dblookup>
                <connection>
                    <pool>
                        <driver key="com.mysql.jdbc.Driver"/>
                        <url key="jdbc:mysql://localhost:3306/utilizatori"/>
                        <user key="root"/>
                        <password key="1234"/>
                    </pool>
                </connection>
                <statement>
                    <sql><![CDATA[SELECT * FROM people WHERE id=1;]]></sql>
                    <parameter expression="//m0:getQuote/m0:request/m0:symbol" type="VARCHAR" xmlns:m0="https://services.samples"/>
                    <result column="nume" name="nume"/>
                </statement>
            </dblookup>
            <!--
            <log level="custom">
                    <property name="ID" expression="get-property('id')" />
                    <property name="NAME" expression="get-property('nume')" />
                    <property name="AGE" expression="get-property('varsta')" />
            </log>
                -->
            <respond/>
        </inSequence>
        <outSequence/>
        <faultSequence/>
    </resource>
</api>
4

1 に答える 1