wso2 manager - com.mysql.jdbc.Driver not found - mysql

I've downloaded WSO2 Stratos 1.5.2 platform.
I'm trying to start wso2stratos-manager-1.5.2, but it doesn't find the mysql jdbc driver
[2012-08-08 16:31:15,201] ERROR
{org.wso2.carbon.user.core.util.DatabaseUtil} - Database Error -
Cannot load JDBC driver class 'com.mysql.jdbc.Driver'
org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver
class 'com.mysql.jdbc.Driver'

I believe you're trying to use a mysql database as the backend database of the user management repository. Did you put the MySQL JDBC driver to MANAGER_HOME/repository/components/lib directory?
Regards,
Prabath

We do not ship the mysql-connector jar with our packs due to license issues. Therefore you need to copy the jar to repository/components/lib folder as mentioned in Prabath's reply.
Regards,
Amila.

As mentioned by others but adding specific details.
When configuring the Datasource Driver in many of the WSO2 products you need to specify the class name of the JDBC driver to use.
Make sure to copy the JDBC driver relevant to the database engine to the /repository/components/lib/ directory.
For example, if you are using MySQL, specify com.mysql.jdbc.Driver as the driver and copy mysql-connector-java-5.XX-bin.jar file to this directory.
If you do not copy the driver to this directory when you create the datasource, you will get an exception similar to Cannot load JDBC driver class com.mysql.jdbc.Driver.

Driver name is "com.mysql.jdbc.Driver".
JAR file (mysql-connector-java-x.xx.xx.jar) must be present in MANAGER_HOME/repository/components/lib

I solved by adding the mysql jar file at the directory
C:\Program Files\WSO2\Identity Server\6.1.0\repository\components\lib
You can download jar by the following link:
https://mvnrepository.com/artifact/mysql/mysql-connector-java/8.0.20
After that you should restart the WSO2 server

Related

Cannot load JDBC driver class 'com.mysql.jdbc.Driver

I have updated Jmeter 5.4.3 and added MySQL connect java-8.0.27 to bin folder also
and given JDBC Driver class as-com.mysql.jdbc.Driver
with all details. but when I run getting "Cannot load JDBC driver class 'com.mysql.jdbc.Driver'"
enter image description here
You need to put the MySQL Connector/J to "lib" folder of your JMeter installation, not "bin" or to any other location which is in JMeter Classpath. Also JMeter restart will be required to pick up the .jar
I believe correct class is com.mysql.cj.jdbc.Driver
Your image is incomplete so I cannot comment on other "all details".
More information: MySQL Database and JMeter - How to Test Your Connection

MySQL and Keycloak setup

Hello I am trying to add mysql database in my Keycloak server.
I've added module.xml and mysql-connector-java-5.1.42-bin.jar under /modules/system/layers/base/com/mysql/main.
When I am running the command to add mysql module,
./jboss-cli.sh, it errors out with
Exception in thread "CLI Terminal Connection (uninterruptable)"
java.lang.ArithmeticException: / by zero
And when i am trying to start Keycloak, I am also notified that there is a missing service.
service jboss.jdbc-driver.mysql (missing)
Please help!!
When I am running the command to add mysql module, ./jboss-cli.sh, it errors out with
Can you post your Command? You dont't have to do this with the cli. It's also possible to modify the config in a editor. At least for testing you should try this.
Keycloak docs have a pretty good part about database setup: https://www.keycloak.org/docs/latest/server_installation/index.html#_database
The basic steps are:
Locate and download a JDBC driver for your database
Package the driver JAR into a module and install this module into the server (module.xml)
Declare the JDBC driver in the configuration profile of the server (standalone.xml)
Modify the datasource configuration to use your database’s JDBC driver
Modify the datasource configuration to define the connection parameters to your database
There is an error in the Keycloak documentation. Driver should be in the
modules/system/layers/base/com/mysql/driver/main
folder.
The full valid instruction is here
https://github.com/v-ladynev/keycloak-nodejs-example#keycloak-configuration
Also you can use docker images to experiment
https://github.com/v-ladynev/keycloak-nodejs-example#keycloak-docker-image

Cannot create JDBC driver of class 'com.mysql.jdbc.Driver' for connect URL 'jdbc:mysql//10.0.1.86/mp_gws'

SO I am trying to connect to Mysql through JMeter and this error comes up everytime. I am using Mysql through VPN and while running the test plan I am already logged in into VPN. I have already added the jar to lib folder of JMeter and the path to the jar file to Test plan. Please Help!!!
Add the jar file with latest version and give proper path in jdbc connection configuration. as jdbc:mysql://192.168.0.00:3306/db_name. Using this connection configuration fixes the problem for me.
Your connection string is malformed, according to Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J it should be something like:
jdbc:mysql://[host1][:port1][,[host2][:port2]]...[/[database]][?propertyName1=propertyValue1[&propertyName2=propertyValue2]...]
So you need to amend your JDBC URL to:
jdbc:mysql://10.0.1.86:3306/mp_gws
Also make sure you have Connector/J jar somewhere in JMeter Classpath. Make sure you restart JMeter to pick the .jar up.
Check out MySQL Database and JMeter - How to Test Your Connection article for more detailed steps if required.

Why am I unable to connect Sql server 2008 R2 from tibco BW?

When I'm trying to connect to sql server from tibco JDBC connection getting the following errors.
For com.microsoft.sqlserver.jdbc.SQLServerDriver
BW-JDBC-100034 "Configuration Test Failed. Exception [com.microsoft.sqlserver.jdbc.SQLServerException] occurred. com.microsoft.sqlserver.jdbc.SQLServerException: Software caused connection abort: recv failed"
and for tibcosoftwareinc.jdbc.sqlserver.SQLServerDriver
BW-JDBC-100033 "Configuration Test Failed. Failed to find or load the JDBC driver: tibcosoftwareinc.jdbc.sqlserver.SQLServerDriver"
I've placed the jar files in C:\tibco\tpcl\5.7\lib folder and also tried by placing the jar files in C:\tibco\tpcl\5.7\jdbc folder.
Can any please let me know how to solve this problem?
you should put the jar files in tibco bw/lib folder.
For me its C:\tibco\bw\5.10\lib
Additionally if you want to connect ms sql server using windows authentication then you also have to keep windows/system32 folder or add to class path.
Your JDBC drivers should be placed in:
C:\tibco\tpcl\5.7\jdbc
You must create the jdbc folder if it doesn't exist.
I had the same problem and Its resolved now.
First - Check If you are able to connect to a different Sql server using the JDBC connection in Tibco designer. If yes - there is an issue with the Sql server in your machine.
You should upgrade to Sql Server 2008 Service Pack 2. I did, restarted my Sql server and was able to connect. Download it from here. Also you need to make sure you have the jdbc folder in your C:\tibco\tpcl\5.7\ and you have the corresponding class path tibco.env.STD_CP_EXT in the designer.tra.
Just FYI, a relevant fix is in in SP2 patch:-
http://support.microsoft.com/kb/2653857
FIX: You cannot connect to SQL Server by using JDBC Driver for SQL Server after you upgrade to JRE 6 update 29 or a later version

JDeveloper MySQL error Driver not found

I am running MySQL db using the latest wamp server. Using Oracle JDeveloper 11g. I have placed the MySQL connector jar in .../jdeveloper/jdev/lib folder and added the jar as a library in my adf application .
. I am able to create a connection to the db, view the tables in DB Navigator of JDev, also create Entity and View Objects. However when I try to run the Application Module, I get an error popup saying could not create connection, driver not found. I have the ApplicationModule data source configuration set to JDBC Datasource.
Help!!!
. Thank you
Update :
The Error Log-----------------------------
[232] Using the oracle.jbo.server.ConnectionPoolDataSource to acquire a connection...
[233] Creating a new pool resource
[234] Trying connection/3: url='jdbc:mysql:/*****' user='root' password='*****' ...
[235] DBTransactionImpl.initTransaction: Login failed
[236] java.sql.SQLException: No suitable driver found for jdbc:mysql://127.0.0.1:3306/myDatabase
at java.sql.DriverManager.getConnection(DriverManager.java:602)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at oracle.jbo.server.URLConnectionHelper.getConnection(URLConnectionHelper.java:187)
at oracle.jbo.server.URLConnectionHelper.getConnectionFromDriver(URLConnectionHelper.java:50)
at oracle.jbo.server.ConnectionPool.createConnection(ConnectionPool.java:195)
at oracle.jbo.server.ConnectionPool.instantiateResource(ConnectionPool.java:166)
at oracle.jbo.pool.ResourcePool.createResource(ResourcePool.java:580)
at oracle.jbo.pool.ResourcePool.useResource(ResourcePool.java:313)
at oracle.jbo.server.ConnectionPool.getConnectionInternal(ConnectionPool.java:102)
The username and password used to connect to my database is correct, I am able to test it in the connection manager.
I am getting this error on run of Application Module, so I dont think the Integrated Weblogic Server is an issue here.
I have made sure that in libraries the mysql-connector jar is marked as "Deploy by default".
The jdbc jar file should also be placed where the embedded WebLogic can find it. So locate your defaultDomain directory under the JDeveloper's system directory /users/youruser/roaming/app data/JDeveloper
And locate the lib directory there.
Or make sure that the library you created in JDeveloper for the JDBC jar is marked as "Deploy by default".
put the mysql-connector**.jar in ~/.jdeveloper/xxxxxxx/DefaultDomain/lib
Configure JDeveloper to work with MySQL Connector/J
1-Download MySQL Connector/J 3.0.11 and copy the JDBC driver JAR file to a known location, such as /jdev/lib
From the Tools menu, select Default Project Properties.
In the tree view, select Libraries.
In the right pane, select New. The Create Library dialog will be displayed.
Name the library MySQL JDBC.
Set the location to Users Libraries.
Click Edit for the Class Path. The Edit Class Path dialog is displayed.
Click Add Entry. The Select Path Entry dialog is displayed.
Navigate to the JAR file for the MySQL Connect/J JDBC driver (it should be called something like mysql-connector-java--bin.jar).
Click on the jar file and click Select.
Click OK.
The library will be defined, and it will be in the Selected Libraries list.
You probably don't want that library to be defined in all your projects, so shuttle it over to the Available Libraries list.
this link help me a lot :
Oracle JDeveloper 11g with MySQL