Maven and Embedded Glassfish Plugin - How to provide the derby jdbc driver - maven

When running the embedded glassfish plugin I get the following message.
INFO: Cannot find javadb client jar file, derby jdbc driver will not be available by default.
How to provide the javadb client jar file?

Related

Which OJDBC driver will go with oracle19.10.0.0?

We are using oracle version - 19.10.0.0
Java - 1.8
Which ojdbc driver version will be suitable for this combination?
I have found on the pages to use ojdbc8.jar for the above-mentioned specification. But which version of the jar should I use?
You should use the 19.10 Oracle JDBC driver which is available either here or on Maven Central.

Derby JDBC Driver not found when a War is deployed on Payara Micro

I am trying to run the example as per the Link below, step by step:
https://dzone.com/articles/easy-java-ee-microservices-with-payara-micro
The example makes use of Apache Derby DB that I have included in Maven POM and also gets bundled in the WEB-INF/lib folder of the War file.
However, when I try to run the application with command
sudo java -jar payara-micro-5.2020.4.jar --deploy <path to>/SampleService-1.0.war
I get the following error:
javax.resource.ResourceException: The driver could not be loaded: org.apache.derby.jdbc.ClientDriver```
It may be a class loading order problem. Check out https://docs.payara.fish/community/docs/5.201/documentation/payara-server/classloading.html
Derby has been removed starting from version 5.201. Check out https://docs.payara.fish/community/docs/5.2020.4/documentation/payara-micro/h2/h2.html
Use the exact same versions in your example tutorial or use H2 instead of Derby.
Finally check out "Adding Third-Party JARs to a Micro Instance" https://docs.payara.fish/community/docs/5.201/documentation/payara-micro/adding-jars.html

Unable to deploy war to Tomcat

I get this error when deploying application war to the server:
12-Sep-2018 10:21:54.726 SEVERE [localhost-startStop-1] org.apache.catalina.startup.ContextConfig.processAnnotationsJar Unable to process Jar entry [module-info.class] from Jar [file:/xxx/apache-tomcat-8.0.41_xxxx/webapps/xxx/WEB-INF/lib/jaxb-api-2.3.0.jar] for annotations
org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19
Informations:
Application is a micro-service created with Spring Boot
Java used is version 8
Tomcat version: tomcat-8.0.41
Thank you.
module-info.class is a module descriptor for Java’s module system that was introduced in Java 9. Some code in Tomcat 8.0 is unable to read the bytecode in that class file so deployment is failing.
I believe this is a limitation of Tomcat 8.0 that has been fixed in 8.5. Also note that an end-of-life announcement has been made for 8.0 so you should be planning to upgrade ASAP even without this problem.

Check if my current ojdbc jar used in the project is JDBC 4.0 complaint

Currently I have a ojdbc jar in my pom.xml . This is used for connection factory / connection pool. I am not sure if the current jar is JDBC 4.0 Compliant .
As oracle jars are not readily available in public maven repo . The artificatid/groupId/version Id is comming from Local Repo .
How can i be sure whether the ojbdc jar is JDBC4.0 compliant .

jar execution says -- "com.mysql.jdbc.Driver" not found

I have designed a project Database Migration.
While I run it from netbeans directly it executes properly, but when I use its jar - which is created by netbeans - then it gives an exception
com.mysql.jdbc.Driver not found
pls help me
You need to put the JDBC driver at the path. It is working in Netbeans, because it has configured it for you. Search how to set JDBC driver by downloading it from MySQl.
download the mysql jdbc driver jar and copy it the lib folder

Resources