liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE EXAMPLE (ID NUMBER(0,-127)): ORA-01727: numeric precision specifier is out of range (1 to 38)

JIRA | Andy Goossens | 4 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    When I create a table in Oracle with a column of type "NUMBER" without mentioning its precision or scale: {code:sql} CREATE TABLE example ( id NUMBER ); {code} Then generateChangeLog will generate the following XML structure: {code:xml} <changeSet author="user (generated)" id="1360601396312-1"> <createTable tableName="EXAMPLE"> <column name="ID" type="NUMBER(0,-127)"/> </createTable> </changeSet> {code} When executing this changeSet on an Oracle database, I get the following exception: {code} SEVERE 2/11/13 6:01 PM:liquibase: Change Set test.xml::1360601396999-1::user (generated) failed. Error: Error executing SQL CREATE TABLE EXAMPLE (ID NUMBER(0,-127)): ORA-01727: numeric precision specifier is out of range (1 to 38) liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE EXAMPLE (ID NUMBER(0,-127)): ORA-01727: numeric precision specifier is out of range (1 to 38) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104) at liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:1091) at liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:1075) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:317) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58) at liquibase.Liquibase.update(Liquibase.java:114) at liquibase.integration.commandline.Main.doMigration(Main.java:825) at liquibase.integration.commandline.Main.main(Main.java:134) Caused by: java.sql.SQLSyntaxErrorException: ORA-01727: numeric precision specifier is out of range (1 to 38) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193) at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1033) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1329) at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1909) at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1871) at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:318) at liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:92) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) ... 9 more {code} I can work around this issue by modifying the XML and changing "NUMBER(0,-127)" into "NUMBER".

    JIRA | 4 years ago | Andy Goossens
    liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE EXAMPLE (ID NUMBER(0,-127)): ORA-01727: numeric precision specifier is out of range (1 to 38)
  2. 0

    When I create a table in Oracle with a column of type "NUMBER" without mentioning its precision or scale: {code:sql} CREATE TABLE example ( id NUMBER ); {code} Then generateChangeLog will generate the following XML structure: {code:xml} <changeSet author="user (generated)" id="1360601396312-1"> <createTable tableName="EXAMPLE"> <column name="ID" type="NUMBER(0,-127)"/> </createTable> </changeSet> {code} When executing this changeSet on an Oracle database, I get the following exception: {code} SEVERE 2/11/13 6:01 PM:liquibase: Change Set test.xml::1360601396999-1::user (generated) failed. Error: Error executing SQL CREATE TABLE EXAMPLE (ID NUMBER(0,-127)): ORA-01727: numeric precision specifier is out of range (1 to 38) liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE EXAMPLE (ID NUMBER(0,-127)): ORA-01727: numeric precision specifier is out of range (1 to 38) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:62) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104) at liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:1091) at liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:1075) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:317) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58) at liquibase.Liquibase.update(Liquibase.java:114) at liquibase.integration.commandline.Main.doMigration(Main.java:825) at liquibase.integration.commandline.Main.main(Main.java:134) Caused by: java.sql.SQLSyntaxErrorException: ORA-01727: numeric precision specifier is out of range (1 to 38) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445) at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396) at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879) at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450) at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192) at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193) at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1033) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1329) at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1909) at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1871) at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:318) at liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:92) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) ... 9 more {code} I can work around this issue by modifying the XML and changing "NUMBER(0,-127)" into "NUMBER".

    JIRA | 4 years ago | Andy Goossens
    liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE EXAMPLE (ID NUMBER(0,-127)): ORA-01727: numeric precision specifier is out of range (1 to 38)
  3. 0

    invalid character when running liquibase script

    Stack Overflow | 4 years ago | Marthin
    java.sql.SQLSyntaxErrorException: ORA-00911: invalid character
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    ORA-00933 When trying to insert space followed by "n" Character

    Stack Overflow | 3 years ago | Slettal
    com.googlecode.flyway.core.command.FlywaySqlScriptException: Error executing statement at line 12: INSERT INTO TEST (TEST) VALUES ( ' n');
  6. 0

    Executing SQL Script via Ant

    Stack Overflow | 3 years ago | user1259318
    java.sql.SQLSyntaxErrorException: ORA-00922: Fehlende oder ungültige Option

  1. osvzs 1 times, last 2 months ago
  2. jpvee 2 times, last 5 months ago
3 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.sql.SQLSyntaxErrorException

    ORA-01727: numeric precision specifier is out of range (1 to 38)

    at oracle.jdbc.driver.T4CTTIoer.processError()
  2. Oracle jdbc
    OracleStatementWrapper.execute
    1. oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
    2. oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
    3. oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
    4. oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
    5. oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
    6. oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
    7. oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:193)
    8. oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1033)
    9. oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1329)
    10. oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1909)
    11. oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1871)
    12. oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:318)
    12 frames
  3. Liquibase Core
    Main.main
    1. liquibase.executor.jvm.JdbcExecutor$1ExecuteStatementCallback.doInStatement(JdbcExecutor.java:92)
    2. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55)
    3. liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:104)
    4. liquibase.database.AbstractDatabase.execute(AbstractDatabase.java:1091)
    5. liquibase.database.AbstractDatabase.executeStatements(AbstractDatabase.java:1075)
    6. liquibase.changelog.ChangeSet.execute(ChangeSet.java:317)
    7. liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27)
    8. liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58)
    9. liquibase.Liquibase.update(Liquibase.java:114)
    10. liquibase.integration.commandline.Main.doMigration(Main.java:825)
    11. liquibase.integration.commandline.Main.main(Main.java:134)
    11 frames