I am trying to configure WSO2 CEP to store the events to database table.
I have created Event Stream/Receiver,
I would like publish the Stream on a External Database using Datasource.
i am getting the below error while I trying to create Datasource to mysql or oracle
for mysql datasource
ERROR: Error in creating external data source: com.mysql.jdbc.jdbc2.optional.MysqlXADataSource cannot be found by org.wso2.carbon.ndatasource.rdbms_4.4.1
for oracle datasource
ERROR: Error in creating external data source: oracle.jdbc.driver.OracleDriver cannot be found by org.wso2.carbon.ndatasource.rdbms_4.4.1
Can anyone help me fix this one.
Thanks
I suspect that this issue is due to the missing database drivers in {$HOME}/repsitory/components/lib folder. Can you please check if the relevant database drivers are placed in this directory? You can find the documentation regarding setting up MySql and Oracle databases with CEP, respectively at [1] and [2]. Hope this helps.
[1] https://docs.wso2.com/display/CEP400/Setting+up+MySQL
[2] https://docs.wso2.com/display/CEP400/Setting+up+Oracle
Cheers,
Pubudu.
Related
I have an MVC 5 application that I first configured to use Mysql but now would like it to use SQL Server.
My app uses code first and migrations in order to generate the database.
After I changed all the required configuration I tried to run a Update-Database from the Package management console but I keep getting this error:
System.Data.Entity.Core.MetadataException: Schema specified is not
valid. Errors: (0,0) : error 0152: No Entity Framework provider found
for the ADO.NET provider with invariant name 'MySql.Data.MySqlClient'.
Make sure the provider is registered in the 'entityFramework' section
of the application config file. See
http://go.microsoft.com/fwlink/?LinkId=260882 for more information.
This error appears after the database is created. It also appears when I run the application since it checks at that moment if there is any migration to do.
Somehow it still tries to use MySQL even though all providers point to SQL Server.
Any help would be more than welcome.
Thanks in advance
You need to follow the below mentioned steps to overcome above issue.
Step 1 : Use NuGet package to remove and install the relevant packages.This is very important.
If it's not working after the above step then you have to follow the below mentioned steps.
Step 1 : Get a backup of your project and SQL db and keep it in a safe place.
Step 2 : After that you have to delete all your data migration scripts on your app.
Step 3 : Delete the SQL db also.
Step 4 : Recreate all your Migration scripts again and after that run those against the SQL server.
Note : You need to do above steps b'cos it seems EF keep the provider details on the db migration scripts.
I have a database in mysql that I would like to migrate to mssql since I would like to use that database for an asp.net application.I have everything setup but anytime I try to convert the schema using SSMA(SQL Server Migration Assistant) I keep getting this error
An unexpected error occured.Please send the log file to the product support."For more information see getting SSMA assistant"
in the product documentation.
Error Message: Object reference not set to an instance of an object.
How do I get that out of the way and then migrate the data to MSSQL.
I also had the same issue. Once I installed the latest version of ssma for mysql, it resolves the issue you have mentioned above.
https://www.microsoft.com/en-us/download/details.aspx?id=51218
I'm trying to connect to a local MySQL database, with the anylogic object "database".
I'm using the type: "Other Database", and the connection URL: "Server=localhost;Database=anylogicdata;"
but I constantly get a RuntimeException saying: "not suitable driver found"
The help file says that you have to install the driver, but i don't know which or if it is my connection URL that is the problem.
Does anyone have some pointers to help me along the way?
You need a JDBC driver to be able to connect to a MySQL server from Java (that AnyLogic is based on) and you can find one here. After you have installed the driver you should find it in the list of available JDBC drivers in AnyLogic. The name should be com.mysql.jdbc.Driver if you chose the suggested one.
First you have to download and add the mysql-connector-java-*.jar file to the anylogic-project.
Then you have to type com.mysql.jdbc.Driver into the JDBC driver dropdown box. finally the connection string should look something like
jdbc:mysql:[host/db]?:[port]
another thing I found that might be helpfull to others, is that you can get the java connection from the anylogic db object: database.getConnection() this is very usefull if you want to create your own query. eg create a bulk insert instead of the single insert that Anylogic provides.
I have a problem inserting data to my mysql database table. I have an error :
Exception in thread "main" java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Could not find output table 'book'.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6956)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7113)
at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:3109)
at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:337)
at sun.jdbc.odbc.JdbcOdbcStatement.executeUpdate(JdbcOdbcStatement.java:287)
at connectTest.ConnectTest.insertPerson(ConnectTest.java:55)
at connectTest.ConnectTestDemo.main(ConnectTestDemo.java:16)
Java Result: 1
I don't know why could not find my table.
I have created that in mysql database.
Please provide your source code and configuration file so that I can help you better.
Can you correctly connect to the database? You said you are using MYSQL database but I see you are using MS Access ODBC driver for the connection. If that is the case I recommend you use the MYSQL JDBC driver which you can download from
http://dev.mysql.com/downloads/connector/j/
If you can connect to the database correctly, then you may have not set your database schema (database name) properly.
Please provide your source code and configuration file so that I can help you better.
For an example of how you should configure db using pure JDBC have a look at this link:
http://www.tutorialspoint.com/jdbc/jdbc-insert-records.htm
Basically you provide a connection url in the format jdbc:mysql://[MySQLServer_DOMAIN_NAME_OR_IP_ADDRESS]:[PORT]/[DB_NAME].
I am trying out NLog to use mySQL table. I seem to have the configuration set correctly however I am getting the following error (capturing exceptions in NLog).
2012-10-10 17:09:20.0200 Error Error initializing target Database Target[slogger] System.Configuration.ConfigurationErrorsException: Failed to find or load the registered .Net Framework Data Provider.
at System.Data.Common.DbProviderFactories.GetFactory(DataRow providerRow)
at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
at NLog.Targets.DatabaseTarget.InitializeTarget()
at NLog.Targets.Target.Initialize(LoggingConfiguration configuration).
I think that this error is related to the statement "The parameter name should be a provider invariant name as registered in machine.config or app.config" in the database target configuration page however I am not certain how to correct the error. I have the mySQL DLL referenced in the application.
Following is my configuration:
Please let me know what I am doing incorrectly and how to change. I really appreciate help. This is really a cool app!
Thanks
Ray
try changing the dbProvider to this
dbProvider="MySql.Data.MySqlClient.MySqlConnection, MySql.Data"