Quantcast
Channel: Liquibase Forums
Viewing all 2993 articles
Browse latest View live

Re : Version 3.1.1 writing status results to stderr?

$
0
0
Glad you figured out the problem. 

Nathan

Re : informix drop first - alter tables wrong syntax

$
0
0
Thanks for the info. I removed the use of double quotes for informix. 

Your user permissions seem OK, but I made a small change. Does it work now?

Nathan

Incorrect column name used for index

$
0
0
I'm using liquibase 3.1.1 and oracle 11g.

I used the generateChangeLog command from the command line against my development database.  Then I used the updateDatabase command from ant against a new schema.  So basically I'm exporting from one schema to create a base set of ddl and then using it to create a new schema.

The updateDatabase command worked perfectly until it got to this changeset:

    <changeSet author="ectdz6s (generated)" id="1401388617129-3876">
        <createIndex indexName="PRACTICE_U1" tableName="PRACTICE" unique="true">
            <column name="SYS_NC00028$"/>
        </createIndex>
    </changeSet>

It fails with an Oracle error:
Error executing SQL CREATE UNIQUE INDEX LIQUIBASE.PRACTICE_U1 ON LIQUIBASE.PRACTICE(SYS_NC00028$): ORA-00904: "SYS_NC00028$": invalid identifier

But if I go into Toad and ask it to create the script for that index I get this:

DROP INDEX EMR.PRACTICE_U1;

CREATE UNIQUE INDEX EMR.PRACTICE_U1 ON EMR.PRACTICE
(UPPER("DIRECTADDRESSDOMAIN"))
LOGGING
TABLESPACE EMRD
PCTFREE    10
INITRANS   2
MAXTRANS   255
STORAGE    (
            INITIAL          64K
            NEXT             1M
            MAXSIZE          UNLIMITED
            MINEXTENTS       1
            MAXEXTENTS       UNLIMITED
            PCTINCREASE      0
            BUFFER_POOL      DEFAULT
            FLASH_CACHE      DEFAULT
            CELL_FLASH_CACHE DEFAULT
           )
NOPARALLEL;

Other indexes were created correctly.  It's just this one that has a problem.  Why would liquibase have gotten that column name?

ClassFormatError

$
0
0
I'm trying to use use diffDatabaseToChangeLog from ant and I get this error:

C:\Production\jboss_emr\LiquiBase\build.xml:64: java.lang.ClassFormatError: Illegal class name "javax.persistence/src/javax/persistence/PersistenceException" in class file javax/persistence/PersistenceException

Here's my ant target:

    <target name="generateChangeLogFromEntities" depends="">
       
        <diffDatabaseToChangeLog
                driver="oracle.jdbc.OracleDriver}"
                url="${database.url}"
                username="${database.username}"
                password="${database.password}"
                referenceUrl="hibernate:ejb3:emrEJB"
                outputFile="${hibernate.output.file}"
                classpathref="liquibase.classpath"
        />
    </target>

liquibase.classpath contains these jars:
      hibernate-commons-annotations-4.0.1.Final.jar
      lib/hibernate-core-4.1.4.Final.jar
      hibernate-entitymanager-4.1.4.Final.jar
      hibernate-envers-4.1.4.Final.jar
      liquibase-hibernate4.2-3.3.jar
      liquibase.jar
      ojdbc6.jar
      persistence-api-sources-2.0.jar
      snakeyaml-1.13.jar

If I removed persistence-api-sources-2.0.jar I get a ClassNotFoundException for PersistenceException.

Re : Incorrect column name used for index

$
0
0
Is that a function-based index? They sometimes get strange column names. Or a dropped column?

Try it with the new 3.2.0 release, there have been some fixes around oracle index column names.

Nathan

Re : ClassFormatError

$
0
0
ClassFormatError is a strange error to get. Are you running against a too-old version of Java?

Nathan

Re : Error on insert documentation on value param

$
0
0
Yes, you are right. I'll get the docs updated. Thanks for pointing it out.

Nathan

Re : Adding comments to changesets no longer works reliably

$
0
0
3.2.0 is released now with additional fixes. If you are still seeing the problem, log a ticket with the details you have.

Nathan

Re : Support for OrientDB NoSQL

Re : Dynamic property value to be loaded from a external file into the DatabaseChangeLog file

Re : Liquibase table partitioning

Re : changeset with multiple context

$
0
0
Note: 3.2.0 is now available.

Nathan

Re : How to avoid liquibase evaluating columns inside an IF EXISTS BEGIN block even when false

$
0
0
It may be a problem with how liquibase tries to break up the SQL statement into separate blocks to feed to the database. Liquibase should just be dividing them up with a line separator regular expression on the GO but if it was dividing it up so the IF is one statement and the inner block is another it may still always evaluate the inside block.  If that was the case, though, I would think the IF portion would give a syntax error since it is probably not a full statement.

To be sure, you could use splitStatements: false in your changeSet definition. That will cause liquibase to send the whole string to the database as is.

Nathan

Re : ClassFormatError

$
0
0
I was running inside Eclipse, so to take that out of the picture I ran ant from the command line.  Ant version is 1.8.0.  Now I get this:

$ ant generateChangeLogFromEntities
Buildfile: C:\Production\jboss_emr\LiquiBase\build.xml

generateChangeLogFromEntities:
[diffDatabaseToChangeLog] WARNING 6/2/14 2:49 PM:liquibase: Can not use class liquibase.ext.hibernate.database.HibernateSpringDatabase as a Liquibase service because org.springframework.beans.factory.support.BeanDefinitionRegistry is not in the classpath
[diffDatabaseToChangeLog] INFO 6/2/14 2:49 PM:liquibase-hibernate: Reading hibernate configuration hibernate:ejb3:emrEJB

BUILD FAILED
C:\Production\jboss_emr\LiquiBase\build.xml:119: java.lang.NoClassDefFoundError: javax/persistence/spi/ClassTransformer
        at liquibase.ext.hibernate.database.HibernateEjb3Database.buildConfigurationFromFile(HibernateEjb3Database.java:76)
        at liquibase.ext.hibernate.database.HibernateEjb3Database.buildConfiguration(HibernateEjb3Database.java:28)
        at liquibase.ext.hibernate.database.HibernateDatabase.setConnection(HibernateDatabase.java:43)
        at liquibase.database.DatabaseFactory.findCorrectDatabaseImplementation(DatabaseFactory.java:123)
        at liquibase.integration.ant.BaseLiquibaseTask.createDatabaseObject(BaseLiquibaseTask.java:263)
        at liquibase.integration.ant.DiffDatabaseTask.executeWithLiquibaseClassloader(DiffDatabaseTask.java:140)
        at liquibase.integration.ant.BaseLiquibaseTask.execute(BaseLiquibaseTask.java:71)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        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 org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1329)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
        at org.apache.tools.ant.Main.runBuild(Main.java:801)
        at org.apache.tools.ant.Main.startAnt(Main.java:218)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Caused by: java.lang.ClassNotFoundException: javax.persistence.spi.ClassTransformer
        at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1386)
        at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1336)
        at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1074)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
        ... 24 more

I had added all the jboss jars to classpathref for the diffDatabaseToChangeLog command, so it definitely includes the jar that has javax.persistence.spi.ClassTransformer.

Perhaps you could post an example build.xml that works using the EJB3 url. In addition I'm unclear how the hibernate integration finds the annotations in the entities.  Should the classpathref include the compiled java classes or does it need the sources?

Thanks

New feature. Allow UpdateSQL command to skip inserts related with specific liquibase change log tables.

$
0
0
Hi all,

I suppose that isn't possible do it now with liquibase, but maybe it could be a good new feature if the UpdateSQL command allows export only the SQL related with the data base changes, removing from the generated file all inserts related with liquibase databasechangelog tables.

Reason, when we are deploying on productive, data base changes must be checked and revised carefully and we are not including the databasechangelog tables in productive environment. To validate the whole SQL script generated automactically with liquibase we are removing manually all inserts related with specific liquibase tables to do an easy comparison with other compare schema tools.

It could be nice if the updateSQL command allows skip the SQL related with liquibase specific tables.


Re : New feature. Allow UpdateSQL command to skip inserts related with specific liquibase change log tables.

Re : Liquibase table partitioning

$
0
0
Nathan,
 
Thanks for responding!
 
Essentially, the xml files are already generated and the partitions are defined within. So I am, basically, trying to "trick" liquibase using mapping.properties file. is this even possible?
 
example:
 
tablespace_name_2010 = tablespace_name

Re : Adding comments to changesets no longer works reliably

$
0
0
I'm observing the same error message under 3.2.0 when I have multiple comment blocks in my changeSet.

liquibase.parser.core.ParsedNodeException: Multiple nodes match null/comment
at liquibase.parser.core.ParsedNode.getChild(ParsedNode.java:171)
at liquibase.parser.core.ParsedNode.getChildValue(ParsedNode.java:259)
at liquibase.parser.core.ParsedNode.getChildValue(ParsedNode.java:206)
at liquibase.changelog.ChangeSet.load(ChangeSet.java:250)
at liquibase.changelog.DatabaseChangeLog.createChangeSet(DatabaseChangeLog.java:310)
at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:200)
at liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:193)
at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:25)
at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:209)
at liquibase.Liquibase.update(Liquibase.java:187)
at liquibase.Liquibase.update(Liquibase.java:174)
at liquibase.integration.commandline.Main.doMigration(Main.java:992)
at liquibase.integration.commandline.Main.run(Main.java:170)
at liquibase.integration.commandline.Main.main(Main.java:89)

inserting file into table from jar

$
0
0
Hi
 
I have only just found Liquibase and started to experiment with it. I would like to insert a file into a table. The file is located in the application jar as a templates or resource. I need to extract that file and insert into the table.
 
Can I do this with liquibase?
 
Thanks in advance
 
John
 
 

Re : Adding comments to changesets no longer works reliably

Viewing all 2993 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>