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

How to set diffChangeLogFile parameter when “mvn liquibase:diff”?

$
0
0
I run "mvn liquibase:diff" and already configure the diffChangeLogFile, but the diffChangeLogFile file just have the head information.(like below)



But I run the liquibase diff in the command line way with same configuration, there are correct information in the diffChangeLogFile file.

My  pom.xml as below:


Is there anyone met the same problem?


Re : How to set diffChangeLogFile parameter when “mvn liquibase:diff”?

$
0
0
Hard to say based on just this snippet of the POM. One thing that I notice is that in your POM you have execution/configuration/changeLogFile set as well as execution/configuration/diffChangeLogFile set. I am not sure which one the mvn liquibase plugin will use. 

I also see what could be typos in your POM, or they could be intentional, especially ${liquabase.urpasswordl}. It would be good to run mvn with the super-verbose-debug (either -X or --debug) option to see whether the parameters are being filled in as you think they should be.

Steve Donie
Principal Software Engineer
Datical, Inc. http://www.datical.com/

Liquibase Rollback Error for Multi-Line Rollback Script

$
0
0
Hi,
I'm getting an error when I attempt to roll back this sample script (below).  Is this the correct way to format multi-line rollbacks?  We've played with splitStatements, but no luck.  Next we'll try to use XML, but would love to stick with this format.

Thanks in advance for any help!
Rich

Here is the error:
[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.2.0:rollback (default-cli) on project database: Error setting up or running Liquibase: liquibase.exception.RollbackFailedException: Error executing custom SQL [CREATE OR REPLACE FUNCTION a_number() RETURNS integer AS $$
[ERROR] BEGIN
[ERROR] RETURN 1]: Error executing SQL CREATE OR REPLACE FUNCTION a_number() RETURNS integer AS $$
[ERROR] BEGIN
[ERROR] RETURN 1: ERROR: unterminated dollar-quoted string at or near "$$
[ERROR] BEGIN
[ERROR] RETURN 1"
[ERROR] Position: 58
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


-- Start Liquibase Script
--liquibase formatted sql
--changeset rhanbidge :foo splitStatements:false

CREATE OR REPLACE FUNCTION a_number() RETURNS integer AS $$
BEGIN
    RETURN 2;
END
$$ LANGUAGE plpgsql;

--rollback CREATE OR REPLACE FUNCTION a_number() RETURNS integer AS $$
--rollback BEGIN
--rollback     RETURN 1;
--rollback END
--rollback $$ LANGUAGE plpgsql;


Is there a way to add lock from command line?

$
0
0
Hi,

our development lifecycle includes the following steps:

1. create a clean DB
2. copy the schema + subset of data from prod
3. run liquibase update

Step 2 takes something like 2 hours, and the easiest would be to be able to do something like `liquibase lock "DB is being copied from prod"` before it, and `liquibase releaseLocks` after it, so that noone could accidentally start step 3 too early.

Add logLevel=sql

$
0
0
Hi,

I would like to be able to run liquibase commands with --logLevel=sql. I would like it to display every SQL it runs (like in updateSQL)

At the moment I can only achieve this by running liquibase updateSQL update, because --logLevel=info doesn't print enough and debug prints way too much things.

Re : How to set diffChangeLogFile parameter when “mvn liquibase:diff”?

$
0
0
Thanks a lot for your answer.
I removed the diffChangelogFile parameter, then the output show the two db is same. But in fact, the two db is different.
In the same time, it shows correct diff information by using the "liquibase diff" in command line with same configuration.
So I think the issue is not diffChangeLogFile parameter, it is just "mvn liquibase:diff" issue.

mvn liquibase:diff 



 "liquibase diff" in command line



Re : Liquibase Rollback Error for Multi-Line Rollback Script

$
0
0
We figured out a workaround, which is to put the entire create function code on one line, in one "rollback" statement.  Ugly, but it works.  :)

--rollback CREATE OR REPLACE FUNCTION a_number() RETURNS integer AS $$ BEGIN RETURN 1; END  $$ LANGUAGE plpgsql;

Any other suggestions welcome!
Rich

Re : How to set diffChangeLogFile parameter when “mvn liquibase:diff”?

$
0
0
I figure out it. 
 It works after I changed the "liquibase-maven-plugin" from 3.2.1 to 3.0.7. 

Re : Referring to s for

$
0
0
I've generally just left all the references in the changelog under the assumption that processes around files in version control would ensure nothing is changed unexpectedly. That being said, you can never be too careful :)

Is the failure doing an update because of the changelog reference in rollback? Or are you trying to do a rollback?

Nathan

Re : Is there a way to add lock from command line?

$
0
0
There isn't a command line prompt to lock the database, but I could see it being helpful. I created https://liquibase.jira.com/browse/CORE-1980 so the feature doesn't get lost.

For now, you could call out to the java APIS: LockServiceFactory.getInstance().getLockService(database).lock() or something similar.

Or, you could create the databasechangeloglock table yourself and set the LOCKED column to 1. That is all liquibase uses to track the lock.

Nathan

Liquibase upgradation from 2.1 to 3.1

$
0
0
hi we have been trying to upgrade from Liquibase 2.1 to 3.1
 
when our installer runs it gives following error and our databasechanglog script do not execute:
 
SEVERE 7/24/14 2:21 PM:liquibase: Cannot load class 'liquibase/snapshot/ResultSetCache$ResultSetExtractor$1.class' in classloader: java.net.URLClassLoader@f39b3a.  Reason: java.lang.IllegalAccessError: class liquibase.snapshot.ResultSetCache$ResultSetExtractor$1 cannot access its superclass liquibase.executor.jvm.ColumnMapRowMapper
java.lang.IllegalAccessError: class liquibase.snapshot.ResultSetCache$ResultSetExtractor$1 cannot access its superclass liquibase.executor.jvm.ColumnMapRowMapper
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
 at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
 at liquibase.servicelocator.DefaultPackageScanClassResolver.addIfMatching(DefaultPackageScanClassResolver.java:361)
 at liquibase.servicelocator.DefaultPackageScanClassResolver.loadImplementationsInJar(DefaultPackageScanClassResolver.java:329)
 at liquibase.servicelocator.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:207)
 at liquibase.servicelocator.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:113)
 at liquibase.servicelocator.DefaultPackageScanClassResolver.findImplementations(DefaultPackageScanClassResolver.java:83)
 at liquibase.servicelocator.ServiceLocator.findClassesImpl(ServiceLocator.java:170)
 at liquibase.servicelocator.ServiceLocator.findClasses(ServiceLocator.java:145)
 at liquibase.change.ChangeFactory.<init>(ChangeFactory.java:25)
 at liquibase.change.ChangeFactory.getInstance(ChangeFactory.java:43)
 at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(XMLChangeLogSAXHandler.java:330)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:506)
 at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
 at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:775)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:353)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2717)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
 at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
 at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
 at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:98)
 at liquibase.parser.core.xml.XMLChangeLogSAXHandler.handleIncludedChangeLog(XMLChangeLogSAXHandler.java:492)
 at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(XMLChangeLogSAXHandler.java:133)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:506)
 at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
 at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:775)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:353)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2717)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
 at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
 at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
 at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:98)
 at liquibase.Liquibase.update(Liquibase.java:106)
 at liquibase.integration.commandline.Main.doMigration(Main.java:684)
 at liquibase.integration.commandline.Main.main(Main.java:116)
SEVERE 7/24/14 2:21 PM:liquibase: Cannot load class 'liquibase/lockservice/StandardLockService.class' in classloader: java.net.URLClassLoader@f39b3a.  Reason: java.lang.IncompatibleClassChangeError: Implementing class
java.lang.IncompatibleClassChangeError: Implementing class
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
 at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
 at liquibase.servicelocator.DefaultPackageScanClassResolver.addIfMatching(DefaultPackageScanClassResolver.java:361)
 at liquibase.servicelocator.DefaultPackageScanClassResolver.loadImplementationsInJar(DefaultPackageScanClassResolver.java:329)
 at liquibase.servicelocator.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:207)
 at liquibase.servicelocator.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:113)
 at liquibase.servicelocator.DefaultPackageScanClassResolver.findImplementations(DefaultPackageScanClassResolver.java:83)
 at liquibase.servicelocator.ServiceLocator.findClassesImpl(ServiceLocator.java:170)
 at liquibase.servicelocator.ServiceLocator.findClasses(ServiceLocator.java:145)
 at liquibase.change.ChangeFactory.<init>(ChangeFactory.java:25)
 at liquibase.change.ChangeFactory.getInstance(ChangeFactory.java:43)
 at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(XMLChangeLogSAXHandler.java:330)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:506)
 at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
 at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:775)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:353)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2717)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
 at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
 at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
 at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:98)
 at liquibase.parser.core.xml.XMLChangeLogSAXHandler.handleIncludedChangeLog(XMLChangeLogSAXHandler.java:492)
 at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(XMLChangeLogSAXHandler.java:133)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:506)
 at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
 at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:775)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:353)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2717)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
 at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
 at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
 at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:98)
 at liquibase.Liquibase.update(Liquibase.java:106)
 at liquibase.integration.commandline.Main.doMigration(Main.java:684)
 at liquibase.integration.commandline.Main.main(Main.java:116)
SEVERE 7/24/14 2:21 PM:liquibase: Cannot load class 'liquibase/lockservice/LockServiceImpl.class' in classloader: java.net.URLClassLoader@f39b3a.  Reason: java.lang.IncompatibleClassChangeError: Implementing class
java.lang.IncompatibleClassChangeError: Implementing class
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
 at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
 at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
 at liquibase.servicelocator.DefaultPackageScanClassResolver.addIfMatching(DefaultPackageScanClassResolver.java:361)
 at liquibase.servicelocator.DefaultPackageScanClassResolver.loadImplementationsInJar(DefaultPackageScanClassResolver.java:329)
 at liquibase.servicelocator.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:207)
 at liquibase.servicelocator.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:113)
 at liquibase.servicelocator.DefaultPackageScanClassResolver.findImplementations(DefaultPackageScanClassResolver.java:83)
 at liquibase.servicelocator.ServiceLocator.findClassesImpl(ServiceLocator.java:170)
 at liquibase.servicelocator.ServiceLocator.findClasses(ServiceLocator.java:145)
 at liquibase.change.ChangeFactory.<init>(ChangeFactory.java:25)
 at liquibase.change.ChangeFactory.getInstance(ChangeFactory.java:43)
 at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(XMLChangeLogSAXHandler.java:330)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:506)
 at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
 at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:775)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:353)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2717)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
 at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
 at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
 at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:98)
 at liquibase.parser.core.xml.XMLChangeLogSAXHandler.handleIncludedChangeLog(XMLChangeLogSAXHandler.java:492)
 at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(XMLChangeLogSAXHandler.java:133)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:506)
 at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
 at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:775)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:353)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2717)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
 at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
 at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
 at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:98)
 at liquibase.Liquibase.update(Liquibase.java:106)
 at liquibase.integration.commandline.Main.doMigration(Main.java:684)
 at liquibase.integration.commandline.Main.main(Main.java:116)
SEVERE 7/24/14 2:21 PM:liquibase: Cannot load class 'liquibase/lockservice/OfflineLockService.class' in classloader: java.net.URLClassLoader@f39b3a.  Reason: java.lang.IncompatibleClassChangeError: Implementing class
java.lang.IncompatibleClassChangeError: Implementing class
 at java.lang.ClassLoader.defineClass1(Native Method)
 at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
 at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
 at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
 at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
 at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
 at liquibase.servicelocator.DefaultPackageScanClassResolver.addIfMatching(DefaultPackageScanClassResolver.java:361)
 at liquibase.servicelocator.DefaultPackageScanClassResolver.loadImplementationsInJar(DefaultPackageScanClassResolver.java:329)
 at liquibase.servicelocator.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:207)
 at liquibase.servicelocator.DefaultPackageScanClassResolver.find(DefaultPackageScanClassResolver.java:113)
 at liquibase.servicelocator.DefaultPackageScanClassResolver.findImplementations(DefaultPackageScanClassResolver.java:83)
 at liquibase.servicelocator.ServiceLocator.findClassesImpl(ServiceLocator.java:170)
 at liquibase.servicelocator.ServiceLocator.findClasses(ServiceLocator.java:145)
 at liquibase.change.ChangeFactory.<init>(ChangeFactory.java:25)
 at liquibase.change.ChangeFactory.getInstance(ChangeFactory.java:43)
 at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(XMLChangeLogSAXHandler.java:330)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:506)
 at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
 at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:775)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:353)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2717)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
 at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
 at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
 at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:98)
 at liquibase.parser.core.xml.XMLChangeLogSAXHandler.handleIncludedChangeLog(XMLChangeLogSAXHandler.java:492)
 at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(XMLChangeLogSAXHandler.java:133)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:506)
 at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
 at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:775)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:353)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2717)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
 at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
 at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
 at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:98)
 at liquibase.Liquibase.update(Liquibase.java:106)
 at liquibase.integration.commandline.Main.doMigration(Main.java:684)
 at liquibase.integration.commandline.Main.main(Main.java:116)
INFO 7/24/14 2:21 PM:liquibase: Successfully released change log lock
Liquibase Update Failed: liquibase.change.AbstractChange: method <init>()V not found
SEVERE 7/24/14 2:21 PM:liquibase: liquibase.change.AbstractChange: method <init>()V not found
java.lang.NoSuchMethodError: liquibase.change.AbstractChange: method <init>()V not found
 at liquibase.change.core.DropProcedureChange.<init>(DropProcedureChange.java:13)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
 at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
 at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
 at java.lang.Class.newInstance0(Class.java:374)
 at java.lang.Class.newInstance(Class.java:327)
 at liquibase.change.ChangeFactory.register(ChangeFactory.java:55)
 at liquibase.change.ChangeFactory.<init>(ChangeFactory.java:29)
 at liquibase.change.ChangeFactory.getInstance(ChangeFactory.java:43)
 at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(XMLChangeLogSAXHandler.java:330)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:506)
 at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
 at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:775)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:353)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2717)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
 at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
 at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
 at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:98)
 at liquibase.parser.core.xml.XMLChangeLogSAXHandler.handleIncludedChangeLog(XMLChangeLogSAXHandler.java:492)
 at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(XMLChangeLogSAXHandler.java:133)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:506)
 at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:182)
 at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:775)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:353)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2717)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:607)
 at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
 at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:489)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:835)
 at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
 at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
 at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1210)
 at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:568)
 at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:98)
 at liquibase.Liquibase.update(Liquibase.java:106)
 at liquibase.integration.commandline.Main.doMigration(Main.java:684)
 at liquibase.integration.commandline.Main.main(Main.java:116)

For more information, use the --logLevel flag)
 
 
============================
while we executethe liquibase update on command line the databasechangelog scripts excute without any issues.
 
We have tried hard to resolve the issue but could not figure out anything.
 
following are the few lines of code our Wise installer uses to  execute Liquibase update command
 
item: Custom Script Item
  Filename=Display Progress Message.wse
  Variable Name1=_CENTER_
  Variable Value1=AB
  Variable Name2=_WIDTH_
  Variable Value2=320
  Variable Name3=_MSG_TITLE_
  Variable Value3=Upgrading Database
  Variable Name4=HELPFILE
  Variable Value4=C:\Program Files\Wise Installation System\Help\Wise.hlp
  Variable Name5=_OPTION_
  Variable Value5=B
  Variable Name6=_HEIGHT_
  Variable Value6=80
  Variable Name7=_MSG_TEXT_
  Variable Value7=Please Wait...
  Variable Name8=_Y_POS_
  Variable Name9=_X_POS_
end
item: Set Variable
  Variable=PARAM
  Value=%MAINDIR%\bin\liquibase.bat
end
item: If/While Statement
  Value=LEN(SQL_PASSWORD) > 0
  Flags=00001101
end
item: Set Variable
  Variable=PARAM
  Value=%PARAM% --password="%SQL_PASSWORD%"
end
item: End Block
end
item: Set Variable
  Variable=PARAM
  Value=%PARAM% update > "%INSTALLLOGFOLDER%liquibase_bat.log" 2>&1
end
item: Include Script
  Pathname=..\..\..\..\..\includes\wisescripts\RunVBSInCMD.wse
end
remarked item: Execute Program
  Pathname=%MAINDIR%\bin\liquibase.bat
  Command Line=--password="%SQL_PASSWORD%" update > "%INSTALLLOGFOLDER%liquibase_bat.log" 2>&1
  Default Directory=%MAINDIR%\bin
  Flags=00001010
end
item: Set Variable
  Variable=PARAM
  Value=InstallFunctions.vbs CheckLog -l"%INSTALLLOGFOLDER%liquibase_bat.log" -p"Liquibase Database Upgrade" -s"successful" -f"Failed" -r
end
item: Include Script
  Pathname=..\..\..\..\..\includes\wisescripts\RunVBSInCMD.wse
end
item: Custom Script Item
  Filename=Display Progress Message.wse
  Variable Name1=_CENTER_
  Variable Value1=AB
  Variable Name2=_WIDTH_
  Variable Value2=320
  Variable Name3=_MSG_TITLE_
  Variable Value3=Upgrading Database
  Variable Name4=HELPFILE
  Variable Value4=C:\Program Files\Wise Installation System\Help\Wise.hlp
  Variable Name5=_OPTION_
  Variable Value5=A
  Variable Name6=_Y_POS_
  Variable Name7=_MSG_TEXT_
  Variable Value7=Please Wait...
  Variable Name8=_HEIGHT_
  Variable Value8=80
  Variable Name9=_X_POS_
end
 
Following is the liquibase.batch file the installer executes to exute the databse upgrade
 
 

@echo off

Setlocal EnableDelayedExpansion

if "%OS%" == "Windows_NT" setlocal

set CP=%COWWW_HOME%\config\liquibase

for /R %COWWW_HOME%\webapps\cowww5\WEB-INF\lib %%f in (liquibase*.jar) do set CP=!CP!;%%f

for /R %COWWW_HOME%\webapps\cowww5\WEB-INF\lib %%f in (9999*-cowww-update.jar) do set CP=!CP!;%%f

for /R %COWWW_HOME%\webapps\cowww5\WEB-INF\lib %%f in (9999*-cowww.jar) do set CP=!CP!;%%f

for /R %COWWW_HOME%\webapps\cowww5\WEB-INF\lib %%f in (cowww-upgrade*.jar) do set CP=!CP!;%%f

for /R %COWWW_HOME%\webapps\cowww5\WEB-INF\lib %%f in (cowww*.jar) do set CP=!CP!;%%f

for /R %COWWW_HOME%\webapps\cowww5\WEB-INF\lib %%f in (jtds*.jar) do set CP=!CP!;%%f

for /R %COWWW_HOME%\webapps\cowww5\WEB-INF\lib %%f in (commons-logging*.jar) do set CP=!CP!;%%f

for /R %COWWW_HOME%\webapps\cowww5\WEB-INF\lib %%f in (log4j*.jar) do set CP=!CP!;%%f

rem get command line args into a variable

set CMD_LINE_ARGS=%1

if ""%1""=="""" goto done

shift

:setup

if ""%1""=="""" goto done

set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1

shift

goto setup

:done

set JAVA_OPTS=

"%JAVA_HOME%\bin\java" -cp "%CP%" %JAVA_OPTS% liquibase.integration.commandline.Main --defaultsFile=%COWWW_HOME%\config\liquibase\liquibase.properties %CMD_LINE_ARGS%

 

any help in resolving this issue is appreciated!
 

 

 
 
 
 

Re : Add logLevel=sql

$
0
0
That is good idea, I created https://liquibase.jira.com/browse/CORE-1983 to track it. 

I'm currently working on a large refactoring of the SQL processing and execution logic which should include better tracking and logging of SQL executed, but hadn't gotten to the point of determine the best way to expose it back out. The logLevel=SQL approach may work well.

Nathan 

Re : Liquibase Rollback Error for Multi-Line Rollback Script

Re : Liquibase upgradation from 2.1 to 3.1

$
0
0
You are getting an IncompatibleClassChangeError which usually means something needs to be recompiled. Have you tried fully rebuilding your application with the new liquibase 3.1.1 version?  There have also been some classloader fixes in 3.2.x if you wanted to try upgrading to the newest version.

Nathan

Re : How to set diffChangeLogFile parameter when “mvn liquibase:diff”?

$
0
0
Good, always nice when the bug is already fixed :)

Thanks for the update.

Nathan

Re : Liquibase Rollback Error for Multi-Line Rollback Script

Re : Liquibase upgradation from 2.1 to 3.1

$
0
0
Thanks Nathan!
 
Its not that the files are not compiling. our build process does not give any issues. the problem is coming when the installer tries to execute liquibase update. Installer works fine incase of clean install. we are experiencing this incase of upgrade
 
Following is what the installer is trying to do.
 
1. remove existing 2.1 liquibase jar
2. copy new 3.1 liquibase jar at the desired location
3. execute liquibase update
 
Please also note that when we run liquibase update in the command prompt, it works fine.
 
I can try with 3.2.x to see how it works.

Re : precondition problem mysql

$
0
0

Just tried latest version, I am still getting the error.

liquibase: liquibase.statement.core.CreateSequenceStatement is not supported on mysql, but createSequence will still execute

SEVERE: null
liquibase.exception.ValidationFailedException: Validation Failed:
     1 changes have validation failures
          createSequence is not supported on mysql, ./changelog.xml::1::author


Then execution of the xml stops processing. I am using MySQL 5.6.17


Is this caused by the fact that the docs say it is not supported for MySQL?








Extension migration validation issue 3.1.1 -> 3.2.2

$
0
0
Hello,

I'm not quite sure if this is a bug, but at least it is a quite strange issue:

I have written an extension which ran without any problems on Liquibase 3.1.1. I switched to Liquibase 3.2.2 and made some changes to the extension class (added getters for every variable in the Change-class and adding @DatabaseChangeProperty annotations to them).

Now I get checksum errors on already ran changeSets, which is a bit unexpected to me as the changeSet itself did not change.

Is it intended that changes is the Change-Classes result in checksum-validation errors? What are the options to circumvent this?

Re : Liquibase upgradation from 2.1 to 3.1

$
0
0
Hi Nathan
 
I tried upgrading to 3.2.0 but I think there have been major changes to ResourceAccessor. I am facing issues while compiling. I am having issues in following method

getResourcesAsStream. earlier we did not have this method. we were using

 

getResourceAsStream in 3.1. The Java Doc does not seem to help much.
 
Thanks!
Viewing all 2993 articles
Browse latest View live


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