简体   繁体   English

找不到适合的驱动程序以连接到MySql openshift

[英]No suitable driver found to connect to MySql openshift

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? 我已经在我的项目lib中添加了mysql连接器jar文件,它在我的本地机器上可以正常工作,但不能在openshift中工作,对于openshift,我已经更改了openshift给出的用户名,密码和url来在我的Java程序中连接到MySql我不能将jar文件放在其他任何地方吗?有人可以帮我吗?

Did you 'git add .' 您是否'git add'。 and then 'git commit' to make sure JAR file is on the server? 然后'git commit'以确保JAR文件在服务器上? Is there a reason you can't add the mysql connector jar to the dependencies in the pom.xml? 您是否有理由无法将mysql连接器jar添加到pom.xml中的依赖项?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM