Setting journal external ODBC fails with 'Specified cast is not valid'

Hello,

When trying to setup an external ODBC for the Journal, the following error is shown : ‘Specified cast is not valid’
In the database (SQL Server 2019) 2 tables are created, [dbo].[em_server_journal_events] & [dbo].[em_server_journal_metadata]) but these stay empty.
Also in the journal settings, the connection is reverted back to Embedded (SQLite).

From the server log :

19/05/2022 08:48:10 133809 ERROR Error while handling request POST /api/v1/journal/configuration
19/05/2022 08:48:10 133810 ERROR Specified cast is not valid.
19/05/2022 08:48:10 133811 ERROR Error while handling request POST /api/v1/journal/configuration
19/05/2022 08:48:10 133812 ERROR Specified cast is not valid.
19/05/2022 08:48:10 133813 ERROR exception type: InvalidCastException
19/05/2022 08:48:10 133814 ERROR exception source: Morph.Server.FSLogic
19/05/2022 08:48:10 133815 ERROR exception stack trace: at <StartupCode$Morph-Server-FSLogic>.$JournallerRepository.Morph-Server-FSLogic-Interfaces-IJournallerEventsRepository-GetEventByIdAsync@187-7.Invoke(Exception _arg5)
19/05/2022 08:48:10 133816 ERROR at Ply.TplPrimitives.tryWith[u](FSharpFunc2 continuation, FSharpFunc2 catch)
19/05/2022 08:48:10 133817 ERROR at <StartupCode$Morph-Server-FSLogic>.$JournallerRepository.continuation@1-6[a](JournallerRepository this, IJournallerEventsMapper1 mapper, Int64 eventId, CancellationToken ct, DbDataReader dataReader, FSharpRef1 res, Boolean _arg4)
19/05/2022 08:48:10 133818 ERROR at <StartupCode$Morph-Server-FSLogic>.$JournallerRepository.Morph-Server-FSLogic-Interfaces-IJournallerEventsRepository-GetEventByIdAsync@184-2.Invoke(Unit unitVar)
19/05/2022 08:48:10 133819 ERROR at Ply.TplPrimitives.ContinuationStateMachine`1.System-Runtime-CompilerServices-IAsyncStateMachine-MoveNext()

Do you have any idea what could cause this error ?

Thanks,
Tom

Hello Tom and welcome to the Community!

What is your Server version?

Thank you !

The server version is 5.1.2.1

Hello Tom,

What ODBC driver and what driver version are you trying to use?

Hello Andrew,

I checked the DSN that was created and it is using the standard SQL Server ODBC driver that is shipped with the Windows.

I’ll install SQL Server ODBC Driver 18 and test with this ODBC again.

Thanks,
Tom

I installed the latest SQL Server ODBC Driver and recreated the DNS.
With this new version of the ODBC Driver, the connection to the database is OK.

However, I get a new error telling me that the ExternalServerJournal is not licensed.
It seems that this option is only available with an Enterprise Server license and not a Team Server license ?

Yes, the external server journal is available only in EasyMorph Server Enterprise.

Ok, thank you for the confirmation.
And also thank you for the fast replies !

You’re welcome!