Hi Eric/Norman:

In the current version after 3.0-Beta2 jcr functionality got broken due to
incompatibility. The issue I guess is Encrypted Mail message and Header
content. If the email server initially configured in jpa mode and used
JPAEncryptedMessage functionality and later if we change the mode to jcr.
JCR is trying to read the existing emails from the repository and it is
unable to read the content because the content now is in Encrypted format.
So, IMAP Server unable to load the existing email to mailbox and hence the
JCR functionality is now broken.

I verified jcr functionality in one of our machine having 3.0-M3-SNAPSHOT
version and it seems to be working fine. Except that I found a exception in
james-server.log file even jConsole says email copier method got executed
successfully. I am giving the error below and may be this is a minor issue.
*******
INFO  18:50:01,134 | org.apache.james.mailbox.copier.MailboxCopierImpl |
Message #0 appended in destination mailbox with
path=#private:ad...@florida-hie.net:INBOX
ERROR 18:50:01,212 |
org.apache.james.mailbox.jcr.JCRMailboxSessionMapperFactory | Unable to
access property jamesMailbox:mailboxNamespace
javax.jcr.RepositoryException: This session has been closed. See the chained
exception for a trace of where the session was closed.
********

I also played little bit by interchanging jcr to jpa and jpa to jcr in
mailbox.xml file and was ablet o send / receive emails without any issues in
3.0-M3-SNAPSHOT.

At present if I can get the above Error fixed in 3.0-M3 then I am good to go
with back-up of our existing production database and later after upgrade I
just need to restore it and I guess this should work without any issues from
jcr-mailboxmanager to jpa-mailboxmanager.

How do we proceed with broken functionality in JCR. Based on design
consideration if you think the issue can be fixed just by having the simialr
Encrypted functionality in JCR as well then I am happy to spend sometime and
provide you the code with your guidence.

Please let me know.

Thanks, Sai.



On Sun, Aug 7, 2011 at 2:15 AM, Eric Charles <e...@apache.org> wrote:

> Hi Sai,
>
> Strange... I wonder if jpa and jcr are now incompatible?
> I would first try to make the jcr mailbox work (set jcr in mailbox.xml).
>
> Once you are sure jcr mailbox works fine, you can try to copy from jpa to
> jcr.
>
> Thx.
>
>
> On 06/08/11 21:24, Saibabu Vallurupalli wrote:
>
>> Hi Eric and Team,
>>
>> I started debugging the issue with JCR implementation. I was able to get
>> rid
>> of the issue related to RMI Class Loader by adding the class path to
>> jConsole as shown below:
>> -J-Djava.class.path=C:\Java\**jdk1.6.0_16\lib\jconsole.jar;**
>> C:\Java\jdk1.6.0_16\lib\tools.**jar;C:\Apps\direct\apache-**
>> james-3.0-beta2\lib\openjpa-2.**1.0.jar
>>
>> I am showing only up to openjpa-2.1.0.jar I have actually got all the JAR
>> files referenced under my apache-names-3.0-beta2/lib path. Now, I am
>> getting
>> a new error as shown below:
>>
>> ***************
>> <openjpa-2.1.0-r422266:1071316 nonfatal user error>
>> org.apache.openjpa.**persistence.**InvalidStateException: This operation
>> cannot
>> be performed while a Transaction is active.
>>     at org.apache.openjpa.kernel.**BrokerImpl.close(BrokerImpl.**
>> java:4304)
>>     at
>> org.apache.openjpa.kernel.**DelegatingBroker.close(**
>> DelegatingBroker.java:1346)
>>     at
>> org.apache.openjpa.**persistence.EntityManagerImpl.**
>> close(EntityManagerImpl.java:**1284)
>>     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$**
>> ExtendedEntityManagerInvocatio**nHandler.invoke(**
>> ExtendedEntityManagerCreator.**java:365)
>>     at $Proxy56.close(Unknown Source)
>>     at
>> org.apache.james.mailbox.jpa.**mail.JPAUidProvider.**
>> lockedNextUid(JPAUidProvider.**java:81)
>>     at
>> org.apache.james.mailbox.**store.mail.**AbstractLockingUidProvider$1.**
>> execute(**AbstractLockingUidProvider.**java:42)
>>     at
>> org.apache.james.mailbox.**store.mail.**AbstractLockingUidProvider$1.**
>> execute(**AbstractLockingUidProvider.**java:38)
>>     at
>> org.apache.james.mailbox.**store.**AbstractMailboxPathLocker.**
>> executeWithLock(**AbstractMailboxPathLocker.**java:36)
>>     at
>> org.apache.james.mailbox.**store.mail.**AbstractLockingUidProvider.**
>> nextUid(**AbstractLockingUidProvider.**java:38)
>>     at
>> org.apache.james.mailbox.**store.mail.**AbstractMessageMapper.add(**
>> AbstractMessageMapper.java:**130)
>>     at
>> org.apache.james.mailbox.**store.StoreMessageManager$2.**
>> run(StoreMessageManager.java:**497)
>>     at
>> org.apache.james.mailbox.**store.StoreMessageManager$2.**
>> run(StoreMessageManager.java:**494)
>>     at
>> org.apache.james.mailbox.**store.transaction.**
>> TransactionalMapper.execute(**TransactionalMapper.java:38)
>>     at
>> org.apache.james.mailbox.**store.StoreMessageManager.**
>> appendMessageToStore(**StoreMessageManager.java:494)
>>     at
>> org.apache.james.mailbox.**store.StoreMessageManager.**appendMessage(**
>> StoreMessageManager.java:303)
>>     at
>> org.apache.james.mailbox.**copier.MailboxCopierImpl.**copyMailboxes(**
>> MailboxCopierImpl.java:130)
>>     at
>> org.apache.james.container.**spring.mailbox.**
>> MailboxCopierManagement.copy(**MailboxCopierManagement.java:**79)
>>     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
>> com.sun.jmx.mbeanserver.**StandardMBeanIntrospector.**invokeM2(**
>> StandardMBeanIntrospector.**java:93)
>>     at
>> com.sun.jmx.mbeanserver.**StandardMBeanIntrospector.**invokeM2(**
>> StandardMBeanIntrospector.**java:27)
>>     at
>> com.sun.jmx.mbeanserver.**MBeanIntrospector.invokeM(**
>> MBeanIntrospector.java:208)
>>     at com.sun.jmx.mbeanserver.**PerInterface.invoke(**
>> PerInterface.java:120)
>>     at com.sun.jmx.mbeanserver.**MBeanSupport.invoke(**
>> MBeanSupport.java:262)
>>     at
>> com.sun.jmx.interceptor.**DefaultMBeanServerInterceptor.**invoke(**
>> DefaultMBeanServerInterceptor.**java:836)
>>     at
>> com.sun.jmx.mbeanserver.**JmxMBeanServer.invoke(**
>> JmxMBeanServer.java:761)
>>     at
>> javax.management.remote.rmi.**RMIConnectionImpl.doOperation(**
>> RMIConnectionImpl.java:1426)
>>     at
>> javax.management.remote.rmi.**RMIConnectionImpl.access$200(**
>> RMIConnectionImpl.java:72)
>>     at
>> javax.management.remote.rmi.**RMIConnectionImpl$**
>> PrivilegedOperation.run(**RMIConnectionImpl.java:1264)
>>     at
>> javax.management.remote.rmi.**RMIConnectionImpl.**doPrivilegedOperation(*
>> *RMIConnectionImpl.java:1359)
>>     at
>> javax.management.remote.rmi.**RMIConnectionImpl.invoke(**
>> RMIConnectionImpl.java:788)
>>     at sun.reflect.**GeneratedMethodAccessor65.**invoke(Unknown Source)
>>     at
>> sun.reflect.**DelegatingMethodAccessorImpl.**invoke(**
>> DelegatingMethodAccessorImpl.**java:25)
>>     at java.lang.reflect.Method.**invoke(Method.java:597)
>>     at sun.rmi.server.**UnicastServerRef.dispatch(**
>> UnicastServerRef.java:305)
>>     at sun.rmi.transport.Transport$1.**run(Transport.java:159)
>>     at java.security.**AccessController.doPrivileged(**Native Method)
>>     at sun.rmi.transport.Transport.**serviceCall(Transport.java:**155)
>>     at
>> sun.rmi.transport.tcp.**TCPTransport.handleMessages(**
>> TCPTransport.java:535)
>>     at
>> sun.rmi.transport.tcp.**TCPTransport$**ConnectionHandler.run0(**
>> TCPTransport.java:790)
>>     at
>> sun.rmi.transport.tcp.**TCPTransport$**ConnectionHandler.run(**
>> TCPTransport.java:649)
>>     at
>> java.util.concurrent.**ThreadPoolExecutor$Worker.**
>> runTask(ThreadPoolExecutor.**java:886)
>>     at
>> java.util.concurrent.**ThreadPoolExecutor$Worker.run(**
>> ThreadPoolExecutor.java:908)
>>     at java.lang.Thread.run(Thread.**java:619)
>>
>> **************
>>
>> Did you get any thoughts after reading this error?
>>
>> Thanks, Sai.
>>
>>
>> On Sat, Aug 6, 2011 at 12:18 PM, Eric Charles<e...@apache.org>  wrote:
>>
>>  Hi,
>>>
>>> I applied the same process, and got the same exception without more info
>>> in
>>> the log...
>>>
>>> After, I invoked the copy to the maildir-mailboxmanager, and it worked
>>> fine. So copy process in not the cause.
>>>
>>> After, I have set jcr in maibox.xml to test the JCR implementation. James
>>> starts, but imap connection are rejected. There is clearly a problem with
>>> JCR: in the impl, or in the dependencies compatiblity...
>>>
>>> Unfortunately, I won't have time to debug this. If nobody takes on this,
>>> you should consider another option to migrate (manual SQL diff,
>>> Linux...?).
>>>
>>> Thx.
>>>
>>>
>>> On 06/08/11 16:48, Saibabu Vallurupalli wrote:
>>>
>>>  Yeah, I have added it to persistence.xml [1] as shown below and tested
>>>> by
>>>> sending some sample emails it worked. My problem is now only backup and
>>>> restore. Encryption works great.
>>>>
>>>> Thanks, Sai
>>>>
>>>> [1]
>>>> <class>org.apache.james.****mailbox.jpa.mail.model.**
>>>> openjpa.JPAEncryptedMessage</****class>
>>>>
>>>>
>>>>
>>>>
>>>> On Sat, Aug 6, 2011 at 10:40 AM, Norman Maurer<norman.maurer@**
>>>> googlemail.com<norman.maurer@**googlemail.com<norman.mau...@googlemail.com>
>>>> >
>>>>
>>>>
>>>>  wrote:
>>>>>
>>>>>
>>>>  did you add the JPAEncryptedMessage to persistence.xml ?
>>>>
>>>>>
>>>>> bye
>>>>> norman
>>>>>
>>>>> Am Samstag, 6. August 2011 schrieb Saibabu Vallurupalli<
>>>>> saibabu.vallurupa...@gmail.com****>:
>>>>>
>>>>>  Hi Eric and Team,
>>>>>>
>>>>>> I am feeling bad to come back to you so many times on this issue. I
>>>>>> tried
>>>>>> the options below and I still get the same error:
>>>>>>
>>>>>> Step 1 - Modified POM.xml in container-spring [1] project by adding
>>>>>> the
>>>>>> dependency as shown below:
>>>>>> <dependency>
>>>>>>     <groupId>org.apache.james</****groupId>
>>>>>>     <artifactId>apache-james-****mailbox-jcr</artifactId>
>>>>>>   </dependency>
>>>>>>
>>>>>> Step 2 - Did a maven build mvn package.
>>>>>> Step 3 - Unzipped the distribution and copied all the libraries from
>>>>>> apache-james-3.0-beta2/lib to my Original installation path.
>>>>>> Step 4 - Also visually compared if I missed any other libraires (JAR
>>>>>>
>>>>>>  files)
>>>>>
>>>>>  from the latest distribution and my Original 3.0-Beta2 version.
>>>>>>
>>>>>>  Everything
>>>>>
>>>>>  looks same.
>>>>>> Step 5 - Ran the application jConsole ->   copy operation using
>>>>>> jpa-mailboxmanager and jcr-mailboxmanager
>>>>>> Step6 - I still get the same error as shown below:
>>>>>> *********
>>>>>> Problem invoking copy : java.rmi.UnmarshalException: Error
>>>>>> unmarshaling
>>>>>> return; nested exception is:
>>>>>> java.lang.****ClassNotFoundException:
>>>>>> org.apache.openjpa.****persistence.****InvalidStateException (no
>>>>>> security
>>>>>>
>>>>>>  manager:
>>>>>
>>>>>  RMI class loader disabled)
>>>>>> *********
>>>>>>
>>>>>> I am not seeing any errors in james-server.log file below is the
>>>>>> content:
>>>>>> **********
>>>>>>  INFO  15:50:36,179 | org.apache.james.mailbox.****
>>>>>> copier.MailboxCopierImpl
>>>>>> |
>>>>>> Found 12 mailboxes in source mailbox manager.
>>>>>> INFO  15:50:36,179 | org.apache.james.mailbox.****
>>>>>> copier.MailboxCopierImpl
>>>>>> |
>>>>>> Mailbox#0 path=#private:admin@Florida-****HIE.net:INBOX
>>>>>> INFO  15:50:36,180 | org.apache.james.mailbox.****
>>>>>> copier.MailboxCopierImpl
>>>>>> |
>>>>>> Mailbox#1 path=#private:admin@Florida-****HIE.net:INBOX.Sent
>>>>>> INFO  15:50:36,180 | org.apache.james.mailbox.****
>>>>>> copier.MailboxCopierImpl
>>>>>> |
>>>>>> Mailbox#2 path=#private:admin@Florida-****HIE.net:INBOX.Trash
>>>>>> INFO  15:50:36,180 | org.apache.james.mailbox.****
>>>>>> copier.MailboxCopierImpl
>>>>>> |
>>>>>> Mailbox#3 path=#private:admin@Florida-****HIE.net:INBOX.Drafts
>>>>>> INFO  15:50:36,180 | org.apache.james.mailbox.****
>>>>>> copier.MailboxCopierImpl
>>>>>> |
>>>>>> Mailbox#4 path=#private:sbrewste@****Florida-HIE.net:INBOX
>>>>>> INFO  15:50:36,180 | org.apache.james.mailbox.****
>>>>>> copier.MailboxCopierImpl
>>>>>> |
>>>>>> Mailbox#5 path=#private:sbrewste@****Florida-HIE.net:INBOX.Sent
>>>>>> INFO  15:50:36,180 | org.apache.james.mailbox.****
>>>>>> copier.MailboxCopierImpl
>>>>>> |
>>>>>> Mailbox#6 path=#private:sbrewste@****Florida-HIE.net:INBOX.Trash
>>>>>> INFO  15:50:36,180 | org.apache.james.mailbox.****
>>>>>> copier.MailboxCopierImpl
>>>>>> |
>>>>>> Mailbox#7 path=#private:sbrewste@****Florida-HIE.net:INBOX.Drafts
>>>>>> INFO  15:50:36,180 | org.apache.james.mailbox.****
>>>>>> copier.MailboxCopierImpl
>>>>>> |
>>>>>> Mailbox#8 path=#private:pvalluri@****florida-hie.net:INBOX
>>>>>> INFO  15:50:36,180 | org.apache.james.mailbox.****
>>>>>> copier.MailboxCopierImpl
>>>>>> |
>>>>>> Mailbox#9 path=#private:pvalluri@****Florida-HIE.net:INBOX.Sent
>>>>>> INFO  15:50:36,180 | org.apache.james.mailbox.****
>>>>>> copier.MailboxCopierImpl
>>>>>> |
>>>>>> Mailbox#10 path=#private:pvalluri@****Florida-HIE.net:INBOX.Trash
>>>>>> INFO  15:50:36,181 | org.apache.james.mailbox.****
>>>>>> copier.MailboxCopierImpl
>>>>>> |
>>>>>> Mailbox#11 path=#private:pvalluri@****Florida-HIE.net:INBOX.Drafts
>>>>>> INFO  15:50:36,181 | org.apache.james.mailbox.****
>>>>>> copier.MailboxCopierImpl
>>>>>> |
>>>>>> Ready to copy source mailbox path=#private:admin@Florida-**
>>>>>> HIE.net:INBOX
>>>>>> INFO  15:50:36,964 | org.apache.james.mailbox.****
>>>>>> copier.MailboxCopierImpl
>>>>>> |
>>>>>> Destination mailbox 0/12 created with path=#private:admin@Florida-**
>>>>>> HIE.net
>>>>>>
>>>>>>  :INBOX
>>>>>
>>>>>  after 1059 ms.
>>>>>> ***********
>>>>>>
>>>>>> Any help on this will be greatly appreciated. I can't consider the
>>>>>> manual
>>>>>> schema export and import approach because of Encryption. Our
>>>>>> production
>>>>>> system already has got some data and this upgrade has got a fix to
>>>>>>
>>>>>>  encrypt
>>>>>
>>>>>  email message and header. If I manually export data from MySQL and
>>>>>> during
>>>>>> restore these emails are NOT encrypted and we might run into issues.
>>>>>> So,
>>>>>>
>>>>>>  I
>>>>>
>>>>>  have to use one of the techniques recommended by you either using
>>>>>> jcr-mailboxmanager or modify jpa-mailboxmanager for backup. We can't
>>>>>> move
>>>>>>
>>>>>>  to
>>>>>
>>>>>  Linux environment because we already have our production box running
>>>>>> on
>>>>>> Windows.
>>>>>>
>>>>>> Thank you,
>>>>>> Sai
>>>>>>
>>>>>> [1]
>>>>>>
>>>>>>
>>>>>>  
>>>>>> https://svn.apache.org/repos/****asf/james/server/tags/james-****<https://svn.apache.org/repos/**asf/james/server/tags/james-**>
>>>>> server-3.0-beta2/container-****spring/pom.xml<https://svn.**
>>>>> apache.org/repos/asf/james/**server/tags/james-server-3.0-**
>>>>> beta2/container-spring/pom.xml<https://svn.apache.org/repos/asf/james/server/tags/james-server-3.0-beta2/container-spring/pom.xml>
>>>>> **>
>>>>>
>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>> --
>>> Eric Charles
>>> http://about.echarles.net
>>>
>>> ------------------------------****----------------------------**
>>> --**---------
>>> To unsubscribe, e-mail: server-dev-unsubscribe@james.****apache.org<
>>> server-dev-**unsubscr...@james.apache.org<server-dev-unsubscr...@james.apache.org>
>>> >
>>> For additional commands, e-mail: server-dev-help@james.apache.****org<
>>> server-dev-help@james.**apache.org <server-dev-h...@james.apache.org>>
>>>
>>>
>>>
>>
>
> --
> Eric Charles
> http://about.echarles.net
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: 
> server-dev-unsubscribe@james.**apache.org<server-dev-unsubscr...@james.apache.org>
> For additional commands, e-mail: 
> server-dev-help@james.apache.**org<server-dev-h...@james.apache.org>
>
>

Reply via email to