Hi Sailbabu, Thanks for your thoughts but no joy...  MARIADB and MYSQL are identical in all respects, AFAIK, and according to OpenSUSE documentation fully compatible. Anywise, when I tried to change the vendorAdapter name as you suggested, to MARIADB, James threw a different exception basically saying that MARIADB is unrecognized/unknown. So I went back to MYSQL.  I suspect this only controls the construction of command/query syntax for working with a particular database, so my belief is that MYSQL should be the correct selection...   Marc...

On 1/4/19 3:47 AM, Saibabu Vallurupalli 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

Reply via email to