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 Listman <my...@shoesobjects.com> on 2003/02/11 04:04:36 UTC

Component named "mailstore" failed to pass through the Initialization stage.

Ive searched the archives and cannot find any reference to this other than
smtp port is already being used.  That is not the case here.  

I have verfied that I can log into mysql with the username/password in the
config.xml file.  Any ideas?



[root@orion logs]# vi phoenix.log 
INFO    2003-02-10 20:20:49.269 [Phoenix ] (): Logger started
WARN    2003-02-10 20:20:49.486 [Phoenix ] (): Phoenix was not started by
the daemon thus it will not be possible to restart the JVM via the
Management interface.
INFO    2003-02-10 20:20:51.900 [Phoenix.] (): Installing Sar located at
file:/usr/local/james-2.1/apps/james.sar.
WARN    2003-02-10 20:20:52.253 [Phoenix.] (): The file
SAR-INF/lib/mm.mysql.LICENCE can not be extracted from the Sar
"file:/usr/local/james-2.1/apps/james.sar" into directory
/usr/local/james-2.1/apps/james/SAR-INF/lib/mm.mysql.LICENCE because there
is a file in the way.
WARN    2003-02-10 20:20:52.256 [Phoenix.] (): The file
conf/sqlResources.xml can not be extracted from the Sar
"file:/usr/local/james-2.1/apps/james.sar" into directory
/usr/local/james-2.1/apps/james/conf/sqlResources.xml because there is a
file in the way.
WARN    2003-02-10 20:20:52.258 [Phoenix.] (): The file SAR-INF/config.xml
can not be extracted from the Sar "file:/usr/local/james-2.1/apps/james.sar"
into directory /usr/local/james-2.1/apps/james/SAR-INF/config.xml because
there is a file in the way.
WARN    2003-02-10 20:20:52.260 [Phoenix.] (): The file SAR-INF/assembly.xml
can not be extracted from the Sar "file:/usr/local/james-2.1/apps/james.sar"
into directory /usr/local/james-2.1/apps/james/SAR-INF/assembly.xml because
there is a file in the way.
WARN    2003-02-10 20:20:52.261 [Phoenix.] (): The file
SAR-INF/environment.xml can not be extracted from the Sar
"file:/usr/local/james-2.1/apps/james.sar" into directory
/usr/local/james-2.1/apps/james/SAR-INF/environment.xml because there is a
file in the way.
INFO    2003-02-10 20:20:52.524 [Phoenix.] (): No policy specified in
server.xml, giving full permissions to ServerApplication.
INFO    2003-02-10 20:20:53.319 [Phoenix.] (): Verifying that the name
specified for Blocks and BlockListeners are valid.
INFO    2003-02-10 20:20:53.321 [Phoenix.] (): Verifying that the name
specified for Blocks and BlockListeners are unique.
INFO    2003-02-10 20:20:53.321 [Phoenix.] (): Verifying that the specified
Dependencies are valid according to BlockInfo.
INFO    2003-02-10 20:20:53.323 [Phoenix.] (): Verifying that the
dependencies of Blocks are valid with respect to other Blocks.
INFO    2003-02-10 20:20:53.324 [Phoenix.] (): Verifying that there are no
circular dependencies between Blocks.
INFO    2003-02-10 20:20:53.333 [Phoenix.] (): Verifying that the specified
Blocks have valid types.
INFO    2003-02-10 20:20:53.494 [Phoenix.] (): Verifying that the specified
BlockListeners have valid types.
INFO    2003-02-10 20:20:53.732 [Phoenix.] (): 17 Blocks to process for
phase "startup". Order of processing = [dnsserver, objectstorage,
database-connections, mailstore, users-store, thread-manager, connections,
sockets, scheduler, James, spoolmanager, remotemanager, pop3server,
smtpserver, nntp-repository, nntpserver, fetchpop].
ERROR   2003-02-10 20:21:01.384 [Phoenix.] (): Component named "mailstore"
failed to pass through the Initialization stage. (Reason:
org.apache.avalon.framework.component.ComponentException: Cannot find or
init repository).
ERROR   2003-02-10 20:21:01.385 [Phoenix.] (): There was an error running
phase "startup" for Block named "mailstore". (Reason: Component named
"mailstore" failed to pass through the Initialization stage. (Reason:
org.apache.avalon.framework.component.ComponentException: Cannot find or
init repository).).
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(LifecycleHe
lper.java:289)
        at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(Lifecycl
eHelper.java:159)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.startup(
DefaultApplication.java:480)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPha
se(DefaultApplication.java:428)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase
(DefaultApplication.java:364)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.start(De
faultApplication.java:138)
        at
org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java
:251)
rethrown from
org.apache.avalon.framework.component.ComponentException: Cannot find or
init repository
        at
org.apache.james.core.AvalonMailStore.select(AvalonMailStore.java:311)
        at
org.apache.james.core.AvalonMailStore.initialize(AvalonMailStore.java:121)
        at
org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil
.java:235)
        at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(Lifecycl
eHelper.java:144)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.startup(
DefaultApplication.java:480)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPha
se(DefaultApplication.java:428)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase
(DefaultApplication.java:364)
rethrown from
java.sql.SQLException: Giving up... no connections available.
        at
org.apache.james.util.mordred.JdbcDataSource.getConnection(JdbcDataSource.ja
va:208)
        at
org.apache.james.mailrepository.JDBCMailRepository.initialize(JDBCMailReposi
tory.java:307)
        at
org.apache.james.core.AvalonMailStore.select(AvalonMailStore.java:292)
        at
org.apache.james.core.AvalonMailStore.initialize(AvalonMailStore.java:121)
        at
org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil
.java:235)
        at
org.apache.excalibur.containerkit.lifecycle.LifecycleHelper.startup(Lifecycl
eHelper.java:144)
        at
org.apache.avalon.phoenix.components.application.DefaultApplication.startup(
DefaultApplication.java:480)
INFO    2003-02-10 20:21:01.402 [Phoenix.] (): exception while
starting:Component named "mailstore" failed to pass through the
Initialization stage. (Reason:
org.apache.avalon.framework.component.ComponentException: Cannot find or
init repository).

WARN    2003-02-10 20:21:01.421 [Phoenix.] (): Failed to start application
james.
org.apache.avalon.framework.CascadingException: Failed to start application
james.
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(DefaultKer
nel.java:195)
        at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication(Def
aultKernel.java:254)
        at
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(Default
Deployer.java:353)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(Def
aultEmbeddor.java:498)
        at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(Def
aultEmbeddor.java:491)
               





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


Re: service under linux

Posted by bill parducci <bi...@parducci.net>.
testing tidbit:

for those who want to keep the console running, but don't want to stay 
logged in i would suggest considering screen.  not only does this keep 
the session alive after you detach but it allows you to fire up numerous 
'screens' where one can observe various log files, edit configs, etc. in 
real time.

b

Eric Weidner wrote:
> If you are using 2.1, create a new file named /etc/init.d/james with the 
> contents below.  Replace /opt/james with your james location and adjust 
> your JAVA_HOME location.
> 
> Then create a symlink in /etc/rc3.d and/or /etc/rc5.d (depending on your 
> default run level).
> 
> In the /etc/rc3.d directory (or /etc/rc5.d):
> #ln -s ../init.d/james S98james
> 
> James should start on boot.
> 
> To manually start or stop james:
> #/etc/init.d/james stop
> #/etc/init.d/james start
> 
> 
> 
> Eric Weidner
> Out-of-the-Box
> http://www.ejbsolutions.com
> 
> 
> **********************  BEGIN FILE BELOW ******************************
> #!/bin/sh
> # Startup script for James server
> #
> # description: Run James server
> 
> [ -f /opt/james/bin/phoenix.sh ] || exit 0
> 
> start() {
>   echo -n  "Starting James Server: "
>   JAVA_HOME=/usr/java;export JAVA_HOME
>   /opt/james/bin/phoenix.sh start
>   RETVAL=$?
>   echo
>   return $RETVAL
> }
> 
> stop() {
>   echo -n "Shutting down James Server "
>   /opt/james/bin/phoenix.sh stop
>   echo
>   return 0
> }
> 
> case "$1" in
>       start)
>           start
>           ;;
> 
>       stop)
>           stop
>           ;;
> 
>       *)
>           echo "Usage: james {start|stop}"
>           exit 1
> 
> esac
> 
> exit 0
> ************************    END FILE ABOVE ****************************
> 
> 
> Davide Frigerio wrote:
> 
>> Witch is the best way to run james as deamon under linux? Something about
>> watchdog?
>>
>> Thanks.
>> Davide Frigerio.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: james-user-help@jakarta.apache.org
>>
>>
>>
>>  
>>
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org



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


RE: service under linux

Posted by "Noel J. Bergman" <no...@devtech.com>.
Eric,

Alternative instructions for those using a system like RedHat:

 1. create a symlink from /usr/local/java to your java installation
 2. create a symlink from /opt/james to your james installation
 3. add the script file (below) to /etc/rc.d/init.d
 4. run "chkconfig --add james"

You have to make sure that the script has the right permissions, and line
endings.

	--- Noel

#!/bin/sh
# Startup script for James Mail server
#
# chkconfig: 345 95 92
# description: Run James Mail server
# processname: james
# Source function library.
. /etc/rc.d/init.d/functions

[ -f /opt/james/bin/phoenix.sh ] || exit 0

case "$1" in
  start)
  	echo -n "Starting James Mail Server: "
	export JAVA_HOME=/usr/local/java
      /opt/james/bin/phoenix.sh start
	echo
	;;

  stop)
       echo -n "Shutting down James Mail Server "
       /opt/james/bin/phoenix.sh stop
       echo
       ;;

  restart)
       echo -n "Restarting James Mail Server "
       /opt/james/bin/phoenix.sh restart
       echo
       ;;

  *)
       echo "Usage: $0 {start|stop|restart}"
       exit 1
esac

exit 0


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


Re: service under linux

Posted by Eric Weidner <es...@speakeasy.org>.
If you are using 2.1, create a new file named /etc/init.d/james with the 
contents below.  Replace /opt/james with your james location and adjust 
your JAVA_HOME location.

Then create a symlink in /etc/rc3.d and/or /etc/rc5.d (depending on your 
default run level).

In the /etc/rc3.d directory (or /etc/rc5.d):
#ln -s ../init.d/james S98james

James should start on boot.

To manually start or stop james:
#/etc/init.d/james stop
#/etc/init.d/james start



Eric Weidner
Out-of-the-Box
http://www.ejbsolutions.com


**********************  BEGIN FILE BELOW ******************************
#!/bin/sh
# Startup script for James server
#
# description: Run James server

[ -f /opt/james/bin/phoenix.sh ] || exit 0

start() {
   echo -n  "Starting James Server: "
   JAVA_HOME=/usr/java;export JAVA_HOME
   /opt/james/bin/phoenix.sh start
   RETVAL=$?
   echo
   return $RETVAL
}

stop() {
   echo -n "Shutting down James Server "
   /opt/james/bin/phoenix.sh stop
   echo
   return 0
}

case "$1" in
       start)
           start
           ;;

       stop)
           stop
           ;;

       *)
           echo "Usage: james {start|stop}"
           exit 1

esac

exit 0
************************    END FILE ABOVE ****************************


Davide Frigerio wrote:

>Witch is the best way to run james as deamon under linux? Something about
>watchdog?
>
>Thanks.
>Davide Frigerio.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: james-user-help@jakarta.apache.org
>
>
>
>  
>




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


service under linux

Posted by Davide Frigerio <da...@wise-lab.it>.
Witch is the best way to run james as deamon under linux? Something about
watchdog?

Thanks.
Davide Frigerio.


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


RE: Component named "mailstore" failed to pass through the Initialization stage.

Posted by "Noel J. Bergman" <no...@devtech.com>.
> I created both the database and the user.  When I "use mail" and execute
> show tables I see none.

Check your spelling, etc.  If there are no tables then clearly James wasn't
able to access the database.  If you cannot figure it out, try the
following:

  <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/test?autoReconnect=true</dburl>
    <user></user>
    <password></password>
    <max>20</max>
  </data-source>

That is the standard configuration, except it is pointing at the test
database, which the mysql distribution sets up for unrestricted access to
all users.

	--- Noel


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


RE: Component named "mailstore" failed to pass through the Initialization stage.

Posted by Listman <my...@shoesobjects.com>.
I created both the database and the user.  When I "use mail" and execute
show tables I see none.  
I did grant all permissions with the following command
"grant all privileges on mail.* to james@localhost identified by 'PASSWORD'
with grant option;"

I also changed all INFO's to DEBUG's in environment.xml(is this the correct
place) and I see no more detail.  
Same exceptions thrown.  Any other ideas?  

Would the mysql version matter?  Im using mysql 3.23.  Ive also tried to use
the jdbc driver from mysql.com instead of
The one that shipped with james.  Same outcome.  Im stumped :(




-----Original Message-----
From: Noel J. Bergman [mailto:noel@devtech.com] 
Sent: Monday, February 10, 2003 10:53 PM
To: James Users List
Subject: RE: Component named "mailstore" failed to pass through the
Initialization stage.


> I have verfied that I can log into mysql with the username/password in 
> the config.xml file.

Did you remember to create the database, or did you just create the user?
Did you grant all permissions for that database to that username?

> java.sql.SQLException: Giving up... no connections available.
>       at JdbcDataSource.getConnection(JdbcDataSource.java:208)
>       at JDBCMailRepository.initialize(JDBCMailRepository.java:307)

It was not able to get connections to the database.  Doublecheck your
configuration, and change the log from INFO to DEBUG if necessary.

	--- Noel


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




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


RE: Component named "mailstore" failed to pass through the Initialization stage.

Posted by "Noel J. Bergman" <no...@devtech.com>.
> I have verfied that I can log into mysql with the
> username/password in the config.xml file.

Did you remember to create the database, or did you just create the user?
Did you grant all permissions for that database to that username?

> java.sql.SQLException: Giving up... no connections available.
>       at JdbcDataSource.getConnection(JdbcDataSource.java:208)
>       at JDBCMailRepository.initialize(JDBCMailRepository.java:307)

It was not able to get connections to the database.  Doublecheck your
configuration, and change the log from INFO to DEBUG if necessary.

	--- Noel


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