Hi,

I'm using James 2.1a1 with Oracle 8.1.7 Db in Windows 2000 Server and using 
it without any problems. I have included both classes12.zip and 
nls_charset12.zip oracle jdbc libraries which you must use whenever the 
datasource sink is oracle.

I am using the following config in config.xml:

<data-source name="maildb"
class="org.apache.james.util.mordred.JdbcDataSource">
<driver>oracle.jdbc.driver.OracleDriver</driver>
<dburl>jdbc:oracle:thin:@localhost:1521:<SID></dburl>
<user>system</user>
<password>manager</password>
<max>0</max>
</data-source>

Place both mentioned libs in the <James Installation Dir>\lib and follow 
steps in http://jakarta.apache.org/james/FAQ.html#8 (FAQ) on how to achieve 
this.

Also you must ensure valid db specific SQL schema info have been included in 
SQLResources.xml. This should already be included in James 2.02a/2.03a 
readily available in CVS.

Hope this helps,

Sam.


>From: Eric Weidner <[EMAIL PROTECTED]>
>Reply-To: "James Users List" <[EMAIL PROTECTED]>
>To: James Users List <[EMAIL PROTECTED]>
>Subject: Re: ClassNotFoundException error when trying to connect to Oracle  
>9i
>Date: Mon, 17 Jun 2002 15:33:29 -0600
>
>Renaming to .jar should be fine.
>
>A word of caution....
>
>I recently tried to use James with 9i using the steps in the attachment. 
>Everything worked great except that attachments over about 100kB were 
>getting truncated when going through the smtp processor.  In the past few 
>days, I finally got around to trying out Oracle 8.1.7 and had the same 
>truncation problem.  I know there are a few people on here that I think are 
>using Oracle 8 successfully.
>
>If anyone has any ideas, please let me know.  Just beware that you may have 
>some issues.
>
>I'll be going to use MySQL soon anyway, but the problem would be nice to 
>solve.
>
>Eric Weidner
>Sr. Consultant
>EJB Solutions, Inc.
>
>Lach, Thierry wrote:
>
>>I've always been able to rename the oracle jdbc drivers from .zip to .jar 
>>and they work just fine.
>>
>>-----Original Message-----
>>From: Andrei Ivanov [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, June 17, 2002 4:23 PM
>>To: James Users List
>>Subject: Re: ClassNotFoundException error when trying to connect to Oracle 
>>9i
>>
>>
>>If your Oracle drivers are in zip this is *not* ok for Phoenix. They must 
>>be in jar with valid manifest. I recommend you to unzip your Oracle 
>>drivers and then jar them for example with ant. If you use excalibur 
>>packages for database access make sure they are located in same directory 
>>as your jdbc drivers. Simplest way is to just have them all under 
>>phoenix/lib directory. Hope this helps, Andrei
>>
>>----- Original Message -----
>>From: "bhogan" <[EMAIL PROTECTED]>
>>To: <[EMAIL PROTECTED]>
>>Sent: Monday, June 17, 2002 11:02 PM
>>Subject: ClassNotFoundException error when trying to connect to Oracle 9i
>>
>>
>> > I'm having problems getting James to talk to an external Oracle 9i
>> > database.Does anyone have any suggestions?  Thanks!
>> >
>> > My config.xml:
>> > <data-source name="maildb"
>> >                      
>>class="org.apache.james.util.mordred.JdbcDataSource">
>> >             <driver>oracle.jdbc.driver.OracleDriver</driver>
>> >             <dburl>jdbc:oracle://123.123.123.23/PROTO9</dburl>
>> >             <user>name</user>
>> >             <password>blah</password>
>> >             <max>2</max>
>> >         </data-source>
>> >
>> > Error from phoenix.log:
>> >
>> > rethrown from
>> > java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver at
>> > java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>> > at java.security.AccessController.doPrivileged(Native Method) at
>> > java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>> > at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
>> > at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
>> > at
>> >
>>org.apache.avalon.cornerstone.blocks.datasource.DefaultDataSourceSelector.in
>>
>>it
>> > ialize(DefaultDataSourceSelector.java:94)
>> > at
>> >
>>org.apache.avalon.phoenix.components.application.LifecycleHelper.startup(Lif
>>
>>ec
>> > ycleHelper.java:199)
>> >
>> > Please note I have a new e-mail address
>> >
>> > Brendan L. Hogan, MCSE, MCT
>> > Product Support Engineer
>> > Virginia Community College Utility
>> > Customer Support Center
>> > [EMAIL PROTECTED]
>> > 540-857-6475
>> > fax 540-857-6090
>> >
>> >
>> > --
>> > To unsubscribe, e-mail:
>><mailto:[EMAIL PROTECTED]>
>> > For additional commands, e-mail:
>><mailto:[EMAIL PROTECTED]>
>> >
>>
>>
>>
>>--
>>To unsubscribe, e-mail:   
>><mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail: 
>><mailto:[EMAIL PROTECTED]>
>>
>>------------------------------------------------------------------------
>>
>>--
>>To unsubscribe, e-mail:   
>><mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail: 
>><mailto:[EMAIL PROTECTED]>
>>
>
>
>Create Tablespace in your instance.
>
>Create James user
>
>
>
>Edit sqlResources.xml
>
>
>Find in the JamesUsersJdbcRepository section
>
>     <sql name="createTable">CREATE TABLE ${table} (username VARCHAR(50) 
>NOT NULL, pwdHas
>h VARCHAR(50), pwdAlgorithm VARCHAR(20), useForwarding SMALLINT, 
>forwardDestination VARC
>HAR(250), useAlias SMALLINT, alias VARCHAR(250), PRIMARY 
>KEY(username))</sql>
>
>to
>
>     <sql name="createTable">CREATE TABLE ${table} (username VARCHAR2(50) 
>NOT NULL, pwdHa
>sh VARCHAR2(50), pwdAlgorithm VARCHAR2(20), useForwarding NUMBER(10), 
>forwardDestination
>  VARCHAR2(2250), useAlias NUMBER(10), alias VARCHAR2(2250), PRIMARY 
>KEY(username))</sql>
>
>
>
>Find in the DefaultUsersJdbcRepository section
>
>     <sql name="createTable">CREATE TABLE ${table} (username VARCHAR(50) 
>NOT NULL, pwdHas
>h VARCHAR(50), pwdAlgorithm VARCHAR(20), PRIMARY KEY(username))</sql>
></sqlDefs>
>
>to
>
>     <sql name="createTable">CREATE TABLE ${table} (username VARCHAR2(50) 
>NOT NULL, pwdHa
>sh VARCHAR2(50), pwdAlgorithm VARCHAR2(20), PRIMARY KEY(username))</sql>
></sqlDefs>
>
>
>
>Find in the ListUsersJdbcRepository section
>
>     <sql name="createTable">CREATE TABLE ${table} (listName VARCHAR(50) 
>NOT NULL, listSu
>bscriber VARCHAR(50) NOT NULL)</sql>
>
>to
>
>     <sql name="createTable">CREATE TABLE ${table} (listName VARCHAR2(50) 
>NOT NULL, listS
>ubscriber VARCHAR2(50) NOT NULL)</sql>
>
>
>Find in the JDBCMailRepository section
>
>should be ok in latest CVS build
>
>
>Find in the JDBCSpoolRepository section
>
>
>should be ok in latest CVS build
>
>
>
>Edit config.xml
>
>Find in the James block
>
>       <!-- The inbox repository is the location for users inboxes -->
>       <!-- Default setting: file based repository - enter path ( :/// for 
>absolute) -->
>       <inboxRepository>
>         <repository destinationURL="file://var/mail/inboxes/"
>                     type="MAIL">
>         </repository>
>       </inboxRepository>
>       <!-- Alternative inbox repository definition for DB use. -->
>       <!--  The format for the destinationURL is 
>"db://<data-source>/<table>"
>             - <data-source> is the datasource name set up in the
>                     database-connections block, below
>             - <table> is the name of the table to store user inboxes in
>            The user name is used as <repositoryName> for this repository 
>config.
>
>            <inboxRepository>
>         <repository destinationURL="db://maildb/inbox/"
>                     type="MAIL">
>         </repository>
>       </inboxRepository>
>       -->
>
>to
>
>       <!-- The inbox repository is the location for users inboxes -->
>       <!-- Default setting: file based repository - enter path ( :/// for 
>absolute) -->
>       <!--
>       <inboxRepository>
>         <repository destinationURL="file://var/mail/inboxes/"
>                     type="MAIL">
>         </repository>
>       </inboxRepository>
>       -->
>       <!-- Alternative inbox repository definition for DB use. -->
>       <!--  The format for the destinationURL is 
>"db://<data-source>/<table>"
>             - <data-source> is the datasource name set up in the
>                     database-connections block, below
>             - <table> is the name of the table to store user inboxes in
>            The user name is used as <repositoryName> for this repository 
>config.
>       -->
>
>       <inboxRepository>
>         <repository destinationURL="db://maildb/inbox/"
>                     type="MAIL">
>         </repository>
>       </inboxRepository>
>
>
>
>Find in the mailstore block
>
>       <!-- Spool repository configuration -->
>       <!-- The spool repository is a singular location where incoming 
>mails
>       are temporarily stored before being processed.
>      (ex. file://c:/james/spool/) -->
>
>       <!-- Default setting: file based repository - enter path ( :/// for 
>absolute) -->
>       <spoolRepository>
>         <repository destinationURL="file://var/mail/spool/"
>                     type="SPOOL">
>         </repository>
>       </spoolRepository>
>
>       <!-- Alternative spool repository definition for JDBC use -->
>
>       <!--      <spoolRepository>
>         <repository destinationURL="db://maildb/message/spool"
>                     type="SPOOL">
>         </repository>
>       </spoolRepository>
>       -->
>
>to
>
>       <!-- Spool repository configuration -->
>       <!-- The spool repository is a singular location where incoming 
>mails
>       are temporarily stored before being processed.
>      (ex. file://c:/james/spool/) -->
>
>       <!-- Default setting: file based repository - enter path ( :/// for 
>absolute) -->
>       <!--
>       <spoolRepository>
>         <repository destinationURL="file://var/mail/spool/"
>                     type="SPOOL">
>         </repository>
>       </spoolRepository>
>       -->
>
>       <!-- Alternative spool repository definition for JDBC use -->
>
>       <spoolRepository>
>         <repository destinationURL="db://maildb/message/spool"
>                     type="SPOOL">
>         </repository>
>       </spoolRepository>
>
>Find in the users-store block
>
>       <!-- Default: File-based user repositories
>            Use these configurations to store user info in the filesystem  
>-->
>
>       <!-- The LocalUsers repository, for storing James' User info. -->
>       <repository name="LocalUsers"
>                   
>class="org.apache.james.userrepository.UsersFileRepository">
>         <destination URL="file://var/users/"/>
>       </repository>
>       <!-- The list used by the default ListServ mailet -->
>       <repository name="list-james"
>                   
>class="org.apache.james.userrepository.UsersFileRepository">
>         <destination URL="file://var/lists/list-james/"/>
>       </repository>
>
>
>       <!-- Database backed user repositories
>            Use these configurations to store user info in a database.
>            Note: the <data-source> element must refer to a connection 
>configured
>             in the <database-connections> configuration section. -->
>
>       <!-- The LocalUsers repository, for storing James' User info. -->
>
>       <!--       <repository name="LocalUsers"
>                   
>class="org.apache.james.userrepository.JamesUsersJdbcRepository"
>                   destinationURL="db://maildb/users">
>           <sqlFile>file://conf/sqlResources.xml</sqlFile>
>       </repository>
>       -->
>       <!-- The list used by the default ListServ mailet -->
>       <!--      <repository name="list-james"
>                   
>class="org.apache.james.userrepository.ListUsersJdbcRepository"
>                   destinationURL="db://maildb/lists/list-james">
>           <sqlFile>file://conf/sqlResources.xml</sqlFile>
>       </repository>
>       -->
>
>       <!-- An example mailinglist repository, with no "listName" parameter
>            specified. Uses the default value from the sql definition file. 
>-->
>       <!-- Testing purposes only. -->
>       <!--     <repository name="list-test"
>                   
>class="org.apache.james.userrepository.ListUsersJdbcRepository"
>                   destinationURL="db://maildb/lists">
>           <sqlFile>file://conf/sqlResources.xml</sqlFile>
>       </repository>
>       -->
>
>to
>
>       <!-- Default: File-based user repositories
>            Use these configurations to store user info in the filesystem  
>-->
>
>       <!-- The LocalUsers repository, for storing James' User info. -->
>       <!--
>       <repository name="LocalUsers"
>                   
>class="org.apache.james.userrepository.UsersFileRepository">
>         <destination URL="file://var/users/"/>
>       </repository>
>       -->
>       <!-- The list used by the default ListServ mailet -->
>       <!--
>       <repository name="list-james"
>                   
>class="org.apache.james.userrepository.UsersFileRepository">
>         <destination URL="file://var/lists/list-james/"/>
>       </repository>
>       -->
>
>
>       <!-- Database backed user repositories
>            Use these configurations to store user info in a database.
>            Note: the <data-source> element must refer to a connection 
>configured
>             in the <database-connections> configuration section. -->
>
>       <!-- The LocalUsers repository, for storing James' User info. -->
>
>       <repository name="LocalUsers"
>                   
>class="org.apache.james.userrepository.JamesUsersJdbcRepository"
>                   destinationURL="db://maildb/users">
>           <sqlFile>file://conf/sqlResources.xml</sqlFile>
>       </repository>
>       <!-- The list used by the default ListServ mailet -->
>       <repository name="list-james"
>                   
>class="org.apache.james.userrepository.ListUsersJdbcRepository"
>                   destinationURL="db://maildb/lists/list-james">
>           <sqlFile>file://conf/sqlResources.xml</sqlFile>
>       </repository>
>
>
>
>Find in the database-connections block
>
>   <database-connections>
>     <!-- Confugure database connections here.
>          These connections are referred to by name elsewhere in the config 
>file -->
><!-- CHECKME! To allow James to use a database, configure the database 
>connection here -
>->
>     <data-sources>
>         <!-- Example, connecting to a MySQL database called "mail" on 
>localhost
>         -->
>         <!--
>         <data-source name="maildb"
>                      class="org.apache.james.util.mordred.JdbcDataSource">
>             <driver>org.gjt.mm.mysql.Driver</driver>
>             <dburl>jdbc:mysql://127.0.0.1/mail</dburl>
>             <user>username</user>
>             <password>password</password>
>             <max>2</max>
>         </data-source>
>         <data-source name="maildb"
>                      class="org.apache.james.util.mordred.JdbcDataSource">
>             <driver>com.inet.tds.TdsDriver</driver>
>             <dburl>jdbc:inetdae7:127.0.0.1?database=James</dburl>
>             <user>sa_james</user>
>             <password>blahblah</password>
>             <max>2</max>
>         </data-source>
>         -->
>     </data-sources>
>   </database-connections>
>
>
>to
>
>
>   <database-connections>
>     <!-- Confugure database connections here.
>          These connections are referred to by name elsewhere in the config 
>file -->
><!-- CHECKME! To allow James to use a database, configure the database 
>connection here -
>->
>     <data-sources>
>         <!-- Example, connecting to a MySQL database called "mail" on 
>localhost
>         -->
>         <data-source name="maildb"
>                      class="org.apache.james.util.mordred.JdbcDataSource">
>             <driver>oracle.jdbc.driver.OracleDriver</driver>
>             <dburl>jdbc:oracle:oci8:@ejb.ejbsolutions.com</dburl>
>             <user>james</user>
>             <password>blahblah</password>
>             <max>20</max>
>         </data-source>
>         <!--
>         <data-source name="maildb"
>                      class="org.apache.james.util.mordred.JdbcDataSource">
>             <driver>com.inet.tds.TdsDriver</driver>
>             <dburl>jdbc:inetdae7:127.0.0.1?database=James</dburl>
>             <user>sa_james</user>
>             <password>blahblah</password>
>             <max>2</max>
>         </data-source>
>         -->
>     </data-sources>
>   </database-connections>
>
>
>
>Need to set up Oracle client so that Root can use the fat client (Type 2 
>driver).
>
>
>cd to root's home
>
>edit .bash_profile
>
>add the following lines at the end...
>
>ORACLE_HOME=/u01/oracle/9i;export ORACLE_HOME
>PATH=$PATH:$ORACLE_HOME/bin;export PATH
>LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib;export LD_LIBRARY_PATH
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>--
>To unsubscribe, e-mail:   
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>


_________________________________________________________________
Join the world�s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to