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 J Malcolm <te...@malcolms.com> on 2004/04/02 07:32:29 UTC

Problem using db store for the first time

I've been using file storage until now.  I'm attempting to move to db
storage.  So this is an initial bringup problem.  I'm getting the
following error:

 ERROR   2004-04-01 23:16:02.258 [Phoenix.] (): Component named
"mailstore" failed to pass through the Initialization stage. (Reason:
org.apache.avalon.framework.component.ComponentException: Cannot find or
init repository).

Here are the relevant blocks in the config file:

   <mailstore>
      <repository
class="org.apache.james.mailrepository.JDBCMailRepository">
         <protocols>
            <protocol>db</protocol>
         </protocols>
         <types>
            <type>MAIL</type>
         </types>
         <config>
 
<sqlFile>file:///c:/james-2.1.3/apps/james/conf/sqlResources.xml</sqlFil
e>
         </config>
      </repository>

      <repository
class="org.apache.james.mailrepository.JDBCSpoolRepository">
         <protocols>
            <protocol>db</protocol>
         </protocols>
         <types>
            <type>SPOOL</type>
         </types>
         <config>
 
<sqlFile>file:///c:/james-2.1.3/apps/james/conf/sqlResources.xml</sqlFil
e>
         </config>
      </repository>

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

   <database-connections>
      <data-sources>
         <data-source name="maildb"
class="org.apache.james.util.mordred.JdbcDataSource">
            <driver>org.gjt.mm.mysql.Driver</driver>
 
<dburl>jdbc:mysql://localhost/mail?autoReconnect=true</dburl>
            <user>xxxxx</user>
            <password>xxxxxxxx</password>
            <max>40</max>
         </data-source>
      </data-sources>
   </database-connections>

========================================================================
==================

I created a db named "mail" in mysql.  It didn't appear from docs that I
have to create tables or anything.  

I tried renaming the data source and get the same error, which implies
to me it's not even getting that far.  But the error message implies
that it is.

Any ideas where I've gone wrong?  Any way to turn on high debug level in
phoenix (debug loglevel in mailstore doesn't yield any additional info).

One other question... if the url syntax is "db:<datasource>/<table>",
what does "db:/maildb/spool/spool" resolve to?  Is there a table created
named "spool/spool"

Thanks as always.

Jerry


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


RE: Problem using db store for the first time

Posted by Daniel Perry <d....@netcase.co.uk>.
I had this problem with ips - you can use 127.0.0.1, but if you set up a
mysql user for Host localhost it doesnt work!

Instead set up a mysql user with the Host being the machines full name.

I think this is somthing to with the JDBC driver, as php uses a user with
'localhost'.

Daniel.

-----Original Message-----
From: Brian Brewer [mailto:bbrewer@tregyr.com]
Sent: 05 April 2004 16:22
To: James Users List
Subject: Re: Problem using db store for the first time


Don't use localhost for your connect string - use the boxes local IP or
127.0.0.1 and make sure you have a relevant entry in your database users
table.  mySql has some problems with resolving localhost.  I don't
remember the specifics, but I've had similar problems in the past.

Brian Brewer

J Malcolm wrote:

>I've been using file storage until now.  I'm attempting to move to db
>storage.  So this is an initial bringup problem.  I'm getting the
>following error:
>
> ERROR   2004-04-01 23:16:02.258 [Phoenix.] (): Component named
>"mailstore" failed to pass through the Initialization stage. (Reason:
>org.apache.avalon.framework.component.ComponentException: Cannot find or
>init repository).
>
>Here are the relevant blocks in the config file:
>
>   <mailstore>
>      <repository
>class="org.apache.james.mailrepository.JDBCMailRepository">
>         <protocols>
>            <protocol>db</protocol>
>         </protocols>
>         <types>
>            <type>MAIL</type>
>         </types>
>         <config>
>
><sqlFile>file:///c:/james-2.1.3/apps/james/conf/sqlResources.xml</sqlFil
>e>
>         </config>
>      </repository>
>
>      <repository
>class="org.apache.james.mailrepository.JDBCSpoolRepository">
>         <protocols>
>            <protocol>db</protocol>
>         </protocols>
>         <types>
>            <type>SPOOL</type>
>         </types>
>         <config>
>
><sqlFile>file:///c:/james-2.1.3/apps/james/conf/sqlResources.xml</sqlFil
>e>
>         </config>
>      </repository>
>
>      <spoolRepository>
>         <repository destinationURL="db://maildb/spool/spool"
>type="SPOOL"/>
>      </spoolRepository>
>   </mailstore>
>
>   <database-connections>
>      <data-sources>
>         <data-source name="maildb"
>class="org.apache.james.util.mordred.JdbcDataSource">
>            <driver>org.gjt.mm.mysql.Driver</driver>
>
><dburl>jdbc:mysql://localhost/mail?autoReconnect=true</dburl>
>            <user>xxxxx</user>
>            <password>xxxxxxxx</password>
>            <max>40</max>
>         </data-source>
>      </data-sources>
>   </database-connections>
>
>========================================================================
>==================
>
>I created a db named "mail" in mysql.  It didn't appear from docs that I
>have to create tables or anything.
>
>I tried renaming the data source and get the same error, which implies
>to me it's not even getting that far.  But the error message implies
>that it is.
>
>Any ideas where I've gone wrong?  Any way to turn on high debug level in
>phoenix (debug loglevel in mailstore doesn't yield any additional info).
>
>One other question... if the url syntax is "db:<datasource>/<table>",
>what does "db:/maildb/spool/spool" resolve to?  Is there a table created
>named "spool/spool"
>
>Thanks as always.
>
>Jerry
>
>
>---------------------------------------------------------------------
>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: Problem using db store for the first time

Posted by Brian Brewer <bb...@tregyr.com>.
Don't use localhost for your connect string - use the boxes local IP or 
127.0.0.1 and make sure you have a relevant entry in your database users 
table.  mySql has some problems with resolving localhost.  I don't 
remember the specifics, but I've had similar problems in the past. 

Brian Brewer

J Malcolm wrote:

>I've been using file storage until now.  I'm attempting to move to db
>storage.  So this is an initial bringup problem.  I'm getting the
>following error:
>
> ERROR   2004-04-01 23:16:02.258 [Phoenix.] (): Component named
>"mailstore" failed to pass through the Initialization stage. (Reason:
>org.apache.avalon.framework.component.ComponentException: Cannot find or
>init repository).
>
>Here are the relevant blocks in the config file:
>
>   <mailstore>
>      <repository
>class="org.apache.james.mailrepository.JDBCMailRepository">
>         <protocols>
>            <protocol>db</protocol>
>         </protocols>
>         <types>
>            <type>MAIL</type>
>         </types>
>         <config>
> 
><sqlFile>file:///c:/james-2.1.3/apps/james/conf/sqlResources.xml</sqlFil
>e>
>         </config>
>      </repository>
>
>      <repository
>class="org.apache.james.mailrepository.JDBCSpoolRepository">
>         <protocols>
>            <protocol>db</protocol>
>         </protocols>
>         <types>
>            <type>SPOOL</type>
>         </types>
>         <config>
> 
><sqlFile>file:///c:/james-2.1.3/apps/james/conf/sqlResources.xml</sqlFil
>e>
>         </config>
>      </repository>
>
>      <spoolRepository>
>         <repository destinationURL="db://maildb/spool/spool"
>type="SPOOL"/>
>      </spoolRepository>
>   </mailstore>
>
>   <database-connections>
>      <data-sources>
>         <data-source name="maildb"
>class="org.apache.james.util.mordred.JdbcDataSource">
>            <driver>org.gjt.mm.mysql.Driver</driver>
> 
><dburl>jdbc:mysql://localhost/mail?autoReconnect=true</dburl>
>            <user>xxxxx</user>
>            <password>xxxxxxxx</password>
>            <max>40</max>
>         </data-source>
>      </data-sources>
>   </database-connections>
>
>========================================================================
>==================
>
>I created a db named "mail" in mysql.  It didn't appear from docs that I
>have to create tables or anything.  
>
>I tried renaming the data source and get the same error, which implies
>to me it's not even getting that far.  But the error message implies
>that it is.
>
>Any ideas where I've gone wrong?  Any way to turn on high debug level in
>phoenix (debug loglevel in mailstore doesn't yield any additional info).
>
>One other question... if the url syntax is "db:<datasource>/<table>",
>what does "db:/maildb/spool/spool" resolve to?  Is there a table created
>named "spool/spool"
>
>Thanks as always.
>
>Jerry
>
>
>---------------------------------------------------------------------
>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: Problem using db store for the first time

Posted by J Malcolm <te...@malcolms.com>.
Will do.  But it was a clean install yesterday when I started this.

Jerry

-----Original Message-----
From: Noel J. Bergman [mailto:noel@devtech.com] 
Sent: Friday, April 02, 2004 2:38 PM
To: James Users List
Subject: RE: Problem using db store for the first time

> 01/04/04 23:16:02 DEBUG mailstore: obtained repository: null to
handle:
db,SPOOL

Sounds as if something is broken in the configuration.  I suggest that
you
start with a clean install of  James, at least to test, and go from
there.

	--- 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: Problem using db store for the first time

Posted by "Noel J. Bergman" <no...@devtech.com>.
> 01/04/04 23:16:02 DEBUG mailstore: obtained repository: null to handle:
db,SPOOL

Sounds as if something is broken in the configuration.  I suggest that you
start with a clean install of  James, at least to test, and go from there.

	--- Noel


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


RE: Problem using db store for the first time

Posted by J Malcolm <te...@malcolms.com>.
I had that turned on, but only got the one additional line about the
repository.  But $CLASS is null:

01/04/04 23:16:02 INFO  mailstore: JamesMailStore init...
01/04/04 23:16:02 DEBUG mailstore: obtained repository: null to handle:
db,SPOOL
01/04/04 23:16:02 WARN  mailstore: Exception while creating
repository:null
java.lang.NullPointerException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at
org.apache.james.core.AvalonMailStore.select(AvalonMailStore.java:336)
        at
org.apache.james.core.AvalonMailStore.initialize(AvalonMailStore.java:17
9)
        at
org.apache.avalon.framework.container.ContainerUtil.initialize(Container
Util.java:235)
        at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(Life
cycleHelper.java:144)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.star
tup(DefaultApplication.java:480)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.doRu
nPhase(DefaultApplication.java:428)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.runP
hase(DefaultApplication.java:364)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.star
t(DefaultApplication.java:138)
        at
org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.
java:251)
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(Defaul
tKernel.java:178)
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication
(DefaultKernel.java:254)
        at
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(Def
aultDeployer.java:353)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
(DefaultEmbeddor.java:498)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
(DefaultEmbeddor.java:491)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
s(DefaultEmbeddor.java:476)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefa
ultApplications(DefaultEmbeddor.java:466)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute(De
faultEmbeddor.java:224)
        at
org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:158)
        at
org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:144)
        at
org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:102)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.avalon.phoenix.launcher.Main.startup(Main.java:94)
        at org.apache.avalon.phoenix.launcher.Main.main(Main.java:46)
01/04/04 23:16:02 ERROR mailstore: Cannot open private SpoolRepository

-----Original Message-----
From: Noel J. Bergman [mailto:noel@devtech.com] 
Sent: Friday, April 02, 2004 2:13 PM
To: James Users List
Subject: RE: Problem using db store for the first time

It can't load the repository class.  If you enable DEBUG in
environment.xml
for things, in this case the mail stores, you will get a lot more
information.  One message in particular will tell you wish class it
thinks
it wants to load.

 obtained repository: $CLASS to handle $PROTOCOL, [MAIL|SPOOL]

	--- 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: Problem using db store for the first time

Posted by "Noel J. Bergman" <no...@devtech.com>.
It can't load the repository class.  If you enable DEBUG in environment.xml
for things, in this case the mail stores, you will get a lot more
information.  One message in particular will tell you wish class it thinks
it wants to load.

 obtained repository: $CLASS to handle $PROTOCOL, [MAIL|SPOOL]

	--- Noel


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


RE: Problem using db store for the first time

Posted by J Malcolm <te...@malcolms.com>.
I am attaching the full output trace.

The changes to the sqlFile path were done just grasping at straws when I
was just trying anything to see what was failing.  It was failing the
same way prior those changes.

Are the only debug flag options the ones in environment.xml, or is there
some sort of command line Phoenix-level debug flag I can turn on?

Thanks.

Using PHOENIX_HOME:   C:\james-2.1.3
Using PHOENIX_TMPDIR: C:\james-2.1.3\temp
Using JAVA_HOME:      c:\j2sdk1.4.2_04

Phoenix 4.0.1

There was an uncaught exception:
---------------------------------------------------------
--- Message ---
Failed to start application james.
--- Stack Trace ---
org.apache.avalon.phoenix.interfaces.DeploymentException: Failed to
start application james.
        at
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(Def
aultDeployer.java:379)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
(DefaultEmbeddor.java:498)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
(DefaultEmbeddor.java:491)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
s(DefaultEmbeddor.java:476)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefa
ultApplications(DefaultEmbeddor.java:466)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute(De
faultEmbeddor.java:224)
        at
org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:158)
        at
org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:144)
        at
org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:102)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.avalon.phoenix.launcher.Main.startup(Main.java:94)
        at org.apache.avalon.phoenix.launcher.Main.main(Main.java:46)
Caused by: org.apache.avalon.framework.CascadingException: Failed to
start application james.
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(Defaul
tKernel.java:195)
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication
(DefaultKernel.java:254)
        at
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(Def
aultDeployer.java:353)
        ... 14 more
Caused by: org.apache.avalon.phoenix.interfaces.ApplicationException:
Component named "mailstore" failed to pass through the Initialization
stage. (Reason:
org.apache.avalon.framework.component.ComponentException: Cannot find or
init repository).
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.star
t(DefaultApplication.java:144)
        at
org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.
java:251)
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(Defaul
tKernel.java:178)
        ... 16 more
Caused by:
org.apache.excalibur.containerkit.lifecycle.LifecycleException:
Component named "mailstore" failed to pass through the Initialization
stage. (Reason:
org.apache.avalon.framework.component.ComponentException: Cannot find or
init repository).
        at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.fail(Lifecyc
leHelper.java:289)
        at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(Life
cycleHelper.java:159)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.star
tup(DefaultApplication.java:480)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.doRu
nPhase(DefaultApplication.java:428)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.runP
hase(DefaultApplication.java:364)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.star
t(DefaultApplication.java:138)
        ... 18 more
Caused by: org.apache.avalon.framework.component.ComponentException:
Cannot find or init repository
        at
org.apache.james.core.AvalonMailStore.select(AvalonMailStore.java:369)
        at
org.apache.james.core.AvalonMailStore.initialize(AvalonMailStore.java:17
9)
        at
org.apache.avalon.framework.container.ContainerUtil.initialize(Container
Util.java:235)
        at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(Life
cycleHelper.java:144)
        ... 22 more
Caused by: java.lang.NullPointerException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at
org.apache.james.core.AvalonMailStore.select(AvalonMailStore.java:336)
        ... 25 more
rethrown from
org.apache.avalon.framework.CascadingException: Failed to start
application james.
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(Defaul
tKernel.java:195)
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication
(DefaultKernel.java:254)
        at
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(Def
aultDeployer.java:353)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
(DefaultEmbeddor.java:498)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
(DefaultEmbeddor.java:491)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
s(DefaultEmbeddor.java:476)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefa
ultApplications(DefaultEmbeddor.java:466)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute(De
faultEmbeddor.java:224)
        at
org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:158)
        at
org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:144)
        at
org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:102)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.avalon.phoenix.launcher.Main.startup(Main.java:94)
        at org.apache.avalon.phoenix.launcher.Main.main(Main.java:46)
Caused by: org.apache.avalon.phoenix.interfaces.ApplicationException:
Component named "mailstore" failed to pass through the Initialization
stage. (Reason:
org.apache.avalon.framework.component.ComponentException: Cannot find or
init repository).
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.star
t(DefaultApplication.java:144)
        at
org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.
java:251)
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(Defaul
tKernel.java:178)
        ... 16 more
Caused by:
org.apache.excalibur.containerkit.lifecycle.LifecycleException:
Component named "mailstore" failed to pass through the Initialization
stage. (Reason:
org.apache.avalon.framework.component.ComponentException: Cannot find or
init repository).
        at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.fail(Lifecyc
leHelper.java:289)
        at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(Life
cycleHelper.java:159)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.star
tup(DefaultApplication.java:480)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.doRu
nPhase(DefaultApplication.java:428)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.runP
hase(DefaultApplication.java:364)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.star
t(DefaultApplication.java:138)
        ... 18 more
Caused by: org.apache.avalon.framework.component.ComponentException:
Cannot find or init repository
        at
org.apache.james.core.AvalonMailStore.select(AvalonMailStore.java:369)
        at
org.apache.james.core.AvalonMailStore.initialize(AvalonMailStore.java:17
9)
        at
org.apache.avalon.framework.container.ContainerUtil.initialize(Container
Util.java:235)
        at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(Life
cycleHelper.java:144)
        ... 22 more
Caused by: java.lang.NullPointerException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at
org.apache.james.core.AvalonMailStore.select(AvalonMailStore.java:336)
        ... 25 more
rethrown from
org.apache.avalon.phoenix.interfaces.ApplicationException: Component
named "mailstore" failed to pass through the Initialization stage.
(Reason: org.apache.avalon.framework.component.ComponentException:
Cannot find or init repository).
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.star
t(DefaultApplication.java:144)
        at
org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.
java:251)
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(Defaul
tKernel.java:178)
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication
(DefaultKernel.java:254)
        at
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(Def
aultDeployer.java:353)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
(DefaultEmbeddor.java:498)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
(DefaultEmbeddor.java:491)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
s(DefaultEmbeddor.java:476)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefa
ultApplications(DefaultEmbeddor.java:466)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute(De
faultEmbeddor.java:224)
        at
org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:158)
        at
org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:144)
        at
org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:102)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.avalon.phoenix.launcher.Main.startup(Main.java:94)
        at org.apache.avalon.phoenix.launcher.Main.main(Main.java:46)
Caused by:
org.apache.excalibur.containerkit.lifecycle.LifecycleException:
Component named "mailstore" failed to pass through the Initialization
stage. (Reason:
org.apache.avalon.framework.component.ComponentException: Cannot find or
init repository).
        at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.fail(Lifecyc
leHelper.java:289)
        at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(Life
cycleHelper.java:159)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.star
tup(DefaultApplication.java:480)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.doRu
nPhase(DefaultApplication.java:428)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.runP
hase(DefaultApplication.java:364)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.star
t(DefaultApplication.java:138)
        ... 18 more
Caused by: org.apache.avalon.framework.component.ComponentException:
Cannot find or init repository
        at
org.apache.james.core.AvalonMailStore.select(AvalonMailStore.java:369)
        at
org.apache.james.core.AvalonMailStore.initialize(AvalonMailStore.java:17
9)
        at
org.apache.avalon.framework.container.ContainerUtil.initialize(Container
Util.java:235)
        at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(Life
cycleHelper.java:144)
        ... 22 more
Caused by: java.lang.NullPointerException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at
org.apache.james.core.AvalonMailStore.select(AvalonMailStore.java:336)
        ... 25 more
rethrown from
org.apache.excalibur.containerkit.lifecycle.LifecycleException:
Component named "mailstore" failed to pass through the Initialization
stage. (Reason:
org.apache.avalon.framework.component.ComponentException: Cannot find or
init repository).
        at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.fail(Lifecyc
leHelper.java:289)
        at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(Life
cycleHelper.java:159)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.star
tup(DefaultApplication.java:480)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.doRu
nPhase(DefaultApplication.java:428)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.runP
hase(DefaultApplication.java:364)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.star
t(DefaultApplication.java:138)
        at
org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.
java:251)
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(Defaul
tKernel.java:178)
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication
(DefaultKernel.java:254)
        at
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(Def
aultDeployer.java:353)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
(DefaultEmbeddor.java:498)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
(DefaultEmbeddor.java:491)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
s(DefaultEmbeddor.java:476)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefa
ultApplications(DefaultEmbeddor.java:466)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute(De
faultEmbeddor.java:224)
        at
org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:158)
        at
org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:144)
        at
org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:102)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.avalon.phoenix.launcher.Main.startup(Main.java:94)
        at org.apache.avalon.phoenix.launcher.Main.main(Main.java:46)
Caused by: org.apache.avalon.framework.component.ComponentException:
Cannot find or init repository
        at
org.apache.james.core.AvalonMailStore.select(AvalonMailStore.java:369)
        at
org.apache.james.core.AvalonMailStore.initialize(AvalonMailStore.java:17
9)
        at
org.apache.avalon.framework.container.ContainerUtil.initialize(Container
Util.java:235)
        at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(Life
cycleHelper.java:144)
        ... 22 more
Caused by: java.lang.NullPointerException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at
org.apache.james.core.AvalonMailStore.select(AvalonMailStore.java:336)
        ... 25 more
rethrown from
org.apache.avalon.framework.component.ComponentException: Cannot find or
init repository
        at
org.apache.james.core.AvalonMailStore.select(AvalonMailStore.java:369)
        at
org.apache.james.core.AvalonMailStore.initialize(AvalonMailStore.java:17
9)
        at
org.apache.avalon.framework.container.ContainerUtil.initialize(Container
Util.java:235)
        at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(Life
cycleHelper.java:144)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.star
tup(DefaultApplication.java:480)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.doRu
nPhase(DefaultApplication.java:428)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.runP
hase(DefaultApplication.java:364)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.star
t(DefaultApplication.java:138)
        at
org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.
java:251)
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(Defaul
tKernel.java:178)
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication
(DefaultKernel.java:254)
        at
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(Def
aultDeployer.java:353)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
(DefaultEmbeddor.java:498)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
(DefaultEmbeddor.java:491)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
s(DefaultEmbeddor.java:476)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefa
ultApplications(DefaultEmbeddor.java:466)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute(De
faultEmbeddor.java:224)
        at
org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:158)
        at
org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:144)
        at
org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:102)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.avalon.phoenix.launcher.Main.startup(Main.java:94)
        at org.apache.avalon.phoenix.launcher.Main.main(Main.java:46)
Caused by: java.lang.NullPointerException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at
org.apache.james.core.AvalonMailStore.select(AvalonMailStore.java:336)
        ... 25 more
rethrown from
java.lang.NullPointerException
        at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
        at
org.apache.james.core.AvalonMailStore.select(AvalonMailStore.java:336)
        at
org.apache.james.core.AvalonMailStore.initialize(AvalonMailStore.java:17
9)
        at
org.apache.avalon.framework.container.ContainerUtil.initialize(Container
Util.java:235)
        at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(Life
cycleHelper.java:144)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.star
tup(DefaultApplication.java:480)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.doRu
nPhase(DefaultApplication.java:428)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.runP
hase(DefaultApplication.java:364)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.star
t(DefaultApplication.java:138)
        at
org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.
java:251)
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(Defaul
tKernel.java:178)
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication
(DefaultKernel.java:254)
        at
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(Def
aultDeployer.java:353)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
(DefaultEmbeddor.java:498)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
(DefaultEmbeddor.java:491)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile
s(DefaultEmbeddor.java:476)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefa
ultApplications(DefaultEmbeddor.java:466)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.execute(De
faultEmbeddor.java:224)
        at
org.apache.avalon.phoenix.frontends.CLIMain.run(CLIMain.java:158)
        at
org.apache.avalon.phoenix.frontends.CLIMain.execute(CLIMain.java:144)
        at
org.apache.avalon.phoenix.frontends.CLIMain.main(CLIMain.java:102)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.avalon.phoenix.launcher.Main.startup(Main.java:94)
        at org.apache.avalon.phoenix.launcher.Main.main(Main.java:46)
-----Original Message-----
From: Noel J. Bergman [mailto:noel@devtech.com] 
Sent: Friday, April 02, 2004 12:07 PM
To: James Users List
Subject: RE: Problem using db store for the first time

> I'm attempting to move to db storage.

> I'm getting the following error

Why did you change from the working default configuration?  You have
added
absolute paths where there were relative paths, and I haven't looked to
see
what other changes you made, although the fact that you are using
mordred
instead of DBCP suggests that you are trying 2.1.3 instead of the
current
test build.

The only steps you should need to make would be:

 - create a database named "mail"
 - create a user with full permissions for the "mail" database
 - comment out the file-based selections
 - uncomment the db-based ones
 - uncomment the <data-source> element for the desired driver
 - adjust the <user> and <password> elements in the </data-source>
element.

James will create the tables.

	--- 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: Problem using db store for the first time

Posted by "Noel J. Bergman" <no...@devtech.com>.
> I'm attempting to move to db storage.

> I'm getting the following error

Why did you change from the working default configuration?  You have added
absolute paths where there were relative paths, and I haven't looked to see
what other changes you made, although the fact that you are using mordred
instead of DBCP suggests that you are trying 2.1.3 instead of the current
test build.

The only steps you should need to make would be:

 - create a database named "mail"
 - create a user with full permissions for the "mail" database
 - comment out the file-based selections
 - uncomment the db-based ones
 - uncomment the <data-source> element for the desired driver
 - adjust the <user> and <password> elements in the </data-source> element.

James will create the tables.

	--- Noel


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