I get this error when I try with both command line and Maven invocations:
Diff Results:
Unexpected error running Liquibase: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: Unknown constraint type: 3
This is using a SQL Server DB. Created both the reference and target using liquibase:update.
Properties:
driver=com.microsoft.sqlserver.jdbc.SQLServerDriver
url=jdbc:sqlserver://localhost:11433;databaseName=DB
username=user
password=pass
referenceUrl=jdbc:sqlserver://localhost:11433;databaseName=DBRef
referenceUsername=user
referencePassword=pass
We use a combination of Liquibase/MS-SQL database and had a similar issue when we recently upgraded our driver to Microsoft's latest release (6.4.0.jre8).
As #SteveDonie says in his comment, the issue is with "oldish" version of liquibase and "newish" version of MS-SQL driver. Details behind the reason for this problem can be found in this liquibase JIRA case:
https://liquibase.jira.com/browse/CORE-3141
To solve this, we tried upgrading the liquibase version to the latest as on date (3.6.1) and it works!! You may also try to downgrade the version of your MS-SQL driver, but I would say that isn't a good option - it's better to upgrade than downgrade unless you've some pressing needs to that.
Related
env:
intel chip macbook air 2017 with macOS Monterey 12.5
flink 1.15
mysql 5.7
I'm trying to set up a demo to sync one table to another table in mysql. However, i encountered some issue when executing sql statement in FLINK SQL CLIENT.
Let's say there's a table named product in mysql. Then I start flink and sql client, "CREATE TABLE" and execute "select * from products". Terminal returned ERROR message which says [ERROR] Could not execute SQL statement. Reason:
java.lang.ClassNotFoundException: io.debezium.relational.history.AbstractSchemaHistory
I downloaded debezium-core jar of most recent version and put it under lib path. Then it raised another error
[ERROR] Could not execute SQL statement. Reason:
java.lang.ClassNotFoundException: io.debezium.relational.history.DatabaseHistory
I checked version 2.0.0 alpha and 2.0.0 beta, DatabaseHistory only appear in version alpha and AbstractSchemaHistory only appear in version beta.
If I put those two jar files into the lib path. I get [ERROR] Could not execute SQL statement. Reason:
java.lang.NoSuchFieldError: TOPIC_PREFIX
enter image description here
Is there anyone who could give me some advice, thanks in advance.
I m pretty new to liquibase. But here is what I m doing:
liquibase --username=XXX --password='XXX' --driver=net.snowflake.client.jdbc.SnowflakeDriver --url='jdbc:snowflake://lala.east-us-2lala.azure.snowflakecomputing.com?db=dbname&schema=schemaname&warehouse=warehousename' --snapshotFormat=json snapshot --output-file=snapshot.json
And here are the drivers and their versions:
Liquibase Version: 4.4.3
Liquibase Community 4.4.3 by Datical
liquibase-snowflake-4.4.3.jar
snowflake-jdbc-3.13.7.jar
And after running for a while it just keeps on failing with:
Unexpected error running Liquibase: Expected single row from liquibase.statement.core.GetViewDefinitionStatement#e04ccf8 but got 0
Can anyone help with some guidance regarding the probable causes? If i run it with debug level log it does show that its fetching few tables and procedures but fails somewhere in between.
I am using sts and make project:
and refresh all.
error message:
Could not resolve: com.microsoft.sqlserver:sqljdbc4:4.0
how to fix it?
Try changing the line to:
compile('com.microsoft.sqlserver:mssql-jdbc')
You probably found a reference from somebody's code where they are using a local repository. As of November 11, 2016, mssql-jdbc is in Maven central. Much nicer to work with. It would appear that the 4.x versions are no longer officially available. All reference links that I have are redirecting to their new JDBC homepage.
Version 4 is not in Maven central, so you'd have to obtain it and use it locally. Here are the SQL Server JDBC drivers in Maven Repo.
My application running with this below configurations
TOMCAT - 6.0.18
Database - Oracle 11g enterprise Edition(11.2.0.2.0)
Java Version - jdk 1.6
JDBC Driver - OJDBC14.jar(Not sure about exact version)
I am getting Oracle-Character-set-178 error, when i am passing Oracle Array type value into Stored procedure from java. Find below error message.
java.sql.SQLException: Non supported character set: oracle-character-set-178
Below is the code i am executing
String query = "{call DBA.SP_XXXX(?,?,?)}";
con = this.getConnection();
con=((DelegatingConnection) con).getInnermostDelegate();
oracle.sql.ArrayDescriptor descrip =oracle.sql.ArrayDescriptor.createDescriptor("DBA.ARRAY_TABLE", con);
oracle.sql.ARRAY oracArray = new oracle.sql.ARRAY(descrip, con, arrayValue);
cs = con.prepareCall(query);
cs.setString(1,ID);
cs.registerOutParameter(2, java.sql.Types.VARCHAR);
cs.setObject(3,oracArray);
cs.execute();
Below are the characterset value my oracle returns
PARAMETER VALUE
NLS_CHARACTERSET WE8MSWIN1252
NLS_NCHAR_CHARACTERSET AL16UTF16
i am not sure with exact version of OJDBC14.jar is running in my current setup but when i tried replacing with latest OJDBC14 and getting below error
java.lang.NoSuchMethodError: oracle.i18n.text.converter.CharacterConverterOGS.getInstance(I)Loracle/sql/converter/CharacterConverters;
Please suggest me what is the issue and solution
Resolved my issue with following solution: replaced ojdbc14.jar with exact versions of ojdbc6.jar & orai18n.jar which supports my oracle 11.2.0.2.
add this dependency:
<dependency>
<groupId>com.oracle.ojdbc</groupId>
<artifactId>orai18n</artifactId>
<version>19.3.0.0</version>
</dependency>
Had the same error!
I was using spring, so if you did as well, it will guide you inside the error with something like add the orai18n.jar to classpath and thats all you should do, but if you did and error was insisting to show up, mkdir a lib dir to your root and fill it with oracle jars of your chosen version and do use the maven plugin to include jars in your compile.
any jar should be provided by compile scope so you dont get production errors.
When installing DNN 04.09.02 upgrade (from DNN 4.8.4) I receive System.IndexOutOfRangeException: PermanentRedirect error and cannot install the upgrade. How do I get around this so I can install the upgrade?
This thread might help you:
It looks like you have to update it manually... steps are described there.
Also check this thread, might be due to AD if AD is used.
I've re-posted the following from the thread provided by kitsune. Source
First try the following in your browser. Replace "www.yourdomain.com" with your domain:
http://www.yourdomain.com/install/install.aspx?mode=install
If that doesn't work (which it didn't for me) then try the following steps (copied from Chris on that thread).
To manually run the SQL portion of the upgrade you'll need to run each upgrade script between your version and 4.9.2. I upgraded from 4.9.0 to 4.9.2 so I performed the following:
On the web server open the directory: \Providers\DataProviders\SqlDataProvider
Determine which files need to be run. Basically, all of the versions after your old version. In my case I needed to run the files 04.09.00.SqlDataProvider, 04.09.01.SqlDataProvider and 04.09.02.SqlDataProvider.
Open the SQL files in a text editor and replace "{databaseOwner}" (usually with "dbo.") and "{objectQualifier}" (usually with "", but sometimes "DNN4" or some other object prefix)
Run those SQL files in version order using SQL Management Studio.
Assuming those scripts ran without an error then the site should be ready to use.