I'm trying to connect to MySql from tomcat(jboss) but i'm getting the error
我正在尝试从tomcat(jboss)连接到MySql,但我收到了错误
java.sql.SQLException : No suitable driver found
I have added the mysql connector jar file in my project lib ,it works fine in my local machine but not working in openshift, for openshift i have changed the username, password and url given by openshift to connect to MySql in my java program but it doesn't work do i have to place the jar file anywhere else...can any one help me with this?
我已经在我的项目库中添加了mysql连接器jar文件,它在我的本地机器上运行正常但在openshift中没有工作,对于openshift我已经更改了openshift给出的用户名,密码和url以连接到我的java程序中的MySql但是它不起作用我必须将jar文件放在其他任何地方......任何人都可以帮助我吗?
1 个解决方案
#1
0
Did you 'git add .' and then 'git commit' to make sure JAR file is on the server? Is there a reason you can't add the mysql connector jar to the dependencies in the pom.xml?
你有没有添加。然后'git commit'确保JAR文件在服务器上?有没有理由你不能将mysql连接器jar添加到pom.xml中的依赖项?
#1
0
Did you 'git add .' and then 'git commit' to make sure JAR file is on the server? Is there a reason you can't add the mysql connector jar to the dependencies in the pom.xml?
你有没有添加。然后'git commit'确保JAR文件在服务器上?有没有理由你不能将mysql连接器jar添加到pom.xml中的依赖项?