java.lang.NullPointerException

JIRA | michael-m-x | 8 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Transferred from Sourceforge: artifact_id: 2482819 submitted_by: michael-m-x assigned_to: nvoxland priority: 5 resolution: None open_date: 1230927000 aftifact_type: Feature Requests category: None artifact_group_id: None category: None status: Closed history: close_date01230931595nvoxland assigned_to1001230931595nvoxland status_id11230931595nvoxland messages: close_date01230931595nvoxland assigned_to1001230931595nvoxland status_id11230931595nvoxland If I use a condition in an included file, I get a null pointer exception. Is this unsupported usage, or a bug? See scenario below: File v1.xml: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.8 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.8.xsd"> <preConditions> <dbms type="abc" /> </preConditions> </databaseChangeLog> liquibase --changeLogFile=v1.xml update Migration Failed: Validation Failed: 1 preconditions failed v1.xml : DBMS Precondition failed: expected abc, got oracle Now include file v1.xml from file v0.xml: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.8 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.8.xsd"> <include file="v1.xml"/> </databaseChangeLog> liquibase --changeLogFile=v0.xml update java.lang.NullPointerException at liquibase.parser.xml.XMLChangeLogHandler.handleIncludedChangeLog(XMLChangeLogHandler.java:236) at liquibase.parser.xml.XMLChangeLogHandler.startElement(XMLChangeLogHandler.java:80) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at liquibase.parser.xml.XMLChangeLogParser.parse(XMLChangeLogParser.java:70) at liquibase.parser.ChangeLogParser.parse(ChangeLogParser.java:24) at liquibase.Liquibase.update(Liquibase.java:107) at liquibase.commandline.Main.doMigration(Main.java:637) at liquibase.commandline.Main.main(Main.java:90) Migration Failed: Unknown Reason

    JIRA | 8 years ago | michael-m-x
    java.lang.NullPointerException
  2. 0

    Transferred from Sourceforge: artifact_id: 2482819 submitted_by: michael-m-x assigned_to: nvoxland priority: 5 resolution: None open_date: 1230927000 aftifact_type: Feature Requests category: None artifact_group_id: None category: None status: Closed history: close_date01230931595nvoxland assigned_to1001230931595nvoxland status_id11230931595nvoxland messages: close_date01230931595nvoxland assigned_to1001230931595nvoxland status_id11230931595nvoxland If I use a condition in an included file, I get a null pointer exception. Is this unsupported usage, or a bug? See scenario below: File v1.xml: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.8 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.8.xsd"> <preConditions> <dbms type="abc" /> </preConditions> </databaseChangeLog> liquibase --changeLogFile=v1.xml update Migration Failed: Validation Failed: 1 preconditions failed v1.xml : DBMS Precondition failed: expected abc, got oracle Now include file v1.xml from file v0.xml: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.8" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.8 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.8.xsd"> <include file="v1.xml"/> </databaseChangeLog> liquibase --changeLogFile=v0.xml update java.lang.NullPointerException at liquibase.parser.xml.XMLChangeLogHandler.handleIncludedChangeLog(XMLChangeLogHandler.java:236) at liquibase.parser.xml.XMLChangeLogHandler.startElement(XMLChangeLogHandler.java:80) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at liquibase.parser.xml.XMLChangeLogParser.parse(XMLChangeLogParser.java:70) at liquibase.parser.ChangeLogParser.parse(ChangeLogParser.java:24) at liquibase.Liquibase.update(Liquibase.java:107) at liquibase.commandline.Main.doMigration(Main.java:637) at liquibase.commandline.Main.main(Main.java:90) Migration Failed: Unknown Reason

    JIRA | 8 years ago | michael-m-x
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at liquibase.parser.xml.XMLChangeLogHandler.handleIncludedChangeLog()
    2. liquibase.parser.xml
      XMLChangeLogHandler.startElement
      1. liquibase.parser.xml.XMLChangeLogHandler.handleIncludedChangeLog(XMLChangeLogHandler.java:236)
      2. liquibase.parser.xml.XMLChangeLogHandler.startElement(XMLChangeLogHandler.java:80)
      2 frames
    3. Java RT
      SAXParserImpl$JAXPSAXParser.parse
      1. com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source)
      2. com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
      3. com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
      4. com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
      5. com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
      6. com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
      7. com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
      8. com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      9. com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
      10. com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
      11. com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
      12. com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
      13. com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      13 frames
    4. liquibase.parser.xml
      XMLChangeLogParser.parse
      1. liquibase.parser.xml.XMLChangeLogParser.parse(XMLChangeLogParser.java:70)
      1 frame
    5. Liquibase Core
      Liquibase.update
      1. liquibase.parser.ChangeLogParser.parse(ChangeLogParser.java:24)
      2. liquibase.Liquibase.update(Liquibase.java:107)
      2 frames
    6. liquibase.commandline
      Main.main
      1. liquibase.commandline.Main.doMigration(Main.java:637)
      2. liquibase.commandline.Main.main(Main.java:90)
      2 frames