Oracle

Full import failed during di-buildindex utility

If you are using an Oracle database, you might encounter a Full import failed error similar to the following message during a di-buildindex run.

org.apache.solr.common.SolrException log Full Import
failed:java.lang.RuntimeException: java.lang.RuntimeException:
org.apache.solr.handler.dataimport.DataImportHandlerException:
java.io.IOException: IO Error: Unexpected packet
Caused by: oracle.net.ns.NetException: Unexpected packet
 at
oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:252)
 at oracle.net.ns.NetInputStream.read(NetInputStream.java:175)
 at oracle.net.ns.NetInputStream.read(NetInputStream.java:100)
 at oracle.net.ns.NetInputStream.read(NetInputStream.java:85)
 at
oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketI
nputStreamWrapper.java:122)
 at
oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStream
Wrapper.java:78)
 at
oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1179)
 at
oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1155)
 at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:279)
 at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
 at oracle.jdbc.driver.T4C8TTIClob.read(T4C8TTIClob.java:240)
 at
oracle.jdbc.driver.T4CConnection.getChars(T4CConnection.java:3015)
 ... 15 more

Problem

A configuration exists that enables a holdability attribute that is not supported by Oracle.

Solution

Delete the holdability attribute or update the Oracle driver. To delete the holdability attribute, complete the following steps.
  1. Find all wc-data-config.xml files under the following parent folder:

    WC_installdir/instances/instance_name/search/solr/

  2. Open the wc-data-config.xml files.
  3. Find the following code.
    <dataSource name="WC database"
        type="com.ibm.commerce.solr.handler.SchemaJdbcDataSource"
        jndiName="com.ibm.commerce.foundation.server.services.search.datasource"
        readOnly="true"              
        autoCommit="true"
        transactionIsolation="TRANSACTION_READ_COMMITTED"              
        <!-- Holdability must be removed for Oracle. -->              
        holdability="CLOSE_CURSORS_AT_COMMIT"
    />
  4. Delete the holdability="CLOSE_CURSORS_AT_COMMIT" attribute, or change the value to HOLD_CURSORS_OVER_COMMIT.