Compatibility between MongoDB server and Mongo C++ Driver - c++

I'm new to the MongoDB. My virtual machine runs Ubuntu 14.04.5 with mongod, which is standard for this OS:
hekto#ubuntu:~$ mongod --version
db version v2.4.9
Tue Jun 5 18:00:23.923 git version: nogitversion
I've built a Mongo C++ Driver Ver 3.2.0 from sources and tried to write some tests. All of them output an exception below:
Server at localhost:27017 reports wire version 0, but this version of libmongoc requires at least 3 (MongoDB 3.0): generic server error
It looks like the C++ client and the server are incompatible.
Are there any tricks, which can be used with the Mongo C++ Driver to force it to work with older Mongo servers?
I can't convert the database itself to any new format for now, but also wouldn't like to learn the obsolete driver API.

MongoDB 2.4.9 has been end-of-life for quite some time: https://www.mongodb.com/support-policy, and most drivers have dropped support for talking to it.
If you are just starting with MongoDB, you should start with the newest available stable version, which is currently 3.6.5.
You can obtain packages for Ubuntu 14.04 according to the instructions here https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

Related

Qt missing OpenSSL 3.x support on Ubuntu 22.04

I tried to build my application which uses QNetworkManager to communicate to a server. I did not have any problems on older Linux versions but with the newest Ubuntu 22.04 the network reply fails and QtCreator shows this output:
Incompatible version of OpenSSL (built with OpenSSL 1.x, runtime version is >= 3.x)
The backend "cert-only" does not support QSslKey
Active TLS backend does not support key creation
The backend "cert-only" does not support QSslKey
Active TLS backend does not support key creation
The backend "cert-only" does not support QSslKey
Active TLS backend does not support key creation
The backend "cert-only" does not support QSslKey
Active TLS backend does not support key creation
The backend "cert-only" does not support QSslKey
Active TLS backend does not support key creation
The backend "cert-only" does not support QSslKey
Active TLS backend does not support key creation
The backend "cert-only" does not support QSslSocket
The backend named "cert-only" does not support TLS
QSslSocket::connectToHostEncrypted: TLS initialization failed
QSslSocket::connectToHostEncrypted: TLS initialization failed
When I build my application on older Ubuntu (20.04) and deploy it as AppImage, and then run it on Ubuntu 22.04, the network communication fails too with the same error.
How can this be solved? I need to be able to create AppImage on older Ubuntu and then run it "everywhere"...
UPDATE: I managed to build and deploy deploy AppImage of my application on Ubuntu 20.04 with correct OpenSSL library and now it runs also on Ubuntu 22.04. The trick is to manually copy libssl.so.1.1 to the AppImage lib folder before calling linuxdeployqt on it.
But I still have not found how to build and run my application with QtCreator on Ubuntu 22.04. Fortunately this is not of high importance to me because I build it for deployment on Ubuntu 20.04.
I was able to solve this issue on Ubuntu 22.04 and Qt 6.3.0 following this workaround:
https://linuxpip.org/install-openssl-linux/
You have to build OpenSSL 1.1 from source code and tell the system to use the newly installed OpenSSL.
Other answers work, but rather than manually installing or copying file around, I would suggest to use a .deb.
libssl1.1 package can be downloaded from https://packages.ubuntu.com/focal-updates/libssl1.1
Then you can simply install it with sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb.
In this way, it will appear in your installed package list and you will be able to cleanly remove it when you do not need it anymore.

Django-REST: The database driver doesn't support modern datatime types

I'm trying to make a rest API with Django Rest on Debian,
but when I run the command "python3 manage.py migrate" throws this exception
Error: The database driver doesn't support modern datatime types.")
django.core.exceptions.ImproperlyConfigured: The database driver doesn't support modern datatime types.
Already installed:
msodbcsql17 is already the newest version (17.3.1.1-1).
freetds-bin is already the newest version (0.91-6.1+b4).
freetds-dev is already the newest version (0.91-6.1+b4).
tdsodbc is already the newest version (0.91-6.1+b4).
unixodbc-dev is already the newest version (2.3.7).
unixodbc is already the newest version (2.3.7).
file:odbc.ini
[MYSERVER]
Description = Django SQLServer
Driver = FreeTDS
Trace = Yes
TraceFile = /tmp/sql.log
Database = DjangoDB
Servername = MYSERVER
UserName = sa
Password = *******
Port = 1433
Protocol = 8.0
file:odbcinst.ini
[FreeTDS]
Description=FreeTDS Driver for Linux & MSSQL on Win32
Driver=/usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Setup =/usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
UsageCount=1
[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.3.so.1.1
UsageCount=1
file:freetds.conf
[global]
# TDS protocol version
tds version = 8.0
[MYSERVER]
host = localhost
port = 1433
tds version = 8.0
The problem is with your TDS Version. Version 8.0 isn't actually a valid version, despite a lot of bad advice existing across the Internet. There are a lot of reasons for this, but Version 8.0 actually maps to TDS Version 7.1, which was before Microsoft adding new date and time field types in SQL Server 2008. See the footnote here:
https://www.freetds.org/userguide/tdshistory.htm
You're running a pretty old version of FreeTDS (0.91). It only supports TDS Version 7.2, which was introduced in SQL Server 2005. I would recommend upgrading your version of FreeTDS, and using TDS Version 7.3. Details here:
https://www.freetds.org/userguide/choosingtdsprotocol.htm
The other option is to use the MS ODBC driver you seem to have installed already, which is much more up-to-date than the version of FreeTDS you have.
Good luck!

Connecting django with oracle database

Im a beginner to django.
Someone help to connect Oracle 11g db with django 2.0 in windows. What is the requirements and how to connect and what are the changes to be done.
According to the manual,
Django supports Oracle Database Server versions 12.1 and higher. Version 5.2 or higher of the cx_Oracle Python driver is required.
You may run in to trouble with version 11g -- but if you want to give it a shot, that link has the instructions.

Multiple Informatica Powercenter Clients on same machine?

I have Informatica Powercenter Server version 9.1.0. The client on my machine is version 9.6.1. Since the client and server versions have to be same, I need to install Informatica Powercenter Client version 9.1.0. Can I install client version 9.1.0 without uninstalling version 9.6.1?
It's possible in general. I've had some issues due to using same domains.infa config file by both clients. What made it even more difficult was the fact that the repositories in each version had very same names - the host was the only difference. Check this out in case of issues. Otherwise you should be perfectly fine.
Yes it is. I am using both 9.6 and 10.1 in a same machine.
As long as you are connected to correct server repository you are good to go
I don't believe this should be an issue (am running 8.6.1 and 9.1 on my machine) check you have enough space for both though.

UnsupportedOperationException in DSS server

I am getting below exception when I try to connect DSS server to mssql 2008 r2. I have already added the sqljdbc4.jar file to wso2dss-3.0.1\repository\components\lib. Anyway still I am getting below error:
SEVERE: Java Runtime Environment (JRE) version 1.6 is not supported by this driver.
Use the sqljdbc4.jar class library, which provides support for JDBC 4.0.
[2013-09-17 19:40:38,790] ERROR {org.apache.axis2.rpc.receivers.RPCMessageReceiver}
- Java Runtime Environment (JRE) version 1.6 is not supported by this driver.
Use the sqljdbc4.jar class library,
sqljdbc4.jar class library requires JRE version to be 6.0 or later. So sqljdbc4.jar needs to be used when your java version is 1.6 or above. If your java version is 1.5 or less use sqljdbc.jar. You can download sqljdbc.jar here, http://www.java2s.com/Code/Jar/s/Downloadsqljdbcjar.htm