Opened 11 years ago

Closed 3 years ago

Last modified 3 years ago

#649 closed defect (fixed)

KingOracle Provider doesn’t work in Linux

Reported by: rafael Owned by: haris
Priority: blocker Milestone: 3.5.0
Component: FDO API Version: 3.5.0
Severity: 3 Keywords: Oracle FDO King Linux
Cc: External ID:

Description

The FDO KingOracle? Provider in MapGuide? (Linux 32 bits) crash when you try to connect in Oracle. In MapGuide? Windows 32 bits is ok.

Sometimes this messages was showed in MapGuide? logfile

Error: An exception occurred in FDO component.

CLNT_8_UNABLE_TO_LOAD_LIBRARY

StackTrace?:

Change History (3)

comment:1 Changed 11 years ago by gregboone

Owner: changed from gregboone to haris

comment:2 Changed 3 years ago by jng

Resolution: fixed
Status: newclosed

In 7812:

Merged revision(s) 7766-7811 from sandbox/kgoralinux:

Get King Oracle provider working on Linux. The root cause of why this provider did not work on Linux in the past is due to:

a) wchar_t strings being garbage on Linux due to difference in platform size. Where wchar_t* strings are passed to OCI on Windows, they are now #ifdef'd (D_OCI_WIDE_STRINGS) on Linux to pass char* strings instead
b) Possibly the use of OCINlsEnvCreate and OCILogon

  • I could not find a suitable OCI reference code on Linux that demonstrated the use of these 2 APIs.
  • So taking a page out of known OCI reference code (the OGR OCI driver), the provider uses OCIEnvCreate and OCIServerAttach on Linux for OCI setup and connection.

This is backed by a new reproducible test suite that runs a basic set of provider test against an Oracle XE 11g instance. An 11g docker environment is provided to easily spin up such an environment.

Fixes #649, #562

comment:3 Changed 3 years ago by jng

In 7814:

Merged revision(s) 7811-7813 from trunk:
Merged revision(s) 7790-7810 from sandbox/linux64shp:

Fix up the SHP spatial index for 64-bit Linux. This makes the provider finally functional for FDO client applications like MapGuide? on 64-bit Linux.

Fixes #963
........
Merged revision(s) 7766-7811 from sandbox/kgoralinux:

Get King Oracle provider working on Linux. The root cause of why this provider did not work on Linux in the past is due to:

a) wchar_t strings being garbage on Linux due to difference in platform size. Where wchar_t* strings are passed to OCI on Windows, they are now #ifdef'd (D_OCI_WIDE_STRINGS) on Linux to pass char* strings instead
b) Possibly the use of OCINlsEnvCreate and OCILogon

  • I could not find a suitable OCI reference code on Linux that demonstrated the use of these 2 APIs.
  • So taking a page out of known OCI reference code (the OGR OCI driver), the provider uses OCIEnvCreate and OCIServerAttach on Linux for OCI setup and connection.

This is backed by a new reproducible test suite that runs a basic set of provider test against an Oracle XE 11g instance. An 11g docker environment is provided to easily spin up such an environment.

Fixes #649, #562
........
Need to add TestCommon? and ExpressionEngine? projects to KingOracle_vs15.sln to ensure KgOraUnitTest? will build in the correct configuration
........

Note: See TracTickets for help on using tickets.