Обсуждение: Migrating from Sql Server to PostgreSQL - postgres drivers

Поиск
Список
Период
Сортировка

Migrating from Sql Server to PostgreSQL - postgres drivers

От
Дата:

Hi,

 

Apologies if this question has been answered but I have yet to find a solution from searches online.

 

I have installed the latest PostgreSQL 10.1 and using the EDB Migration Toolkit (trying)

 

I am experiencing the same issues as per link: http://helgasoft.com/tools/migration.html

 

However for some reason I can’t get passed the

 

Connecting with target Postgres database server... 
Exception in thread "main" java.lang.NoClassDefFoundError: org/postgresql/Driver 
com.edb.dbhandler.postgresql.PGConnection.< init>(PGConnection.java:32

 

I have placed the postgresql-42.1.1.jar in C:\Program files (x86)\sdb\mtk\lib

 

However I still geting the same error. I have installed Java 8.151 and my edbmtk-51.config does have the correct path defined.

 

Can anyone help in suggesting where to correctly place the postgresql-42.1.1.jar or have a solution to the error message:

 

Connecting with target Postgres database server... 
Exception in thread "main" java.lang.NoClassDefFoundError: org/postgresql/Driver 
com.edb.dbhandler.postgresql.PGConnection.< init>(PGConnection.java:32

 

Am I missing some other configuration or binaries?

 

Kind regards

 

Guido Le Lorrain

 




This e-mail is for the sole use of the intended recipient and contains information that may be privileged and/or confidential. If you are not an intended recipient, please notify the sender by return e-mail and delete this e-mail and any attachments. Certain required legal entity disclosures can be accessed on our website.

Re: Migrating from Sql Server to PostgreSQL - postgres drivers

От
Zahid Iqbal
Дата:
You need to place the driver under JDK/JRE-HOME/ext/lib path (the MTK 51 contains classpath reference for an old version of PG JDBC driver) so that JVM picks the driver in default classpath (alternatively you can place PG JDBC driver ver 9.4-1208 under MTK lib path).

Thanks

On Wed, 13 Dec 2017 at 10:38 PM, <guido.lelorrain@thomsonreuters.com> wrote:

Hi,

 

Apologies if this question has been answered but I have yet to find a solution from searches online.

 

I have installed the latest PostgreSQL 10.1 and using the EDB Migration Toolkit (trying)

 

I am experiencing the same issues as per link: http://helgasoft.com/tools/migration.html

 

However for some reason I can’t get passed the

 

Connecting with target Postgres database server... 
Exception in thread "main" java.lang.NoClassDefFoundError: org/postgresql/Driver 
com.edb.dbhandler.postgresql.PGConnection.< init>(PGConnection.java:32

 

I have placed the postgresql-42.1.1.jar in C:\Program files (x86)\sdb\mtk\lib

 

However I still geting the same error. I have installed Java 8.151 and my edbmtk-51.config does have the correct path defined.

 

Can anyone help in suggesting where to correctly place the postgresql-42.1.1.jar or have a solution to the error message:

 

Connecting with target Postgres database server... 
Exception in thread "main" java.lang.NoClassDefFoundError: org/postgresql/Driver 
com.edb.dbhandler.postgresql.PGConnection.< init>(PGConnection.java:32

 

Am I missing some other configuration or binaries?

 

Kind regards

 

Guido Le Lorrain

 




This e-mail is for the sole use of the intended recipient and contains information that may be privileged and/or confidential. If you are not an intended recipient, please notify the sender by return e-mail and delete this e-mail and any attachments. Certain required legal entity disclosures can be accessed on our website.
--
Sent from Gmail Mobile

Re: Migrating from Sql Server to PostgreSQL - postgres drivers

От
Mark Rotteveel
Дата:
On 2017-12-13 19:03, Zahid Iqbal wrote:
> You need to place the driver under JDK/JRE-HOME/ext/lib path (the MTK
> 51 contains classpath reference for an old version of PG JDBC driver)
> so that JVM picks the driver in default classpath (alternatively you
> can place PG JDBC driver ver 9.4-1208 under MTK lib path).

JDBC drivers don't belong in lib/ext, and the lib/ext extension 
mechanism has been deprecated in Java 8 and removed in Java 9.

Mark


Re: Migrating from Sql Server to PostgreSQL - postgres drivers

От
Mark Rotteveel
Дата:
On 2017-12-13 17:54, guido.lelorrain@thomsonreuters.com wrote:
> Hi,
> 
> Apologies if this question has been answered but I have yet to find a
> solution from searches online.
> 
> I have installed the latest PostgreSQL 10.1 and using the EDB
> Migration Toolkit (trying)
> 
> I am experiencing the same issues as per link:
> http://helgasoft.com/tools/migration.html [1]
> 
> However for some reason I can't get passed the
> 
> _Connecting with target Postgres database server... _
> _Exception in thread "main" java.lang.NoClassDefFoundError:
> org/postgresql/Driver _
> _com.edb.dbhandler.postgresql.PGConnection.<
> init>(PGConnection.java:32_
> 
> _ _
> 
> I have placed the postgresql-42.1.1.jar in C:\Program files
> (x86)\sdb\mtk\lib
> 
> However I still geting the same error. I have installed Java 8.151 and
> my edbmtk-51.config does have the correct path defined.
> 
> Can anyone help in suggesting where to correctly place the
> postgresql-42.1.1.jar or have a solution to the error message:
> 
> _Connecting with target Postgres database server... _
> _Exception in thread "main" java.lang.NoClassDefFoundError:
> org/postgresql/Driver _
> _com.edb.dbhandler.postgresql.PGConnection.<
> init>(PGConnection.java:32_
> 
> Am I missing some other configuration or binaries?

Please post the full exception stacktrace. Given the error is 
NoClassDefFoundError, and not ClassNotFoundException, the driver is 
probably present, but could not be loaded. This could happen if you are 
using a driver for the wrong Java version, eg using the Java 8 version 
of the driver, while the application is running under Java 7 (although 
that would mean you have missed or ignored a 
UnsupportedClassVersionError).

Mark


Re: Migrating from Sql Server to PostgreSQL - postgres drivers

От
"Igal @ Lucee.org"
Дата:
On 12/13/2017 11:23 AM, Mark Rotteveel wrote:
On 2017-12-13 19:03, Zahid Iqbal wrote:
You need to place the driver under JDK/JRE-HOME/ext/lib path (the MTK
51 contains classpath reference for an old version of PG JDBC driver)
so that JVM picks the driver in default classpath (alternatively you
can place PG JDBC driver ver 9.4-1208 under MTK lib path).

JDBC drivers don't belong in lib/ext, and the lib/ext extension mechanism has been deprecated in Java 8 and removed in Java 9.

You can put the JAR file of the driver anywhere on the classpath.  I'm not familiar with the MTK, but if MTK has a lib directory then that sounds like the right place to go.

Also, you can probably use a newer driver from https://jdbc.postgresql.org/download.html -- there have been quite a few changes since the aforementioned version.

Igal Sapir
Lucee Core Developer
Lucee.org

RE: Migrating from Sql Server to PostgreSQL - postgres drivers

От
Дата:

Hi Zahid,

 

Thank you for the extra information. Just to clarify I placed “postgresql-42.1.1.jar” in location “C:\Program Files (x86)\Java\jre1.8.0_151\lib\ext” this solved the problem.

 

Many thanks

 

Guido

 

From: Zahid Iqbal [mailto:zahid.iqbal@enterprisedb.com]
Sent: 13 December 2017 18:04
To: Le Lorrain, Guido (TR Technology & Ops)
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Migrating from Sql Server to PostgreSQL - postgres drivers

 

You need to place the driver under JDK/JRE-HOME/ext/lib path (the MTK 51 contains classpath reference for an old version of PG JDBC driver) so that JVM picks the driver in default classpath (alternatively you can place PG JDBC driver ver 9.4-1208 under MTK lib path).

 

Thanks

 

On Wed, 13 Dec 2017 at 10:38 PM, <guido.lelorrain@thomsonreuters.com> wrote:

Hi,

 

Apologies if this question has been answered but I have yet to find a solution from searches online.

 

I have installed the latest PostgreSQL 10.1 and using the EDB Migration Toolkit (trying)

 

I am experiencing the same issues as per link: http://helgasoft.com/tools/migration.html

 

However for some reason I can’t get passed the

 

Connecting with target Postgres database server... 
Exception in thread "main" java.lang.NoClassDefFoundError: org/postgresql/Driver 
com.edb.dbhandler.postgresql.PGConnection.< init>(PGConnection.java:32

 

I have placed the postgresql-42.1.1.jar in C:\Program files (x86)\sdb\mtk\lib

 

However I still geting the same error. I have installed Java 8.151 and my edbmtk-51.config does have the correct path defined.

 

Can anyone help in suggesting where to correctly place the postgresql-42.1.1.jar or have a solution to the error message:

 

Connecting with target Postgres database server... 
Exception in thread "main" java.lang.NoClassDefFoundError: org/postgresql/Driver 
com.edb.dbhandler.postgresql.PGConnection.< init>(PGConnection.java:32

 

Am I missing some other configuration or binaries?

 

Kind regards

 

Guido Le Lorrain

 

 



This e-mail is for the sole use of the intended recipient and contains information that may be privileged and/or confidential. If you are not an intended recipient, please notify the sender by return e-mail and delete this e-mail and any attachments. Certain required legal entity disclosures can be accessed on our website.

--

Sent from Gmail Mobile