You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Torgeir Veimo <to...@pobox.com> on 2008/08/12 02:17:41 UTC
Re: [jira] Created: (SLING-583) Implement a file system resource
provider
On 25 Jul 2008, at 23:53, Felix Meschberger (JIRA) wrote:
> The filesystem resource provider is your friend: Create a
> configuration mapping sling.home into the resource tree and start
> looking at it.
Can someone provide the exact details of what to change in
sling.properties for this to work? The current value of sling.home is
defined as
sling.home = sling
Also, is this provider in current trunk?
--
Torgeir Veimo
torgeir@pobox.com
Re: [jira] Created: (SLING-583) Implement a file system resource
provider
Posted by Felix Meschberger <fm...@gmail.com>.
Hi,
Torgeir Veimo schrieb:
>
> On 12 Aug 2008, at 21:43, Felix Meschberger wrote:
>
>> Hi,
>>
>> Torgeir Veimo schrieb:
>>> On 12 Aug 2008, at 21:19, Felix Meschberger wrote:
>>>>
>>>> Ah ! That is the point. The FsResourceProvider is a component
>>>> factory. The configuration you are showing is not one which causes
>>>> FsResourceProvider to activate. If you are using the old (I think
>>>> this is default) 1.0 release of the Felix Web Console, you should
>>>> select the FsResourceProvider configuration and click on "Create" to
>>>> create a new configuration instance.
>>> I am trying, but nothing is happening..
>>>> Alternatively, you may update to the latest Web Console plugin
>>>> snapshot, select the FsResourceProvider configuration factory from
>>>> the lower selection list and create a new instance to configure.
>>> I use sling trunk current. How do I update to the latest web console
>>> plugin snapshop most easily?
>>
>> I would say download it from [1] and use the console to install it
>> from the bundles page.
>
>
> Ah! That fixed it. Now I get
>
> Index of /test
> Name Last modified Size
> Description
>
> config/ Tue Aug 12 19:57:06 EST 2008 -
> felix/ Tue Aug 12 20:00:08 EST 2008 -
> jackrabbit/ Tue Aug 12 21:55:47 EST 2008 -
> logs/ Tue Aug 12 19:57:05 EST 2008 -
> sling.properties Tue Aug 12 21:36:26 EST 2008 4660
> when fetching localhost:8080/sling/test/
Happy to hear this.
> Is there any way to configure it to map to the actual webapp, or do I
> have to create my own resource provider using something like
> servletContext.getResource() ?
Do you mean reading the contents of the web application context into
which sling is deployed ?
If you know, where your container unpacked the Sling Web App, you may
probably set the provider.file property to that location. But this is
probably not stable (YMMV).
In this case something like a WebAppResourceProvider would probably be
more appropriate. Such a provider would access resources from the
ServletContext, I assume.
>
> Also, when will this new console make it to sling trunk?
I cannot say anything about timing right now. But I will probably create
a new release of the console in some weeks from now. Then the new
release will be referenced.
Alternatively you get the current snapshot into the Sling Web app by
setting the version number for the web console dependency to
1.0.1-SNAPSHOT in the launchpad/app/pom.xml file.
>
> Thank you for your time!
You are welcome.
Regards
Felix
Re: [jira] Created: (SLING-583) Implement a file system resource
provider
Posted by Torgeir Veimo <to...@pobox.com>.
On 12 Aug 2008, at 21:43, Felix Meschberger wrote:
> Hi,
>
> Torgeir Veimo schrieb:
>> On 12 Aug 2008, at 21:19, Felix Meschberger wrote:
>>>
>>> Ah ! That is the point. The FsResourceProvider is a component
>>> factory. The configuration you are showing is not one which causes
>>> FsResourceProvider to activate. If you are using the old (I think
>>> this is default) 1.0 release of the Felix Web Console, you should
>>> select the FsResourceProvider configuration and click on "Create"
>>> to create a new configuration instance.
>> I am trying, but nothing is happening..
>>> Alternatively, you may update to the latest Web Console plugin
>>> snapshot, select the FsResourceProvider configuration factory from
>>> the lower selection list and create a new instance to configure.
>> I use sling trunk current. How do I update to the latest web
>> console plugin snapshop most easily?
>
> I would say download it from [1] and use the console to install it
> from the bundles page.
Ah! That fixed it. Now I get
Index of /test
Name Last modified
Size Description
config/ Tue Aug 12 19:57:06 EST 2008 -
felix/ Tue Aug 12 20:00:08 EST 2008 -
jackrabbit/ Tue Aug 12 21:55:47 EST 2008 -
logs/ Tue Aug 12 19:57:05 EST 2008 -
sling.properties Tue Aug 12 21:36:26 EST 2008 4660
when fetching localhost:8080/sling/test/
Is there any way to configure it to map to the actual webapp, or do I
have to create my own resource provider using something like
servletContext.getResource() ?
Also, when will this new console make it to sling trunk?
Thank you for your time!
--
Torgeir Veimo
torgeir@pobox.com
Re: [jira] Created: (SLING-583) Implement a file system resource
provider
Posted by Felix Meschberger <fm...@gmail.com>.
Hi,
Torgeir Veimo schrieb:
>
> On 12 Aug 2008, at 21:19, Felix Meschberger wrote:
>
>>
>> Ah ! That is the point. The FsResourceProvider is a component factory.
>> The configuration you are showing is not one which causes
>> FsResourceProvider to activate. If you are using the old (I think this
>> is default) 1.0 release of the Felix Web Console, you should select
>> the FsResourceProvider configuration and click on "Create" to create a
>> new configuration instance.
>
> I am trying, but nothing is happening..
>
>> Alternatively, you may update to the latest Web Console plugin
>> snapshot, select the FsResourceProvider configuration factory from the
>> lower selection list and create a new instance to configure.
>
> I use sling trunk current. How do I update to the latest web console
> plugin snapshop most easily?
I would say download it from [1] and use the console to install it from
the bundles page.
>
> Are there supposed to be two selection lists in the configuration
> management console?
Yes, with the new plugin there are two: the upper for actual
configuration instances the lower for factory configurations.
>
> Also, when I create a configuration, shouldn't it appear as an
> additional item in the selection list, with the name of the component
> suffixed with it's uuid?
It should but the old web console was broken for configuration factories.
In addition, there were some issues with the declarative services
implementation and configuration admin services. So you probably also
should update them to version 1.0.4. [2], [3]
Don't forget to "refresh Packages" after the updates.
Hope this helps.
Regards
Felix
[1]
http://people.apache.org/repo/m2-snapshot-repository/org/apache/felix/org.apache.felix.webconsole/1.0.1-SNAPSHOT/org.apache.felix.webconsole-1.0.1-20080807.192143-1.jar
[2]
http://repo1.maven.org/maven2/org/apache/felix/org.apache.felix.scr/1.0.4/org.apache.felix.scr-1.0.4.jar
[3]
http://repo1.maven.org/maven2/org/apache/felix/org.apache.felix.configadmin/1.0.4/org.apache.felix.configadmin-1.0.4.jar
Re: [jira] Created: (SLING-583) Implement a file system resource
provider
Posted by Torgeir Veimo <to...@pobox.com>.
On 12 Aug 2008, at 21:19, Felix Meschberger wrote:
>
> Ah ! That is the point. The FsResourceProvider is a component
> factory. The configuration you are showing is not one which causes
> FsResourceProvider to activate. If you are using the old (I think
> this is default) 1.0 release of the Felix Web Console, you should
> select the FsResourceProvider configuration and click on "Create" to
> create a new configuration instance.
I am trying, but nothing is happening..
> Alternatively, you may update to the latest Web Console plugin
> snapshot, select the FsResourceProvider configuration factory from
> the lower selection list and create a new instance to configure.
I use sling trunk current. How do I update to the latest web console
plugin snapshop most easily?
Are there supposed to be two selection lists in the configuration
management console?
Also, when I create a configuration, shouldn't it appear as an
additional item in the selection list, with the name of the component
suffixed with it's uuid?
--
Torgeir Veimo
torgeir@pobox.com
Re: [jira] Created: (SLING-583) Implement a file system resource
provider
Posted by Felix Meschberger <fm...@gmail.com>.
Hi,
Torgeir Veimo schrieb:
> Macintosh-3:fsresource torgeir$ cat
> ~/java/apache-tomcat-6.0.14/sling/config/org/apache/sling/fsprovider/FsResourceProvider.config
>
> service.pid="org.apache.sling.fsprovider.FsResourceProvider"
> provider.roots="/test"
> provider.file="."
Ah ! That is the point. The FsResourceProvider is a component factory.
The configuration you are showing is not one which causes
FsResourceProvider to activate. If you are using the old (I think this
is default) 1.0 release of the Felix Web Console, you should select the
FsResourceProvider configuration and click on "Create" to create a new
configuration instance.
Alternatively, you may update to the latest Web Console plugin snapshot,
select the FsResourceProvider configuration factory from the lower
selection list and create a new instance to configure.
Regards
Felix
Re: [jira] Created: (SLING-583) Implement a file system resource
provider
Posted by Torgeir Veimo <to...@pobox.com>.
On 12 Aug 2008, at 20:30, Felix Meschberger wrote:
> Torgeir Veimo schrieb:
>> Starting with a fresh org.apache.sling.launchpad.webapp-4-incubator-
>> SNAPSHOT.war (from trunk) deployed as sling.war into a tomcat
>> instance. Also deploying FsResourceProvider bundle using mangement
>> console.
>
> ok, freshly built FsResourceProvider from svn-up-ed checkout ?
>
>> I notice that in the configuration management dropdown there are
>> two instances. Is this correct? (Also, it seems that the name and
>> description strings are not being used. I see strings like
>> resource.resolver.name, resource.resolver.description,
>> provider.file.description etc.)
>
> This sounds like an incompletely built FsResourceProvider bundle.
> The latest trunk state should have "real" readable labels and
> descriptions.
Macintosh-3:fsresource torgeir$ svn update
At revision 685114.
I built it by running mvn clean install in the samples/fsresource
directory. I've checked that the resulting jar contains the
metatype.properties file.
>> I try to configure setting providers.roots and provider.file
>> selecting save (which seems to save the settings ok). I also try
>> selecting create configuration, but this seems to have no effect.
>> Is this my problem? I have
>> Configuration Information
>> Persistent Identity (PID)
>> org.apache.sling.fsprovider.FsResourceProvider
>> Configuration Binding None
>
> This says, that the configuration is not actually used.
>
> Is the FsResourceProvider bundle started ?
Yes. I guess it's the create configuration that fails then. Would the
cause of this show up in any logs? The settings is stored;
Macintosh-3:fsresource torgeir$ cat ~/java/apache-tomcat-6.0.14/sling/
config/org/apache/sling/fsprovider/FsResourceProvider.config
service.pid="org.apache.sling.fsprovider.FsResourceProvider"
provider.roots="/test"
provider.file="."
I have these entries in my errors.log;
12.08.2008 20:00:08.748 *INFO* [FelixDispatchQueue]
org.apache.sling.fsresource BundleEvent INSTALLED
12.08.2008 20:00:08.749 *INFO* [FelixDispatchQueue]
org.apache.sling.fsresource BundleEvent RESOLVED
12.08.2008 20:00:08.751 *INFO* [Background Install /Users/torgeir/java/
apache-tomcat-6.0.14/temp/install48384.tmp]
org.apache.sling.fsresource Servi
ce [org.apache.sling.fsprovider.FsFolderServlet,85] ServiceEvent
REGISTERED
12.08.2008 20:00:08.752 *INFO* [FelixDispatchQueue]
org.apache.sling.fsresource BundleEvent STARTED
12.08.2008 20:00:08.753 *INFO* [SCR Component Actor]
org.apache.sling.fsresource Service
[org.apache.sling.fsprovider.FsResourceProvider,86] Service
Event REGISTERED
12.08.2008 20:00:08.755 *INFO* [SCR Component Actor]
org.apache.sling.servlets.resolver Service [ServletResourceProvider
for Servlets at [/apps/slin
g/fs/folder/GET.servlet],88] ServiceEvent REGISTERED
12.08.2008 20:00:08.755 *INFO* [SCR Component Actor]
org.apache.sling.fsresource Service
[org.apache.sling.fsprovider.FsFolderServlet,87] ServiceEve
nt REGISTERED
but nothing that seems to be related to the configuration creation
request.
--
Torgeir Veimo
torgeir@pobox.com
Re: [jira] Created: (SLING-583) Implement a file system resource
provider
Posted by Felix Meschberger <fm...@gmail.com>.
Hi Torgeir,
Torgeir Veimo schrieb:
> Starting with a fresh
> org.apache.sling.launchpad.webapp-4-incubator-SNAPSHOT.war (from trunk)
> deployed as sling.war into a tomcat instance. Also deploying
> FsResourceProvider bundle using mangement console.
ok, freshly built FsResourceProvider from svn-up-ed checkout ?
>
> I notice that in the configuration management dropdown there are two
> instances. Is this correct? (Also, it seems that the name and
> description strings are not being used. I see strings like
> resource.resolver.name, resource.resolver.description,
> provider.file.description etc.)
This sounds like an incompletely built FsResourceProvider bundle. The
latest trunk state should have "real" readable labels and descriptions.
>
> I try to configure setting providers.roots and provider.file selecting
> save (which seems to save the settings ok). I also try selecting create
> configuration, but this seems to have no effect. Is this my problem? I have
>
> Configuration Information
> Persistent Identity (PID) org.apache.sling.fsprovider.FsResourceProvider
> Configuration Binding None
This says, that the configuration is not actually used.
Is the FsResourceProvider bundle started ?
Regards
Felix
Re: [jira] Created: (SLING-583) Implement a file system resource
provider
Posted by Torgeir Veimo <to...@pobox.com>.
On 12 Aug 2008, at 19:43, Felix Meschberger wrote:
>> Ok, I found it and tried configuring with eg. provider.roots = test
>> and provider.file = .
>> I still cannot seem to trigger that this one is being used when
>> trying to access localhost/sling/test/. Any ideas?
>
> Could it be that the provider.roots property must be set with a
> leading slash as in /test ?
>
> I just tested it with the current trunk state of the provider and it
> seems to work just fine.
Ok, I'm obviously doing something wrong..
Starting with a fresh org.apache.sling.launchpad.webapp-4-incubator-
SNAPSHOT.war (from trunk) deployed as sling.war into a tomcat
instance. Also deploying FsResourceProvider bundle using mangement
console.
I notice that in the configuration management dropdown there are two
instances. Is this correct? (Also, it seems that the name and
description strings are not being used. I see strings like
resource.resolver.name, resource.resolver.description,
provider.file.description etc.)
I try to configure setting providers.roots and provider.file selecting
save (which seems to save the settings ok). I also try selecting
create configuration, but this seems to have no effect. Is this my
problem? I have
Configuration Information
Persistent Identity (PID) org.apache.sling.fsprovider.FsResourceProvider
Configuration Binding None
--
Torgeir Veimo
torgeir@pobox.com
Re: [jira] Created: (SLING-583) Implement a file system resource
provider
Posted by Felix Meschberger <fm...@gmail.com>.
Hi Torgeir,
Torgeir Veimo schrieb:
>
> On 12 Aug 2008, at 16:00, Felix Meschberger wrote:
>
>> Nothing needs to be changed to the sling.properties file. Just create
>> a configuration object with the "Provider Root" set to the location
>> where you want to hook (mount) the filesystem provider in the resource
>> tree and set the "Filesystem Root" to "." (just a single dot), which
>> is converted to meaning the location of ${sling.home}.
>>
>>> Also, is this provider in current trunk?
>>
>> The provider is in the trunk at samples/fsresource.
>
>
> Ok, I found it and tried configuring with eg. provider.roots = test and
> provider.file = .
>
> I still cannot seem to trigger that this one is being used when trying
> to access localhost/sling/test/. Any ideas?
Could it be that the provider.roots property must be set with a leading
slash as in /test ?
I just tested it with the current trunk state of the provider and it
seems to work just fine.
Regards
Felix
Re: [jira] Created: (SLING-583) Implement a file system resource
provider
Posted by Torgeir Veimo <to...@pobox.com>.
On 12 Aug 2008, at 16:00, Felix Meschberger wrote:
> Nothing needs to be changed to the sling.properties file. Just
> create a configuration object with the "Provider Root" set to the
> location where you want to hook (mount) the filesystem provider in
> the resource tree and set the "Filesystem Root" to "." (just a
> single dot), which is converted to meaning the location of $
> {sling.home}.
>
>> Also, is this provider in current trunk?
>
> The provider is in the trunk at samples/fsresource.
Ok, I found it and tried configuring with eg. provider.roots = test
and provider.file = .
I still cannot seem to trigger that this one is being used when trying
to access localhost/sling/test/. Any ideas?
--
Torgeir Veimo
torgeir@pobox.com
Re: [jira] Created: (SLING-583) Implement a file system resource
provider
Posted by Felix Meschberger <fm...@gmail.com>.
Hi Torgeir,
Torgeir Veimo schrieb:
>
> On 25 Jul 2008, at 23:53, Felix Meschberger (JIRA) wrote:
>
>> The filesystem resource provider is your friend: Create a
>> configuration mapping sling.home into the resource tree and start
>> looking at it.
>
>
> Can someone provide the exact details of what to change in
> sling.properties for this to work? The current value of sling.home is
> defined as
>
> sling.home = sling
Nothing needs to be changed to the sling.properties file. Just create a
configuration object with the "Provider Root" set to the location where
you want to hook (mount) the filesystem provider in the resource tree
and set the "Filesystem Root" to "." (just a single dot), which is
converted to meaning the location of ${sling.home}.
>
> Also, is this provider in current trunk?
The provider is in the trunk at samples/fsresource.
Regards
Felix