詹姆斯没有拿起 mysql 连接器罐子 [英] james not picking up mysql connector jar
问题描述
我尝试在我的亚马逊实例上使用 MySQL 作为后端进行 james [1] 安装.我有 MySQL 连接器 mysql-connector-java-5.1.20.zip,解压缩并将其复制到 conf/lib 和 lib/,但是当我启动 james 时: $ sudo bin/james start 它停止.包装器日志显示:java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
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
我的 james-database.properties 如下所示:
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
database.password= ** secret **vendorAdapter.database=MYSQL openjpa.streaming=false
我没有改变任何其他东西.但詹姆斯不起作用.
I didn't change anything else.but james is not work.
任何帮助,谢谢!
推荐答案
wiki 说:
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 连接器罐子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!