Hi Sai,

If you change JPAMessage to JPAEncryptedMessage in the JPAMessageManager, you must update persistence.xml accordingly.

However, even if OpenJPAMailboxManager handles the encryption feature to initialize the EncryptionDecryptHelper if needed, the JPAMailboxManager should also verify the feature, and return a JPAEncryptedMessage if needed.

I hope this makes sense, and if yes, a patch is needed.

wdyt?

On 31/08/11 15:19, Saibabu Vallurupalli wrote:
Hi Eric/Norman:

I am able to reproduce this error in a simple way. In my checked-out version
-
C:\work\workspace\james\mailbox\trunk\jpa\src\main\java\org\apache\james\mailbox\jpa\JPAMessageManager.java
There is reference to JPAMessage.java class and I changed it to
JPAEncryptedMessage.java ran the maven clean package and the tests failed
with the similar exception:

Thought of letting you. Thank you very much in advance.

Thanks, Sai




_____________________________________________
*From:* Valluripalli, Sai
*Sent:* Wednesday, August 31, 2011 2:42 PM
*To:* 'server-dev@james.apache.org'
*Subject:* Unable to move emails between folders with Encryption turned -
on


Hi Norman/Eric,

We were in our System Testing phase and close to our release. During our
System Testing we discovered that Move  option is not working between the
folders. When we try to move email from Inbox to Trash we encounter the
exception below. I have also got the complete log if you need. But the root
cause I understood from the below exception is somewhere in the mail/store
code and other places JPAMessage class is referenced and when I changed it
to JPAEncryptedMessage it is unable to locate JPAMessage and throwing the
exception.

Is there any master configuration to modify or do I need to refer
JPAEncryptedMessage.java class to any other modules and re-compile it?
Please advise.

Caused by:<openjpa-2.1.0-r422266:1071316 fatal user error>
org.apache.openjpa.persistence.ArgumentException: No metadata was found for
type "class org.apache.james.mailbox.jpa.mail.model.openjpa.JPAMessage". The
class does not appear in the list of persistent types:
[org.apache.james.mailbox.jpa.mail.model.JPAUserFlag,
org.apache.james.mailbox.jpa.mail.model.JPAMailbox,
org.apache.james.mailbox.jpa.mail.model.openjpa.JPAEncryptedMessage,
org.apache.james.domainlist.jpa.model.JPADomain,
org.apache.james.mailbox.jpa.mail.model.openjpa.AbstractJPAMessage,
org.apache.james.user.jpa.model.JPAUser,
org.apache.james.mailbox.jpa.mail.model.JPAProperty,
org.apache.james.rrt.jpa.model.JPARecipientRewrite,
org.apache.james.mailbox.jpa.user.model.JPASubscription].
         at
org.apache.openjpa.meta.MetaDataRepository.getMetaDataInternal(MetaDataRepository.java:407)
         at
org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:384)
         at
org.apache.openjpa.kernel.BrokerImpl.persistInternal(BrokerImpl.java:2601)
         at
org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2540)
         at
org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2437)
         at
org.apache.openjpa.kernel.DelegatingBroker.persist(DelegatingBroker.java:1069)
         at
org.apache.openjpa.persistence.EntityManagerImpl.persist(EntityManagerImpl.java:707)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at
org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:365)
         at $Proxy56.persist(Unknown Source)
         at
org.apache.james.mailbox.jpa.mail.JPAMessageMapper.save(JPAMessageMapper.java:362)
         ... 100 more
DEBUG 12:55:29,285 | james.imapserver | ID=1684154803 Error while
processing imap request


We appreciate your help on this.

Thank you, Sai.




--
Eric
http://about.echarles.net

--
Eric
http://about.echarles.net

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to