- Robert
Tomas Viberg wrote:
----- Original Message ----- From: "Berin Loritsch" <[EMAIL PROTECTED]>
To: "Avalon framework users" <[EMAIL PROTECTED]>
Sent: Tuesday, March 04, 2003 5:35 PM
Subject: Re: [Fortress] Resolve config file locations
Tomas Viberg wrote:
Hello,
consider this minimalistic initialization code:
FortressConfig config = new FortressConfig(); m_containerManager = new DefaultContainerManager(config.getContext()); ContainerUtil.initialize(m_containerManager);
This used to work fine if the config files were in their default locations. However, with the current code I get this error message:
org.apache.excalibur.source.SourceException: Unable to select source factory for file:/c:\Java\netbeans\3.4.1\..\conf\logkit.xconf
It seems to me that the source resolver for the 'file' protocol has
disappeared. If that's the case, will it come back again, or is there some
good reason why not to use it?
The "File" protocol always has been the default File protocol from your JVM.
Make sure that the supplied URL works just as well with the URL object.
Also make sure it is really there...
Retrieving the file using a URL works fine. For example, this causes no problems:
new URL("file:/C:\\Program\\Java\\netbeans\\3.4\\bin\\..\\conf\\logkit.xconf").openStream();
But when I try to start Fortress (with only default parameters):
org.apache.excalibur.source.SourceException: Unable to select source factory for file:/C:\Program\Java\netbeans\3.4\bin\..\conf\logkit.xconf at org.apache.excalibur.source.impl.SourceResolverImpl.resolveURI(SourceResolverImpl.java:304) at org.apache.excalibur.source.impl.SourceResolverImpl.resolveURI(SourceResolverImpl.java:189) at org.apache.avalon.fortress.util.ContextManager.getConfiguration(ContextManager.java:660) at org.apache.avalon.fortress.util.ContextManager.initializeLoggerManager(ContextManager.java:740) at org.apache.avalon.fortress.util.ContextManager.initialize(ContextManager.java:231) at org.apache.avalon.fortress.impl.DefaultContainerManager.getInitializedContextManager(DefaultContainerManager.java:122) at org.apache.avalon.fortress.impl.DefaultContainerManager.<init>(DefaultContainerManager.java:107) at org.apache.avalon.fortress.impl.DefaultContainerManager.<init>(DefaultContainerManager.java:101) at Test.main(Gurka.java:32) Caused by: org.apache.avalon.framework.service.ServiceException: Unable to provide implementation for * at org.apache.avalon.framework.service.DefaultServiceSelector.select(DefaultServiceSelector.java:90) at org.apache.excalibur.source.impl.SourceResolverImpl.resolveURI(SourceResolverImpl.java:299) ... 8 more
Maybe it's a SourceResolver problem? I don't know...
/ Tomas
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
