Well this one wasn't as difficult as I expected.  Turns out during all of the transition and merging I ended up with the conf/META-INF folder from b5.  Since that folder contains all of the JPA stuff, 3.3.0 was not at all happy with v3b5 JPA files.

Just a note for continuing to document my adventures.... Once I swapped over the META-INF folder, things initially got much worse.  The JPA stuff is used to update all of the table schemas from 3.0 to 3.3 version.  In the process of updating, it tries to add foreign keys to JAMES_MAIL_PROPERTY and JAMES_MAIL_USERFLAG tables.  Both of those failed miserably.  Digging into those database tables, I realized I had 32 million (yup... 32 million) userFlag records with null MAIL_ID  and MAIL_UID fields that had no hope of matching up with fields in JAMES_MAIL.  And there were four records in JAMES_MAIL_PROPERTY that weren't null, but still didn't have a match in JAMES_MAIL.  So after finding and deleting those 4 as well as the 32 million null records, James was able to successfully complete the JPA startup stuff.  I guess this is a good thing that I'm forced to clean up problems with the current database.  This migration glacier is moving a millimeter at a time....


On 9/17/2019 1:26 AM, Tellier Benoit wrote:
Hi Jerry,

To explain it shortly:

  1. In OpenJPA NamedQuery are directly attached to the POJO being
persited, here AbstractJPAMailboxMessage
  2. Using these annotations (named query) openjpa plugin enhance code
upon compilation
  3. Then the magic happens

Here because openjpa do not load correctly persisted objects, it then
fails at executing related queries.

Why OpenJPA fails loading related metadata? - the log is missing
explanation...

And of course...
  - What is the exact James version?
  - JDBC mysql driver version?
  - MySQL version?

This would enable us to be testing this locally, see if we can reproduce
it with basic setup...

Cheers,

Benoit

On 17/09/2019 10:36, Jerry Malcolm wrote:
Something that might be relevant to this problem, but the messages make
no more sense than the other one... A little earlier in the log, I have
a bunch of these messages:

174  James  INFO   [main] openjpa.Runtime - Starting OpenJPA 3.0.0
207  James  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class
"org.apache.openjpa.jdbc.sql.MySQLDictionary".
552  James  INFO   [main] openjpa.jdbc.JDBC - Connected to MySQL version
5.5 using JDBC driver MySQL Connector Java version
mysql-connector-java-5.1.34 ( Revision:
jess.bal...@oracle.com-20141014163213-wqbwpf1ok2kvo1om ).
586  James  WARN   [main] openjpa.MetaData - The class
"org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage" listed in
the openjpa.MetaDataFactory configuration property could not be loaded
by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
587  James  WARN   [main] openjpa.MetaData - The class
"org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage"
listed in the openjpa.MetaDataFactory configuration property could not
be loaded by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
688  James  INFO   [main] openjpa.MetaData - The class
"org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage" listed in
the openjpa.MetaDataFactory configuration property could not be loaded
by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
689  James  INFO   [main] openjpa.MetaData - The class
"org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage"
listed in the openjpa.MetaDataFactory configuration property could not
be loaded by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.
702  James  INFO   [main] openjpa.MetaData - The class
"org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage" listed in
the openjpa.MetaDataFactory configuration property could not be loaded
by sun.misc.Launcher$AppClassLoader@764c12b6; ignoring.

On 9/16/2019 10:28 PM, Jerry Malcolm wrote:
The fun just keeps happening.... I was finally able to bring up the
new installation of James 3.3.0 with a sandbox copy of my real
database.  I created a new test email account in James and configured
it in my local Thunderbird instance.  So far, so good. But now every
time Thunderbird contacts James for an IMAP update, I get the error
below in the James log.  I'm not really familiar with jpa.  I searched
through the source and found quite a few places that the
"findMessagesInMailbox" name is referenced.  So not really sure why it
says it isn't defined.  Any ideas?  This is with the downloaded
binaries, not a re-built version.

<openjpa-3.0.0-r422266:1833209 fatal user error>
org.apache.openjpa.persistence.ArgumentException:  There is no query
with the name "findMessagesInMailbox" defined for any of the known
persistent classes:
[org.apache.james.mailbox.jpa.mail.model.JPAMailbox,
org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage,
org.apache.james.mailbox.jpa.mail.model.JPAUserFlag,
org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage,
org.apache.james.domainlist.jpa.model.JPADomain,
org.apache.james.user.jpa.model.JPAUser,
org.apache.james.mailbox.jpa.mail.model.JPAProperty,
org.apache.james.mailbox.jpa.user.model.JPASubscription,
org.apache.james.rrt.jpa.model.JPARecipientRewrite].


---------------------------------------------------------------------
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

Reply via email to