java.lang.reflect.InvocationTargetException

JIRA | Nathan Voxland | 8 years ago
  1. 0

    Transferred from Sourceforge: artifact_id: 1958145 submitted_by: nvoxland assigned_to: nvoxland priority: 5 resolution: Works For Me open_date: 1210014168 aftifact_type: Bugs category: None artifact_group_id: None category: None status: Open history: assigned_to1001214329254nvoxland resolution_id1001214329254nvoxland messages: assigned_to1001214329254nvoxland resolution_id1001214329254nvoxland Mailed to Me: I'm using SQL server. I have a database with a bunch of tables (the target database i guess) and a new empty database. I generate a diff log for these two databases (which looks fine as far as I can tell.) But when i try to run this diff log I get an error saying liquibase.exception.ChangeLogParseException Invalid Migration File: Unknown Reason . I sometimes get an error saying "Premature End of File as well" . Am I doing something wrong? I checked the empty database after I get these errors and the DatabaseChangeLog and DatabaseChangeLogLock tables are being created just fine. I'm using the ANT Task. This is what I'm doing before the updateDatabase task: generateChangeLog for the target database diffDatabaseToChangeLog (output is stored in a file - diff.xml) updateDatabase task using diff.xml file as the changelog to run ------------------------------ Stacktrace ------------------------------ liquibase.parser.xml.XMLChangeLogHandler startElement SEVERE: Error thrown as a SAXException: null java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at liquibase.util.ObjectUtil.setProperty(ObjectUtil.java:18) at liquibase.parser.xml.XMLChangeLogHandler.setProperty(XMLChangeLogHandler.java:196) at liquibase.parser.xml.XMLChangeLogHandler.startElement(XMLChangeLogHandler.java:109) 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:69) at liquibase.parser.ChangeLogParser.parse(ChangeLogParser.java:11) at liquibase.Liquibase.update(Liquibase.java:87) at liquibase.commandline.Main.doMigration(Main.java:658) at liquibase.commandline.Main.main(Main.java:98) Caused by: java.text.ParseException: Unparseable number: "(0)" at java.text.NumberFormat.parse(Unknown Source) at liquibase.change.ColumnConfig.setDefaultValueNumeric(ColumnConfig.java:150) ... 25 more Migration Failed: Unknown Reason. For more information, use the --logLevel flag) May 5, 2008 10:50:07 AM liquibase.commandline.Main main SEVERE: Unknown Reason liquibase.exception.ChangeLogParseException: Invalid Migration File: Unknown Reason at liquibase.parser.xml.XMLChangeLogParser.parse(XMLChangeLogParser.java:103) at liquibase.parser.ChangeLogParser.parse(ChangeLogParser.java:11) at liquibase.Liquibase.update(Liquibase.java:87) at liquibase.commandline.Main.doMigration(Main.java:658) at liquibase.commandline.Main.main(Main.java:98) Caused by: java.lang.reflect.InvocationTargetException at liquibase.parser.xml.XMLChangeLogHandler.startElement(XMLChangeLogHandler.java:178) 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:69) ... 4 more

    JIRA | 8 years ago | Nathan Voxland
    java.lang.reflect.InvocationTargetException
  2. 0

    Transferred from Sourceforge: artifact_id: 1958145 submitted_by: nvoxland assigned_to: nvoxland priority: 5 resolution: Works For Me open_date: 1210014168 aftifact_type: Bugs category: None artifact_group_id: None category: None status: Open history: assigned_to1001214329254nvoxland resolution_id1001214329254nvoxland messages: assigned_to1001214329254nvoxland resolution_id1001214329254nvoxland Mailed to Me: I'm using SQL server. I have a database with a bunch of tables (the target database i guess) and a new empty database. I generate a diff log for these two databases (which looks fine as far as I can tell.) But when i try to run this diff log I get an error saying liquibase.exception.ChangeLogParseException Invalid Migration File: Unknown Reason . I sometimes get an error saying "Premature End of File as well" . Am I doing something wrong? I checked the empty database after I get these errors and the DatabaseChangeLog and DatabaseChangeLogLock tables are being created just fine. I'm using the ANT Task. This is what I'm doing before the updateDatabase task: generateChangeLog for the target database diffDatabaseToChangeLog (output is stored in a file - diff.xml) updateDatabase task using diff.xml file as the changelog to run ------------------------------ Stacktrace ------------------------------ liquibase.parser.xml.XMLChangeLogHandler startElement SEVERE: Error thrown as a SAXException: null java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at liquibase.util.ObjectUtil.setProperty(ObjectUtil.java:18) at liquibase.parser.xml.XMLChangeLogHandler.setProperty(XMLChangeLogHandler.java:196) at liquibase.parser.xml.XMLChangeLogHandler.startElement(XMLChangeLogHandler.java:109) 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:69) at liquibase.parser.ChangeLogParser.parse(ChangeLogParser.java:11) at liquibase.Liquibase.update(Liquibase.java:87) at liquibase.commandline.Main.doMigration(Main.java:658) at liquibase.commandline.Main.main(Main.java:98) Caused by: java.text.ParseException: Unparseable number: "(0)" at java.text.NumberFormat.parse(Unknown Source) at liquibase.change.ColumnConfig.setDefaultValueNumeric(ColumnConfig.java:150) ... 25 more Migration Failed: Unknown Reason. For more information, use the --logLevel flag) May 5, 2008 10:50:07 AM liquibase.commandline.Main main SEVERE: Unknown Reason liquibase.exception.ChangeLogParseException: Invalid Migration File: Unknown Reason at liquibase.parser.xml.XMLChangeLogParser.parse(XMLChangeLogParser.java:103) at liquibase.parser.ChangeLogParser.parse(ChangeLogParser.java:11) at liquibase.Liquibase.update(Liquibase.java:87) at liquibase.commandline.Main.doMigration(Main.java:658) at liquibase.commandline.Main.main(Main.java:98) Caused by: java.lang.reflect.InvocationTargetException at liquibase.parser.xml.XMLChangeLogHandler.startElement(XMLChangeLogHandler.java:178) 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:69) ... 4 more

    JIRA | 8 years ago | Nathan Voxland
    java.lang.reflect.InvocationTargetException
  3. 0

    From http://liquibase.org/forum/index.php?topic=27.msg83#msg83 Hi Nathan, numericDefaultValue did not work: <changeSet id="0002.0006.00" author="ssantoro" dbms="msql"> <createTable tableName="SimpleTable"> <column name="GUID" type="uniqueidentifier" defaultValueNumeric="newsequentialid()"> <constraints nullable="false" primaryKey="true" primaryKeyName="PK_AssignSet"/> </column> <column name="ChangeNumber" type="int" defaultValueNumeric="0"> <constraints nullable="false"/> </column> <column name="Value" type="varchar(256)"/> </createTable> </changeSet> results into this exception $ lqb --changeLogFile=pocone.xml updateSQL java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at liquibase.util.ObjectUtil.setProperty(ObjectUtil.java:29) at liquibase.parser.xml.XMLChangeLogHandler.setProperty(XMLChangeLogHandler.java:350) at liquibase.parser.xml.XMLChangeLogHandler.startElement(XMLChangeLogHandler.java:240) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:688) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at liquibase.parser.xml.XMLChangeLogParser.parse(XMLChangeLogParser.java:70) at liquibase.parser.ChangeLogParser.parse(ChangeLogParser.java:28) at liquibase.Liquibase.update(Liquibase.java:105) at liquibase.Liquibase.update(Liquibase.java:136) at liquibase.commandline.Main.doMigration(Main.java:660) at liquibase.commandline.Main.main(Main.java:95) Caused by: java.text.ParseException: Unparseable number: "newsequentialid(" at java.text.NumberFormat.parse(NumberFormat.java:333) at liquibase.change.ColumnConfig.setDefaultValueNumeric(ColumnConfig.java:204) ... 25 more Migration Failed: Unknown Reason

    JIRA | 8 years ago | Nathan Voxland
    java.lang.reflect.InvocationTargetException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    From http://liquibase.org/forum/index.php?topic=27.msg83#msg83 Hi Nathan, numericDefaultValue did not work: <changeSet id="0002.0006.00" author="ssantoro" dbms="msql"> <createTable tableName="SimpleTable"> <column name="GUID" type="uniqueidentifier" defaultValueNumeric="newsequentialid()"> <constraints nullable="false" primaryKey="true" primaryKeyName="PK_AssignSet"/> </column> <column name="ChangeNumber" type="int" defaultValueNumeric="0"> <constraints nullable="false"/> </column> <column name="Value" type="varchar(256)"/> </createTable> </changeSet> results into this exception $ lqb --changeLogFile=pocone.xml updateSQL java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at liquibase.util.ObjectUtil.setProperty(ObjectUtil.java:29) at liquibase.parser.xml.XMLChangeLogHandler.setProperty(XMLChangeLogHandler.java:350) at liquibase.parser.xml.XMLChangeLogHandler.startElement(XMLChangeLogHandler.java:240) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:501) at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:688) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:400) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2747) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:648) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:140) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:807) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:107) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522) at liquibase.parser.xml.XMLChangeLogParser.parse(XMLChangeLogParser.java:70) at liquibase.parser.ChangeLogParser.parse(ChangeLogParser.java:28) at liquibase.Liquibase.update(Liquibase.java:105) at liquibase.Liquibase.update(Liquibase.java:136) at liquibase.commandline.Main.doMigration(Main.java:660) at liquibase.commandline.Main.main(Main.java:95) Caused by: java.text.ParseException: Unparseable number: "newsequentialid(" at java.text.NumberFormat.parse(NumberFormat.java:333) at liquibase.change.ColumnConfig.setDefaultValueNumeric(ColumnConfig.java:204) ... 25 more Migration Failed: Unknown Reason

    JIRA | 8 years ago | Nathan Voxland
    java.lang.reflect.InvocationTargetException
  6. 0

    No control when adding a text value in a numeric field

    GitHub | 4 years ago | gpetit
    java.text.ParseException: Unparseable number: "yrty"

  1. thilo 12 times, last 8 months ago
4 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.text.ParseException

    Unparseable number: "(0)"

    at java.text.NumberFormat.parse()
  2. Java RT
    NumberFormat.parse
    1. java.text.NumberFormat.parse(Unknown Source)
    1 frame
  3. Liquibase Core
    ColumnConfig.setDefaultValueNumeric
    1. liquibase.change.ColumnConfig.setDefaultValueNumeric(ColumnConfig.java:150)
    1 frame
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    4. java.lang.reflect.Method.invoke(Unknown Source)
    4 frames
  5. Liquibase Core
    ObjectUtil.setProperty
    1. liquibase.util.ObjectUtil.setProperty(ObjectUtil.java:18)
    1 frame
  6. liquibase.parser.xml
    XMLChangeLogHandler.startElement
    1. liquibase.parser.xml.XMLChangeLogHandler.setProperty(XMLChangeLogHandler.java:196)
    2. liquibase.parser.xml.XMLChangeLogHandler.startElement(XMLChangeLogHandler.java:109)
    2 frames
  7. 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
  8. liquibase.parser.xml
    XMLChangeLogParser.parse
    1. liquibase.parser.xml.XMLChangeLogParser.parse(XMLChangeLogParser.java:69)
    1 frame
  9. Liquibase Core
    Liquibase.update
    1. liquibase.parser.ChangeLogParser.parse(ChangeLogParser.java:11)
    2. liquibase.Liquibase.update(Liquibase.java:87)
    2 frames
  10. liquibase.commandline
    Main.main
    1. liquibase.commandline.Main.doMigration(Main.java:658)
    2. liquibase.commandline.Main.main(Main.java:98)
    2 frames