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 Prashant Khandelwal <pr...@thinking-minds.com> on 2001/09/05 19:38:48 UTC

Oracle datamodel for mail repository

Hi All,

I am trying to configure james to use oracle as to store user database and also for mail repository.

I have a problem in delivery of mail to oracle.
I have designed datamodel from sample for mysql in docs directory. .......

        CREATE TABLE Messages (
         message_name varchar2(200) NOT NULL ,
         repository_name varchar2(200) NOT NULL ,
         message_state varchar2(30) NOT NULL ,
         error_message varchar2(4000),
         sender varchar2(200) NOT NULL ,
         recipients varchar2(400) NOT NULL ,
         remote_host varchar2(100) NOT NULL ,
         remote_addr varchar2(20) NOT NULL ,
         message_body clob(4000) NOT NULL,
         last_updated date NOT NULL,
         CONSTRAINT PK_Message PRIMARY KEY (message_name,repository_name)
        );
        


instead of the text data type i have used oracle equivalent 'clob' but it creates a problem.
When the mail arrives to JAMES it inserts it in to database for spooling, the repository_name field
of the  Message table for this mail has entry 'mainspool', and then james goes in some
infinite loop the log jamesfile.log has entries as

2001.09.05 05:08:20 115 (INFO) from JamesSystem: Mail Mail999689897383-0 pushed in spool
2001.09.05 05:08:20 147 (INFO) from Processor: ==== Begin processing mail Mail999689897383-0 ====
2001.09.05 05:08:20 147 (INFO) from Processor: Processing Mail999689897383-0 through root
2001.09.05 05:08:20 433 (INFO) from Processor: Processing Mail999689897383-0 through error
2001.09.05 05:08:20 468 (INFO) from Processor: Processing Mail999689897383-0 through error
2001.09.05 05:08:20 491 (INFO) from Processor: Processing Mail999689897383-0 through error
2001.09.05 05:08:20 529 (INFO) from Processor: Processing Mail999689897383-0 through error
2001.09.05 05:08:20 555 (INFO) from Processor: Processing Mail999689897383-0 through error
2001.09.05 05:08:20 581 (INFO) from Processor: Processing Mail999689897383-0 through error
:
:
:

And
mailet.log has entries as
2001.09.05 05:01:48 409 Channel Mailets opened
2001.09.05 05:08:20 435 (INFO) from Mailets: ToRepository: Storing mail Mail999689897383-0 in
town://mail-error
2001.09.05 05:08:20 468 (INFO) from Mailets: ToRepository: Storing mail Mail999689897383-0 in
town://mail-error
2001.09.05 05:08:20 492 (INFO) from Mailets: ToRepository: Storing mail Mail999689897383-0 in
town://mail-error
2001.09.05 05:08:20 530 (INFO) from Mailets: ToRepository: Storing mail Mail999689897383-0 in
town://mail-error
2001.09.05 05:08:20 556 (INFO) from Mailets: ToRepository: Storing mail Mail999689897383-0 in
town://mail-error
:
:
:




If I chang the datamodel replacing 'message_body CLOB' with 'message_body varchar2(4000)' every
thing works fine.
the mail is inserted in database, also retrived through database, BUT I want the message_body field
to be of CLOB
type as the message may also contain BIG attachments.





Regards,

---------------------
Prashant Khandelwal
Thinking-minds
---------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org