[jira] [Created] (SLING-5478) Implement MockNode methods regarding mixin and more

2016-02-02 Thread Danilo Cugia (JIRA)
Danilo Cugia created SLING-5478:
---

 Summary: Implement MockNode methods regarding mixin and more
 Key: SLING-5478
 URL: https://issues.apache.org/jira/browse/SLING-5478
 Project: Sling
  Issue Type: Improvement
  Components: JCR, Testing
Affects Versions: Testing JCR Mock 1.1.10
Reporter: Danilo Cugia
Priority: Minor
 Fix For: Testing JCR Mock 1.1.12


Implement the following operations on a MockNode object:
- Add mixin
- Get index
- Get mixin types
- Node repositioning (node.orderBefore)
- Remove mixin
- Move

PR: https://github.com/apache/sling/pull/121



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: Planning to release api, jcr.resource and resourceresolver on Monday

2016-02-02 Thread Robert Munteanu
On Sat, 2016-01-30 at 16:01 +0100, Carsten Ziegeler wrote:
> We should also release the new servlets resolver as it's using the
> new
> API as well.

Ack, will include it ( as soon as I convince nexus to allow me to log
in ... )

Robert

> 
> Regards
> Carsten
> 
> Robert Munteanu wrote
> > Hi,
> > 
> > I plan to make a release of the three mentioned bundles on Monday.
> > The
> > main drivers for these releases are the new ResourceResolver and
> > Observation APIs ([1],[2]).
> > 
> > If you have any comments on these APIs now would be a great time to
> > hear them :-)
> > 
> > Also, if there is anything that you think must be included in these
> > releases please let me know.
> > 
> > Robert
> > 
> > [1]: https://issues.apache.org/jira/browse/SLING-4750
> > [2]: https://issues.apache.org/jira/browse/SLING-4751
> > 
> 
> 
>  



[jira] [Commented] (SLING-5468) Resource Merger: Provide a way to completely replace the underlying resources

2016-02-02 Thread Radu Cotescu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128878#comment-15128878
 ] 

Radu Cotescu commented on SLING-5468:
-

Doesn't this issue somehow duplicate SLING-5460? I didn't want to explicitly 
refer to AEM's Touch UI dialogs, but that's obviously one of the main use cases.

> Resource Merger: Provide a way to completely replace the underlying resources
> -
>
> Key: SLING-5468
> URL: https://issues.apache.org/jira/browse/SLING-5468
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Resource Merger 1.2.10
>Reporter: Konrad Windszus
>
> Currently whenever the mount point of the {{MergingResourcePicker}} 
> (/mnt/overlay) or {{OverridingResourcePicker}} (/mnt/override) is used, the 
> merging always takes place. It is only possible to hide/modify individual 
> resource/properties of the underlying resources but not to completely disable 
> the inheritance (and by that replace the whole overriden/overlaid resource).
> A concrete usecase for that is in a CMS (e.g. AEM) where the dialog 
> definitions are always loaded via /mnt/override/. In that case 
> it is not easily possible to completely replace the dialog of the resource 
> super type (as only individual child resources or properties can be hidden 
> but there is no special property to ignore the inherited resource 
> alltogether).
> I propose the following:
> Add a new property {{sling:disregardInheritedResource=true}} in which case 
> all the inherited resources would not be taken into account for merging.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[VOTE] Release Apache Sling API 2.10.0, Apache Sling Resource Resolver 1.3.0, Apache Sling JCR Resource Resolver 2.6.0, Apache Sling Servlet Resolver 2.3.10

2016-02-02 Thread Robert Munteanu
Hi,

We solved a large number of issues issues in these releases:

https://issues.apache.org/jira/browse/SLING/fixforversion/12329540 (
Apache Sling API 2.10.0, 21 issues) 
https://issues.apache.org/jira/browse/SLING/fixforversion/12332988 (
Apache Sling Resource Resolver 1.3.0, 22 issues )
https://issues.apache.org/jira/browse/SLING/fixforversion/1242 (
Apache Sling JCR Resource Resolver 2.6.0, 12 issues )
https://issues.apache.org/jira/browse/SLING/fixforversion/12333753 (
Apache Sling Servlet Resolver 2.3.10, 3 issues)

Staging repository:
https://repository.apache.org/content/repositories/orgapachesling-1416/

You can use this UNIX script to download the release and verify the
signatures:
http://svn.apache.org/repos/asf/sling/trunk/check_staged_release.sh

Usage:
sh check_staged_release.sh 1416 /tmp/sling-staging

Please vote to approve this release:

  [ ] +1 Approve the release
  [ ]  0 Don't care
  [ ] -1 Don't release, because ...

This majority vote is open for at least 72 hours.


Re: [VOTE] Release Apache Sling API 2.10.0, Apache Sling Resource Resolver 1.3.0, Apache Sling JCR Resource Resolver 2.6.0, Apache Sling Servlet Resolver 2.3.10

2016-02-02 Thread Carsten Ziegeler
+1
 
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org


Re: [VOTE] Release Apache Sling HApi 1.0.0

2016-02-02 Thread Robert Munteanu
On Tue, 2016-02-02 at 15:38 +0100, Carsten Ziegeler wrote:
> Please vote to approve this release:

+1

Robert

signature.asc
Description: This is a digitally signed message part


[jira] [Updated] (SLING-5470) Resource providers might not be closed

2016-02-02 Thread Carsten Ziegeler (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-5470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler updated SLING-5470:

Fix Version/s: (was: Resource Resolver 1.4.0)
   Resource Resolver 1.3.2

> Resource providers might not be closed
> --
>
> Key: SLING-5470
> URL: https://issues.apache.org/jira/browse/SLING-5470
> Project: Sling
>  Issue Type: Bug
>  Components: ResourceResolver
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Resource Resolver 1.3.2
>
>
> The CommonResourceResolverFactoryImpl contains some code to make sure that 
> all resource resolvers (and therefore the providers) are closed - as soon as 
> there is no reference to them anymore
> With the refactoring to the new provider API, this functionality has been 
> removed - while the resource resolver context is still closed, the providers 
> are not closed (logged out)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Updated] (SLING-5218) ResourceProviderAuthenticator must not hold stateless providers

2016-02-02 Thread Carsten Ziegeler (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-5218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler updated SLING-5218:

Fix Version/s: (was: Resource Resolver 1.4.0)
   Resource Resolver 1.3.2

> ResourceProviderAuthenticator must not hold stateless providers
> ---
>
> Key: SLING-5218
> URL: https://issues.apache.org/jira/browse/SLING-5218
> Project: Sling
>  Issue Type: Improvement
>  Components: ResourceResolver
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Resource Resolver 1.3.2
>
>
> The ResourceProviderAuthenticator keeps currently a state provider object for 
> each provider it uses. This is not necessary for all stateless providers (all 
> servlet and bundle providers for example). We can reduce memory footprint by 
> avoiding this.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: [VOTE] Release Apache Sling API 2.10.0, Apache Sling Resource Resolver 1.3.0, Apache Sling JCR Resource Resolver 2.6.0, Apache Sling Servlet Resolver 2.3.10

2016-02-02 Thread Robert Munteanu
On Tue, 2016-02-02 at 23:34 +0200, Robert Munteanu wrote:
> Please vote to approve this release:

+1

Robert

signature.asc
Description: This is a digitally signed message part


[jira] [Commented] (SLING-5478) Implement MockNode methods regarding mixin and more

2016-02-02 Thread Stefan Seifert (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5478?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128766#comment-15128766
 ] 

Stefan Seifert commented on SLING-5478:
---

patch looks good to me on the first sight - but we need unit test for the 
functionality to apply it to the codebase.
can you provide them as well?


> Implement MockNode methods regarding mixin and more
> ---
>
> Key: SLING-5478
> URL: https://issues.apache.org/jira/browse/SLING-5478
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR, Testing
>Affects Versions: Testing JCR Mock 1.1.10
>Reporter: Danilo Cugia
>Priority: Minor
>  Labels: test
> Fix For: Testing JCR Mock 1.1.12
>
>
> Implement the following operations on a MockNode object:
> - Add mixin
> - Get index
> - Get mixin types
> - Node repositioning (node.orderBefore)
> - Remove mixin
> - Move
> PR: https://github.com/apache/sling/pull/121



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: Sling Resource Merger and intended behaviour of sling:hideProperties and sling:hideChildren

2016-02-02 Thread Konrad Windszus
I contributed some documentation in 
http://sling.staging.apache.org/documentation/bundles/resource-merger.html 
.
Would you be so kind and quickly cross-check?
I would still be interested though in someone else’s opinion on how the 
sling:hideProperties=* is supposed to work.
Thanks
Konrad


> On 29 Jan 2016, at 18:09, Julian Sedding  wrote:
> 
> There is some more documentation at
> https://github.com/gknob/sling-resourcemerger, where the feature was
> originally developed. Haven't had time to read it yet.
> 
> Regards
> Julian
> 
> On Fri, Jan 29, 2016 at 6:02 PM, Konrad Windszus
>  wrote:
>> As being suggested by Julian Sedding in 
>> https://issues.apache.org/jira/browse/SLING-5468 I want to get your input on 
>> how the properties
>> "sling:hideProperties=*”  and "sling:hideChildren=*” are supposed to work in 
>> the Sling Resource Merger.
>> 
>> At least for the OverridingResourcePicker using the wildcard hides both the 
>> local as well as the inherited resources/properties. This is causing some 
>> trouble as that way I cannot easily replace the whole resource without 
>> considering any underlying resources.
>> The only documentation about those properties is at 
>> https://issues.apache.org/jira/browse/SLING-2986?focusedCommentId=13802834=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13802834
>>  but that does not really explain how those should behave in terms of 
>> inheritance. Also the implementation changed quite a bit due to the 
>> refactoring being done in https://issues.apache.org/jira/browse/SLING-3423.
>> 
>> For me this looks rather like a bug because I cannot come up with a good use 
>> case where you would be interested to even hide your own/local 
>> properties/child resources. Those properties should IMHO always refer only 
>> to the inherited/underlying resources/properties but not to the local ones 
>> (i.e. the ones next to the resource defining sling:hideProperties or 
>> sling:hideChildren.
>> WDYT?
>> 
>> Thanks for your input,
>> Konrad
>> 



[jira] [Commented] (SLING-5414) Make the contents of the provisioning model available at runtime

2016-02-02 Thread Felix Meschberger (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15129982#comment-15129982
 ] 

Felix Meschberger commented on SLING-5414:
--

>From the peanut gallery: Providing the model is ok. Do we also have API to 
>expose this model programmatically ? Such that not everyone goes about trying 
>to find the model and parse the model ...

> Make the contents of the provisioning model available at runtime
> 
>
> Key: SLING-5414
> URL: https://issues.apache.org/jira/browse/SLING-5414
> Project: Sling
>  Issue Type: New Feature
>  Components: Maven Plugins and Archetypes
>Affects Versions: Slingstart Maven Plugin 1.4.0
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>Priority: Minor
> Fix For: Slingstart Maven Plugin 1.4.2
>
> Attachments: SLING-5414.patch
>
>
> For SLING-5355 we need to make additional sections from the provisioning 
> model available at runtime, so that ACLs can be set at startup, and also to 
> be able to reuse their definitions later for auditing/verification purposes.
> A simple way to do that is to copy those sections in the sling_bootstrap.txt 
> file. I have created a patch that does that, will attach it here for review.
> _edit: as discussed below, we'll make the full text of the model available at 
> runtime_



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5468) Resource Merger: Provide a way to completely replace the underlying resources

2016-02-02 Thread Konrad Windszus (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15129988#comment-15129988
 ] 

Konrad Windszus commented on SLING-5468:


Indeed it is. I close that one as a duplicate (because this issue contains more 
information about the star value probably being wrongly implemented).

> Resource Merger: Provide a way to completely replace the underlying resources
> -
>
> Key: SLING-5468
> URL: https://issues.apache.org/jira/browse/SLING-5468
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Resource Merger 1.2.10
>Reporter: Konrad Windszus
>
> Currently whenever the mount point of the {{MergingResourcePicker}} 
> (/mnt/overlay) or {{OverridingResourcePicker}} (/mnt/override) is used, the 
> merging always takes place. It is only possible to hide/modify individual 
> resource/properties of the underlying resources but not to completely disable 
> the inheritance (and by that replace the whole overriden/overlaid resource).
> A concrete usecase for that is in a CMS (e.g. AEM) where the dialog 
> definitions are always loaded via /mnt/override/. In that case 
> it is not easily possible to completely replace the dialog of the resource 
> super type (as only individual child resources or properties can be hidden 
> but there is no special property to ignore the inherited resource 
> alltogether).
> I propose the following:
> Add a new property {{sling:disregardInheritedResource=true}} in which case 
> all the inherited resources would not be taken into account for merging.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5459) Recording of tracer logs

2016-02-02 Thread Carsten Ziegeler (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15127884#comment-15127884
 ] 

Carsten Ziegeler commented on SLING-5459:
-

This sounds like a nice addition, couple of comments:
- the user initiation the request can be anyone I assume (doesn't have to be 
admin), however the user who can view the log needs access to the console. I 
guess this makes sense as otherwise every user could get this information. But 
allowing every user to create the logs might not be the best thing either. Not 
sure
- I'm not happy about adding a dependency to Guava Cache. We have Sling Cache 
or maybe could use a simple solution, like we do elsewhere where simply the 
last N entries are kept

> Recording of tracer logs
> 
>
> Key: SLING-5459
> URL: https://issues.apache.org/jira/browse/SLING-5459
> Project: Sling
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Chetan Mehrotra
>Assignee: Chetan Mehrotra
> Fix For: Log Tracer 1.0.0
>
> Attachments: SLING-5459-v1.patch, tracer-recording.json
>
>
> Sling Log Tracer currently provides support for fine grained control of 
> enabling logs for specific request. To make this log more accessible it would 
> be useful to have a feature where the client can also fetch the logs from 
> specific request over HTTP.
> This feature would work like below
> # Client sends an HTTP request with header {{Sling-Tracer-Record​}}  set to 
> true
> {noformat}
> curl -D - -u admin:admin \
>   -H "Sling-Tracer-Record : true" \
>  -d "./jcr:content/jcr:title=Summer Collection" \
>  -d ":name=summer-collection" \
>  -d "./jcr:primaryType=sling:Folder" \
>  -d "./jcr:content/jcr:primaryType=nt:unstructured" \
>  -d "tracers=oak-writes" \
>  http://localhost:4802/content/dam/
> {noformat}
> # Server includes a request id as part of {{Sling-Tracer-Request-Id}} 
> response headers
> {noformat}
> HTTP/1.1 201 Created
> Date: Wed, 27 Jan 2016 07:30:22 GMT
> Sling-Tracer-Request-Id: 9b5b01f6-f269-47c3-a889-2dc8d4d7938f
> X-Content-Type-Options: nosniff
> X-Frame-Options: SAMEORIGIN
> Location: /content/dam/summer-collection
> Content-Type: text/html; charset=UTF-8
> Transfer-Encoding: chunked
> {noformat}
> # The logs in json format can then be fetched like 
> http://localhost:4802/system/console/tracer/9b5b01f6-f269-47c3-a889-2dc8d4d7938f.json
>  (see [attached output|^tracer-recording.json]. it includes following data 
> for now. It can be extended as per need
> ## RequestProgressTracker logs
> ## JCR Queries made
> Key points
> # Request id is randomly generated
> # The access to request log is via Web Console Plugin servlet hence its only 
> accessible to admin user account
> # The request data would only be recorded for those request which have the 
> {{​Sling-Tracer-Record}} header set. The data would be kept in memory for 
> *some time* with the assumption that client would fetch it soon. After some 
> time the data would expire
> # This feature would need to explicitly enabled via config option
> # The feature is somewhat similar to 'Recent Request' support. However it 
> exposes a JSON rendition and only keeps the data for request where client 
> requested that. 
> # For this feature dependency is added for Guava Cache to make use of space 
> bound/expiring cache. We can to an extent use {{LinkedHashMap}} but given 
> that Guava is now being used in Sling for Oak it makes sense to make use of 
> its feature. If required can look into embedding minimum required set



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: [VOTE] Release Apache Sling HApi 1.0.0

2016-02-02 Thread Stefan Egli
+1

Cheers,
Stefan

On 02/02/16 15:38, "Carsten Ziegeler"  wrote:

>Hi,
>
>this is the initial release, solved issues:
>
>
>https://issues.apache.org/jira/browse/SLING/fixforversion/12334761
>
>Staging repository:
>https://repository.apache.org/content/repositories/orgapachesling-1415/
>
>You can use this UNIX script to download the release and verify the
>signatures:
>http://svn.apache.org/repos/asf/sling/trunk/check_staged_release.sh
>
>Usage:
>sh check_staged_release.sh 1415 /tmp/sling-staging
>
>Please vote to approve this release:
>
>  [ ] +1 Approve the release
>  [ ]  0 Don't care
>  [ ] -1 Don't release, because ...
>
>This majority vote is open for at least 72 hours.
>
>Carsten
>-- 
>Carsten Ziegeler
>Adobe Research Switzerland
>cziege...@apache.org




[RESULT][VOTE] Release Apache Sling XSS Protection API 1.0.8

2016-02-02 Thread Radu Cotescu
Hi,

The vote passed with 3 +1 from: Robert Munteanu, Daniel Klco and Stefan
Seifert.

@PMC: could you please move the artifacts to dist?

Thanks,
Radu


[jira] [Commented] (SLING-5463) GetStarTest fails with "Invalid name or path"

2016-02-02 Thread Carsten Ziegeler (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128342#comment-15128342
 ] 

Carsten Ziegeler commented on SLING-5463:
-

I think for now we should just ignore the exception - returning null for all 
cases is probably better/more correct than throwing a runtime exception 
(SlingException). Checking the path results in checking the path at least twice

> GetStarTest fails with "Invalid name or path"
> -
>
> Key: SLING-5463
> URL: https://issues.apache.org/jira/browse/SLING-5463
> Project: Sling
>  Issue Type: Bug
>  Components: JCR, Testing
>Reporter: Bertrand Delacretaz
>Assignee: Robert Munteanu
>  Labels: sling-IT
> Fix For: JCR Resource 2.6.0
>
>
> The GetStarTest from launchpad/integration-tests recently started failing, 
> for example at [1]:
> {code}
> javax.jcr.RepositoryException: Invalid name or path: 
> /GetStarTest1453972215267/* 
>  at 
> org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPathOrThrow(SessionContext.java:347)
> ...
>  at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl.getItemOrNull(SessionImpl.java:225)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.getItemOrNull(JcrItemResourceFactory.java:182)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.createResource(JcrItemResourceFactory.java:96)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.listChildren(JcrResourceProvider.java:293)
>  at 
> org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider.listChildren(AuthenticatedResourceProvider.java:175)
>  at 
> org.apache.sling.resourceresolver.impl.providers.stateful.CombinedResourceProvider.listChildren(CombinedResourceProvider.java:205)
>  at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.listChildren(ResourceResolverImpl.java:719)
>  at 
> org.apache.sling.api.resource.ResourceUtil.listChildren(ResourceUtil.java:360)
> ...
>  at 
> org.apache.sling.servlets.get.impl.helpers.JsonRendererServlet.doGet(JsonRendererServlet.java:100)
> {code}
> [1] 
> https://builds.apache.org/view/S-Z/view/Sling/job/sling-trunk-1.7/org.apache.sling$org.apache.sling.launchpad.testing/3252/testReport/junit/org.apache.sling.launchpad.webapp.integrationtest/GetStarTest/testGetStarJson/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5475) JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk

2016-02-02 Thread Robert Munteanu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128390#comment-15128390
 ] 

Robert Munteanu commented on SLING-5475:


Fixed in [r1728145|https://svn.apache.org/r1728145]

> JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk
> 
>
> Key: SLING-5475
> URL: https://issues.apache.org/jira/browse/SLING-5475
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Affects Versions: JCR Resource 2.5.6
>Reporter: Stefan Egli
>Assignee: Robert Munteanu
>Priority: Blocker
> Fix For: JCR Resource 2.6.0
>
>
> With OAK-3842 a fair number of oak packages have gotten their export version 
> reset to 0.0.0 instead of exporting a particular version (as that package is 
> not meant to be a stable API just yet).
> One consequence of this change is that JcrResourceProviderFactory now fails 
> with a NoClassDefFoundError as it has as import dependency 
> {{org.apache.jackrabbit.oak.plugins.observation; resolution:=optional; 
> version="[2.0, 3)"}} while that is now exported as {{0.0.0}}.
> Not sure if we have to do much or of this gets fixed automagically when we're 
> releasing a new jcr.resource bundle ([~cziegeler], wdyt?).
> Here's the details of the exception:
> {code}
> 02.02.2016 11:02:55.098 *ERROR* [FelixStartLevel] 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory 
> Unable to instantiate improved JCR Resource listener for Oak. Using fallback.
> java.lang.NoClassDefFoundError: 
> org/apache/jackrabbit/oak/plugins/observation/NodeObserver
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2370)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2154)
> at 
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1542)
> at 
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory.activate(JcrResourceProviderFactory.java:159)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
> at 
> org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:113)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:866)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:833)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:774)
> at 
> org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:347)
> at 
> org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:247)
> at 
> org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:344)
> at org.apache.felix.framework.Felix.getService(Felix.java:3699)
> at 
> org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)
> at 
> org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:72)
> at 
> org.apache.felix.scr.impl.helper.BindMethod.getServiceObject(BindMethod.java:646)
> at 
> org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2137)
> at 
> 

[jira] [Commented] (SLING-5475) JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk

2016-02-02 Thread Konrad Windszus (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128325#comment-15128325
 ] 

Konrad Windszus commented on SLING-5475:


In terms of backwards compatibility this makes it once again compatible with 
1.2 IMHO (http://www.mail-archive.com/dev%40sling.apache.org/msg49385.html).

> JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk
> 
>
> Key: SLING-5475
> URL: https://issues.apache.org/jira/browse/SLING-5475
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Affects Versions: JCR Resource 2.5.6
>Reporter: Stefan Egli
>Assignee: Robert Munteanu
>Priority: Blocker
> Fix For: JCR Resource 2.6.0
>
>
> With OAK-3842 a fair number of oak packages have gotten their export version 
> reset to 0.0.0 instead of exporting a particular version (as that package is 
> not meant to be a stable API just yet).
> One consequence of this change is that JcrResourceProviderFactory now fails 
> with a NoClassDefFoundError as it has as import dependency 
> {{org.apache.jackrabbit.oak.plugins.observation; resolution:=optional; 
> version="[2.0, 3)"}} while that is now exported as {{0.0.0}}.
> Not sure if we have to do much or of this gets fixed automagically when we're 
> releasing a new jcr.resource bundle ([~cziegeler], wdyt?).
> Here's the details of the exception:
> {code}
> 02.02.2016 11:02:55.098 *ERROR* [FelixStartLevel] 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory 
> Unable to instantiate improved JCR Resource listener for Oak. Using fallback.
> java.lang.NoClassDefFoundError: 
> org/apache/jackrabbit/oak/plugins/observation/NodeObserver
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2370)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2154)
> at 
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1542)
> at 
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory.activate(JcrResourceProviderFactory.java:159)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
> at 
> org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:113)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:866)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:833)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:774)
> at 
> org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:347)
> at 
> org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:247)
> at 
> org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:344)
> at org.apache.felix.framework.Felix.getService(Felix.java:3699)
> at 
> org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)
> at 
> org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:72)
> at 
> org.apache.felix.scr.impl.helper.BindMethod.getServiceObject(BindMethod.java:646)
> at 
> 

[jira] [Commented] (SLING-5463) GetStarTest fails with "Invalid name or path"

2016-02-02 Thread Robert Munteanu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128347#comment-15128347
 ] 

Robert Munteanu commented on SLING-5463:


Agreed. Re-added the try/catch in https://svn.apache.org/r1728136, all 
integration tests pass.

> GetStarTest fails with "Invalid name or path"
> -
>
> Key: SLING-5463
> URL: https://issues.apache.org/jira/browse/SLING-5463
> Project: Sling
>  Issue Type: Bug
>  Components: JCR, Testing
>Reporter: Bertrand Delacretaz
>Assignee: Robert Munteanu
>  Labels: sling-IT
> Fix For: JCR Resource 2.6.0
>
>
> The GetStarTest from launchpad/integration-tests recently started failing, 
> for example at [1]:
> {code}
> javax.jcr.RepositoryException: Invalid name or path: 
> /GetStarTest1453972215267/* 
>  at 
> org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPathOrThrow(SessionContext.java:347)
> ...
>  at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl.getItemOrNull(SessionImpl.java:225)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.getItemOrNull(JcrItemResourceFactory.java:182)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.createResource(JcrItemResourceFactory.java:96)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.listChildren(JcrResourceProvider.java:293)
>  at 
> org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider.listChildren(AuthenticatedResourceProvider.java:175)
>  at 
> org.apache.sling.resourceresolver.impl.providers.stateful.CombinedResourceProvider.listChildren(CombinedResourceProvider.java:205)
>  at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.listChildren(ResourceResolverImpl.java:719)
>  at 
> org.apache.sling.api.resource.ResourceUtil.listChildren(ResourceUtil.java:360)
> ...
>  at 
> org.apache.sling.servlets.get.impl.helpers.JsonRendererServlet.doGet(JsonRendererServlet.java:100)
> {code}
> [1] 
> https://builds.apache.org/view/S-Z/view/Sling/job/sling-trunk-1.7/org.apache.sling$org.apache.sling.launchpad.testing/3252/testReport/junit/org.apache.sling.launchpad.webapp.integrationtest/GetStarTest/testGetStarJson/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (SLING-5463) GetStarTest fails with "Invalid name or path"

2016-02-02 Thread Robert Munteanu (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-5463?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Munteanu resolved SLING-5463.

Resolution: Fixed

> GetStarTest fails with "Invalid name or path"
> -
>
> Key: SLING-5463
> URL: https://issues.apache.org/jira/browse/SLING-5463
> Project: Sling
>  Issue Type: Bug
>  Components: JCR, Testing
>Reporter: Bertrand Delacretaz
>Assignee: Robert Munteanu
>  Labels: sling-IT
> Fix For: JCR Resource 2.6.0
>
>
> The GetStarTest from launchpad/integration-tests recently started failing, 
> for example at [1]:
> {code}
> javax.jcr.RepositoryException: Invalid name or path: 
> /GetStarTest1453972215267/* 
>  at 
> org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPathOrThrow(SessionContext.java:347)
> ...
>  at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl.getItemOrNull(SessionImpl.java:225)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.getItemOrNull(JcrItemResourceFactory.java:182)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.createResource(JcrItemResourceFactory.java:96)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.listChildren(JcrResourceProvider.java:293)
>  at 
> org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider.listChildren(AuthenticatedResourceProvider.java:175)
>  at 
> org.apache.sling.resourceresolver.impl.providers.stateful.CombinedResourceProvider.listChildren(CombinedResourceProvider.java:205)
>  at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.listChildren(ResourceResolverImpl.java:719)
>  at 
> org.apache.sling.api.resource.ResourceUtil.listChildren(ResourceUtil.java:360)
> ...
>  at 
> org.apache.sling.servlets.get.impl.helpers.JsonRendererServlet.doGet(JsonRendererServlet.java:100)
> {code}
> [1] 
> https://builds.apache.org/view/S-Z/view/Sling/job/sling-trunk-1.7/org.apache.sling$org.apache.sling.launchpad.testing/3252/testReport/junit/org.apache.sling.launchpad.webapp.integrationtest/GetStarTest/testGetStarJson/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5463) GetStarTest fails with "Invalid name or path"

2016-02-02 Thread Robert Munteanu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128323#comment-15128323
 ] 

Robert Munteanu commented on SLING-5463:


[~anchela] - thanks for the information, I'll drop the idea of trying to detect 
invalid paths.

I've noticed that there is a 
[{{PathParser}}|https://github.com/apache/jackrabbit/blob/1404d55fb1d913a1e08f8b6634082184073213d1/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/conversion/PathParser.java]
 in jackrabbit-spi-commons with a {{checkFormat}} method which seems to work 
well for our scenario.

Is that something we can use, until/if we decide to improve Oak to report more 
specific errors when an invalid path is encountered?

> GetStarTest fails with "Invalid name or path"
> -
>
> Key: SLING-5463
> URL: https://issues.apache.org/jira/browse/SLING-5463
> Project: Sling
>  Issue Type: Bug
>  Components: JCR, Testing
>Reporter: Bertrand Delacretaz
>Assignee: Robert Munteanu
>  Labels: sling-IT
> Fix For: JCR Resource 2.6.0
>
>
> The GetStarTest from launchpad/integration-tests recently started failing, 
> for example at [1]:
> {code}
> javax.jcr.RepositoryException: Invalid name or path: 
> /GetStarTest1453972215267/* 
>  at 
> org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPathOrThrow(SessionContext.java:347)
> ...
>  at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl.getItemOrNull(SessionImpl.java:225)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.getItemOrNull(JcrItemResourceFactory.java:182)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.createResource(JcrItemResourceFactory.java:96)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.listChildren(JcrResourceProvider.java:293)
>  at 
> org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider.listChildren(AuthenticatedResourceProvider.java:175)
>  at 
> org.apache.sling.resourceresolver.impl.providers.stateful.CombinedResourceProvider.listChildren(CombinedResourceProvider.java:205)
>  at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.listChildren(ResourceResolverImpl.java:719)
>  at 
> org.apache.sling.api.resource.ResourceUtil.listChildren(ResourceUtil.java:360)
> ...
>  at 
> org.apache.sling.servlets.get.impl.helpers.JsonRendererServlet.doGet(JsonRendererServlet.java:100)
> {code}
> [1] 
> https://builds.apache.org/view/S-Z/view/Sling/job/sling-trunk-1.7/org.apache.sling$org.apache.sling.launchpad.testing/3252/testReport/junit/org.apache.sling.launchpad.webapp.integrationtest/GetStarTest/testGetStarJson/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: [VOTE] Release Apache Sling HApi 1.0.0

2016-02-02 Thread Carsten Ziegeler
+1


 
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org


[RESULT][VOTE] Release Apache Sling Scripting Sightly Engine 1.0.12

2016-02-02 Thread Radu Cotescu
Hi,

The vote passed with 3 +1 from: Stefan Egli, Robert Munteanu and Stefan
Seifert.

@PMC: could you please move the artifacts to dist?

Thanks,
Radu


[jira] [Comment Edited] (SLING-5475) JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk

2016-02-02 Thread Konrad Windszus (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128325#comment-15128325
 ] 

Konrad Windszus edited comment on SLING-5475 at 2/2/16 2:46 PM:


In terms of backwards compatibility this makes it once again compatible with 
Oak 1.2 IMHO 
(http://www.mail-archive.com/dev%40sling.apache.org/msg49385.html). For that to 
work the version must be fixed to 0 (because that implicitly would cover the 
version range [0.0.0,∞))


was (Author: kwin):
In terms of backwards compatibility this makes it once again compatible with 
Oak 1.2 IMHO (http://www.mail-archive.com/dev%40sling.apache.org/msg49385.html).

> JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk
> 
>
> Key: SLING-5475
> URL: https://issues.apache.org/jira/browse/SLING-5475
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Affects Versions: JCR Resource 2.5.6
>Reporter: Stefan Egli
>Assignee: Robert Munteanu
>Priority: Blocker
> Fix For: JCR Resource 2.6.0
>
>
> With OAK-3842 a fair number of oak packages have gotten their export version 
> reset to 0.0.0 instead of exporting a particular version (as that package is 
> not meant to be a stable API just yet).
> One consequence of this change is that JcrResourceProviderFactory now fails 
> with a NoClassDefFoundError as it has as import dependency 
> {{org.apache.jackrabbit.oak.plugins.observation; resolution:=optional; 
> version="[2.0, 3)"}} while that is now exported as {{0.0.0}}.
> Not sure if we have to do much or of this gets fixed automagically when we're 
> releasing a new jcr.resource bundle ([~cziegeler], wdyt?).
> Here's the details of the exception:
> {code}
> 02.02.2016 11:02:55.098 *ERROR* [FelixStartLevel] 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory 
> Unable to instantiate improved JCR Resource listener for Oak. Using fallback.
> java.lang.NoClassDefFoundError: 
> org/apache/jackrabbit/oak/plugins/observation/NodeObserver
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2370)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2154)
> at 
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1542)
> at 
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory.activate(JcrResourceProviderFactory.java:159)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
> at 
> org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:113)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:866)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:833)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:774)
> at 
> org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:347)
> at 
> org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:247)
> at 
> org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:344)
> at org.apache.felix.framework.Felix.getService(Felix.java:3699)
> at 
> 

[jira] [Commented] (SLING-5475) JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk

2016-02-02 Thread Robert Munteanu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128354#comment-15128354
 ] 

Robert Munteanu commented on SLING-5475:


Yup, that was what I suggested as well in my previous comment. I'll give it a 
shot now.

> JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk
> 
>
> Key: SLING-5475
> URL: https://issues.apache.org/jira/browse/SLING-5475
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Affects Versions: JCR Resource 2.5.6
>Reporter: Stefan Egli
>Assignee: Robert Munteanu
>Priority: Blocker
> Fix For: JCR Resource 2.6.0
>
>
> With OAK-3842 a fair number of oak packages have gotten their export version 
> reset to 0.0.0 instead of exporting a particular version (as that package is 
> not meant to be a stable API just yet).
> One consequence of this change is that JcrResourceProviderFactory now fails 
> with a NoClassDefFoundError as it has as import dependency 
> {{org.apache.jackrabbit.oak.plugins.observation; resolution:=optional; 
> version="[2.0, 3)"}} while that is now exported as {{0.0.0}}.
> Not sure if we have to do much or of this gets fixed automagically when we're 
> releasing a new jcr.resource bundle ([~cziegeler], wdyt?).
> Here's the details of the exception:
> {code}
> 02.02.2016 11:02:55.098 *ERROR* [FelixStartLevel] 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory 
> Unable to instantiate improved JCR Resource listener for Oak. Using fallback.
> java.lang.NoClassDefFoundError: 
> org/apache/jackrabbit/oak/plugins/observation/NodeObserver
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2370)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2154)
> at 
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1542)
> at 
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory.activate(JcrResourceProviderFactory.java:159)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
> at 
> org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:113)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:866)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:833)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:774)
> at 
> org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:347)
> at 
> org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:247)
> at 
> org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:344)
> at org.apache.felix.framework.Felix.getService(Felix.java:3699)
> at 
> org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)
> at 
> org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:72)
> at 
> org.apache.felix.scr.impl.helper.BindMethod.getServiceObject(BindMethod.java:646)
> at 
> org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2137)
> at 
> 

An API to retrieve the search path?

2016-02-02 Thread Bertrand Delacretaz
Hi,

I was looking at a few cases where we use an administrative
ResourceResolver just to get the current search paths, for example in
ScriptCacheImpl [1], the (simplified) pattern is:

  ResourceResolver resolver = rrf.getAdministrativeResourceResolver(null);
  searchPaths = resolver.getSearchPath();
  resolver.close();

Conceptually there's no need to have a resource resolver to get the
search path, nor should it be necessary to login to anything - the
search path is just a configuration in
ResourceResolverFactoryActivator.

To avoid having to create service users just for this, I suggest
creating a service that provides the search path, and letting the
ResourceResolverFactoryActivator provide that service. We can then get
rid of a number of admin sessions and resolvers, in various places.

WDYT?

-Bertrand

[1] 
https://github.com/apache/sling/blob/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptCacheImpl.java


[jira] [Resolved] (SLING-5475) JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk

2016-02-02 Thread Robert Munteanu (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Munteanu resolved SLING-5475.

Resolution: Fixed

> JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk
> 
>
> Key: SLING-5475
> URL: https://issues.apache.org/jira/browse/SLING-5475
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Affects Versions: JCR Resource 2.5.6
>Reporter: Stefan Egli
>Assignee: Robert Munteanu
>Priority: Blocker
> Fix For: JCR Resource 2.6.0
>
>
> With OAK-3842 a fair number of oak packages have gotten their export version 
> reset to 0.0.0 instead of exporting a particular version (as that package is 
> not meant to be a stable API just yet).
> One consequence of this change is that JcrResourceProviderFactory now fails 
> with a NoClassDefFoundError as it has as import dependency 
> {{org.apache.jackrabbit.oak.plugins.observation; resolution:=optional; 
> version="[2.0, 3)"}} while that is now exported as {{0.0.0}}.
> Not sure if we have to do much or of this gets fixed automagically when we're 
> releasing a new jcr.resource bundle ([~cziegeler], wdyt?).
> Here's the details of the exception:
> {code}
> 02.02.2016 11:02:55.098 *ERROR* [FelixStartLevel] 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory 
> Unable to instantiate improved JCR Resource listener for Oak. Using fallback.
> java.lang.NoClassDefFoundError: 
> org/apache/jackrabbit/oak/plugins/observation/NodeObserver
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2370)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2154)
> at 
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1542)
> at 
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory.activate(JcrResourceProviderFactory.java:159)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
> at 
> org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:113)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:866)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:833)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:774)
> at 
> org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:347)
> at 
> org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:247)
> at 
> org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:344)
> at org.apache.felix.framework.Felix.getService(Felix.java:3699)
> at 
> org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)
> at 
> org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:72)
> at 
> org.apache.felix.scr.impl.helper.BindMethod.getServiceObject(BindMethod.java:646)
> at 
> org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2137)
> at 
> 

Service users and backwards compatibility

2016-02-02 Thread Bertrand Delacretaz
Hi,

We should now be ready to remove admin sessions wherever possible in
our code and test the results, the SLING-5449 repository
initialization language is not completely finished but can be used in
tests already.

What's our plan about backwards compatibility when we introduce service users?
People will need to create service users for modules that didn't use
them before but start doing so.

A simple way to create those, that works in all environments, is to
implement a RepositoryInitializer like [1] does.

Are people ok with just pointing to that example (which is used in our
integration tests so guaranteed to work) or do we need more than that?

-Bertrand

[1] 
https://github.com/apache/sling/blob/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/repository/SystemUsersInitializer.java

Uses 
https://github.com/apache/sling/blob/trunk/launchpad/test-services/src/main/resources/repoinit.txt
which can contain any statements supported by the
bundles/commons/repoinit language. Which needs to be documented, for
now examples are in tests there.


[jira] [Commented] (SLING-5477) Allow to add an artifact of the slingstart project to the model

2016-02-02 Thread Carsten Ziegeler (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128307#comment-15128307
 ] 

Carsten Ziegeler commented on SLING-5477:
-

Added a first untested implementation in rev 1728125

> Allow to add an artifact of the slingstart project to the model
> ---
>
> Key: SLING-5477
> URL: https://issues.apache.org/jira/browse/SLING-5477
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Slingstart Maven Plugin 1.4.2
>
>
> In some cases it might be useful to have a slingstart project, where the 
> project in addition to a provisioning model contains the source for a bundle. 
> The maven bundle plugin could be used to build the bundle and the 
> provisioning model includes this artifact.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (SLING-5471) Sightly error in terminal: RHINO USAGE WARNING: Missed Context.javaToJS() conversion

2016-02-02 Thread Radu Cotescu (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-5471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Radu Cotescu resolved SLING-5471.
-
Resolution: Not A Problem

> Sightly error in terminal: RHINO USAGE WARNING: Missed Context.javaToJS() 
> conversion
> 
>
> Key: SLING-5471
> URL: https://issues.apache.org/jira/browse/SLING-5471
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting Sightly Engine 1.0.10
> Environment: Mac
>Reporter: Joel Richard
> Attachments: Screen Shot 2016-02-01 at 11.14.07.png
>
>
> I often see the following error in the terminal:
> {code}
> RHINO USAGE WARNING: Missed Context.javaToJS() conversion:
> Rhino runtime detected object 
> java.util.GregorianCalendar[time=1434664044399,areFieldsSet=true,areAllFieldsSet=true,lenient=false,zone=sun.util.calendar.ZoneInfo[id="GMT-07:00",offset=-2520,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2015,MONTH=5,WEEK_OF_YEAR=25,WEEK_OF_MONTH=3,DAY_OF_MONTH=18,DAY_OF_YEAR=169,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=3,AM_PM=1,HOUR=2,HOUR_OF_DAY=14,MINUTE=47,SECOND=24,MILLISECOND=399,ZONE_OFFSET=-2520,DST_OFFSET=0]
>  of class java.util.GregorianCalendar where it expected String, Number, 
> Boolean or Scriptable instance. Please check your code for missing 
> Context.javaToJS() call.
> {code}
> I think it happens for if statements. Attached is a stack. Please let me know 
> if you need more information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5471) Sightly error in terminal: RHINO USAGE WARNING: Missed Context.javaToJS() conversion

2016-02-02 Thread Radu Cotescu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128304#comment-15128304
 ] 

Radu Cotescu commented on SLING-5471:
-

After an offline chat with [~joelrich] we identified that this issue manifests 
in an AEM application. The debugging showed that these errors were logged by 
Rhino when client code (e.g. JavaScript Use objects) were performing 
comparisons between Java Calendar objects and JavaScript native objects.

> Sightly error in terminal: RHINO USAGE WARNING: Missed Context.javaToJS() 
> conversion
> 
>
> Key: SLING-5471
> URL: https://issues.apache.org/jira/browse/SLING-5471
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting Sightly Engine 1.0.10
> Environment: Mac
>Reporter: Joel Richard
> Attachments: Screen Shot 2016-02-01 at 11.14.07.png
>
>
> I often see the following error in the terminal:
> {code}
> RHINO USAGE WARNING: Missed Context.javaToJS() conversion:
> Rhino runtime detected object 
> java.util.GregorianCalendar[time=1434664044399,areFieldsSet=true,areAllFieldsSet=true,lenient=false,zone=sun.util.calendar.ZoneInfo[id="GMT-07:00",offset=-2520,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2015,MONTH=5,WEEK_OF_YEAR=25,WEEK_OF_MONTH=3,DAY_OF_MONTH=18,DAY_OF_YEAR=169,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=3,AM_PM=1,HOUR=2,HOUR_OF_DAY=14,MINUTE=47,SECOND=24,MILLISECOND=399,ZONE_OFFSET=-2520,DST_OFFSET=0]
>  of class java.util.GregorianCalendar where it expected String, Number, 
> Boolean or Scriptable instance. Please check your code for missing 
> Context.javaToJS() call.
> {code}
> I think it happens for if statements. Attached is a stack. Please let me know 
> if you need more information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: Release of hapi 1.0.0

2016-02-02 Thread Carsten Ziegeler
Andrei Dulvac wrote
> Hi guys,
> 
> Could we have a first release of HApi core 1.0.0 from
> /trunk/contrib/extensions/hapi/core ?
> Issues solved: SLING-4513, SLING-5055, SLING-5061, SLING-5474.
> 
I can take care of it
 
Carsten
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org


[jira] [Closed] (SLING-5445) XSSAPI#encodeForJSString is too restrictive

2016-02-02 Thread Radu Cotescu (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-5445?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Radu Cotescu closed SLING-5445.
---

> XSSAPI#encodeForJSString is too restrictive
> ---
>
> Key: SLING-5445
> URL: https://issues.apache.org/jira/browse/SLING-5445
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: XSS Protection API 1.0.6
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
> Fix For: XSS Protection API 1.0.8
>
>
> For the cases when somebody tries to sanitise JSON strings the 
> {{XSSAPI#encodeForJSString}} current implementation is too restrictive. 
> Assuming one would want to sanitize {{2016-01-21T15:40:30}}, the output of 
> the {{XSSAPI#encodeForJSString}} would be 
> {noformat}
> 2016\-01\-21T15:40:30
> {noformat}
> which although is a valid String for JavaScript code is not a valid one for 
> JSON.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: An API to retrieve the search path?

2016-02-02 Thread Carsten Ziegeler
This pattern is usually used with registering event handlers as
observation listeners. With the new observation api we have a more
elegant solution: you can register the listener with a relative path and
the search paths are automatically added.

As all our event handlers should move to the new observation api, I
don't see a reason to add new api - unless there is another good use case.

Carsten

Bertrand Delacretaz wrote
> Hi,
> 
> I was looking at a few cases where we use an administrative
> ResourceResolver just to get the current search paths, for example in
> ScriptCacheImpl [1], the (simplified) pattern is:
> 
>   ResourceResolver resolver = rrf.getAdministrativeResourceResolver(null);
>   searchPaths = resolver.getSearchPath();
>   resolver.close();
> 
> Conceptually there's no need to have a resource resolver to get the
> search path, nor should it be necessary to login to anything - the
> search path is just a configuration in
> ResourceResolverFactoryActivator.
> 
> To avoid having to create service users just for this, I suggest
> creating a service that provides the search path, and letting the
> ResourceResolverFactoryActivator provide that service. We can then get
> rid of a number of admin sessions and resolvers, in various places.
> 
> WDYT?
> 
> -Bertrand
> 
> [1] 
> https://github.com/apache/sling/blob/trunk/bundles/scripting/core/src/main/java/org/apache/sling/scripting/core/impl/ScriptCacheImpl.java
> 


 
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org


[jira] [Commented] (SLING-5477) Allow to add an artifact of the slingstart project to the model

2016-02-02 Thread Bertrand Delacretaz (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128308#comment-15128308
 ] 

Bertrand Delacretaz commented on SLING-5477:


Not sure what your use case is but mine would be to create integration tests in 
the same Maven module that the bundle under test. If the provisioning model 
used for tests can include the bundle being built that would make this easier.

> Allow to add an artifact of the slingstart project to the model
> ---
>
> Key: SLING-5477
> URL: https://issues.apache.org/jira/browse/SLING-5477
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Slingstart Maven Plugin 1.4.2
>
>
> In some cases it might be useful to have a slingstart project, where the 
> project in addition to a provisioning model contains the source for a bundle. 
> The maven bundle plugin could be used to build the bundle and the 
> provisioning model includes this artifact.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (SLING-5471) Sightly error in terminal: RHINO USAGE WARNING: Missed Context.javaToJS() conversion

2016-02-02 Thread Radu Cotescu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128304#comment-15128304
 ] 

Radu Cotescu edited comment on SLING-5471 at 2/2/16 2:20 PM:
-

After an offline chat with [~joelrich] we identified that this issue manifests 
in an AEM application. The debugging showed that these errors were logged by 
Rhino when client code (e.g. JavaScript Use objects) was performing comparisons 
between Java Calendar objects and JavaScript native objects.


was (Author: radu.cotescu):
After an offline chat with [~joelrich] we identified that this issue manifests 
in an AEM application. The debugging showed that these errors were logged by 
Rhino when client code (e.g. JavaScript Use objects) were performing 
comparisons between Java Calendar objects and JavaScript native objects.

> Sightly error in terminal: RHINO USAGE WARNING: Missed Context.javaToJS() 
> conversion
> 
>
> Key: SLING-5471
> URL: https://issues.apache.org/jira/browse/SLING-5471
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting Sightly Engine 1.0.10
> Environment: Mac
>Reporter: Joel Richard
> Attachments: Screen Shot 2016-02-01 at 11.14.07.png
>
>
> I often see the following error in the terminal:
> {code}
> RHINO USAGE WARNING: Missed Context.javaToJS() conversion:
> Rhino runtime detected object 
> java.util.GregorianCalendar[time=1434664044399,areFieldsSet=true,areAllFieldsSet=true,lenient=false,zone=sun.util.calendar.ZoneInfo[id="GMT-07:00",offset=-2520,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2015,MONTH=5,WEEK_OF_YEAR=25,WEEK_OF_MONTH=3,DAY_OF_MONTH=18,DAY_OF_YEAR=169,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=3,AM_PM=1,HOUR=2,HOUR_OF_DAY=14,MINUTE=47,SECOND=24,MILLISECOND=399,ZONE_OFFSET=-2520,DST_OFFSET=0]
>  of class java.util.GregorianCalendar where it expected String, Number, 
> Boolean or Scriptable instance. Please check your code for missing 
> Context.javaToJS() call.
> {code}
> I think it happens for if statements. Attached is a stack. Please let me know 
> if you need more information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[VOTE] Release Apache Sling HApi 1.0.0

2016-02-02 Thread Carsten Ziegeler
Hi,

this is the initial release, solved issues:


https://issues.apache.org/jira/browse/SLING/fixforversion/12334761

Staging repository:
https://repository.apache.org/content/repositories/orgapachesling-1415/

You can use this UNIX script to download the release and verify the
signatures:
http://svn.apache.org/repos/asf/sling/trunk/check_staged_release.sh

Usage:
sh check_staged_release.sh 1415 /tmp/sling-staging

Please vote to approve this release:

  [ ] +1 Approve the release
  [ ]  0 Don't care
  [ ] -1 Don't release, because ...

This majority vote is open for at least 72 hours.

Carsten
-- 
Carsten Ziegeler
Adobe Research Switzerland
cziege...@apache.org


[jira] [Comment Edited] (SLING-5475) JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk

2016-02-02 Thread Konrad Windszus (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128325#comment-15128325
 ] 

Konrad Windszus edited comment on SLING-5475 at 2/2/16 2:36 PM:


In terms of backwards compatibility this makes it once again compatible with 
Oak 1.2 IMHO (http://www.mail-archive.com/dev%40sling.apache.org/msg49385.html).


was (Author: kwin):
In terms of backwards compatibility this makes it once again compatible with 
1.2 IMHO (http://www.mail-archive.com/dev%40sling.apache.org/msg49385.html).

> JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk
> 
>
> Key: SLING-5475
> URL: https://issues.apache.org/jira/browse/SLING-5475
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Affects Versions: JCR Resource 2.5.6
>Reporter: Stefan Egli
>Assignee: Robert Munteanu
>Priority: Blocker
> Fix For: JCR Resource 2.6.0
>
>
> With OAK-3842 a fair number of oak packages have gotten their export version 
> reset to 0.0.0 instead of exporting a particular version (as that package is 
> not meant to be a stable API just yet).
> One consequence of this change is that JcrResourceProviderFactory now fails 
> with a NoClassDefFoundError as it has as import dependency 
> {{org.apache.jackrabbit.oak.plugins.observation; resolution:=optional; 
> version="[2.0, 3)"}} while that is now exported as {{0.0.0}}.
> Not sure if we have to do much or of this gets fixed automagically when we're 
> releasing a new jcr.resource bundle ([~cziegeler], wdyt?).
> Here's the details of the exception:
> {code}
> 02.02.2016 11:02:55.098 *ERROR* [FelixStartLevel] 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory 
> Unable to instantiate improved JCR Resource listener for Oak. Using fallback.
> java.lang.NoClassDefFoundError: 
> org/apache/jackrabbit/oak/plugins/observation/NodeObserver
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2370)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2154)
> at 
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1542)
> at 
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory.activate(JcrResourceProviderFactory.java:159)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
> at 
> org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:113)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:866)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:833)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:774)
> at 
> org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:347)
> at 
> org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:247)
> at 
> org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:344)
> at org.apache.felix.framework.Felix.getService(Felix.java:3699)
> at 
> org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)
> at 
> 

[jira] [Closed] (SLING-5447) Enable FindBugs for the Sightly Scripting Engine

2016-02-02 Thread Radu Cotescu (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-5447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Radu Cotescu closed SLING-5447.
---

> Enable FindBugs for the Sightly Scripting Engine
> 
>
> Key: SLING-5447
> URL: https://issues.apache.org/jira/browse/SLING-5447
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
> Fix For: Scripting Sightly Engine 1.0.12
>
>
> FindBugs should run as part of the normal build process for the Sightly 
> Scripting Engine.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Closed] (SLING-5461) Sightly quotes all markup attributes' values with double quotes

2016-02-02 Thread Radu Cotescu (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-5461?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Radu Cotescu closed SLING-5461.
---

> Sightly quotes all markup attributes' values with double quotes
> ---
>
> Key: SLING-5461
> URL: https://issues.apache.org/jira/browse/SLING-5461
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting Sightly Engine 1.0.0
>Reporter: Radu Cotescu
>Assignee: Radu Cotescu
> Fix For: Scripting Sightly Engine 1.0.12
>
>
> Irrespective of how HTML attributes are quoted in a Sightly script, the 
> resulting output will always use double quotes ({{"}}), which will break 
> attributes that have been defined in the script to use single quotes ({{'}}).
> This issue affects developers who would like to define JSON structures in 
> {{data-}} attributes.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5463) GetStarTest fails with "Invalid name or path"

2016-02-02 Thread angela (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128017#comment-15128017
 ] 

angela commented on SLING-5463:
---

[~rombert], unfortunately that doesn't work at all. as you can see this method 
is about {{name}}s not paths. while e.g. square brackets are not allowed in JCR 
name they are definitely valid in a JCR path.

maybe you want to read the corresponding section of the specification:
http://www.day.com/specs/jcr/2.0/3_Repository_Model.html#3.4%20Paths

as you can see there are plenty of different paths and last but not least 
escaping/identifying invalid characters won't solve the problem you are 
experiencing (but just get _this_ very test pass). just an example: path 
resolution might also fail because the editing session has a local namespace 
remapping (figure out "cq" was mapped to "aem" just on a per session level)... 
consequently, every single path containing "cq" as namespace prefix will fail 
upon resolution.

> GetStarTest fails with "Invalid name or path"
> -
>
> Key: SLING-5463
> URL: https://issues.apache.org/jira/browse/SLING-5463
> Project: Sling
>  Issue Type: Bug
>  Components: JCR, Testing
>Reporter: Bertrand Delacretaz
>Assignee: Robert Munteanu
>  Labels: sling-IT
> Fix For: JCR Resource 2.6.0
>
>
> The GetStarTest from launchpad/integration-tests recently started failing, 
> for example at [1]:
> {code}
> javax.jcr.RepositoryException: Invalid name or path: 
> /GetStarTest1453972215267/* 
>  at 
> org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPathOrThrow(SessionContext.java:347)
> ...
>  at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl.getItemOrNull(SessionImpl.java:225)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.getItemOrNull(JcrItemResourceFactory.java:182)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.createResource(JcrItemResourceFactory.java:96)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.listChildren(JcrResourceProvider.java:293)
>  at 
> org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider.listChildren(AuthenticatedResourceProvider.java:175)
>  at 
> org.apache.sling.resourceresolver.impl.providers.stateful.CombinedResourceProvider.listChildren(CombinedResourceProvider.java:205)
>  at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.listChildren(ResourceResolverImpl.java:719)
>  at 
> org.apache.sling.api.resource.ResourceUtil.listChildren(ResourceUtil.java:360)
> ...
>  at 
> org.apache.sling.servlets.get.impl.helpers.JsonRendererServlet.doGet(JsonRendererServlet.java:100)
> {code}
> [1] 
> https://builds.apache.org/view/S-Z/view/Sling/job/sling-trunk-1.7/org.apache.sling$org.apache.sling.launchpad.testing/3252/testReport/junit/org.apache.sling.launchpad.webapp.integrationtest/GetStarTest/testGetStarJson/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5463) GetStarTest fails with "Invalid name or path"

2016-02-02 Thread Carsten Ziegeler (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128030#comment-15128030
 ] 

Carsten Ziegeler commented on SLING-5463:
-

Thanks [~anchela] 

maybe then the simplest solution is to ignore the exception in all cases - with 
JR2 we were already doing this for itemExists, with the new getItemOrNull we 
would simply do the same - which means we're ignoring for now more exceptions 
than we should (all other errors where the path is correct), and once Oak gives 
us specific exceptions, we can filter for those

> GetStarTest fails with "Invalid name or path"
> -
>
> Key: SLING-5463
> URL: https://issues.apache.org/jira/browse/SLING-5463
> Project: Sling
>  Issue Type: Bug
>  Components: JCR, Testing
>Reporter: Bertrand Delacretaz
>Assignee: Robert Munteanu
>  Labels: sling-IT
> Fix For: JCR Resource 2.6.0
>
>
> The GetStarTest from launchpad/integration-tests recently started failing, 
> for example at [1]:
> {code}
> javax.jcr.RepositoryException: Invalid name or path: 
> /GetStarTest1453972215267/* 
>  at 
> org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPathOrThrow(SessionContext.java:347)
> ...
>  at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl.getItemOrNull(SessionImpl.java:225)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.getItemOrNull(JcrItemResourceFactory.java:182)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.createResource(JcrItemResourceFactory.java:96)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.listChildren(JcrResourceProvider.java:293)
>  at 
> org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider.listChildren(AuthenticatedResourceProvider.java:175)
>  at 
> org.apache.sling.resourceresolver.impl.providers.stateful.CombinedResourceProvider.listChildren(CombinedResourceProvider.java:205)
>  at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.listChildren(ResourceResolverImpl.java:719)
>  at 
> org.apache.sling.api.resource.ResourceUtil.listChildren(ResourceUtil.java:360)
> ...
>  at 
> org.apache.sling.servlets.get.impl.helpers.JsonRendererServlet.doGet(JsonRendererServlet.java:100)
> {code}
> [1] 
> https://builds.apache.org/view/S-Z/view/Sling/job/sling-trunk-1.7/org.apache.sling$org.apache.sling.launchpad.testing/3252/testReport/junit/org.apache.sling.launchpad.webapp.integrationtest/GetStarTest/testGetStarJson/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5459) Recording of tracer logs

2016-02-02 Thread Bertrand Delacretaz (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15127946#comment-15127946
 ] 

Bertrand Delacretaz commented on SLING-5459:


About restricting who can activate these logs, one possible technique that is 
to allow this only if the current request has read access to a specific path 
like {{/system/auth/tracelogs}}. Getting that info costs a bit, but in this 
case as it's for debugging purposes it's not an issue.

> Recording of tracer logs
> 
>
> Key: SLING-5459
> URL: https://issues.apache.org/jira/browse/SLING-5459
> Project: Sling
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Chetan Mehrotra
>Assignee: Chetan Mehrotra
> Fix For: Log Tracer 1.0.0
>
> Attachments: SLING-5459-v1.patch, tracer-recording.json
>
>
> Sling Log Tracer currently provides support for fine grained control of 
> enabling logs for specific request. To make this log more accessible it would 
> be useful to have a feature where the client can also fetch the logs from 
> specific request over HTTP.
> This feature would work like below
> # Client sends an HTTP request with header {{Sling-Tracer-Record​}}  set to 
> true
> {noformat}
> curl -D - -u admin:admin \
>   -H "Sling-Tracer-Record : true" \
>  -d "./jcr:content/jcr:title=Summer Collection" \
>  -d ":name=summer-collection" \
>  -d "./jcr:primaryType=sling:Folder" \
>  -d "./jcr:content/jcr:primaryType=nt:unstructured" \
>  -d "tracers=oak-writes" \
>  http://localhost:4802/content/dam/
> {noformat}
> # Server includes a request id as part of {{Sling-Tracer-Request-Id}} 
> response headers
> {noformat}
> HTTP/1.1 201 Created
> Date: Wed, 27 Jan 2016 07:30:22 GMT
> Sling-Tracer-Request-Id: 9b5b01f6-f269-47c3-a889-2dc8d4d7938f
> X-Content-Type-Options: nosniff
> X-Frame-Options: SAMEORIGIN
> Location: /content/dam/summer-collection
> Content-Type: text/html; charset=UTF-8
> Transfer-Encoding: chunked
> {noformat}
> # The logs in json format can then be fetched like 
> http://localhost:4802/system/console/tracer/9b5b01f6-f269-47c3-a889-2dc8d4d7938f.json
>  (see [attached output|^tracer-recording.json]. it includes following data 
> for now. It can be extended as per need
> ## RequestProgressTracker logs
> ## JCR Queries made
> Key points
> # Request id is randomly generated
> # The access to request log is via Web Console Plugin servlet hence its only 
> accessible to admin user account
> # The request data would only be recorded for those request which have the 
> {{​Sling-Tracer-Record}} header set. The data would be kept in memory for 
> *some time* with the assumption that client would fetch it soon. After some 
> time the data would expire
> # This feature would need to explicitly enabled via config option
> # The feature is somewhat similar to 'Recent Request' support. However it 
> exposes a JSON rendition and only keeps the data for request where client 
> requested that. 
> # For this feature dependency is added for Guava Cache to make use of space 
> bound/expiring cache. We can to an extent use {{LinkedHashMap}} but given 
> that Guava is now being used in Sling for Oak it makes sense to make use of 
> its feature. If required can look into embedding minimum required set



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5459) Recording of tracer logs

2016-02-02 Thread Chetan Mehrotra (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15127961#comment-15127961
 ] 

Chetan Mehrotra commented on SLING-5459:


bq. But allowing every user to create the logs might not be the best thing 
either. Not sure

This feature is disabled by default and need to enabled via OSGi config. So its 
expected that its enabled for debugging purpose for some time. I can add a 
health check which can issue failure if it is left enabled. Would that be fine

bq. I'm not happy about adding a dependency to Guava Cache. We have Sling Cache 
or maybe could use a simple solution, like we do elsewhere where simply the 
last N entries are kept

The logs generated in trace might be large and would hog the memory. Guava has 
good support for sizing the cache by memory size and also supports timed 
eviction. So tracer makes use of that and expires the cached entries after 10 
mins if they are not accessed. Would try to embed cache related classes and see 
how it work out via [Conditional 
Package|http://njbartlett.name/2014/05/26/static-linking.html]

> Recording of tracer logs
> 
>
> Key: SLING-5459
> URL: https://issues.apache.org/jira/browse/SLING-5459
> Project: Sling
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Chetan Mehrotra
>Assignee: Chetan Mehrotra
> Fix For: Log Tracer 1.0.0
>
> Attachments: SLING-5459-v1.patch, tracer-recording.json
>
>
> Sling Log Tracer currently provides support for fine grained control of 
> enabling logs for specific request. To make this log more accessible it would 
> be useful to have a feature where the client can also fetch the logs from 
> specific request over HTTP.
> This feature would work like below
> # Client sends an HTTP request with header {{Sling-Tracer-Record​}}  set to 
> true
> {noformat}
> curl -D - -u admin:admin \
>   -H "Sling-Tracer-Record : true" \
>  -d "./jcr:content/jcr:title=Summer Collection" \
>  -d ":name=summer-collection" \
>  -d "./jcr:primaryType=sling:Folder" \
>  -d "./jcr:content/jcr:primaryType=nt:unstructured" \
>  -d "tracers=oak-writes" \
>  http://localhost:4802/content/dam/
> {noformat}
> # Server includes a request id as part of {{Sling-Tracer-Request-Id}} 
> response headers
> {noformat}
> HTTP/1.1 201 Created
> Date: Wed, 27 Jan 2016 07:30:22 GMT
> Sling-Tracer-Request-Id: 9b5b01f6-f269-47c3-a889-2dc8d4d7938f
> X-Content-Type-Options: nosniff
> X-Frame-Options: SAMEORIGIN
> Location: /content/dam/summer-collection
> Content-Type: text/html; charset=UTF-8
> Transfer-Encoding: chunked
> {noformat}
> # The logs in json format can then be fetched like 
> http://localhost:4802/system/console/tracer/9b5b01f6-f269-47c3-a889-2dc8d4d7938f.json
>  (see [attached output|^tracer-recording.json]. it includes following data 
> for now. It can be extended as per need
> ## RequestProgressTracker logs
> ## JCR Queries made
> Key points
> # Request id is randomly generated
> # The access to request log is via Web Console Plugin servlet hence its only 
> accessible to admin user account
> # The request data would only be recorded for those request which have the 
> {{​Sling-Tracer-Record}} header set. The data would be kept in memory for 
> *some time* with the assumption that client would fetch it soon. After some 
> time the data would expire
> # This feature would need to explicitly enabled via config option
> # The feature is somewhat similar to 'Recent Request' support. However it 
> exposes a JSON rendition and only keeps the data for request where client 
> requested that. 
> # For this feature dependency is added for Guava Cache to make use of space 
> bound/expiring cache. We can to an extent use {{LinkedHashMap}} but given 
> that Guava is now being used in Sling for Oak it makes sense to make use of 
> its feature. If required can look into embedding minimum required set



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (SLING-5459) Recording of tracer logs

2016-02-02 Thread Bertrand Delacretaz (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15127946#comment-15127946
 ] 

Bertrand Delacretaz edited comment on SLING-5459 at 2/2/16 9:17 AM:


About restricting who can activate these logs, one possible technique is to 
allow this only if the current request has read access to a specific path like 
{{/system/auth/tracelogs}}. Getting that info costs a bit, but in this case as 
it's for debugging purposes it's not an issue.


was (Author: bdelacretaz):
About restricting who can activate these logs, one possible technique that is 
to allow this only if the current request has read access to a specific path 
like {{/system/auth/tracelogs}}. Getting that info costs a bit, but in this 
case as it's for debugging purposes it's not an issue.

> Recording of tracer logs
> 
>
> Key: SLING-5459
> URL: https://issues.apache.org/jira/browse/SLING-5459
> Project: Sling
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Chetan Mehrotra
>Assignee: Chetan Mehrotra
> Fix For: Log Tracer 1.0.0
>
> Attachments: SLING-5459-v1.patch, tracer-recording.json
>
>
> Sling Log Tracer currently provides support for fine grained control of 
> enabling logs for specific request. To make this log more accessible it would 
> be useful to have a feature where the client can also fetch the logs from 
> specific request over HTTP.
> This feature would work like below
> # Client sends an HTTP request with header {{Sling-Tracer-Record​}}  set to 
> true
> {noformat}
> curl -D - -u admin:admin \
>   -H "Sling-Tracer-Record : true" \
>  -d "./jcr:content/jcr:title=Summer Collection" \
>  -d ":name=summer-collection" \
>  -d "./jcr:primaryType=sling:Folder" \
>  -d "./jcr:content/jcr:primaryType=nt:unstructured" \
>  -d "tracers=oak-writes" \
>  http://localhost:4802/content/dam/
> {noformat}
> # Server includes a request id as part of {{Sling-Tracer-Request-Id}} 
> response headers
> {noformat}
> HTTP/1.1 201 Created
> Date: Wed, 27 Jan 2016 07:30:22 GMT
> Sling-Tracer-Request-Id: 9b5b01f6-f269-47c3-a889-2dc8d4d7938f
> X-Content-Type-Options: nosniff
> X-Frame-Options: SAMEORIGIN
> Location: /content/dam/summer-collection
> Content-Type: text/html; charset=UTF-8
> Transfer-Encoding: chunked
> {noformat}
> # The logs in json format can then be fetched like 
> http://localhost:4802/system/console/tracer/9b5b01f6-f269-47c3-a889-2dc8d4d7938f.json
>  (see [attached output|^tracer-recording.json]. it includes following data 
> for now. It can be extended as per need
> ## RequestProgressTracker logs
> ## JCR Queries made
> Key points
> # Request id is randomly generated
> # The access to request log is via Web Console Plugin servlet hence its only 
> accessible to admin user account
> # The request data would only be recorded for those request which have the 
> {{​Sling-Tracer-Record}} header set. The data would be kept in memory for 
> *some time* with the assumption that client would fetch it soon. After some 
> time the data would expire
> # This feature would need to explicitly enabled via config option
> # The feature is somewhat similar to 'Recent Request' support. However it 
> exposes a JSON rendition and only keeps the data for request where client 
> requested that. 
> # For this feature dependency is added for Guava Cache to make use of space 
> bound/expiring cache. We can to an extent use {{LinkedHashMap}} but given 
> that Guava is now being used in Sling for Oak it makes sense to make use of 
> its feature. If required can look into embedding minimum required set



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5459) Recording of tracer logs

2016-02-02 Thread Chetan Mehrotra (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5459?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15127965#comment-15127965
 ] 

Chetan Mehrotra commented on SLING-5459:


That can be done. However at times this feature is used to figure out the 
authentication failure so we might not have session also. Its a developer 
tooling and needs to be enabled for debugging session. Probably adding health 
check would be good to indicate to the admin that such a feature is still 
enabled. wdyt?

> Recording of tracer logs
> 
>
> Key: SLING-5459
> URL: https://issues.apache.org/jira/browse/SLING-5459
> Project: Sling
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Chetan Mehrotra
>Assignee: Chetan Mehrotra
> Fix For: Log Tracer 1.0.0
>
> Attachments: SLING-5459-v1.patch, tracer-recording.json
>
>
> Sling Log Tracer currently provides support for fine grained control of 
> enabling logs for specific request. To make this log more accessible it would 
> be useful to have a feature where the client can also fetch the logs from 
> specific request over HTTP.
> This feature would work like below
> # Client sends an HTTP request with header {{Sling-Tracer-Record​}}  set to 
> true
> {noformat}
> curl -D - -u admin:admin \
>   -H "Sling-Tracer-Record : true" \
>  -d "./jcr:content/jcr:title=Summer Collection" \
>  -d ":name=summer-collection" \
>  -d "./jcr:primaryType=sling:Folder" \
>  -d "./jcr:content/jcr:primaryType=nt:unstructured" \
>  -d "tracers=oak-writes" \
>  http://localhost:4802/content/dam/
> {noformat}
> # Server includes a request id as part of {{Sling-Tracer-Request-Id}} 
> response headers
> {noformat}
> HTTP/1.1 201 Created
> Date: Wed, 27 Jan 2016 07:30:22 GMT
> Sling-Tracer-Request-Id: 9b5b01f6-f269-47c3-a889-2dc8d4d7938f
> X-Content-Type-Options: nosniff
> X-Frame-Options: SAMEORIGIN
> Location: /content/dam/summer-collection
> Content-Type: text/html; charset=UTF-8
> Transfer-Encoding: chunked
> {noformat}
> # The logs in json format can then be fetched like 
> http://localhost:4802/system/console/tracer/9b5b01f6-f269-47c3-a889-2dc8d4d7938f.json
>  (see [attached output|^tracer-recording.json]. it includes following data 
> for now. It can be extended as per need
> ## RequestProgressTracker logs
> ## JCR Queries made
> Key points
> # Request id is randomly generated
> # The access to request log is via Web Console Plugin servlet hence its only 
> accessible to admin user account
> # The request data would only be recorded for those request which have the 
> {{​Sling-Tracer-Record}} header set. The data would be kept in memory for 
> *some time* with the assumption that client would fetch it soon. After some 
> time the data would expire
> # This feature would need to explicitly enabled via config option
> # The feature is somewhat similar to 'Recent Request' support. However it 
> exposes a JSON rendition and only keeps the data for request where client 
> requested that. 
> # For this feature dependency is added for Guava Cache to make use of space 
> bound/expiring cache. We can to an extent use {{LinkedHashMap}} but given 
> that Guava is now being used in Sling for Oak it makes sense to make use of 
> its feature. If required can look into embedding minimum required set



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5463) GetStarTest fails with "Invalid name or path"

2016-02-02 Thread angela (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128022#comment-15128022
 ] 

angela commented on SLING-5463:
---

[~cziegeler], see my comment above. i am quite confident that this won't 
produce the expected result :-)

since an invalid path should IMHO be considered an exception situation and not 
the _normal_, I would treat it this way and make sure Oak throws a proper 
exception (subclass of {{RepositoryException}} that would allow you distinguish 
an invalid path from other exceptional situations. In 
{{jackrabbit.spi.commons}} we actually have that already:

- MalformedPathException
- NameException
- IllegalNameException

I guess we could make those part of the official Jackrabbit API with limited 
effort and make sure Oak uses specific, identifiable exceptions.

> GetStarTest fails with "Invalid name or path"
> -
>
> Key: SLING-5463
> URL: https://issues.apache.org/jira/browse/SLING-5463
> Project: Sling
>  Issue Type: Bug
>  Components: JCR, Testing
>Reporter: Bertrand Delacretaz
>Assignee: Robert Munteanu
>  Labels: sling-IT
> Fix For: JCR Resource 2.6.0
>
>
> The GetStarTest from launchpad/integration-tests recently started failing, 
> for example at [1]:
> {code}
> javax.jcr.RepositoryException: Invalid name or path: 
> /GetStarTest1453972215267/* 
>  at 
> org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPathOrThrow(SessionContext.java:347)
> ...
>  at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl.getItemOrNull(SessionImpl.java:225)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.getItemOrNull(JcrItemResourceFactory.java:182)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.createResource(JcrItemResourceFactory.java:96)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.listChildren(JcrResourceProvider.java:293)
>  at 
> org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider.listChildren(AuthenticatedResourceProvider.java:175)
>  at 
> org.apache.sling.resourceresolver.impl.providers.stateful.CombinedResourceProvider.listChildren(CombinedResourceProvider.java:205)
>  at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.listChildren(ResourceResolverImpl.java:719)
>  at 
> org.apache.sling.api.resource.ResourceUtil.listChildren(ResourceUtil.java:360)
> ...
>  at 
> org.apache.sling.servlets.get.impl.helpers.JsonRendererServlet.doGet(JsonRendererServlet.java:100)
> {code}
> [1] 
> https://builds.apache.org/view/S-Z/view/Sling/job/sling-trunk-1.7/org.apache.sling$org.apache.sling.launchpad.testing/3252/testReport/junit/org.apache.sling.launchpad.webapp.integrationtest/GetStarTest/testGetStarJson/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (SLING-5475) JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk

2016-02-02 Thread Stefan Egli (JIRA)
Stefan Egli created SLING-5475:
--

 Summary: JcrResourceProviderFactory dependency to NodeObserver 
fails in oak trunk
 Key: SLING-5475
 URL: https://issues.apache.org/jira/browse/SLING-5475
 Project: Sling
  Issue Type: Bug
  Components: JCR
Affects Versions: JCR Resource 2.5.6
Reporter: Stefan Egli
Assignee: Robert Munteanu
Priority: Blocker
 Fix For: JCR Resource 2.6.0


With OAK-3842 a fair number of oak packages have gotten their export version 
reset to 0.0.0 instead of exporting a particular version (as that package is 
not meant to be a stable API just yet).

One consequence of this change is that JcrResourceProviderFactory now fails 
with a NoClassDefFoundError as it has as import dependency 
{{org.apache.jackrabbit.oak.plugins.observation; resolution:=optional; 
version="[2.0, 3)"}} while that is now exported as {{0.0.0}}.

Not sure if we have to do much or of this gets fixed automagically when we're 
releasing a new jcr.resource bundle ([~cziegeler], wdyt?).

Here's the details of the exception:

{code}
02.02.2016 11:02:55.098 *ERROR* [FelixStartLevel] 
org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory 
Unable to instantiate improved JCR Resource listener for Oak. Using fallback.
java.lang.NoClassDefFoundError: 
org/apache/jackrabbit/oak/plugins/observation/NodeObserver
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
at 
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2370)
at 
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2154)
at 
org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1542)
at 
org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
at 
org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at 
org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory.activate(JcrResourceProviderFactory.java:159)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at 
org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
at 
org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
at 
org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
at 
org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
at 
org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
at 
org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)
at 
org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:113)
at 
org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:866)
at 
org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:833)
at 
org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:774)
at 
org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:347)
at 
org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:247)
at 
org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:344)
at org.apache.felix.framework.Felix.getService(Felix.java:3699)
at 
org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)
at 
org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:72)
at 
org.apache.felix.scr.impl.helper.BindMethod.getServiceObject(BindMethod.java:646)
at 
org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2137)
at 
org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.prebind(DependencyManager.java:389)
at 
org.apache.felix.scr.impl.manager.DependencyManager.prebind(DependencyManager.java:1457)
at 
org.apache.felix.scr.impl.manager.AbstractComponentManager.collectDependencies(AbstractComponentManager.java:983)
at 
org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:812)
at 

[GitHub] sling pull request: Implemented methods in the testing jcr-mock mo...

2016-02-02 Thread ciany85
GitHub user ciany85 opened a pull request:

https://github.com/apache/sling/pull/121

Implemented methods in the testing jcr-mock module:

This changes allow the following operations:
- Add mixin to a node
- Get node index
- Get mixin node types
- Node repositioning (node.orderBefore)
- Remove mixin
- Move node

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/ciany85/sling trunk

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/sling/pull/121.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #121


commit 060b4e05cafd81cb5a64d82ad2467f7582b2c726
Author: Danilo Cugia 
Date:   2016-02-02T10:41:49Z

Implemented methods to allow the following operations:
- Add mixin to a node
- Get node index
- Get mixin node types
- Node repositioning (node.orderBefore)
- Remove mixin
- Move node




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[jira] [Commented] (SLING-5471) Sightly error in terminal: RHINO USAGE WARNING: Missed Context.javaToJS() conversion

2016-02-02 Thread Radu Cotescu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128459#comment-15128459
 ] 

Radu Cotescu commented on SLING-5471:
-

That's a Rhino internal and I'm afraid there's nothing more we can do at Sling 
level. In the Sightly JS Use Provider we execute client code over which we have 
no control.

> Sightly error in terminal: RHINO USAGE WARNING: Missed Context.javaToJS() 
> conversion
> 
>
> Key: SLING-5471
> URL: https://issues.apache.org/jira/browse/SLING-5471
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting Sightly Engine 1.0.10
> Environment: Mac
>Reporter: Joel Richard
> Attachments: Screen Shot 2016-02-01 at 11.14.07.png
>
>
> I often see the following error in the terminal:
> {code}
> RHINO USAGE WARNING: Missed Context.javaToJS() conversion:
> Rhino runtime detected object 
> java.util.GregorianCalendar[time=1434664044399,areFieldsSet=true,areAllFieldsSet=true,lenient=false,zone=sun.util.calendar.ZoneInfo[id="GMT-07:00",offset=-2520,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2015,MONTH=5,WEEK_OF_YEAR=25,WEEK_OF_MONTH=3,DAY_OF_MONTH=18,DAY_OF_YEAR=169,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=3,AM_PM=1,HOUR=2,HOUR_OF_DAY=14,MINUTE=47,SECOND=24,MILLISECOND=399,ZONE_OFFSET=-2520,DST_OFFSET=0]
>  of class java.util.GregorianCalendar where it expected String, Number, 
> Boolean or Scriptable instance. Please check your code for missing 
> Context.javaToJS() call.
> {code}
> I think it happens for if statements. Attached is a stack. Please let me know 
> if you need more information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5463) GetStarTest fails with "Invalid name or path"

2016-02-02 Thread angela (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5463?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128090#comment-15128090
 ] 

angela commented on SLING-5463:
---

sounds like a plan... most probably you want to return {{null}} for all 
exceptional situations in order not to break backwards compatibility. 
specifically dealing with invalid paths might be handy for the consumer but as 
far as I understood you don't reveal to the resource API consumer why a given 
resource is {{null}}... so having that extra distinction might just rather be 
nice to have.

> GetStarTest fails with "Invalid name or path"
> -
>
> Key: SLING-5463
> URL: https://issues.apache.org/jira/browse/SLING-5463
> Project: Sling
>  Issue Type: Bug
>  Components: JCR, Testing
>Reporter: Bertrand Delacretaz
>Assignee: Robert Munteanu
>  Labels: sling-IT
> Fix For: JCR Resource 2.6.0
>
>
> The GetStarTest from launchpad/integration-tests recently started failing, 
> for example at [1]:
> {code}
> javax.jcr.RepositoryException: Invalid name or path: 
> /GetStarTest1453972215267/* 
>  at 
> org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPathOrThrow(SessionContext.java:347)
> ...
>  at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl.getItemOrNull(SessionImpl.java:225)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.getItemOrNull(JcrItemResourceFactory.java:182)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.createResource(JcrItemResourceFactory.java:96)
>  at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.listChildren(JcrResourceProvider.java:293)
>  at 
> org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider.listChildren(AuthenticatedResourceProvider.java:175)
>  at 
> org.apache.sling.resourceresolver.impl.providers.stateful.CombinedResourceProvider.listChildren(CombinedResourceProvider.java:205)
>  at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.listChildren(ResourceResolverImpl.java:719)
>  at 
> org.apache.sling.api.resource.ResourceUtil.listChildren(ResourceUtil.java:360)
> ...
>  at 
> org.apache.sling.servlets.get.impl.helpers.JsonRendererServlet.doGet(JsonRendererServlet.java:100)
> {code}
> [1] 
> https://builds.apache.org/view/S-Z/view/Sling/job/sling-trunk-1.7/org.apache.sling$org.apache.sling.launchpad.testing/3252/testReport/junit/org.apache.sling.launchpad.webapp.integrationtest/GetStarTest/testGetStarJson/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (SLING-5476) target/classes should not be used by the plugin

2016-02-02 Thread Carsten Ziegeler (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-5476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler resolved SLING-5476.
-
Resolution: Fixed

Resolved in rev 1728116

> target/classes should not be used by the plugin
> ---
>
> Key: SLING-5476
> URL: https://issues.apache.org/jira/browse/SLING-5476
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Slingstart Maven Plugin 1.4.2
>
>
> In order to better cooperate with other plugins, the slingstart plugin should 
> not use /target/classes



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Release of hapi 1.0.0

2016-02-02 Thread Andrei Dulvac
Hi guys,

Could we have a first release of HApi core 1.0.0 from
/trunk/contrib/extensions/hapi/core ?
Issues solved: SLING-4513, SLING-5055, SLING-5061, SLING-5474.

Cheers,
- Andrei


[jira] [Updated] (SLING-5455) Add helper class to construct valid paths

2016-02-02 Thread Robert Munteanu (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-5455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Munteanu updated SLING-5455:
---
Fix Version/s: (was: Commons 1.0.0)

> Add helper class to construct valid paths
> -
>
> Key: SLING-5455
> URL: https://issues.apache.org/jira/browse/SLING-5455
> Project: Sling
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Robert Munteanu
>Assignee: Robert Munteanu
>Priority: Minor
> Fix For: API 2.10.0
>
>
> When working with paths it's easy to combine two valid paths into an invalid 
> one. For instance
> * '/parent/' + '/child' -> '/parent//child'
> * '/parent' + 'child' -> '/parentchild'
> We should add a simple helper class which allows to build paths, with a 
> fluent syntax.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (SLING-5455) Add helper class to construct valid paths

2016-02-02 Thread Robert Munteanu (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-5455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robert Munteanu resolved SLING-5455.

Resolution: Fixed

> Add helper class to construct valid paths
> -
>
> Key: SLING-5455
> URL: https://issues.apache.org/jira/browse/SLING-5455
> Project: Sling
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Robert Munteanu
>Assignee: Robert Munteanu
>Priority: Minor
> Fix For: API 2.10.0
>
>
> When working with paths it's easy to combine two valid paths into an invalid 
> one. For instance
> * '/parent/' + '/child' -> '/parent//child'
> * '/parent' + 'child' -> '/parentchild'
> We should add a simple helper class which allows to build paths, with a 
> fluent syntax.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5455) Add helper class to construct valid paths

2016-02-02 Thread Robert Munteanu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128409#comment-15128409
 ] 

Robert Munteanu commented on SLING-5455:


FIxed in [r1728151 |https://svn.apache.org/r1728151 ]

> Add helper class to construct valid paths
> -
>
> Key: SLING-5455
> URL: https://issues.apache.org/jira/browse/SLING-5455
> Project: Sling
>  Issue Type: New Feature
>  Components: Extensions
>Reporter: Robert Munteanu
>Assignee: Robert Munteanu
>Priority: Minor
> Fix For: API 2.10.0
>
>
> When working with paths it's easy to combine two valid paths into an invalid 
> one. For instance
> * '/parent/' + '/child' -> '/parent//child'
> * '/parent' + 'child' -> '/parentchild'
> We should add a simple helper class which allows to build paths, with a 
> fluent syntax.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: Planning to release api, jcr.resource and resourceresolver on Monday

2016-02-02 Thread Robert Munteanu
On Sat, 2016-01-30 at 15:53 +0100, Carsten Ziegeler wrote:
> I had a look at the modules now, and all looks good to me.
> Great work!
> 
> I think, we need to solve SLING-5455 and SLING-5463 before a release.

Thanks for the review, now that SLING-5455 and SLING-5463 are solved I
will do a final testing run and then start the release vote.

Robert

> 
> Regards
> Carsten
> 
> Robert Munteanu wrote
> > Hi,
> > 
> > I plan to make a release of the three mentioned bundles on Monday.
> > The
> > main drivers for these releases are the new ResourceResolver and
> > Observation APIs ([1],[2]).
> > 
> > If you have any comments on these APIs now would be a great time to
> > hear them :-)
> > 
> > Also, if there is anything that you think must be included in these
> > releases please let me know.
> > 
> > Robert
> > 
> > [1]: https://issues.apache.org/jira/browse/SLING-4750
> > [2]: https://issues.apache.org/jira/browse/SLING-4751
> > 
> 
> 
>  



Re: Utility to construct paths out of strings?

2016-02-02 Thread Robert Munteanu
On Mon, 2016-02-01 at 14:17 +0100, Bertrand Delacretaz wrote:
> Hi,
> 
> On Mon, Feb 1, 2016 at 1:56 PM, Robert Munteanu 
> wrote:
> > ...we re-re-opened the issue :-) and are leaning towards
> > moving the class back in the api bundle, in a different package..
> 
> That works for me, if it's a different package it's fine.

Thanks for confirming, re-added to the api bundle under
org.apache.sling.resource.path .

Robert


[jira] [Commented] (SLING-5471) Sightly error in terminal: RHINO USAGE WARNING: Missed Context.javaToJS() conversion

2016-02-02 Thread Joel Richard (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5471?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128441#comment-15128441
 ] 

Joel Richard commented on SLING-5471:
-

[~radu.cotescu], thanks for looking into it. However, even if the comparison 
doesn't make sense, I don't think that a warning should be logged/printed on 
the terminal. Don't you think so?

> Sightly error in terminal: RHINO USAGE WARNING: Missed Context.javaToJS() 
> conversion
> 
>
> Key: SLING-5471
> URL: https://issues.apache.org/jira/browse/SLING-5471
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting Sightly Engine 1.0.10
> Environment: Mac
>Reporter: Joel Richard
> Attachments: Screen Shot 2016-02-01 at 11.14.07.png
>
>
> I often see the following error in the terminal:
> {code}
> RHINO USAGE WARNING: Missed Context.javaToJS() conversion:
> Rhino runtime detected object 
> java.util.GregorianCalendar[time=1434664044399,areFieldsSet=true,areAllFieldsSet=true,lenient=false,zone=sun.util.calendar.ZoneInfo[id="GMT-07:00",offset=-2520,dstSavings=0,useDaylight=false,transitions=0,lastRule=null],firstDayOfWeek=1,minimalDaysInFirstWeek=1,ERA=1,YEAR=2015,MONTH=5,WEEK_OF_YEAR=25,WEEK_OF_MONTH=3,DAY_OF_MONTH=18,DAY_OF_YEAR=169,DAY_OF_WEEK=5,DAY_OF_WEEK_IN_MONTH=3,AM_PM=1,HOUR=2,HOUR_OF_DAY=14,MINUTE=47,SECOND=24,MILLISECOND=399,ZONE_OFFSET=-2520,DST_OFFSET=0]
>  of class java.util.GregorianCalendar where it expected String, Number, 
> Boolean or Scriptable instance. Please check your code for missing 
> Context.javaToJS() call.
> {code}
> I think it happens for if statements. Attached is a stack. Please let me know 
> if you need more information.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: [RESULT][VOTE] Release Apache Sling XSS Protection API 1.0.8

2016-02-02 Thread Bertrand Delacretaz
On Tue, Feb 2, 2016 at 3:48 PM, Radu Cotescu  wrote:
> ...@PMC: could you please move the artifacts to dist?

done, please cross-check.
-Bertrand


Re: [RESULT][VOTE] Release Apache Sling Scripting Sightly Engine 1.0.12

2016-02-02 Thread Bertrand Delacretaz
On Tue, Feb 2, 2016 at 3:48 PM, Radu Cotescu  wrote:
> ...@PMC: could you please move the artifacts to dist?

done, please cross-check.
-Bertrand


[jira] [Commented] (SLING-5477) Allow to add an artifact of the slingstart project to the model

2016-02-02 Thread Carsten Ziegeler (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15129963#comment-15129963
 ] 

Carsten Ziegeler commented on SLING-5477:
-

yes, that's one use case - the other is to to build an application which 
consists of a single bundle (+1 infrastructure bundles), typical hello world 
scenario and simple OSGi based apps

> Allow to add an artifact of the slingstart project to the model
> ---
>
> Key: SLING-5477
> URL: https://issues.apache.org/jira/browse/SLING-5477
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Slingstart Maven Plugin 1.4.2
>
>
> In some cases it might be useful to have a slingstart project, where the 
> project in addition to a provisioning model contains the source for a bundle. 
> The maven bundle plugin could be used to build the bundle and the 
> provisioning model includes this artifact.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5414) Make the contents of the provisioning model available at runtime

2016-02-02 Thread Carsten Ziegeler (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15129968#comment-15129968
 ] 

Carsten Ziegeler commented on SLING-5414:
-

[~bdelacretaz] I would like to release the slingstart maven plugin - what's the 
status here?

> Make the contents of the provisioning model available at runtime
> 
>
> Key: SLING-5414
> URL: https://issues.apache.org/jira/browse/SLING-5414
> Project: Sling
>  Issue Type: New Feature
>  Components: Maven Plugins and Archetypes
>Affects Versions: Slingstart Maven Plugin 1.4.0
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>Priority: Minor
> Fix For: Slingstart Maven Plugin 1.4.2
>
> Attachments: SLING-5414.patch
>
>
> For SLING-5355 we need to make additional sections from the provisioning 
> model available at runtime, so that ACLs can be set at startup, and also to 
> be able to reuse their definitions later for auditing/verification purposes.
> A simple way to do that is to copy those sections in the sling_bootstrap.txt 
> file. I have created a patch that does that, will attach it here for review.
> _edit: as discussed below, we'll make the full text of the model available at 
> runtime_



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5477) Allow to add an artifact of the slingstart project to the model

2016-02-02 Thread Carsten Ziegeler (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15129965#comment-15129965
 ] 

Carsten Ziegeler commented on SLING-5477:
-

The works with the caveat that the bundle plugin needs to run in the 
process-classes phase. The project needs to be of type "slingstart" and the 
following configuration for the bundle plugin does the trick:
{quote}

org.apache.felix
maven-bundle-plugin
3.0.1
true

bundle


jar
bundle
slingstart




bundle

bundle

process-classes



{quote}

> Allow to add an artifact of the slingstart project to the model
> ---
>
> Key: SLING-5477
> URL: https://issues.apache.org/jira/browse/SLING-5477
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Slingstart Maven Plugin 1.4.2
>
>
> In some cases it might be useful to have a slingstart project, where the 
> project in addition to a provisioning model contains the source for a bundle. 
> The maven bundle plugin could be used to build the bundle and the 
> provisioning model includes this artifact.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Resolved] (SLING-5477) Allow to add an artifact of the slingstart project to the model

2016-02-02 Thread Carsten Ziegeler (JIRA)

 [ 
https://issues.apache.org/jira/browse/SLING-5477?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Carsten Ziegeler resolved SLING-5477.
-
Resolution: Fixed

> Allow to add an artifact of the slingstart project to the model
> ---
>
> Key: SLING-5477
> URL: https://issues.apache.org/jira/browse/SLING-5477
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Slingstart Maven Plugin 1.4.2
>
>
> In some cases it might be useful to have a slingstart project, where the 
> project in addition to a provisioning model contains the source for a bundle. 
> The maven bundle plugin could be used to build the bundle and the 
> provisioning model includes this artifact.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5414) Make the contents of the provisioning model available at runtime

2016-02-02 Thread Carsten Ziegeler (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5414?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15129972#comment-15129972
 ] 

Carsten Ziegeler commented on SLING-5414:
-

[~olli], [~bdelacretaz] I think the current approach is fine - this is about 
storing the provisioning model in launchpad; if the instance is built using 
something else like Karaf there is no provisioning model. Or maybe I'm missing 
something?

> Make the contents of the provisioning model available at runtime
> 
>
> Key: SLING-5414
> URL: https://issues.apache.org/jira/browse/SLING-5414
> Project: Sling
>  Issue Type: New Feature
>  Components: Maven Plugins and Archetypes
>Affects Versions: Slingstart Maven Plugin 1.4.0
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>Priority: Minor
> Fix For: Slingstart Maven Plugin 1.4.2
>
> Attachments: SLING-5414.patch
>
>
> For SLING-5355 we need to make additional sections from the provisioning 
> model available at runtime, so that ACLs can be set at startup, and also to 
> be able to reuse their definitions later for auditing/verification purposes.
> A simple way to do that is to copy those sections in the sling_bootstrap.txt 
> file. I have created a patch that does that, will attach it here for review.
> _edit: as discussed below, we'll make the full text of the model available at 
> runtime_



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


Re: Sling Resource Merger and intended behaviour of sling:hideProperties and sling:hideChildren

2016-02-02 Thread Julian Sedding
Hi Konrad

I read through the page. Good job! It looks fine and I didn't spot any
error. (Not that I am an authority on the Resource Merger...).

Regards
Julian


On Tue, Feb 2, 2016 at 7:54 PM, Konrad Windszus  wrote:
> I contributed some documentation in 
> http://sling.staging.apache.org/documentation/bundles/resource-merger.html 
> .
> Would you be so kind and quickly cross-check?
> I would still be interested though in someone else’s opinion on how the 
> sling:hideProperties=* is supposed to work.
> Thanks
> Konrad
>
>
>> On 29 Jan 2016, at 18:09, Julian Sedding  wrote:
>>
>> There is some more documentation at
>> https://github.com/gknob/sling-resourcemerger, where the feature was
>> originally developed. Haven't had time to read it yet.
>>
>> Regards
>> Julian
>>
>> On Fri, Jan 29, 2016 at 6:02 PM, Konrad Windszus
>>  wrote:
>>> As being suggested by Julian Sedding in 
>>> https://issues.apache.org/jira/browse/SLING-5468 I want to get your input 
>>> on how the properties
>>> "sling:hideProperties=*”  and "sling:hideChildren=*” are supposed to work 
>>> in the Sling Resource Merger.
>>>
>>> At least for the OverridingResourcePicker using the wildcard hides both the 
>>> local as well as the inherited resources/properties. This is causing some 
>>> trouble as that way I cannot easily replace the whole resource without 
>>> considering any underlying resources.
>>> The only documentation about those properties is at 
>>> https://issues.apache.org/jira/browse/SLING-2986?focusedCommentId=13802834=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13802834
>>>  but that does not really explain how those should behave in terms of 
>>> inheritance. Also the implementation changed quite a bit due to the 
>>> refactoring being done in https://issues.apache.org/jira/browse/SLING-3423.
>>>
>>> For me this looks rather like a bug because I cannot come up with a good 
>>> use case where you would be interested to even hide your own/local 
>>> properties/child resources. Those properties should IMHO always refer only 
>>> to the inherited/underlying resources/properties but not to the local ones 
>>> (i.e. the ones next to the resource defining sling:hideProperties or 
>>> sling:hideChildren.
>>> WDYT?
>>>
>>> Thanks for your input,
>>> Konrad
>>>
>


[jira] [Created] (SLING-5476) target/classes should not be used by the plugin

2016-02-02 Thread Carsten Ziegeler (JIRA)
Carsten Ziegeler created SLING-5476:
---

 Summary: target/classes should not be used by the plugin
 Key: SLING-5476
 URL: https://issues.apache.org/jira/browse/SLING-5476
 Project: Sling
  Issue Type: Improvement
  Components: Maven Plugins and Archetypes
Reporter: Carsten Ziegeler
Assignee: Carsten Ziegeler
 Fix For: Slingstart Maven Plugin 1.4.2


In order to better cooperate with other plugins, the slingstart plugin should 
not use /target/classes



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (SLING-5475) JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk

2016-02-02 Thread Stefan Egli (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128175#comment-15128175
 ] 

Stefan Egli commented on SLING-5475:


Ah, you probably have to increase the dependency on oak-core to 1.3.15 (which 
will yet be released one of the next days)

> JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk
> 
>
> Key: SLING-5475
> URL: https://issues.apache.org/jira/browse/SLING-5475
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Affects Versions: JCR Resource 2.5.6
>Reporter: Stefan Egli
>Assignee: Robert Munteanu
>Priority: Blocker
> Fix For: JCR Resource 2.6.0
>
>
> With OAK-3842 a fair number of oak packages have gotten their export version 
> reset to 0.0.0 instead of exporting a particular version (as that package is 
> not meant to be a stable API just yet).
> One consequence of this change is that JcrResourceProviderFactory now fails 
> with a NoClassDefFoundError as it has as import dependency 
> {{org.apache.jackrabbit.oak.plugins.observation; resolution:=optional; 
> version="[2.0, 3)"}} while that is now exported as {{0.0.0}}.
> Not sure if we have to do much or of this gets fixed automagically when we're 
> releasing a new jcr.resource bundle ([~cziegeler], wdyt?).
> Here's the details of the exception:
> {code}
> 02.02.2016 11:02:55.098 *ERROR* [FelixStartLevel] 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory 
> Unable to instantiate improved JCR Resource listener for Oak. Using fallback.
> java.lang.NoClassDefFoundError: 
> org/apache/jackrabbit/oak/plugins/observation/NodeObserver
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2370)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2154)
> at 
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1542)
> at 
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory.activate(JcrResourceProviderFactory.java:159)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
> at 
> org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:113)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:866)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:833)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:774)
> at 
> org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:347)
> at 
> org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:247)
> at 
> org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:344)
> at org.apache.felix.framework.Felix.getService(Felix.java:3699)
> at 
> org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)
> at 
> org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:72)
> at 
> org.apache.felix.scr.impl.helper.BindMethod.getServiceObject(BindMethod.java:646)
> at 
> 

[jira] [Commented] (SLING-5475) JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk

2016-02-02 Thread Robert Munteanu (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128265#comment-15128265
 ] 

Robert Munteanu commented on SLING-5475:


[~egli] - so this does not _yet_ fail, right? It will only fail against a 
1.4-SNAPSHOT Oak.

Do you have a list of Oak packages which are now exporter as {{0.0.0}}? I would 
suggest importing them outright without any version, which allows us to fix 
before Oak 1.3.15 is released and not delay the current release.

> JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk
> 
>
> Key: SLING-5475
> URL: https://issues.apache.org/jira/browse/SLING-5475
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Affects Versions: JCR Resource 2.5.6
>Reporter: Stefan Egli
>Assignee: Robert Munteanu
>Priority: Blocker
> Fix For: JCR Resource 2.6.0
>
>
> With OAK-3842 a fair number of oak packages have gotten their export version 
> reset to 0.0.0 instead of exporting a particular version (as that package is 
> not meant to be a stable API just yet).
> One consequence of this change is that JcrResourceProviderFactory now fails 
> with a NoClassDefFoundError as it has as import dependency 
> {{org.apache.jackrabbit.oak.plugins.observation; resolution:=optional; 
> version="[2.0, 3)"}} while that is now exported as {{0.0.0}}.
> Not sure if we have to do much or of this gets fixed automagically when we're 
> releasing a new jcr.resource bundle ([~cziegeler], wdyt?).
> Here's the details of the exception:
> {code}
> 02.02.2016 11:02:55.098 *ERROR* [FelixStartLevel] 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory 
> Unable to instantiate improved JCR Resource listener for Oak. Using fallback.
> java.lang.NoClassDefFoundError: 
> org/apache/jackrabbit/oak/plugins/observation/NodeObserver
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2370)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2154)
> at 
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1542)
> at 
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory.activate(JcrResourceProviderFactory.java:159)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
> at 
> org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:113)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:866)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:833)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:774)
> at 
> org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:347)
> at 
> org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:247)
> at 
> org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:344)
> at org.apache.felix.framework.Felix.getService(Felix.java:3699)
> at 
> org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)
> at 
> org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:72)
>  

[jira] [Commented] (SLING-5475) JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk

2016-02-02 Thread Stefan Egli (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128268#comment-15128268
 ] 

Stefan Egli commented on SLING-5475:


bq. so this does not yet fail, right? It will only fail against a 1.4-SNAPSHOT 
Oak.
exactly.

bq. Do you have a list of Oak packages which are now exporter as 0.0.0?
I don't have that - but it could be created perhaps by starting oak in a 
launchpad/quickstart?

> JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk
> 
>
> Key: SLING-5475
> URL: https://issues.apache.org/jira/browse/SLING-5475
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Affects Versions: JCR Resource 2.5.6
>Reporter: Stefan Egli
>Assignee: Robert Munteanu
>Priority: Blocker
> Fix For: JCR Resource 2.6.0
>
>
> With OAK-3842 a fair number of oak packages have gotten their export version 
> reset to 0.0.0 instead of exporting a particular version (as that package is 
> not meant to be a stable API just yet).
> One consequence of this change is that JcrResourceProviderFactory now fails 
> with a NoClassDefFoundError as it has as import dependency 
> {{org.apache.jackrabbit.oak.plugins.observation; resolution:=optional; 
> version="[2.0, 3)"}} while that is now exported as {{0.0.0}}.
> Not sure if we have to do much or of this gets fixed automagically when we're 
> releasing a new jcr.resource bundle ([~cziegeler], wdyt?).
> Here's the details of the exception:
> {code}
> 02.02.2016 11:02:55.098 *ERROR* [FelixStartLevel] 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory 
> Unable to instantiate improved JCR Resource listener for Oak. Using fallback.
> java.lang.NoClassDefFoundError: 
> org/apache/jackrabbit/oak/plugins/observation/NodeObserver
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2370)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2154)
> at 
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1542)
> at 
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory.activate(JcrResourceProviderFactory.java:159)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
> at 
> org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:113)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:866)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:833)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:774)
> at 
> org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:347)
> at 
> org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:247)
> at 
> org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:344)
> at org.apache.felix.framework.Felix.getService(Felix.java:3699)
> at 
> org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)
> at 
> org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:72)
> at 
> 

[jira] [Commented] (SLING-5475) JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk

2016-02-02 Thread Carsten Ziegeler (JIRA)

[ 
https://issues.apache.org/jira/browse/SLING-5475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15128281#comment-15128281
 ] 

Carsten Ziegeler commented on SLING-5475:
-

Maybe we should simply hard code the package import in the pom, this removes 
the requirement to udpate to a new oak core

> JcrResourceProviderFactory dependency to NodeObserver fails in oak trunk
> 
>
> Key: SLING-5475
> URL: https://issues.apache.org/jira/browse/SLING-5475
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Affects Versions: JCR Resource 2.5.6
>Reporter: Stefan Egli
>Assignee: Robert Munteanu
>Priority: Blocker
> Fix For: JCR Resource 2.6.0
>
>
> With OAK-3842 a fair number of oak packages have gotten their export version 
> reset to 0.0.0 instead of exporting a particular version (as that package is 
> not meant to be a stable API just yet).
> One consequence of this change is that JcrResourceProviderFactory now fails 
> with a NoClassDefFoundError as it has as import dependency 
> {{org.apache.jackrabbit.oak.plugins.observation; resolution:=optional; 
> version="[2.0, 3)"}} while that is now exported as {{0.0.0}}.
> Not sure if we have to do much or of this gets fixed automagically when we're 
> releasing a new jcr.resource bundle ([~cziegeler], wdyt?).
> Here's the details of the exception:
> {code}
> 02.02.2016 11:02:55.098 *ERROR* [FelixStartLevel] 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory 
> Unable to instantiate improved JCR Resource listener for Oak. Using fallback.
> java.lang.NoClassDefFoundError: 
> org/apache/jackrabbit/oak/plugins/observation/NodeObserver
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.defineClass(BundleWiringImpl.java:2370)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.findClass(BundleWiringImpl.java:2154)
> at 
> org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1542)
> at 
> org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:79)
> at 
> org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2018)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
> at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory.activate(JcrResourceProviderFactory.java:159)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.invokeMethod(BaseMethod.java:222)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.access$500(BaseMethod.java:37)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod$Resolved.invoke(BaseMethod.java:615)
> at 
> org.apache.felix.scr.impl.helper.BaseMethod.invoke(BaseMethod.java:499)
> at 
> org.apache.felix.scr.impl.helper.ActivateMethod.invoke(ActivateMethod.java:295)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:302)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:113)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:866)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:833)
> at 
> org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:774)
> at 
> org.apache.felix.framework.ServiceRegistrationImpl.getFactoryUnchecked(ServiceRegistrationImpl.java:347)
> at 
> org.apache.felix.framework.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:247)
> at 
> org.apache.felix.framework.ServiceRegistry.getService(ServiceRegistry.java:344)
> at org.apache.felix.framework.Felix.getService(Felix.java:3699)
> at 
> org.apache.felix.framework.BundleContextImpl.getService(BundleContextImpl.java:470)
> at 
> org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:72)
> at 
> org.apache.felix.scr.impl.helper.BindMethod.getServiceObject(BindMethod.java:646)
> at 
> 

[jira] [Created] (SLING-5477) Allow to add an artifact of the slingstart project to the model

2016-02-02 Thread Carsten Ziegeler (JIRA)
Carsten Ziegeler created SLING-5477:
---

 Summary: Allow to add an artifact of the slingstart project to the 
model
 Key: SLING-5477
 URL: https://issues.apache.org/jira/browse/SLING-5477
 Project: Sling
  Issue Type: Improvement
  Components: Maven Plugins and Archetypes
Reporter: Carsten Ziegeler
Assignee: Carsten Ziegeler
 Fix For: Slingstart Maven Plugin 1.4.2


In some cases it might be useful to have a slingstart project, where the 
project in addition to a provisioning model contains the source for a bundle. 
The maven bundle plugin could be used to build the bundle and the provisioning 
model includes this artifact.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)