One other thing. While there are entries in wrapper.conf to allow you to add files to the classpath, ONLY the lib folder is valid in James, so all of your jar files - including the sql files and any custom jars - MUST be in [JAMES_INSTALL_PATH]/lib and not some subdirectory. Even if you point to the jar file in your james.database.properties file, it won’t be seen. And no symbolic links. James is very picky about that for some reason.
Sent from my iPhone > On Jan 4, 2019, at 3:52 PM, Marc Chamberlin <m...@marcchamberlin.com> wrote: > > Hi Garry, and thanks for your thoughts also... Still no joy however... The > vendor class (database.driverClassName) in my configuration is the same as > what you show here. Ditto for all the other parameters except for the > database.url. I created a database called mail (not maildb) in MariaDB so I > adjusted the declaration to - > > database.url=jdbc:mariadb://localhost:3306/mail > > I won't get into the politics/religion over distros, I worship the gods of > OpenSUSE myself, so no I don't have a rc.mysqld file to poke at, but I do > have a my.cnf file and within it there is a parameter to skip networking, > which is commented out. (If uncommented, according to the comments in the > file, then only socket connections would be allowed and all TCP/IP port > connections disabled.) > > Marc... > > > >> On 1/4/19 6:16 AM, Garry Hurley wrote: >> The vendor class on the driver is supposed to match, but also be >> certain you are using Mariadb and not MySQL database and MariaDB >> client in your Linux distro. My config, which does work in the current >> branch (3.3.0 SNAPSHOT), is as follows. It goes without saying that >> your mileage my vary, and that I am using Slackware Linux, so your >> mileage may vary. >> >> ... >> # Use derby as default >> database.driverClassName=org.mariadb.jdbc.Driver >> database.url=jdbc:mariadb://localhost:3306/maildb >> database.username=james >> database.password=<your password> >> >> # Supported adapters are: >> # DB2, DERBY, H2, HSQL, INFORMIX, MYSQL, ORACLE, POSTGRESQL, SQL_SERVER, >> SYBASE >> vendorAdapter.database=MYSQL >> >> ... >> >> >> Make sure, however, that your database is configured to allow network >> connections. Change your rc.mysqld (or comparable one if your Linux >> distro is inferior to Slackware ;) ) script to read as follows: >> ... >> # To allow outside connections to the database comment out the next line. >> # If you don't need incoming network connections, then leave the line >> # uncommented to improve system security. >> #SKIP="--skip-networking" >> ... >> >> >>> On Jan 4, 2019, at 6:47 AM, Saibabu Vallurupalli >>> <saibabu.vallurupa...@gmail.com> wrote: >>> >>> your configurations are incorrect is what the error shows and I see >>> you have got: >>> >>> vendorAdapter.database=MYSQL >>> >>> This should be : >>> vendorAdapter.database=MARIADB >>> >>> Try changing this. >>> >>> Thanks, >>> Sai >>> >>>> On Fri, Jan 4, 2019 at 2:39 AM Marc Chamberlin <m...@marcchamberlin.com> >>>> wrote: >>>> >>>> (Thanks Benoit, Saibabu, and Simon for taking the time/trouble to answer >>>> my previous question on MySQL. It helped a lot!) >>>> >>>> I have managed to get a little further setting up James 3.2.0 Spring >>>> with MySQL/MariaDB but have ran into a problem which Google is not being >>>> helpful. >>>> >>>> I appear to be having troubles with getting a connection going between >>>> James and the MariaDB server. I will provide a description of what I >>>> have done and then I will show the exception message I am getting which >>>> is stopping James from starting up... >>>> >>>> First of all I downloaded the MariaDB Connector/J .jar file from >>>> https://downloads.mariadb.org/connector-java/ and installed it in the >>>> conf/lib directory within the James installation. >>>> >>>> I then set up a database and user in MariaDB as follows - >>>> >>>>> mysql --user=root -p >>>> MariaDB [mysql]> create database mail; >>>> MariaDB [mysql]> create user 'james'@'localhost' identified by 'apassword'; >>>> MariaDB [mysql]> grant all privileges on mail to 'james'@'localhost'; >>>> >>>> I also created a system user for james and assigned it the same password. >>>> >>>> Next I edited the james-database.properties file as follows - >>>> >>>> database.driverClassName=org.mariadb.jdbc.Driver >>>> database.url=jdbc:mariadb://127.0.0.1:3306/mail >>>> database.username=james >>>> database.password=apassword >>>> vendorAdapter.database=MYSQL >>>> openjpa.streaming=false >>>> datasource.testOnBorrow=true >>>> datasource.validationQueryTimeoutSec=2 >>>> datasource.validationQuery=select 1 >>>> >>>> Telnetting to localhost port 3306 does show that the mariadb server is >>>> responding but hard to say exactly what is being communicated because a >>>> lot of the text has non-printable characters. I assume it is working OK... >>>> >>>> Upon starting up James I am getting exceptions with a huge amount of >>>> stack walkback messages, but I will try to capture just what appears to >>>> be relevant - >>>> >>>> INFO 22:03:05,852 | org.apache.james.domainlist.lib.AbstractDomainList >>>> | Set autodetectIP to: true >>>> WARN 22:03:06,000 | >>>> org.apache.james.container.spring.context.JamesServerApplicationContext >>>> | Exception encountered during context initial >>>> ization - cancelling refresh attempt: >>>> org.springframework.beans.factory.UnsatisfiedDependencyException: Error >>>> creating bean with name 'auth >>>> enticator' defined in class path resource >>>> [META-INF/org/apache/james/spring-mailbox-authenticator.xml]: >>>> Unsatisfied dependency expressed th >>>> rough constructor argument with index 0 of type >>>> [org.apache.james.user.api.UsersRepository]: : Error creating bean with >>>> name 'usersreposito >>>> ry': Invocation of init method failed; nested exception is >>>> <openjpa-3.0.0-r422266:1833209 nonfatal general error> >>>> org.apache.openjpa.persis >>>> tence.PersistenceException: There were errors initializing your >>>> configuration: <openjpa-3.0.0-r422266:1833209 fatal user error> org.apache. >>>> openjpa.util.UserException: A connection could not be obtained for >>>> driver class "null" and URL "null". You may have specified an invalid U >>>> RL. >>>> at >>>> org.apache.openjpa.jdbc.schema.DataSourceFactory.newConnectException(DataSourceFactory.java:272) >>>> at >>>> org.apache.openjpa.jdbc.schema.DataSourceFactory.installDBDictionary(DataSourceFactory.java:258) >>>> at >>>> org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:735) >>>> ... (Lots more trace back messages followed by -) >>>> Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot create >>>> PoolableConnectionFactory (Access denied for user 'james@localhost'@'l >>>> ocalhost' (using password: YES)) >>>> at >>>> org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1549) >>>> at >>>> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388) >>>> at >>>> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044) >>>> >>>> and these exceptions/stack trace walkbacks repeat several time in the >>>> log file. Kinda hard for this poor soul to grok and I sure would >>>> appreciate it if wiser eyes could provide me with some ideas/pointers. I >>>> would be willing to send the entire log file if that would help, but >>>> warning it is a LOT! I am missing something simple probably.... Thanks >>>> again in advance for helping me over this bump... >>>> >>>> Marc... >>>> >>>> >>>> >>>> Linux Counter >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org >>> For additional commands, e-mail: server-user-h...@james.apache.org >>> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org >> For additional commands, e-mail: server-user-h...@james.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org > For additional commands, e-mail: server-user-h...@james.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org