Why does James makes calls to Composable.compose() method prior to
Configurable.configure() configure??? Shouldn't it be the other way round. I
thought that configure is the first method in any James object that gets
called prior to initialize, compose or any other method call. As I
understood it, configure must be the first method to be called as it sets up
any required resources based on the object is being called on and also more
importantly, setup and pick any external parameters from its corresponding
configuration file...
If this is the case, then James-dev team would have a serious bug in their
hands as this is the core objects and dictates the way James runs as a mail
server as a whole!!!
This would explain why I keep having problems when sending in attachment
files against a new message I attempt to send because it never recognises
the "filestore" variable run in JDBCMailRepository's compose() method
because it never gets filled as compose is ran before configure() method.
I'm confused!?!>!?!>!?!>!?!>!?>
Can someone shed a light into this issue?
Most grateful.
Sam.
>I have JAMES installed with Oracle 8.1.7 where the setup for the
>repositories are db configured as opposed to file-system based i.e. >lists,
>users, inbox, message tables are held within Oracle db.
>The problem I have is whenever I send a multipart message with a normal
>plain text/plain content type message for the text content and attachments
>for files to the message and send it to a localhost user within JAMES mail
>server domain, I get the following message exception from JAMES:
>java.sql.SQLException: ORA-01461: can bind a LONG value only for >insert
>into a L
ONG column
> at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
> at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
> at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
> at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
> at
oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822
)
> at
oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.ja
va:1446)
> at
oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.jav
a:1371)
> at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStateme
nt.java:1900)
> at
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePrepar
edStatement.java:363)
> at
oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStat
ement.java:407)
> at
org.apache.james.mailrepository.JDBCMailRepository.store(JDBCMailRepo
sitory.java:423)
> at org.apache.james.James.sendMail(James.java:261)
> at java.lang.reflect.Method.invoke(Native Method)
> at
org.apache.avalon.phoenix.components.application.BlockInvocationHandl
er.invoke(BlockInvocationHandler.java:88)
> at $Proxy9.sendMail(Unknown Source)
> at
org.apache.james.smtpserver.SMTPHandler.doDATA(SMTPHandler.java:599)
> at
org.apache.james.smtpserver.SMTPHandler.parseCommand(SMTPHandler.java
:248)
> at
org.apache.james.smtpserver.SMTPHandler.handleConnection(SMTPHandler.
java:163)
> at
org.apache.avalon.cornerstone.blocks.connection.ConnectionRunner.run(
Connection.java:163)
> at
org.apache.avalon.excalibur.thread.impl.ExecutableRunnable.execute(Ex
ecutableRunnable.java:47)
> at
org.apache.avalon.excalibur.thread.impl.WorkerThread.run(WorkerThread
.java:80)
>which seems to me that with this is a known jdbc driver problem >whereby
>big oracle data types such "long" are concerned which is this case, you
> >can only send a separate SQL statement to insert or update into this
>field data >type. In sqlResources.xml file, the mentioned exception is
>generated with >the following SQL statement:
><sql name="insertMessageSQL">INSERT INTO ${table} (message_name,
>repository_name, message_state, error_message, sender, recipients,
>remote_host, remote_addr, last_updated, message_body) VALUES (?, ?, ?, ?,
>?,
?, ?, ?, ?, ?)</sql>
>where message_body is of type LONG bearing in mind of the following oracle
>create clause for the inbox table:
><sql name="createTable" db="oracle">
> CREATE TABLE ${table} (
> message_name varchar2 (200) NOT NULL,
> repository_name varchar2 (200) NOT NULL,
> message_state varchar2 (30) NOT NULL ,
> error_message varchar2 (200) NULL ,
> sender varchar2 (200) ,
> recipients varchar2 (1000) NOT NULL ,
> remote_host varchar2 (100) NOT NULL ,
> remote_addr varchar2 (20) NOT NULL ,
> message_body long NOT NULL ,
> last_updated date NOT NULL ,
> PRIMARY KEY (message_name, repository_name)
> )
> TABLESPACE system
> </sql>
>Is this is a bug with JAMES SQL handling via jdbc pool connections? Is
> >there a workaround for this problem?
>Subsequently, this exception is not thrown when I send a normal pure
>text-based message to JAMES internal store.
>Appreciate some comments on this...
>Rgds,
>Sam.
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>