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 Rhys Hardwick <rh...@hardwick.no-ip.org> on 2004/05/20 12:02:41 UTC

Using MySQL for inbox repository

Hi all.

I have recently installed James for the first time, and am trying to get 
it to use MySQL as the inbox repository.  James started fine using the 
run.bat file, but whenever an email is to be sent to a local inbox, the 
following error is thrown up by the mail client:

An unknown error has occurred. Subject 'test', Account: 'rhys', Server: 
'127.0.0.1', Protocol: SMTP, Server Response: '451 Error processing 
message: Exception spooling message: Exception caught while storing mail 
Container: java.sql.SQLException: General error: Column 
'repository_name' cannot be null;', Port: 25, Secure(SSL): No, Server 
Error: 451, Error Number: 0x800CCC6A

This is then thrown up in the Console :

java.sql.SQLException: General error: Column 'repository_name' cannot be 
null
        at org.gjt.mm.mysql.MysqlIO.sendCommand(Unknown Source)
        at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(Unknown Source)
        at org.gjt.mm.mysql.Connection.execSQL(Unknown Source)
        at org.gjt.mm.mysql.PreparedStatement.execute(Unknown Source)
        at 
org.apache.james.mailrepository.JDBCMailRepository.store(JDBCMailRepository.java:635)
        at 
org.apache.james.mailrepository.JDBCSpoolRepository.store(JDBCSpoolRepository.java:243)
        at org.apache.james.James.sendMail(James.java:499)
        at java.lang.reflect.Method.invoke(Native Method)
        at 
org.apache.avalon.phoenix.components.application.BlockInvocationHandler.invoke(BlockInvoc
ationHandler.java:92)
        at $Proxy9.sendMail(Unknown Source)
        at 
org.apache.james.smtpserver.SMTPHandler.processMail(SMTPHandler.java:1406)
        at 
org.apache.james.smtpserver.SMTPHandler.doDATA(SMTPHandler.java:1253)
        at 
org.apache.james.smtpserver.SMTPHandler.parseCommand(SMTPHandler.java:608)
        at 
org.apache.james.smtpserver.SMTPHandler.handleConnection(SMTPHandler.java:381)
        at 
org.apache.james.util.connection.ServerConnection$ClientConnectionRunner.run(ServerConnec
tion.java:462)
        at 
org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(ExecutableRunnable.jav
a:47)
        at 
org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread.java:80)


I have used the James documentation pages to set up the config.xml file 
as best I can.  Here are the relevent sections:

<inboxRepository>
         <repository destinationURL="db://maildb/inbox/" type="MAIL"/>
</inboxRepository>

<data-source name="maildb" 
class="org.apache.james.util.mordred.JdbcDataSource">
            <driver>org.gjt.mm.mysql.Driver</driver>
            
<dburl>jdbc:mysql://***.***.***.***/james?autoReconnect=true</dburl>
            <user>*****</user>
            <password>*****</password>
            <max>50</max>
         </data-source>


Is there anything you could suggest to sort this problem?

Rhys


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


Re: Using MySQL for inbox repository

Posted by Rhys Hardwick <rh...@hardwick.no-ip.org>.
In fact, I just commented out the changes in my inbox repository, and 
the error still occurred.  I then commented out the changes to the spool 
repository, which I also changed to database, and the error then 
stopped.  I have no idea what is wrong, any help would be greately 
appreciated.

Rhys

Rhys Hardwick wrote:

> Hi all.
>
> I have recently installed James for the first time, and am trying to 
> get it to use MySQL as the inbox repository.  James started fine using 
> the run.bat file, but whenever an email is to be sent to a local 
> inbox, the following error is thrown up by the mail client:
>
> An unknown error has occurred. Subject 'test', Account: 'rhys', 
> Server: '127.0.0.1', Protocol: SMTP, Server Response: '451 Error 
> processing message: Exception spooling message: Exception caught while 
> storing mail Container: java.sql.SQLException: General error: Column 
> 'repository_name' cannot be null;', Port: 25, Secure(SSL): No, Server 
> Error: 451, Error Number: 0x800CCC6A
>
> This is then thrown up in the Console :
>
> java.sql.SQLException: General error: Column 'repository_name' cannot 
> be null
>        at org.gjt.mm.mysql.MysqlIO.sendCommand(Unknown Source)
>        at org.gjt.mm.mysql.MysqlIO.sqlQueryDirect(Unknown Source)
>        at org.gjt.mm.mysql.Connection.execSQL(Unknown Source)
>        at org.gjt.mm.mysql.PreparedStatement.execute(Unknown Source)
>        at 
> org.apache.james.mailrepository.JDBCMailRepository.store(JDBCMailRepository.java:635) 
>
>        at 
> org.apache.james.mailrepository.JDBCSpoolRepository.store(JDBCSpoolRepository.java:243) 
>
>        at org.apache.james.James.sendMail(James.java:499)
>        at java.lang.reflect.Method.invoke(Native Method)
>        at 
> org.apache.avalon.phoenix.components.application.BlockInvocationHandler.invoke(BlockInvoc 
>
> ationHandler.java:92)
>        at $Proxy9.sendMail(Unknown Source)
>        at 
> org.apache.james.smtpserver.SMTPHandler.processMail(SMTPHandler.java:1406) 
>
>        at 
> org.apache.james.smtpserver.SMTPHandler.doDATA(SMTPHandler.java:1253)
>        at 
> org.apache.james.smtpserver.SMTPHandler.parseCommand(SMTPHandler.java:608) 
>
>        at 
> org.apache.james.smtpserver.SMTPHandler.handleConnection(SMTPHandler.java:381) 
>
>        at 
> org.apache.james.util.connection.ServerConnection$ClientConnectionRunner.run(ServerConnec 
>
> tion.java:462)
>        at 
> org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(ExecutableRunnable.jav 
>
> a:47)
>        at 
> org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread.java:80) 
>
>
>
> I have used the James documentation pages to set up the config.xml 
> file as best I can.  Here are the relevent sections:
>
> <inboxRepository>
>         <repository destinationURL="db://maildb/inbox/" type="MAIL"/>
> </inboxRepository>
>
> <data-source name="maildb" 
> class="org.apache.james.util.mordred.JdbcDataSource">
>            <driver>org.gjt.mm.mysql.Driver</driver>
>            
> <dburl>jdbc:mysql://***.***.***.***/james?autoReconnect=true</dburl>
>            <user>*****</user>
>            <password>*****</password>
>            <max>50</max>
>         </data-source>
>
>
> Is there anything you could suggest to sort this problem?
>
> Rhys
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>


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


RE: Using MySQL for inbox repository

Posted by "Noel J. Bergman" <no...@devtech.com>.
> my messages (outgoing/incoming) get stuck in the  "spool" table
> and then get transfered to the "deadletter" table

Turn on DEBUG for the spool manager in environment.xml, and then you can
watch to see which matcher is causing that to happen.

	--- Noel


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


Re: Using MySQL for inbox repository

Posted by jaysheel bhavsar <jb...@mindbridge.com>.
Hi,
   I am very new to james. I got james to work if file repository and now I am 
trying to make it work with the database. I many of you got this to work very 
successfully I don't get any errors but my messages (outgoing/incoming) get 
stuck in the  "spool" table and then get transfered to the "deadletter" table 
they never reach the inbox or outbox of any user. Can someone please let me 
know what I might be doing wrong and how to fix it?, can I take a look at 
your config file as well?
 
thank you so much.
Jay.

On Thursday 20 May 2004 07:03, Rhys Hardwick wrote:
> Thank you very much for the help.  This has stopped the error from
> happening.  I will now try to change all the other repositories to
> database.  If I encounter any problems, I will post them here!  Just
> hope I don't have to!  :-)
>
> Rhys
>
> Noel J. Bergman wrote:
> >>java.sql.SQLException: General error: Column 'repository_name' cannot be
> >
> >null
> >
> >>...
> >>...JDBCMailRepository.store(JDBCMailRepository.java:635)
> >>...JDBCSpoolRepository.store(JDBCSpoolRepository.java:243)
> >>...James.sendMail(James.java:499)
> >>...SMTPHandler.processMail(SMTPHandler.java:1406)
> >
> >This is happening when James tries to inject mail into the spool for
> >processing, so your inbox definition doesn't help.  The entry that looks
> >like:
> >
> >      <spoolRepository>
> >         <repository destinationURL="db://maildb/spool/spool"
> > type="SPOOL"/> </spoolRepository>
> >
> >would be the important thing.
> >
> >	--- Noel
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> >For additional commands, e-mail: server-user-help@james.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org


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


Re: Using MySQL for inbox repository

Posted by Rhys Hardwick <rh...@hardwick.no-ip.org>.
Thank you very much for the help.  This has stopped the error from 
happening.  I will now try to change all the other repositories to 
database.  If I encounter any problems, I will post them here!  Just 
hope I don't have to!  :-)

Rhys


Noel J. Bergman wrote:

>>java.sql.SQLException: General error: Column 'repository_name' cannot be
>>    
>>
>null
>  
>
>>...
>>...JDBCMailRepository.store(JDBCMailRepository.java:635)
>>...JDBCSpoolRepository.store(JDBCSpoolRepository.java:243)
>>...James.sendMail(James.java:499)
>>...SMTPHandler.processMail(SMTPHandler.java:1406)
>>    
>>
>
>This is happening when James tries to inject mail into the spool for
>processing, so your inbox definition doesn't help.  The entry that looks
>like:
>
>      <spoolRepository>
>         <repository destinationURL="db://maildb/spool/spool" type="SPOOL"/>
>      </spoolRepository>
>
>would be the important thing.
>
>	--- Noel
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
>For additional commands, e-mail: server-user-help@james.apache.org
>
>
>  
>



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


RE: Using MySQL for inbox repository

Posted by "Noel J. Bergman" <no...@devtech.com>.
> java.sql.SQLException: General error: Column 'repository_name' cannot be
null
> ...
> ...JDBCMailRepository.store(JDBCMailRepository.java:635)
> ...JDBCSpoolRepository.store(JDBCSpoolRepository.java:243)
> ...James.sendMail(James.java:499)
> ...SMTPHandler.processMail(SMTPHandler.java:1406)

This is happening when James tries to inject mail into the spool for
processing, so your inbox definition doesn't help.  The entry that looks
like:

      <spoolRepository>
         <repository destinationURL="db://maildb/spool/spool" type="SPOOL"/>
      </spoolRepository>

would be the important thing.

	--- Noel


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