Hello,
I wrote my own extension. In eclipse it all runs well. Also deploying it together with the whole liquibase core works perfect.
Trying to make a jar separately and putting this jar to the lib-path of my liquibase installation lead to an “Unkown Liquibase extension”-exception.
I also tried it with the “hello world” extension provided by the “Guide for writing extension with liquibase”, with the same behavior.
What am I doing wrong?
Thanks in advance for answering
Regards,
Holger
I’m not sure where the exception is coming from. Can you run with --logLevel=debug and post the output?
Nathan
Rather than running nathan
Hello,
here is the output, when running liquibase:
-----------------------------------------------------------------
D:\tmp\liqui_test>java -jar D:\tmp\liquibase-3.1.1-bin\liquibase.jar --changeLogFile=EV_Test.xml update
DEBUG 03.02.14 08:37:liquibase: Connected to sa@jdbc:jtds:sqlserver://itdeblgm30728:1433;databaseName=v21p1_lb
DEBUG 03.02.14 08:37:liquibase: Setting auto commit to false from true
DEBUG 03.02.14 08:37:liquibase: Executing QUERY database command: select schema_name()
DEBUG 03.02.14 08:37:liquibase: Executing QUERY database command: SELECT CONVERT(varchar(100), SERVERPROPERTY(‘COLLATION’))
DEBUG 03.02.14 08:37:liquibase: Executing QUERY database command: select count(*) from [dbo].[DATABASECHANGELOGLOCK]
DEBUG 03.02.14 08:37:liquibase: Executing QUERY database command: SELECT [LOCKED] FROM [dbo].[DATABASECHANGELOGLOCK] WHERE [ID]=1
DEBUG 03.02.14 08:37:liquibase: Lock Database
DEBUG 03.02.14 08:37:liquibase: Executing UPDATE database command: UPDATE [dbo].[DATABASECHANGELOGLOCK] SET [LOCKED] = 1, [LOCKEDBY] = ‘ITDEBLGM30728
(172.29.128.38)’, [LOCKGRANTED] = ‘2014-02-03T08:37:49.797’ WHERE [ID] = 1 AND [LOCKED] = 0
INFO 03.02.14 08:37:liquibase: Successfully acquired change log lock
SEVERE 03.02.14 08:37:liquibase: Error thrown as a SAXException: Unknown Liquibase extension: helloWorld. Are you missing a jar from your classpath?
org.xml.sax.SAXException: Unknown Liquibase extension: helloWorld. Are you missing a jar from your classpath?
at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(XMLChangeLogSAXHandler.java:393)
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.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:101)
at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:216)
at liquibase.Liquibase.update(Liquibase.java:194)
at liquibase.Liquibase.update(Liquibase.java:181)
at liquibase.integration.commandline.Main.doMigration(Main.java:880)
at liquibase.integration.commandline.Main.main(Main.java:133)
org.xml.sax.SAXException: Unknown Liquibase extension: helloWorld. Are you missing a jar from your classpath?
at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(XMLChangeLogSAXHandler.java:393)
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.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:101)
at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:216)
at liquibase.Liquibase.update(Liquibase.java:194)
at liquibase.Liquibase.update(Liquibase.java:181)
at liquibase.integration.commandline.Main.doMigration(Main.java:880)
at liquibase.integration.commandline.Main.main(Main.java:133)
DEBUG 03.02.14 08:37:liquibase: Release Database Lock
DEBUG 03.02.14 08:37:liquibase: Executing UPDATE database command: UPDATE [dbo].[DATABASECHANGELOGLOCK] SET [LOCKED] = 0, [LOCKEDBY] = NULL, [LOCKGRAN
TED] = NULL WHERE [ID] = 1
INFO 03.02.14 08:37:liquibase: Successfully released change log lock
Liquibase update Failed: Invalid Migration File: Unknown Liquibase extension: helloWorld. Are you missing a jar from your classpath?
SEVERE 03.02.14 08:37:liquibase: Invalid Migration File: Unknown Liquibase extension: helloWorld. Are you missing a jar from your classpath?
liquibase.exception.ChangeLogParseException: Invalid Migration File: Unknown Liquibase extension: helloWorld. Are you missing a jar from your classpa
th?
at liquibase.parser.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:135)
at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:216)
at liquibase.Liquibase.update(Liquibase.java:194)
at liquibase.Liquibase.update(Liquibase.java:181)
at liquibase.integration.commandline.Main.doMigration(Main.java:880)
at liquibase.integration.commandline.Main.main(Main.java:133)
Caused by: org.xml.sax.SAXException: Unknown Liquibase extension: helloWorld. Are you missing a jar from your classpath?
org.xml.sax.SAXException: Unknown Liquibase extension: helloWorld. Are you missing a jar from your classpath?
at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(XMLChangeLogSAXHandler.java:508)
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.core.xml.XMLChangeLogSAXParser.parse(XMLChangeLogSAXParser.java:101)
… 5 more
Caused by: org.xml.sax.SAXException: Unknown Liquibase extension: helloWorld. Are you missing a jar from your classpath?
at liquibase.parser.core.xml.XMLChangeLogSAXHandler.startElement(XMLChangeLogSAXHandler.java:393)
… 19 more
---------------------------------------------------------
maybe also of interest the property-file:
---------------------------------------------------------
#liquibase.properties
driver: net.sourceforge.jtds.jdbc.Driver
classpath: D:/tmp/liquibase-3.1.1-bin/lib/jtds-1.3.1.jar;D:/tmp/liquibase-3.1.1-bin/lib/adbFile.jar;D:/tmp/liqui_test
url: jdbc:jtds:sqlserver://itdeblgm30728:1433;databaseName=v21p1_lb
username: sa
password: xxxxx
logLevel: debug
---------------------------------------------------------
Hello,
sorry for my late response. But it’s still not possible for me to make it work. I attached the example that I’m not able to make it work:
- liqui_test.zip: The refactoring file and the properties file I used
- located original in d:\tmp
- ext_test.jar: The jar-file I added to the 3.1.1-liquibase installation lib-path
- located original in d:\tmp\liquibase-3.1.1-bin\lib
- LiquibaseTestExtenstion.zip: Export of the eclipse project including the test extension.
I started all with the following command line expression:
D:\tmp\liqui_test>D:\tmp\liquibase-3.1.1-bin\liquibase.bat --changeLogFile=.\EV_Test.xml update
and got still the uknown Liquibase extension exception.
So adding the extension to the classpath (see liquibase.properties) and starting it with the batchscript couldn’t solve the problem.
Maybe you have any idea what have to be changed.
Thanks in advance
Regards,
Holger