You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Simon Levesque <su...@gmail.com> on 2019/03/01 11:17:32 UTC

Re: Required SQL resource: 'createHamTable' was not found

If nothing is present, could you create a Jira with some points about what
would need to be done to manage the JPA? Maybe I could provide a pull
request.
thanks

On Thu, 28 Feb 2019 at 09:24, Garry Hurley <ga...@gmail.com>
wrote:

> Not everything in the stable 3.2.0 release works. Let me rephrase that. As
> I found when I tried to use it, some of the JPA classes create tables only
> in the derby database and users of true SQL databases - SQL Server, MySQL,
> etc. - are left in the cold, but not intentionally. There just is not
> enough manpower to test the code in all possible configurations. I will see
> if ‘createHamTable’ appears in the 3.3 chain and if so, forward it to you.
> If it is in the java source, I will let you know where.
>
> Sent from my iPhone
>
> > On Feb 27, 2019, at 9:11 PM, Simon Levesque <su...@gmail.com> wrote:
> >
> > Hi all,
> >
> > I am using:
> >
> >   - jpa
> >   - MariaDB
> >   - Apache James 3.2.0
> >
> >
> > When I add the mailet BayesianAnalysis , I am getting:
> >
> > INFO   | jvm 1    | 2019/02/26 22:00:34 | 22:00:34.036
> > [WrapperSimpleAppMain] ERROR
> > org.apache.james.mailetcontainer.lib.AbstractStateMailetProcessor -
> Unable
> > to init mailet BayesianAnalysis
> > INFO   | jvm 1    | 2019/02/26 22:00:34 | javax.mail.MessagingException:
> > Exception initializing queries
> > INFO   | jvm 1    | 2019/02/26 22:00:34 |       at
> >
> org.apache.james.transport.mailets.BayesianAnalysis.initDb(BayesianAnalysis.java:271)
> > INFO   | jvm 1    | 2019/02/26 22:00:34 |       at
> >
> org.apache.james.transport.mailets.BayesianAnalysis.init(BayesianAnalysis.java:258)
> > [...]
> > INFO   | jvm 1    | 2019/02/26 22:00:34 |       at
> > java.lang.Thread.run(Thread.java:748)
> > INFO   | jvm 1    | 2019/02/26 22:00:34 | Caused by:
> > java.lang.RuntimeException: Required SQL resource: 'createHamTable' was
> not
> > found.
> > INFO   | jvm 1    | 2019/02/26 22:00:34 |       at
> >
> org.apache.james.util.sql.SqlResources.getSqlString(SqlResources.java:372)
> > INFO   | jvm 1    | 2019/02/26 22:00:34 |       at
> >
> org.apache.james.util.bayesian.JDBCBayesianAnalyzer.createTable(JDBCBayesianAnalyzer.java:362)
> > INFO   | jvm 1    | 2019/02/26 22:00:34 |       at
> >
> org.apache.james.util.bayesian.JDBCBayesianAnalyzer.checkTables(JDBCBayesianAnalyzer.java:335)
> > INFO   | jvm 1    | 2019/02/26 22:00:34 |       at
> >
> org.apache.james.util.bayesian.JDBCBayesianAnalyzer.initSqlQueries(JDBCBayesianAnalyzer.java:322)
> > INFO   | jvm 1    | 2019/02/26 22:00:34 |       at
> >
> org.apache.james.transport.mailets.BayesianAnalysis.initDb(BayesianAnalysis.java:269)
> > INFO   | jvm 1    | 2019/02/26 22:00:34 |       ... 38 common frames
> omitted
> > INFO   | jvm 1    | 2019/02/26 22:00:34 | 22:00:34.036
> > [WrapperSimpleAppMain] ERROR
> > org.apache.james.mailetcontainer.lib.AbstractStateMailetProcessor -
> Caused
> > by nested exception:
> > INFO   | jvm 1    | 2019/02/26 22:00:34 | java.lang.RuntimeException:
> > Required SQL resource: 'createHamTable' was not found.
> > INFO   | jvm 1    | 2019/02/26 22:00:34 |       at
> >
> org.apache.james.util.sql.SqlResources.getSqlString(SqlResources.java:372)
> > INFO   | jvm 1    | 2019/02/26 22:00:34 |       at
> >
> org.apache.james.util.bayesian.JDBCBayesianAnalyzer.createTable(JDBCBayesianAnalyzer.java:362)
> > [...]
> >
> >
> > First, I thought maybe it was due to the "dbMatchers" in sqlResources.xml
> > that did not include "mariadb", but I checked the value returned
> > by conn.getMetaData().getDatabaseProductName() when using the MariaDB
> > connector and it should be returning "MySQL" (just like the MySQL
> > connector).
> >
> > My second guess is maybe because I am using JPA and that mailet is using
> > JDBC. For instance, we have to configure:
> >
> > <repositoryPath>db://maildb</repositoryPath>
> >
> > but I do not see any other occurences of "db://maildb". This is the name
> in
> > the example for that mailet, but does it need any special config?
> >
> > I zipped my full config here:
> > https://www.foilen.com/wp-content/uploads/conf.zip
> >
> > thanks
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>