Hibernate3 with Oracle 12c - oracle12c

We are upgrading oracle from 11g to 12c. My application is using hibernate3.jar which is 3.6.8-Final version. It works great with 11g using Oracle10gDialect but when I connect to 12c database I get below error. I also changed classes12.jar to ojdbc7.jar.
Invocation of init method failed; nested exception is
org.hibernate.HibernateException: Unable to determine Dialect to use
[name=Oracle, majorVersion=12]; user must register resolver or
explicitly set 'hibernate.dialect'
I tried downgrading till 3.1.1 and upgrading till 3.6.10-Final. Below 3.6.8 my code wont compile as there is no Oracle10gDialect class before that. And even 3.6.10-final version gives me same above error. I cannot upgrade to Hibernate 4. Any advise will be of great help. thank you.

If I recall correctly, you need to explicitly declare what dialect to use. I think we did a JVM option -Dhibernate.dialect=org.hibernate.dialect.Oracle10gDialect or we added a configuration in domain.xml (if you're using Glassfish) hibernate.dialect=org.hibernate.dialect.Oracle10gDialect. Hope this helps.

Related

DBeaver PostgreSQL Database - SCRAM authentication is not supported by this driver

I am trying to add a PostgreSQL database to DBeaver and am getting the following error when I try to connect to the database. I'm using DBeaver Version 7.2.3.202010191702. And after receiving this message I installed the latest version of the JDK (11.0.9) and pgJDBC (postgresql-42.2.18.jar). I've not had PostgreSQL on this machine yet, so it's a fresh install of the latest version (v13). Any suggestions?
SCRAM authentication is not supported by this driver. You need JDK >= 8 and pgjdbc >= 42.2.0 (not ".jre" vesions)
I had same error and in my situation I had old database drivers. These steps fixed it for me:
Go to Database Driver Manager
Select PostgreSQL (either double click or single select and then "Edit ...")
Click on "Download/Update"
Choose newer version (see bold version text) e.g. 42.2.18 for org.postgresql:postgresql:RELEASE
Press "Download"
Even using all the tips and tricks found on SO I was not able to connect to PGSQL 14 DBs.
I fixed it by using PostgreSQL (Old) driver, and it now works.
The problem I faced was identical, and what resolved it for me was:
Removing the previous PostgreSQL JDBC from the lib folder.
Downloading the latest PostgreSQL JDBC.
Substituting the old JDBC with the new one.
I had a problem similar to yours. This is the way to fix it:
open folder PostgreSQL\14\data, edit postgresql.config fix password_encryption to md5
alter all METHOD value to password in pg_hba.conf
restart postgres server
In my case, JRE version postgres being used in Pom.xml. Update it to the latest version and it should work

WPF using LocalDB doesn't deploy correctly

I've written a program that uses Code First with LocalDB to store data. After using Click Once to deploy, the application doesn't create the LocalDB in production. I've tried all of the Database Initializers, and the app just errors out saying that no tables actually exist.
I'm assuming that there is something simple that I'm missing, but all the articles I find seem to refer to using SQL Express.
Edit
May be related to EF 6.1.1. I've tried downgrading to 5 and it appears to be working, but I'm not done testing yet.
Downgrading EF from 6.1.1 to 5.0.0 has resolved this issue. I can only assume that this is a bug in 6.1.1.

Installing Liferay 6.2 on IBM WebSphere Application Server 8.5 with DB2 10.1

A little help here. I need to install Liferay 6.2 with WebSphere Application Server 8.5 and DB2 10.1, so I followed the documentation guide for that installation type:
https://www.liferay.com/documentation/liferay-portal/6.2/user-guide/-/ai/installing-liferay-on-websphere-8-5-liferay-portal-6-2-user-guide-15-en
But unfortunately, after doing all the steps in the installation guide, I was not still able to make Liferay work on WAS.
Even though I was able to run the liferay app, it still can't make the setup wizard show.
I installed Liferay 6.1 on DB2 9.7, and I got an error related to the tablespaces. Please, check the installation log file to see the DB2 error. But my problem was that it lacks of a 8KB tablespace
You need to create the database with a 8KB pagesize by default
db2 create db liferay pagesize 8 K
I wrote an article about that http://angocatech.blogspot.fr/2012/04/error-al-instalar-liferay-61-con-db2.html (In Spanish, ;) )
If you followed litterally Liferay 6.2 installation guide you must enable wizard setting setup.wizard.enabled=true in portal-ext.properties
Some more error logs would be great for debugging.
However Liferay 6.2 should run in Websphere 8.5.X without any major issues:
http://www.devops-insight.com/2014/08/liferay-62-in-websphere-application.html
As an alternative you could try to setup an jdbc provider and a data source in websphere to connect to your db2 database.
After that you could setup liferay to use the websphere data source by pointing it to the jndi name of the the data source.
portal-ext.properties:
##
## JDBC
##
#
# Set the JNDI name to lookup the JDBC data source. If none is set,
# then the portal will attempt to create the JDBC data source based on the
# properties prefixed with "jdbc.default.".
#
jdbc.default.jndi.name=jdbc/LiferayPool
Comment out the other jdbc configurations.

Oracle 10 g to 11 g migration.. Connection string

I have one query. We are migrating from Oracle 10g to Oracle 11g. In java code we have used jdbc:oracle:oci8:#XYZ for oracle 10g.
But after 11g upgrade, we kept the above code as is. Now i am "NOT" facing any issue while connecting to DB during the QA testing. Its working perfectly fine. We are using JDK 1.5.
My query is do i need to change the string to jdbc:oracle:oci:#XYZ
for 11g ? or existing will work (backward compatibility). Will this cause any problem in future.
Also, what are other things that needs to be taken care from JAVA perspective while migrating to 11g from 10g.
Kindly Advice.
Thanking you.
Gaurav Kalal.
The connect string does not need to change if the service has the same name.

Flyway: Support for older DB's

I'm currently trying to set up some simple migration scripts for our databases. I was checking flyway, which seems to be simple enough for what I need. My problem is that, for Postgres, only version 9 is supported (we're using 8.4). Is it possible to work around/fix this limitation somehow, or should I start looking for other options?
Edit: I forgot to mention that when I run something like mvn flyway:status, I get the error message:
Flyway Error: java.lang.IllegalArgumentException: Unsupported Database: PostgreSQL
I can connect to the DB via psql, and I'm using the correct jdbc driver, so when I saw the requirements page in the documentation, I assumed that the version was explicitly checked by flyway.
What limitations do you encounter? Flyway is only tested on PostgreSQL version 9.0, that's it. It's not said that older PostgreSQL versions don't work. Just give it a try.
You could also setup a PostgreSQL 9.0 installation on your testbox to see if there is any difference.