Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||||||
ID | ||||||||||||
0045726 | ||||||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
defect | [Openbravo ERP] Y. DBSourceManager | minor | have not tried | 2021-01-13 16:06 | 2022-02-01 07:24 | |||||||
Reporter | shuehner | View Status | public | |||||||||
Assigned To | Triage Platform Base | |||||||||||
Priority | normal | Resolution | open | Fixed in Version | ||||||||
Status | new | Fix in branch | Fixed in SCM revision | |||||||||
Projection | none | ETA | none | Target Version | ||||||||
OS | Any | Database | Any | Java version | ||||||||
OS Version | Database version | Ant version | ||||||||||
Product Version | SCM revision | |||||||||||
Review Assigned To | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0045726: ant create.database fails with NPE if sourcedata contains table with BLOB columns without a value in the xml file (oracle only) | |||||||||||
Description | Part of create.database is loading sourcedata from the xml files into the database. If a table is loaded and it contains a column of type="BLOB" and the xml file being loaded does not have a value for this field (meaning not having a line in the xml file for this table) then ant create.database fails with a NullPointerException. That error only happens when using Oracle datbase (tested both ora11 and ora19) Error happens on both 19Q3 tag and master/head (development for 21Q2) Caused by: org.apache.ddlutils.io.DataSinkException: java.lang.NullPointerException at org.apache.ddlutils.io.DataToDatabaseSink.purgeBatchQueue(DataToDatabaseSink.java:409) at org.apache.ddlutils.io.DataToDatabaseSink.insertBeanIntoDatabase(DataToDatabaseSink.java:383) at org.apache.ddlutils.io.DataToDatabaseSink.addBean(DataToDatabaseSink.java:314) at org.apache.ddlutils.io.DynaSqlCreateRule.end(DynaSqlCreateRule.java:84) at org.apache.commons.digester.Digester.endElement(Digester.java:1233) ... 57 more Caused by: java.lang.NullPointerException at java.base/java.io.ByteArrayInputStream.<init>(ByteArrayInputStream.java:108) at org.apache.ddlutils.platform.PlatformImplBase.setStatementParameterValue(PlatformImplBase.java:2765) at org.apache.ddlutils.platform.PlatformImplBase.setObject(PlatformImplBase.java:2720) at org.apache.ddlutils.platform.PlatformImplBase.insert(PlatformImplBase.java:1867) at org.apache.ddlutils.io.DataToDatabaseSink.purgeBatchQueue(DataToDatabaseSink.java:399) ... 61 more Important note: This is the end of the relevant error stacktrace. Earlier parts as misleading and point to 'xml parsing error for an unrelated table' Cause is dbsourcemanager using batchMode(true) for the data loading so the error is happening and the end of the batch (even if problem is caused way earlier) | |||||||||||
Steps To Reproduce | Put attached AD_IMAGE.xml example file into src-db/database/sourcedata folder run ant create.database using Oracle database | |||||||||||
Proposed Solution | Improve code instacktrace above to add handling for missing value (null) to the BLOB codepath avoiding to try to constuct a ByteArrayInputSteam with null. | |||||||||||
Tags | No tags attached. | |||||||||||
Attached Files | AD_IMAGE.xml [^] (673 bytes) 2021-01-13 16:06 | |||||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Issue History | |||
Date Modified | Username | Field | Change |
2021-01-13 16:06 | shuehner | New Issue | |
2021-01-13 16:06 | shuehner | Assigned To | => platform |
2021-01-13 16:06 | shuehner | File Added: AD_IMAGE.xml | |
2021-01-13 16:06 | shuehner | Modules | => Core |
2021-01-13 16:06 | shuehner | Triggers an Emergency Pack | => No |
2021-01-13 17:28 | shuehner | Category | A. Platform => Y. DBSourceManager |
2022-02-01 07:24 | alostale | Assigned To | platform => Triage Platform Base |
Copyright © 2000 - 2009 MantisBT Group |