Connect MySQL with Grails project in Netbeans - mysql

I want to connect MySQL with Grails in Netbeans. I am using,
Grails version:3.2
Netbeans: 8.2
JDK: 1.8
OS: Windows 10
How to connect my grails project with MySQL Database in NetBeans? I have search through the internet, But could not find any way to add mysql-connector.jar or any other process.
How can I solve this problem?

you shouldn't add it manually. it is usually resolved (by convention) by adding proper dependency:
dependencies {
runtime 'mysql:mysql-connector-java:5.1.29'
}
The configuration can be maintained in either grails-app/conf/application.groovy or grails-app/conf/application.yml
More info: https://docs.grails.org/latest/guide/conf.html#dataSource

Related

Getting ERROR while WAR file deploying in tomcat7

I have spring mvc based application. That is running tomcat7 server. Recently i made a few changes in my application. I created war file for entire application again. And i try to redeploy the new war file in tomcat7 server. When i click on my domain name i am getting "the requested page not available".
Why this error coming. I given all the properties file values correctly. could you please help me?
This is the production application. I used Linux servers and MySQL DB. Tomcat7, spring mvc and spring jdbc.
It looks that you are configured incorrect endpoint/url in application. Since the error is 4o4. Kindly revisit your routing configuration. It doesn't look the issue of database also.
The problem happens due jdk version. In my production server have jdk 1.7 but in my local i have jdk 1.8. I created war file with jdk 1.8 version. That's why i am getting that error. now i changed jdk version and recreate war file and deployed in server. Now it's working fine.

asp.net core 2 MySQL Driver 3.51 ODBC is needed?

I don't quite understand this driver thing for DB's.
First I was trying to connect DB using PHP normally using "mysql" methods but I was receiving error to update password for DB user as it was old MySQL. But I cant change it or upgrade MySQL so I found that in PHP I can use PDO and ODBC to use MySQL driver 3.51 and it works.
Now I want to rewrite back-end to asp.net Core 2. Where I found that there is no ODBC. How can I connect to DB? Can I use MySQL.DATA ? If yes how do I provide driver to it?
Unfortunately the last time I checked MySQL.Data does not have any stable (non prerelease) version to connect .net core to MySQL. However their prerelease versions work just fine. I have used it with a number of applications and faced no bugs yet. There are 4 ways to install the prerelease. You can pick any one:
In visual studio nuget manager, mark Include prerelease check box and then update MySQL.Data to the latest version.
In your Package Manager Console in visual studio, enter the following code to install the latest prerelease
Install-Package MySql.Data -Version 8.0.8-dmr
In command prompt, cd to your project location and use the following code for the latest prerelease
dotnet add package MySql.Data --version 8.0.8-dmr
Manually download your preferred version from here: https://www.nuget.org/packages/MySql.Data/
As of making the connection, I use the following format for the connection string.
Server=;Uid=;Database=;password=;SslMode=none

How to connect Liferay 6.2 bundled with JBoss with MySQL db?

I'm a newbie in Liferay.
I downloaded Liferay Portal 6.2 CE GA1 bundled with JBoss 7. As my understand, it, by default, connects to HSQL database, how can I change the connection to MySQL?
When you start Liferay for the first time your browser will open with an installer. That installer lets you select a different DBMS. But you will need to create the database manually before you run the installer, this will not be done by Liferay:

How to use primefaces on cloudbees glassfish server

We are developing an Java EE webapp on a glassfish 4 server running in the cloubeees cloud. We want to use Primefaces 3.5 . Our app runs perfectly on a local glassfish server after we copied the commons-fileupload.jar into the lib domain/lib folder. When we push the app into the cloud it isnt deployed the log says:
Cause: Class 'org.primefaces.component.fileupload.FileUploadRenderer' is missing a runtime dependency: java.lang.NoClassDefFoundError: org/apache/commons/fileupload/FileItem
So i think the server misses the fileupload.jar, but we dont have acces to the server administration console or the folder structure. Does anyone here used Primefaces in the cloudbees cloud or knows a other way to fix the problem?
best regards
Peter!

IBM Worklight database connection

I have installed Worklight Server and with DB2 database, and now I try to migrate an application that has a MySQL database which is obviously not working. Is there any workaround? Do I have to use an adapter to interface the DB2 and MySQL?
A database usually requires a connector driver in order to interface with it.
Had you used the IBM Installation Manager to install Worklight with DB2 database (available to IBM Worklight customers, are you one?), it would require you to supply such a driver, so I will assume - since you did not provide any information on your environment setup - that you are using the Development Edition (Eclipse + Worklight Studio plug-in).
In this case you need to edit the worklight.properties file (can be found in Eclipse under yourProject\server\conf).
Change the database type to DB2 (ucomment it) and supply the required information based on your environment.
The DB2 connector can be download through this page. Get the correct version for your installation of DB2.
Place the driver in the lib folder (can be found in Eclipse under yourProject\server).
If you are in fact using Liberty or WebSphere, see this troubleshooting section with installation instructions for DB2 and more.