0

I created JDBC connection pool using ant script.

<target name="create-cmifs-connpool">
    <wlconfig username="${user}" password="${password}" url="${wls.url}">
        <query domain="${domain.name}" type="Server" name="${servername}" property="x" />
        <create type="JDBCConnectionPool" name="cmifsDBPool">
            <set attribute="CapacityIncrement" value="1"/>
            <set attribute="DriverName" value="oracle.jdbc.OracleDriver"/>
            <set attribute="InitialCapacity" value="1"/>
            <set attribute="MaxCapacity" value="10"/>
            <set attribute="Password" value="${env.DB_PWD}"/>
            <set attribute="Properties" value="user=${env.DB_USER}"/>
            <set attribute="RefreshMinutes" value="0"/>
            <set attribute="ShrinkPeriodMinutes" value="15"/>
            <set attribute="ShrinkingEnabled" value="true"/>
            <set attribute="TestConnectionsOnRelease" value="false"/>
            <set attribute="TestConnectionsOnReserve" value="false"/>
            <set attribute="TestTableName" value="DUAL"/>
            <set attribute="URL" value="jdbc:oracle:thin:@${env.MACHINE}:1521:NOTXE"/>
            <set attribute="Targets" value="${x}" />
        </create>

        <create type="JDBCDataSource" name="cmifsDBDS" >
            <set attribute="JNDIName" value="jdbc/cmifsDBDS"/>
            <set attribute="PoolName" value="cmifsDBPool"/>
            <set attribute="Targets" value="${x}" />
        </create>

    </wlconfig>
</target>

Everything works good, until I try to retrieve an ARRAY from DB. I get the following error:

java.lang.ClassCastException: weblogic.jdbc.wrapper.Array_oracle_sql_ARRAY cannot be cast to oracle.sql.ARRAY

I got the solution for this problem in this link, which says that Wrap Data Types should be set to false for the connection pool. This fixed the problem. But when I tried to add the attribute to my ant script

<set attribute="WrapTypes" value="false"/>

It doesnt work. I am getting the following error:

Error invoking MBean command: java.lang.IllegalArgumentException: Property Name and value not valid for the MBean. Value false for parameter[WrapTypes].java.lang.IllegalArgumentException: Unable to find the attribute: WrapTypes in the attribute list of the class: JDBCConnectionPool

How to solve this problem?

1 Answers1

0

It seems you use common interface and script executor doesn't understand vendor specific flags in this case. Try to use concrete type. May be weblogic.jdbc.common.internal.ConnectionPool will help you.

Donz
  • 1,389
  • 1
  • 13
  • 21