JavaFX Application Image with ojdbc driver - maven

I'm currently trying to deploy a JavaFX Application with jlink. I have added the Maven Dependency for the jdbc Driver to establish a Connection to our Oracle Database . When I'm starting the Code from IntelliJ it is working fine. After the image is created the Application cannot find any suitable driver for the Database Connection.
Can anyone tell my how i include the jdbc dependeny in jlink ?

Related

NiFi using Clickhouse Driver NoClassDefFoundError

In NiFi i use Clickhouse Driver. When i "enable" DBCPConnectionPool with driver, i get java.lang.NoClassDefFoundError: com/google/common/collect/MapMaker.
screen of settings
The Clickhouse Driver is not a standalone JAR, it has dependencies such as Guava. You'd have to download all the dependencies along with the driver JAR, put them all in a folder, and point to the folder in the Database Driver Location(s) property.

Where to install JDBC driver for Vaadin app run from IntelliJ using bundled Jetty servlet container?

I will ultimately be deploying my Vaadin web app to Tomcat servlet container.
In Tomcat, JDBC drivers generally need to be stored outside of the web app, in a separate Tomcat folder. So I do not want to add any JDBC driver as a dependency within my Maven build settings.
In the meantime, while developing I am running the Vaadin 8 or 8.1 web app (created from the vaadin-archetype-application Maven archetype) from within IntelliJ 2017.1 using the Jetty servlet container that is somewhere mysteriously bundled (“embedded”?) within the project.
Where can I store my JDBC driver jar file(s) while developing with IntelliJ-Jetty combo?
This depends on wether you use Tomcat or Jetty as an "old fashioned" appserver, or if you use it as an embedded component in your application. The archetype you have used probably assumes the latter (adds jetty-plugin to pom), while it sounds like you want the first scenario. In that case, just install the driver in the tomcat or jetty instance you want to use, and create a run configuration in IntelliJ for that instance. If you need the driver compile-time, add it to the pom with scope "provided". If you want to just have it available to the jetty-plugin, add it as a dependency for that plugin (inside the plugin definition).
See this related question for more info about including dependencies only for embedded jetty.

Glassfish with Oracle DS

I am using glassfish 3.1 and configure Oracle Datasource. However, I tried to Ping from glassfish admin console, but hitting an error with oracle.jdbc.pool.OracleDataSource not found. What could be the Issue?
As per http://docs.oracle.com/cd/E18930_01/html/821-2432/gkyan.html - you need to insert Oracle jdbc driver manually as it does not come bundled with Glassfish 3.1 installation. Just put the required jar into domain/lib directory.
Driver jar is downloadable from http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html

Ship JDBC driver into WAR for Tomcat 7

Before updating to Tomcat 7 (from Tomcat 6) I was able to ship MySql JDBC driver with a WAR file. I wasn't experiencing any issues creating JNDI data source with Tomcat 6 (maybe memory leaks on redeploy).
However, I'm attempting to deploy the same WAR (with the MySql driver) on Tomcat 7 using new connection pooling and getting :
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
I do understand that the more appropriate place for JDBC drivers would be CATALINA_HOME/lib.
Does the new connection pooling absolutely requires all JDBC drivers to be in CATALINA_HOME/lib? Or some configuration can allow me to ship the driver within WAR.
Yes. The driver should be in CATALINA_HOME\lib especially if you want to use Tomcat's pooling
From: Tomcat 7 Connection Pooling
Before you proceed, don't forget to copy the JDBC Driver's jar into
$CATALINA_HOME/lib.

How to override TOMCAT Oracle ojdbc14 driver in the application?

The TOMCAT server is using an Oracle 9G ojdbc14 driver to its jndi connections in the /common/lib folder.
My web application uses Maven + Spring and I'm getting the dataSource using Spring jndi features.
I'm trying to bypass TOMCAT old ojdbc14 driver with a newer one (ojdbc14 10.2.0.4.0).
I've tried putting the jars in the WEB-INF/lib folder as a project dependency, but it doesn't work the application keeps using the old oracle driver that is in the TOMCAT folder.
I'm trying to bypass the TOMCAT oracle driver because I cannot update it to the newest version because there are lots of other projects using it.
Does anyone have a clue?
This won't work, Tomcat won't use the JDBC driver of your webapp to create a connection pool. In other words, you'll have to either replace the version in common/lib or to use a standalone connection pool at the application level.

Resources