You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by Christian Eugster <ch...@gmx.net> on 2013/06/03 08:49:48 UTC

ResourceResolver.create

Hi,

as I can see in

http://www.pro-vision.de/content/medialib/pro-vision/production/adaptto/2012/adaptto2012-the-power-of-the-apache-sling-resource-api-carsten-z/_jcr_content/renditions/rendition.file/adaptto2012-the-power-of-the-apache-sling-resource-api-carsten-ziegeler.pdf

there should be a method create in the ResourceResolver class. My 
current version of sling (7) does not provide this method. Do I 
missunderstand something?

Thanks

Christian

-- 
**************************************
Christian Eugster
Grissian 14
I-39010 Tisens
0039 0473 420 873
0041 79 594 85 45
christian.eugster@gmx.net

Re: ResourceResolver.create

Posted by Christian Eugster <ch...@gmx.net>.
Hi Robert,

thank you, that was it!

Christian

**************************************
Christian Eugster
Grissian 14
I-39010 Tisens
0039 0473 420 873
0041 79 594 85 45
christian.eugster@gmx.net

Am 03.06.13 16:18, schrieb Robert Munteanu:
> On Mon, 2013-06-03 at 16:13 +0200, Christian Eugster wrote:
>> Yes. the create method is not there in the proposal list in the eclipse
>> java editor and if I write it on my own I get a The method create() is
>> undefined for the type ResourceResolver.
>
> Then you need to adjust the dependency in your java project to the
> org.apache.sling.api bundle. You probably have an older version.
>
> Robert
>

Re: ResourceResolver.create

Posted by Robert Munteanu <ro...@apache.org>.
On Mon, 2013-06-03 at 16:13 +0200, Christian Eugster wrote:
> Yes. the create method is not there in the proposal list in the eclipse 
> java editor and if I write it on my own I get a The method create() is 
> undefined for the type ResourceResolver.

Then you need to adjust the dependency in your java project to the
org.apache.sling.api bundle. You probably have an older version.

Robert


Re: ResourceResolver.create

Posted by Christian Eugster <ch...@gmx.net>.
Yes. the create method is not there in the proposal list in the eclipse 
java editor and if I write it on my own I get a The method create() is 
undefined for the type ResourceResolver.

Christian

**************************************
Christian Eugster
Grissian 14
I-39010 Tisens
0039 0473 420 873
0041 79 594 85 45
christian.eugster@gmx.net

Am 03.06.13 16:10, schrieb Robert Munteanu:
> On Mon, 2013-06-03 at 15:43 +0200, Christian Eugster wrote:
>> Hi Robert,
>>
>> I have a service component that populates the repository. At the moment
>> I use a reference to SlingRepository. So - as I understand - I have to
>> work on "jcr level". If it were possible I would like to use
>> ResourceResolver because there I am on the "sling level" and so can work
>> with sling resources. When I reference ResourceResolverFactory, obtain a
>> ResourceResolver instance from it, there is no create method.
>
> So do you get a NoSuchMethodError at runtime? Or does the IDE/compiler
> reject it?
>
> Robert
>
>>
>> Christian
>>
>> **************************************
>> Christian Eugster
>> Grissian 14
>> I-39010 Tisens
>> 0039 0473 420 873
>> 0041 79 594 85 45
>> christian.eugster@gmx.net
>>
>> Am 03.06.13 15:23, schrieb Robert Munteanu:
>>> On Mon, 2013-06-03 at 15:14 +0200, Christian Eugster wrote:
>>>> Hi Robert,
>>>>
>>>> I've built standalone from current source. There is no bundle with that
>>>> symbolic name in the bundles list. There is an org.apache.sling.api
>>>> bundle with version 2.4.3-SNAPSHOT.
>>>
>>> You're right, that's the correct bundle. And that version of the bundle
>>> should have the ResourceResolver.create method.
>>>
>>> What is the exact problem you encounter?
>>>
>>> Robert
>>>
>>>>
>>>> Christian
>>>>
>>>> **************************************
>>>> Christian Eugster
>>>> Grissian 14
>>>> I-39010 Tisens
>>>> 0039 0473 420 873
>>>> 0041 79 594 85 45
>>>> christian.eugster@gmx.net
>>>>
>>>> Am 03.06.13 14:46, schrieb Robert Munteanu:
>>>>> On Mon, 2013-06-03 at 08:49 +0200, Christian Eugster wrote:
>>>>>> Hi,
>>>>>>
>>>>>> as I can see in
>>>>>>
>>>>>> http://www.pro-vision.de/content/medialib/pro-vision/production/adaptto/2012/adaptto2012-the-power-of-the-apache-sling-resource-api-carsten-z/_jcr_content/renditions/rendition.file/adaptto2012-the-power-of-the-apache-sling-resource-api-carsten-ziegeler.pdf
>>>>>>
>>>>>> there should be a method create in the ResourceResolver class. My
>>>>>> current version of sling (7) does not provide this method. Do I
>>>>>> missunderstand something?
>>>>>
>>>>>
>>>>> Hi Christian,
>>>>>
>>>>> What is the version of the org.apache.sling.api.resource bundle in your
>>>>> setup?
>>>>>
>>>>> Robert
>>>>>
>>>
>>>
>>>
>
>
>

Re: ResourceResolver.create

Posted by Robert Munteanu <ro...@apache.org>.
On Mon, 2013-06-03 at 15:43 +0200, Christian Eugster wrote:
> Hi Robert,
> 
> I have a service component that populates the repository. At the moment 
> I use a reference to SlingRepository. So - as I understand - I have to 
> work on "jcr level". If it were possible I would like to use 
> ResourceResolver because there I am on the "sling level" and so can work 
> with sling resources. When I reference ResourceResolverFactory, obtain a 
> ResourceResolver instance from it, there is no create method.

So do you get a NoSuchMethodError at runtime? Or does the IDE/compiler
reject it?

Robert

> 
> Christian
> 
> **************************************
> Christian Eugster
> Grissian 14
> I-39010 Tisens
> 0039 0473 420 873
> 0041 79 594 85 45
> christian.eugster@gmx.net
> 
> Am 03.06.13 15:23, schrieb Robert Munteanu:
> > On Mon, 2013-06-03 at 15:14 +0200, Christian Eugster wrote:
> >> Hi Robert,
> >>
> >> I've built standalone from current source. There is no bundle with that
> >> symbolic name in the bundles list. There is an org.apache.sling.api
> >> bundle with version 2.4.3-SNAPSHOT.
> >
> > You're right, that's the correct bundle. And that version of the bundle
> > should have the ResourceResolver.create method.
> >
> > What is the exact problem you encounter?
> >
> > Robert
> >
> >>
> >> Christian
> >>
> >> **************************************
> >> Christian Eugster
> >> Grissian 14
> >> I-39010 Tisens
> >> 0039 0473 420 873
> >> 0041 79 594 85 45
> >> christian.eugster@gmx.net
> >>
> >> Am 03.06.13 14:46, schrieb Robert Munteanu:
> >>> On Mon, 2013-06-03 at 08:49 +0200, Christian Eugster wrote:
> >>>> Hi,
> >>>>
> >>>> as I can see in
> >>>>
> >>>> http://www.pro-vision.de/content/medialib/pro-vision/production/adaptto/2012/adaptto2012-the-power-of-the-apache-sling-resource-api-carsten-z/_jcr_content/renditions/rendition.file/adaptto2012-the-power-of-the-apache-sling-resource-api-carsten-ziegeler.pdf
> >>>>
> >>>> there should be a method create in the ResourceResolver class. My
> >>>> current version of sling (7) does not provide this method. Do I
> >>>> missunderstand something?
> >>>
> >>>
> >>> Hi Christian,
> >>>
> >>> What is the version of the org.apache.sling.api.resource bundle in your
> >>> setup?
> >>>
> >>> Robert
> >>>
> >
> >
> >




Re: ResourceResolver.create

Posted by Christian Eugster <ch...@gmx.net>.
Hi Robert,

I have a service component that populates the repository. At the moment 
I use a reference to SlingRepository. So - as I understand - I have to 
work on "jcr level". If it were possible I would like to use 
ResourceResolver because there I am on the "sling level" and so can work 
with sling resources. When I reference ResourceResolverFactory, obtain a 
ResourceResolver instance from it, there is no create method.

Christian

**************************************
Christian Eugster
Grissian 14
I-39010 Tisens
0039 0473 420 873
0041 79 594 85 45
christian.eugster@gmx.net

Am 03.06.13 15:23, schrieb Robert Munteanu:
> On Mon, 2013-06-03 at 15:14 +0200, Christian Eugster wrote:
>> Hi Robert,
>>
>> I've built standalone from current source. There is no bundle with that
>> symbolic name in the bundles list. There is an org.apache.sling.api
>> bundle with version 2.4.3-SNAPSHOT.
>
> You're right, that's the correct bundle. And that version of the bundle
> should have the ResourceResolver.create method.
>
> What is the exact problem you encounter?
>
> Robert
>
>>
>> Christian
>>
>> **************************************
>> Christian Eugster
>> Grissian 14
>> I-39010 Tisens
>> 0039 0473 420 873
>> 0041 79 594 85 45
>> christian.eugster@gmx.net
>>
>> Am 03.06.13 14:46, schrieb Robert Munteanu:
>>> On Mon, 2013-06-03 at 08:49 +0200, Christian Eugster wrote:
>>>> Hi,
>>>>
>>>> as I can see in
>>>>
>>>> http://www.pro-vision.de/content/medialib/pro-vision/production/adaptto/2012/adaptto2012-the-power-of-the-apache-sling-resource-api-carsten-z/_jcr_content/renditions/rendition.file/adaptto2012-the-power-of-the-apache-sling-resource-api-carsten-ziegeler.pdf
>>>>
>>>> there should be a method create in the ResourceResolver class. My
>>>> current version of sling (7) does not provide this method. Do I
>>>> missunderstand something?
>>>
>>>
>>> Hi Christian,
>>>
>>> What is the version of the org.apache.sling.api.resource bundle in your
>>> setup?
>>>
>>> Robert
>>>
>
>
>

Re: ResourceResolver.create

Posted by Robert Munteanu <ro...@apache.org>.
On Mon, 2013-06-03 at 15:14 +0200, Christian Eugster wrote:
> Hi Robert,
> 
> I've built standalone from current source. There is no bundle with that 
> symbolic name in the bundles list. There is an org.apache.sling.api 
> bundle with version 2.4.3-SNAPSHOT.

You're right, that's the correct bundle. And that version of the bundle
should have the ResourceResolver.create method.

What is the exact problem you encounter?

Robert

> 
> Christian
> 
> **************************************
> Christian Eugster
> Grissian 14
> I-39010 Tisens
> 0039 0473 420 873
> 0041 79 594 85 45
> christian.eugster@gmx.net
> 
> Am 03.06.13 14:46, schrieb Robert Munteanu:
> > On Mon, 2013-06-03 at 08:49 +0200, Christian Eugster wrote:
> >> Hi,
> >>
> >> as I can see in
> >>
> >> http://www.pro-vision.de/content/medialib/pro-vision/production/adaptto/2012/adaptto2012-the-power-of-the-apache-sling-resource-api-carsten-z/_jcr_content/renditions/rendition.file/adaptto2012-the-power-of-the-apache-sling-resource-api-carsten-ziegeler.pdf
> >>
> >> there should be a method create in the ResourceResolver class. My
> >> current version of sling (7) does not provide this method. Do I
> >> missunderstand something?
> >
> >
> > Hi Christian,
> >
> > What is the version of the org.apache.sling.api.resource bundle in your
> > setup?
> >
> > Robert
> >




Re: ResourceResolver.create

Posted by Christian Eugster <ch...@gmx.net>.
Hi Robert,

I've built standalone from current source. There is no bundle with that 
symbolic name in the bundles list. There is an org.apache.sling.api 
bundle with version 2.4.3-SNAPSHOT.

Christian

**************************************
Christian Eugster
Grissian 14
I-39010 Tisens
0039 0473 420 873
0041 79 594 85 45
christian.eugster@gmx.net

Am 03.06.13 14:46, schrieb Robert Munteanu:
> On Mon, 2013-06-03 at 08:49 +0200, Christian Eugster wrote:
>> Hi,
>>
>> as I can see in
>>
>> http://www.pro-vision.de/content/medialib/pro-vision/production/adaptto/2012/adaptto2012-the-power-of-the-apache-sling-resource-api-carsten-z/_jcr_content/renditions/rendition.file/adaptto2012-the-power-of-the-apache-sling-resource-api-carsten-ziegeler.pdf
>>
>> there should be a method create in the ResourceResolver class. My
>> current version of sling (7) does not provide this method. Do I
>> missunderstand something?
>
>
> Hi Christian,
>
> What is the version of the org.apache.sling.api.resource bundle in your
> setup?
>
> Robert
>

Re: ResourceResolver.create

Posted by Robert Munteanu <ro...@apache.org>.
On Mon, 2013-06-03 at 08:49 +0200, Christian Eugster wrote:
> Hi,
> 
> as I can see in
> 
> http://www.pro-vision.de/content/medialib/pro-vision/production/adaptto/2012/adaptto2012-the-power-of-the-apache-sling-resource-api-carsten-z/_jcr_content/renditions/rendition.file/adaptto2012-the-power-of-the-apache-sling-resource-api-carsten-ziegeler.pdf
> 
> there should be a method create in the ResourceResolver class. My 
> current version of sling (7) does not provide this method. Do I 
> missunderstand something?


Hi Christian,

What is the version of the org.apache.sling.api.resource bundle in your
setup?

Robert