[
https://issues.apache.org/jira/browse/JAMES-1631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14991721#comment-14991721
]
Vincent Kirsch edited comment on JAMES-1631 at 11/5/15 2:30 PM:
----------------------------------------------------------------
Hi again,
I discovered that by changing the default provided configuration file
(apps\james\SAR-INF\config.xml) and adapting
<users-store>
<destination URL="file://var/users/"/>
</users-store>
And putting a real name there, the original error goes away. Note that it did
not happen in James 2.3.2
I had a look in the source code and it's due to this new code in
UsersFileRepository:
try {
destinationCanonicalFile = new
File(destination).getCanonicalFile();
} catch (IOException e) {
throw new ConfigurationException("destination>>URL", e);
}
getLogger().debug("Canonical destination: " +
destinationCanonicalFile);
which wasn't there in 2.3.2
However, after putting a folder in the configuration file, I get another error:
{{ERROR 2015-11-05 14:55:26.116 [Phoenix.] (): There was an error running
phase "startup" for Block named "localusersrepository". (Reason: Component
named "localusersrepository" failed to pass through the Starting stage.
(Reason: org.apache.avalon.framework.service.ServiceException: The user
repository could not be found. (Key='')).).
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException: Component
named "localusersrepository" failed to pass through the Starting stage.
(Reason: org.apache.avalon.framework.service.ServiceException: The user
repository could not be found. (Key='')).
at
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail(LifecycleHelper.java:354)
at
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.startup(LifecycleHelper.java:226)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.startup(DefaultApplication.java:530)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:478)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:409)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:180)
at
org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java:260)
rethrown from
org.apache.avalon.framework.service.ServiceException: The user repository could
not be found. (Key='')
at
org.apache.james.core.LocalUsersRepository.initialize(LocalUsersRepository.java:45)
at
org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
at
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.startup(LifecycleHelper.java:200)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.startup(DefaultApplication.java:530)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:478)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:409)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:180)
INFO 2015-11-05 14:55:26.126 [Phoenix.] (): exception while
starting:Component named "localusersrepository" failed to pass through the
Starting stage. (Reason: org.apache.avalon.framework.service.ServiceException:
The user repository could not be found. (Key='')).
WARN 2015-11-05 14:55:26.136 [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(DefaultKernel.java:313)
at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication(DefaultKernel.java:376)
at
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(DefaultDeployer.java:357)
at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:542)
at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:535)
at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFiles(DefaultEmbeddor.java:520)
at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefaultApplications(DefaultEmbeddor.java:509)
rethrown from
org.apache.avalon.phoenix.interfaces.ApplicationException: Component named
"localusersrepository" failed to pass through the Starting stage. (Reason:
org.apache.avalon.framework.service.ServiceException: The user repository could
not be found. (Key='')).
at
org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:186)
at
org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java:260)
at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(DefaultKernel.java:295)
at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication(DefaultKernel.java:376)
at
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(DefaultDeployer.java:357)
at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:542)
at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:535)
rethrown from
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException: Component
named "localusersrepository" failed to pass through the Starting stage.
(Reason: org.apache.avalon.framework.service.ServiceException: The user
repository could not be found. (Key='')).
at
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail(LifecycleHelper.java:354)
at
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.startup(LifecycleHelper.java:226)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.startup(DefaultApplication.java:530)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:478)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:409)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:180)
at
org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java:260)
rethrown from
org.apache.avalon.framework.service.ServiceException: The user repository could
not be found. (Key='')
at
org.apache.james.core.LocalUsersRepository.initialize(LocalUsersRepository.java:45)
at
org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
at
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.startup(LifecycleHelper.java:200)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.startup(DefaultApplication.java:530)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:478)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:409)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:180)}}
So, an NPE...
Further questions:
- it seems the "very important security fix" is actually just a change of the
default root password from "root" to "!changeme!"
Is that correct? Because I don't need the rest of the fixes (Javadoc and users
validation), so if that's all there is to it, I'll revert to James 2.3.2 which
actually works out of the box.
- should the parameter in the xml configuration file point to a file rather
than a folder? If so, what's the expected contents of this file?
Please answer in a timely fashion, I'm totally stuck in my project because of
this!
I would debug myself but I am at a loss about how to start this from an Eclipse
environment (couldn't find any help on this) and don't have too much time to
spend on it.
Thanks
Vincent
was (Author: vincent.kirsch):
Hi again,
I discovered that by changing the default provided configuration file
(apps\james\SAR-INF\config.xml) and adapting
<users-store>
<destination URL="file://var/users/"/>
</users-store>
And putting a real name there, the original error goes away. Note that it did
not happen in James 2.3.2
I had a look in the source code and it's due to this new code in
UsersFileRepository:
try {
destinationCanonicalFile = new
File(destination).getCanonicalFile();
} catch (IOException e) {
throw new ConfigurationException("destination>>URL", e);
}
getLogger().debug("Canonical destination: " +
destinationCanonicalFile);
which wasn't there in 2.3.2
However, after putting a folder in the configuration file, I get another error:
{{ERROR 2015-11-05 14:55:26.116 [Phoenix.] (): There was an error running
phase "startup" for Block named "localusersrepository". (Reason: Component
named "localusersrepository" failed to pass through the Starting stage.
(Reason: org.apache.avalon.framework.service.ServiceException: The user
repository could not be found. (Key='')).).
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException: Component
named "localusersrepository" failed to pass through the Starting stage.
(Reason: org.apache.avalon.framework.service.ServiceException: The user
repository could not be found. (Key='')).
at
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail(LifecycleHelper.java:354)
at
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.startup(LifecycleHelper.java:226)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.startup(DefaultApplication.java:530)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:478)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:409)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:180)
at
org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java:260)
rethrown from
org.apache.avalon.framework.service.ServiceException: The user repository could
not be found. (Key='')
at
org.apache.james.core.LocalUsersRepository.initialize(LocalUsersRepository.java:45)
at
org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
at
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.startup(LifecycleHelper.java:200)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.startup(DefaultApplication.java:530)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:478)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:409)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:180)
INFO 2015-11-05 14:55:26.126 [Phoenix.] (): exception while
starting:Component named "localusersrepository" failed to pass through the
Starting stage. (Reason: org.apache.avalon.framework.service.ServiceException:
The user repository could not be found. (Key='')).
WARN 2015-11-05 14:55:26.136 [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(DefaultKernel.java:313)
at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication(DefaultKernel.java:376)
at
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(DefaultDeployer.java:357)
at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:542)
at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:535)
at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFiles(DefaultEmbeddor.java:520)
at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployDefaultApplications(DefaultEmbeddor.java:509)
rethrown from
org.apache.avalon.phoenix.interfaces.ApplicationException: Component named
"localusersrepository" failed to pass through the Starting stage. (Reason:
org.apache.avalon.framework.service.ServiceException: The user repository could
not be found. (Key='')).
at
org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:186)
at
org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java:260)
at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.startup(DefaultKernel.java:295)
at
org.apache.avalon.phoenix.components.kernel.DefaultKernel.addApplication(DefaultKernel.java:376)
at
org.apache.avalon.phoenix.components.deployer.DefaultDeployer.deploy(DefaultDeployer.java:357)
at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:542)
at
org.apache.avalon.phoenix.components.embeddor.DefaultEmbeddor.deployFile(DefaultEmbeddor.java:535)
rethrown from
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException: Component
named "localusersrepository" failed to pass through the Starting stage.
(Reason: org.apache.avalon.framework.service.ServiceException: The user
repository could not be found. (Key='')).
at
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail(LifecycleHelper.java:354)
at
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.startup(LifecycleHelper.java:226)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.startup(DefaultApplication.java:530)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:478)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:409)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:180)
at
org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java:260)
rethrown from
org.apache.avalon.framework.service.ServiceException: The user repository could
not be found. (Key='')
at
org.apache.james.core.LocalUsersRepository.initialize(LocalUsersRepository.java:45)
at
org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
at
org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.startup(LifecycleHelper.java:200)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.startup(DefaultApplication.java:530)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:478)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:409)
at
org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:180)}}
So, an NPE...
Further questions: it seems the "very important security fix" is actually just
a change of the default root password from "root" to "!changeme!"
Is that correct? Because I don't need the rest of the fixes (Javadoc and users
validation), so if that's all there is to it, I'll revert to James 2.3.2 which
actually works out of the box.
Please answer in a timely fashion, I'm totally stuck in my project because of
this!
I would debug myself but I am at a loss about how to start this from an Eclipse
environment (couldn't find any help on this) and don't have too much time to
spend on it.
Thanks
Vincent
> Can't start James 2.3.2.1 on Windows
> ------------------------------------
>
> Key: JAMES-1631
> URL: https://issues.apache.org/jira/browse/JAMES-1631
> Project: James Server
> Issue Type: Bug
> Components: James Core
> Affects Versions: 2.3.2.1
> Reporter: Vincent Kirsch
> Priority: Blocker
>
> Hi,
> I get the issue on 2 separate Windows machines: Windows 7 64-bit and Windows
> 2012.
> In each case, the Java version is the latest update of JDK 7 (jdk7u80). It
> happens with both 32-bit and 64-bit versions of the JDK.
> Procedre:
> - Unzip James files on the disk
> - Launch cmd.exe as Administrator
> - Go in James' bin directory, and launch run.bat
> James doesn't start, and the phoenix.log file contains this:
> ERROR 2015-10-27 12:50:14.903 [Phoenix.] (): There was an error running
> phase "startup" for Block named "users-store". (Reason: Component named
> "users-store" failed to pass through the Starting stage. (Reason:
> org.apache.avalon.framework.configuration.ConfigurationException:
> destination>>URL).).
> org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleException:
> Component named "users-store" failed to pass through the Starting stage.
> (Reason: org.apache.avalon.framework.configuration.ConfigurationException:
> destination>>URL).
> at
> org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.fail(LifecycleHelper.java:354)
> at
> org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.startup(LifecycleHelper.java:226)
> at
> org.apache.avalon.phoenix.components.application.DefaultApplication.startup(DefaultApplication.java:530)
> at
> org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:478)
> at
> org.apache.avalon.phoenix.components.application.DefaultApplication.runPhase(DefaultApplication.java:409)
> at
> org.apache.avalon.phoenix.components.application.DefaultApplication.start(DefaultApplication.java:180)
> at
> org.apache.avalon.framework.container.ContainerUtil.start(ContainerUtil.java:260)
> rethrown from
> org.apache.avalon.framework.configuration.ConfigurationException:
> destination>>URL
> at
> org.apache.james.userrepository.UsersFileRepository.configure(UsersFileRepository.java:134)
> at
> org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:201)
> at
> org.apache.james.core.AvalonUsersStore.initialize(AvalonUsersStore.java:130)
> at
> org.apache.avalon.framework.container.ContainerUtil.initialize(ContainerUtil.java:244)
> at
> org.apache.avalon.phoenix.containerkit.lifecycle.LifecycleHelper.startup(LifecycleHelper.java:200)
> at
> org.apache.avalon.phoenix.components.application.DefaultApplication.startup(DefaultApplication.java:530)
> at
> org.apache.avalon.phoenix.components.application.DefaultApplication.doRunPhase(DefaultApplication.java:478)
> rethrown from
> java.io.IOException: The filename, directory name, or volume label syntax is
> incorrect
> at java.io.WinNTFileSystem.canonicalize0(Native Method)
> at
> java.io.Win32FileSystem.canonicalize(Win32FileSystem.java:414)
> at java.io.File.getCanonicalPath(File.java:618)
> at java.io.File.getCanonicalFile(File.java:643)
> at
> org.apache.james.userrepository.UsersFileRepository.configure(UsersFileRepository.java:132)
> at
> org.apache.avalon.framework.container.ContainerUtil.configure(ContainerUtil.java:201)
> at
> org.apache.james.core.AvalonUsersStore.initialize(AvalonUsersStore.java:130)
> Upon exit, there's an additional warning because files in the work directory
> cannot be deleted:
> WARN 2015-10-27 12:50:15.028 [Phoenix.] (): Error deleting Work Directory
> "D:\James\work\james-1445946613419". (Reason: File
> D:\James\work\james-1445946613419\SAR-INF\lib\mailet-api-2.3.jar unable to be
> deleted.)
> java.io.IOException: File
> D:\James\work\james-1445946613419\SAR-INF\lib\mailet-api-2.3.jar unable to be
> deleted.
> at
> org.apache.avalon.excalibur.io.FileUtil.forceDelete(FileUtil.java:743)
> at
> org.apache.avalon.excalibur.io.FileUtil.cleanDirectory(FileUtil.java:910)
> at
> org.apache.avalon.excalibur.io.FileUtil.deleteDirectory(FileUtil.java:866)
> at
> org.apache.avalon.excalibur.io.FileUtil.forceDelete(FileUtil.java:735)
> at
> org.apache.avalon.excalibur.io.FileUtil.cleanDirectory(FileUtil.java:910)
> at
> org.apache.avalon.excalibur.io.FileUtil.deleteDirectory(FileUtil.java:866)
> at
> org.apache.avalon.excalibur.io.FileUtil.forceDelete(FileUtil.java:735)
> This is a very blocking issue for me as I rely on James in production
> environments, so I can't just use the previous version with a security issue
> in it.
> Thanks
> Vincent
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]