Eclipse - MariaDB JDBC onnection issue (bug or I messed up something?) - eclipse

I started learning Java EE, and I decided to develop my small application in simulated "real world production" environment:
I decoupled the development and deployment environment into a laptop (with Eclipse IDE) and a server (Raspberry Pi with Tomcat/TomEE and MariaDB).
With this environment I can learn not only EE development but the deployment phase, too.
The problem
After installation of MariaDB I realized that the MariaDB's JDBC connector doesn't work properly. I successfully made a connection in Eclipse via Generic JDBC (I used MariaDB's default connector). Pinging the server was also successful, but every query returned void results.
I tried the following queries:
show tables in dbName;
select * from tableName;
show databases;
When I tried to make entities from tables in a new JPA project, Eclipse didn't offered any tables.
Can somebody please help me to make a complete working connection to MariaDB.
What did I try (until this moment, without result)?
Updated the Raspbian system by apt-get update, moreover I did the same after installing MariaDB.
Tried to install MySql 5.6 with apt-get and dpkg, but the armhf version is not available on Raspbian Stretch
In Eclipse's Preferences/Data Management/Connectivity/Driver Definitions I tried to install MySql driver instead Generic JDBC
In properties (in Edit Driver Definition) tried the following Connection URL-s:
jdbc:mysql://hostName:port/
jdbc:mariadb://hostName:port/
jdbc:mysql://hostName:port/dbName
jdbc:mariadb://hostName:port/dbName
jdbc:mysql://hostName:port/dbName?user=userName&password=password
jdbc:mariadb://hostName:port/dbName?user=userName&password=password
Tried older version of JDBC connectors, too (mariadb-java-client-2.1.0.jar), without good result.
I installed MySQL on local machine, I could connect it in Eclipse successfully.
I could successfully connect, create, insert, alter tables in MariaDB from locally installed MySqlWorkbench.
I installed MariaDB on local machine. Despite the connection ping was successful in Eclipse, the void query result was the same as the remote MariaDB connection.
I installed NetBeans to check whether I can connect MariaDB with it's driver. The result was SUCCESS (screenshot is attached)
One more weird thing: in Data Source Explorer the tree structure is different between MySQL and MariaDB (see the screenshot)
The environment
Server:
Raspbian Stretch (Debian 9.1)
Java: openJKD 1.8.0_141, OpenJDK Runtime Environment build 1.8.0_141-8u141-b15-1~deb9ul-b15, OpenJDK Zero VM build 25.141-b15-1~deb9ul-b15
MariaDB Ver 15.1 Distrib 10.1.23-MariaDB, for debian-linux-gnueabihf (armv71)
Local machine:
Windows 10 Pro 64bit, version: 1703, build: 15063.674 (Hungarian language local)
MySqlWorkbench 6.3CE, 6.3.9 build 10690321 CE(64 bits)
Eclipse Neon.3 Release (4.6.3), Build id: 20170314-1500
NetBeans IDE 8.2, Build 201705191307
Java: JDK 1.8.0_151 (x86_64 architecture)
JDBC: mariadb-java-client-2.1.2.jar (This worked successfully with NetBeans)
To summarize, in Eclipse I can make a connection to MariaDB via Generic JDBC, the ping is successful, but I cannot get any result from queries (and cannot generate entities from tables).

Solved:
In Eclipse you don't have to use MariaDB's JDBC 2.1.2. connector. It is fully MySQL compatible just use MySQL JDBC 5.1 default (mysql-connector-java-5.1.41-bin.jar). Now it works fine!

Related

install windows Postgres logical decoding plugin

Recently I was working on a project where I am supposed to capture data change on a postgres db to update a cache.
After some search i found that i could use Embedded-Debezium to detect all changes on the data base.
In order to ensure the communication between debezium and postgres db , I need to install a logical decoder output plugin to deliver data as Protocol Buffers
postgres-decoderbufs-output-plugin
The link above showing how to install the plugin into Pg installed on a linux distributions..
I wonder how to install it for PG installed on a windows machine?
Is there any other options to integrate debezium with PG wihtout using this plugin?
The Postgres Debezium logical decoding plugin is not available for windows is not available yet you have to build it by your self.

InnoSetup - How to detect if MySQL Workbench is installed?

I'm creating an installer for modeling software, and we encourage our users to install MySQL Workbench to access model output. However, because the MySQL installation process isn't exactly straight forward, many users end up only installing MySQL Server and fail to install MySQL Workbench. How can I detect during my installation process if MySQL Workbench is installed?
On my development machine, there is a registry entry at HKEY_LOCAL_MACHINE\SOFTWARE\MySQL AB\MySQL Workbench 6.3 CE\Location. I could check to make sure that path exists, but this approach requires MySQL registry keys to be up-to-date (I've been burned relying on this approach trying to detect MySQL Server) and it is version specific.
If it turns out that this is the best option, are there other registry paths that I would need to check?
Am I safe checking MySQL Workbench 6.2 CE, MySQL Workbench 6.3 CE, MySQL Workbench 6.4 CE, etc, or are there other versions out there (e.g. non-"Community Edition")? This isn't apparent to me after spending some time on Workbench's website.
More information:
Since MySQL updates their package much more frequently than we update ours, we are hesitant to bundle a version of the MySQL MSI in our installation package and do a silent install, because it will likely be out of date. Instead, we detect if MySQL has been installed, and if not, we direct them to MySQL's download page and tell them to install MySQL Server and Workbench. This generally works for getting Server installed, but Workbench frequently fails (either because of the pre-reqs and MySQL Installer's non-intuitive prompts, or because they don't notice our recommendation). Therefore, I'm looking for a way to detect if Workbench is installed so I can offer a second prompt if needed.
Does the Workbench GUID stay the same over all the different versions? I'd hate to hard code one in and then have my installer be unable to detect newer/older/non-"Community Edition" versions.

DB2 connectivity without client drivers

I'm using EF 6 (Code first) with the IBM.Data.DB2.EntityFramwork nuget package to access a db2 database server. Working locally it all works as expected, but when deployed to a test server I get an exception: "System.MissingMethodException: Method not found: 'Void IBM.Data.DB2.InternalStruct6.SetDefault()"
I'm no DB2 wizard but I think the issue is related to a incompatible version of the db2 client drivers installed on the test server (9.7?). Entity framework 6 support needs version > 10.5. (I must have installed the 10.5 version locally at some point).
It would be nice to be able to run the application on any pc without additional dependencies, so my question is: Are there any way of skipping the db2 clients/drivers installation, and rather reference certain db2 dll's (or other nuget packages), to access db2 db servers?
Ok, I think asking the question resulted in a moment of enlightenment.
I guess the answer is NO, as the db2 clients/drivers actually installs the db2 odbc data source driver for db2. (Located in Administrative Tools -> Data Sources (ODBC)).

MySQL Installation Wizard for Microsoft Windows

I tried to install MySQL on my machine (win 8 64 bit), I downloaded mysql-5.6.24-winx64.exe and after completing MySQL 5.6 setup wizard, the MySQL Server Instance Configuration Wizard does not start and nothing happens. In the windows start menu for MySQL I have only 2 options:MySQL 5.6 command line client and MySQL 5.6 command line - Unicode.
So what can I do to resolve this problem and run MYSQL on my machine, I am waiting for your advice. Please help me I need to resolve this problem
I strongly recommend to use the all-in-one Windows installer for installing a MySQL server plus any additional tool you want, like MySQL Workbench, connectors or documentation. It will not only install the right package but will also do semi-automatic updates, check for prerequisites, start the configuration wizard etc.

sonarqube 4 server migration

I'm trying to move a sonarqube 4.4 installation from one machine to another. What's more we would also like to change the database server from Oracle to Postgres 9.3.
What my plan was initially is that I would shutdown the sonar server, the database adminstrator would dump existing database, migrate it to postgres in the new server and I would zip the existing server installation and move it along to the new server. Then I would start the server.
However I've run into problems, even though sonarqube 4.4 booted fine, when I hit
http://new-server:9001/sonar4
I was getting a 404 response from sonar.
At some point I tried unzipping the server file anew in which case I managed to see the projects and the dashboards but no analysis data existed, even though last analysis time was available.
Any ideas or clues what am I missing?
Also, the driver in sonarqube for postgres is 9.1.xxx can I update this or should we use postgres 9.1 to make sure the driver is compatible with the database?
How is your ..\conf\sonar.properties? Normally, you should have changed:
sonar.jdbc.url=jdbc:oracle:thin:#localhost/XE
Did you use some tool to migrate Oracle to Postgress? I thought it was not possible.
Do not hesitate to ask for further precision.
Regards.