Q:

inserting batch update no error but number of rows effected -2

Java + Spring + JPA + Hibernate + oracle
I am using following code to batch inserts
when i execute the following code i get response -2 and no record insert into the table. any help ?
Example code.java

List<ReportItem> reportItems = new ArrayList<ReportItem>();

        ReportItem reportItem = new ReportItem();

        reportItems.add(reportItem);
        reportItem.setReportId(new Long(61));
        reportItem.setLicenseWindowEnd("LICENSE_WINDOW_END");
        reportItem.setLicenseWindowStart("LICENSE_WINDOW_START");
        reportItem.setPackageAssetID("PACKAGE_ASSET_ID");
        reportItem.setPackageAssetName("PACKAGE_ASSET_NAME");
        reportItem.setPackageProvider("PACKAGE_PROVIDER");
        reportItem.setPackageProviderID("PACKAGE_PROVIDER_ID");
        reportItem.setPackageUpdateNum("PACKAGE_UPDATE_NUM");
        reportItem.setTitle("TITLE");
        reportItem.setTitleAssetID("TITLE_ASSET_ID");
        reportItem.setTitleBrief("TITLE_BRIEF");
        reportItem.setTitleProviderID("TITLE_PROVIDER_ID");
        reportItem.setTitleUpdateNum("TITLE_UPDATE_NUM");
        reportItem.setTargetPitchDate("TARGET_PITCH_DATE");
        reportItem.setAssetCdnStatus("ASSET_CDN_STATUS");
        reportItem.setAssetReceived("ASSET_RECEIVED");
        reportItem.setAssetReceived("ASSET_AVAILABLE");

        int[] counts = reportDAO.insertBatchReportItems(reportItems);
        // response return counts[0] is -2

Dao.java
@Override
    public int[] insertBatchReportItems(final List<ReportItem> reportItems) {

        int[] counts = getJdbcTemplate().batchUpdate(sql, new BatchPreparedStatementSetter() {

            @Override
            public void setValues(PreparedStatement ps, int i) throws SQLException {
                ReportItem reportItem = reportItems.get(i);
                ps.setLong(1, reportItem.getReportId());
                ps.setString(2, reportItem.getLicenseWindowEnd());
                ps.setString(3, reportItem.getLicenseWindowStart());
                ps.setString(4, reportItem.getPackageAssetID());
                ps.setString(5, reportItem.getPackageAssetName());
                ps.setString(6, reportItem.getPackageProvider());
                ps.setString(7, reportItem.getPackageProviderID());
                ps.setString(8, reportItem.getPackageUpdateNum());
                ps.setString(9, reportItem.getTitle());
                ps.setString(10, reportItem.getTitleAssetID());
                ps.setString(11, reportItem.getTitleBrief());
                ps.setString(12, reportItem.getTitleProviderID());
                ps.setString(13, reportItem.getTitleUpdateNum());
                ps.setString(14, reportItem.getTargetPitchDate());
                ps.setString(15, reportItem.getAssetCdnStatus());
                ps.setString(16, reportItem.getAssetReceived());
                ps.setString(17, reportItem.getAssetAvailable());
            }

            @Override
            public int getBatchSize() {
                return reportItems.size();
            }
        });

        return counts;

    }

A:

According to jdbc

Statement.SUCCESS_NO_INFO — the command was processed successfully,
  but the number of rows affected is unknown

Statement.SUCCESS_NO_INFO is defined as being -2, so your result says everything worked fine, but you won't get information on the number of updated columns.
As per oracle docs

For a prepared statement batch, it is not possible to know the number
  of rows affected in the database by each individual statement in the
  batch. Therefore, all array elements have a value of -2. According to
  the JDBC 2.0 specification, a value of -2 indicates that the operation
  was successful but the number of rows affected is unknown.

