詹姆斯不捡的MySQL Connector JAR [英] james not picking up mysql connector jar

查看:164
本文介绍了詹姆斯不捡的MySQL Connector JAR的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试着做了詹姆斯[1]安装在我的MySQLas亚马逊实例的后端。我有MySQL的连接器mysql-connector-java-5.1.20.zip,解压缩并复制它到conf / lib目录和lib /但是当我开始与詹姆斯:$ sudo的斌/詹姆斯开始停止。包装日志显示:
抛出java.lang.ClassNotFoundException:com.mysql.jdbc.Driver

我james-database.properties看起来是这样的:

<$p$p><$c$c>database.driverClassName=com.mysql.jdbc.Driverdatabase.url=jdbc:mysql://localhost:3306/jamesdatabase.username= ** 用户名 **

database.password = **。**秘密= vendorAdapter.database MYSQL openjpa.streaming = FALSE

我没有改变任何东西else.but詹姆斯是不行的。

任何帮助,谢谢!


解决方案

借助维基说:

 使用,而不是MySQL的德比请从http://dev.mysql.com/downloads/connector/j/3.1.html MySQL驱动程序的JAR,并把JAR文件到您的./conf/lib文件夹中。改变./conf/database.properties数据库设置为以下值:#MySQL的JDBC数据库属性
database.driverClassName = com.mysql.jdbc.Driver
database.url =的jdbc:mysql的://本地主机/詹姆斯
database.username = jamesuser
database.password = password_for_jamesuser
vendorAdapter.database = MYSQL
openjpa.streaming = FALSE要将JAR添加到类路径,编辑./bin/setenv.sh如下所示:#每个需要额外的jar添加到该
CLASSPATH_ preFIX = .. / conf目录/ lib中/ MySQL的连接器,Java的5.1.13-bin.jar

然而,他们似乎版本了,而且,不可否认,这些方向<一个href=\"http://stackoverflow.com/questions/11999233/apache-james-gives-classnotfoundexception-com-mysql-jdbc-driver\">don't对我来说工作。

I've tried doing a james [1] install on my amazon instance with MySQLas a back-end. I've MySQL connector mysql-connector-java-5.1.20.zip,unzipped and copied it to conf/lib and lib/ but when I start james with: $ sudo bin/james start it stops. Wrapper log shows: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver

My james-database.properties looks like this:

database.driverClassName=com.mysql.jdbc.Driverdatabase.url=jdbc:mysql://localhost:3306/jamesdatabase.username= ** user name **

database.password= ** secret **vendorAdapter.database=MYSQL openjpa.streaming=false

I didn't change anything else.but james is not work.

Any helps ,Thanks!

解决方案

The wiki says:

Using MySQL instead of Derby

Download the MySQL driver JAR from http://dev.mysql.com/downloads/connector/j/3.1.html, and put the JAR file into your ./conf/lib folder. Change the database settings in ./conf/database.properties to the following values:

# MySQL JDBC database properties
database.driverClassName=com.mysql.jdbc.Driver
database.url=jdbc:mysql://localhost/james
database.username=jamesuser
database.password=password_for_jamesuser
vendorAdapter.database=MYSQL
openjpa.streaming=false

To add the JAR to the classpath, edit ./bin/setenv.sh as shown here:

# Add every needed extra jar to this
CLASSPATH_PREFIX=../conf/lib/mysql-connector-java-5.1.13-bin.jar

However, their versioning seems off, and, admittedly, these directions don't work for me.

这篇关于詹姆斯不捡的MySQL Connector JAR的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆