[jira] [Closed] (SLING-1644) Use configuration reader from Apache Felix ConfigAdmin

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1644.
--

> Use configuration reader from Apache Felix ConfigAdmin
> --
>
> Key: SLING-1644
> URL: https://issues.apache.org/jira/browse/SLING-1644
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Affects Versions: Installer Core 3.0.0
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Installer Core 3.0.0
>
>
> The Apache Felix ConfigAdmin provides an easily integrateable reader for 
> configuration files - we should directly use this in the installer to support 
> configurations based on an input stream.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1305) SynchronousRefreshPackagesTask may miss PACKAGES_REFRESHED event

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1305.
--

> SynchronousRefreshPackagesTask may miss PACKAGES_REFRESHED event
> 
>
> Key: SLING-1305
> URL: https://issues.apache.org/jira/browse/SLING-1305
> Project: Sling
>  Issue Type: Bug
>  Components: Installer
>Reporter: Marcel Reutegger
>Assignee: Bertrand Delacretaz
>Priority: Minor
> Fix For: Installer Core 3.0.0
>
> Attachments: SLING-1305.patch
>
>
> From time to time I see a timeout warning logged by the 
> SynchronousRefreshPackagesTask in my system, triggered by a bundle update in 
> the repository. In most cases the event is received within a reasonably time 
> frame, but in some cases the event is not received and the time limit of 30 
> seconds is reached.
> When an update works fine, the log messages are something like (debug enabled 
> for osgi installer):
> *DEBUG* [FelixDispatchQueue] org.apache.sling.osgi.installer 
> FrameworkEvent.PACKAGES_REFRESHED
> *INFO* [FelixDispatchQueue] org.apache.felix.framework FrameworkEvent 
> PACKAGES REFRESHED
> But when it doesn't, then there is only the info message.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1746) Use slf4j instead of log service

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1746.
--

> Use slf4j instead of log service
> 
>
> Key: SLING-1746
> URL: https://issues.apache.org/jira/browse/SLING-1746
> Project: Sling
>  Issue Type: Task
>  Components: Installer
>Affects Versions: Installer Core 3.0.0
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>Priority: Minor
> Fix For: Installer Core 3.0.0
>
>
> The installer uses currently the LogService to avoid dependencies - however 
> nearly every log service implementation comes with various logging api's - so 
> from
> a dependency pov it's no difference.
> The slf4j api (or any other logging api) provides more usuability, therefore 
> we should switch



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1147) Installing SNAPSHOT of bundle installed via jcrinstall causes both bundles to be active

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1147.
--

> Installing SNAPSHOT of bundle installed via jcrinstall causes both bundles to 
> be active
> ---
>
> Key: SLING-1147
> URL: https://issues.apache.org/jira/browse/SLING-1147
> Project: Sling
>  Issue Type: Bug
>  Components: Installer
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>Priority: Minor
> Fix For: Installer Core 3.0.0
>
>
> (from SLING-1106)
> I have a bundle with version 2.0.5-tlp-SOMETHING in the repo 
> (/libs/sling/install)
> Now I want to update this bundle to a snapshot version using the web console
> After a restart, both versions are active - the one updated through the web 
> console and the one from the libs folder in the repository.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1666) Check and update tests

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1666.
--

> Check and update tests
> --
>
> Key: SLING-1666
> URL: https://issues.apache.org/jira/browse/SLING-1666
> Project: Sling
>  Issue Type: Task
>  Components: Installer
>Affects Versions: Installer Core 3.0.0
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Installer Core 3.0.0
>
>
> We should update/enhance/check the current tests if they check everything, 
> especially with the changes to the it tests we might have lost some testing



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1558) Too much synchronization

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1558.
--

> Too much synchronization
> 
>
> Key: SLING-1558
> URL: https://issues.apache.org/jira/browse/SLING-1558
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Affects Versions: Installer Core 3.0.0
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Installer Core 3.0.0
>
>
> The OSGIInstallerImpl syncs some methods on the osgi installer thread (not 
> all though), and the installer thread in term internally syncs all actions as 
> well.
> We can just remove the outer syncs from the OsgiInstallerImpl



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1346) BundleUpdateTask should check for null InputStream

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1346.
--

> BundleUpdateTask should check for null InputStream
> --
>
> Key: SLING-1346
> URL: https://issues.apache.org/jira/browse/SLING-1346
> Project: Sling
>  Issue Type: Bug
>  Components: Installer
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>Priority: Minor
> Fix For: Installer Core 3.0.0
>
>
> BundleUpdateTask currently does
>   b.update(resource.getInputStream(ctx.getBundleContext()));
> if for any reason resource.getInputStream(...) returns null, the Bundle 
> object will try to update itself from its location.
> As the location starts with jcrinstall:, the framework complains with a 
> "java.net.MalformedURLException: unknown protocol: jcrinstall" if that 
> happens.
> To avoid this, we need to check if the input stream is null, and log a 
> warning instead of trying to update the bundle if that happens.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1559) Potential NPE when logging

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1559.
--

> Potential NPE when logging
> --
>
> Key: SLING-1559
> URL: https://issues.apache.org/jira/browse/SLING-1559
> Project: Sling
>  Issue Type: Bug
>  Components: Installer
>Affects Versions: Installer Core 3.0.0
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Installer Core 3.0.0
>
>
> The logging code does first a getLogService() to check if the service is 
> available. If it is available it calls getLogService() again and directly 
> logs.
> This might result in an NPE when the log service goes away between the two 
> calls



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1381) BundleUpdateTask should stop retrying if RegisteredResource provides no InputStream

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1381.
--

> BundleUpdateTask should stop retrying if RegisteredResource provides no 
> InputStream
> ---
>
> Key: SLING-1381
> URL: https://issues.apache.org/jira/browse/SLING-1381
> Project: Sling
>  Issue Type: Bug
>  Components: Installer
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>Priority: Minor
> Fix For: Installer Core 3.0.0
>
>
> Since SLING-1346 the BundleUpdateTask correctly handles missing InputStream 
> (whatever their cause is), but the task is still retried in this case.
> As there's no way for the InputStream to come back, the retrying should stop 
> when that condition is detected.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1738) Add kind of audit log

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1738.
--

> Add kind of audit log
> -
>
> Key: SLING-1738
> URL: https://issues.apache.org/jira/browse/SLING-1738
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Affects Versions: Installer Core 3.0.0
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Installer Core 3.0.0
>
>
> It would be nice to log all actions (installs, updates, uninstalls) to a 
> special log category to see what is going on in the system.
> With this we should revisit all log statements and unify them



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1774) OSGi Installer Integration Tests installs test bundles

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1774.
--

> OSGi Installer Integration Tests installs test bundles
> --
>
> Key: SLING-1774
> URL: https://issues.apache.org/jira/browse/SLING-1774
> Project: Sling
>  Issue Type: Bug
>  Components: Installer
>Affects Versions: Installer Core 3.0.0
>Reporter: Felix Meschberger
>Assignee: Carsten Ziegeler
> Fix For: Installer Core 3.0.0
>
>
> When running "mvn clean install" of the OSGi Installer Integration Tests 
> (installer/osgi/it) project the test JAR files are all installed as artifacts 
> attached to the project.
> This does not do any harm (probably, because I would assume this project is 
> never deployed anyway), it is probably just overkill.
> We should try to prevent installing/deploying these test bundles.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1657) Installer integration tests should not rely on internal counters/state

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1657.
--

> Installer integration tests should not rely on internal counters/state
> --
>
> Key: SLING-1657
> URL: https://issues.apache.org/jira/browse/SLING-1657
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Affects Versions: Installer Core 3.0.0
>Reporter: Carsten Ziegeler
> Fix For: Installer Core 3.0.0
>
>
> Currently the installer integration tests rely on internal knowledge like the 
> state of counters etc to detect of the tests are correct.
> Once the implementation changes, all these tests are bound to fail
> The tests should not rely on any internals and just check the actions and 
> their result instead.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1773) Possible to store newly install bundle digests into bundle-digests.properties immediately after the bundle is installed successfully

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1773.
--

> Possible to store newly install bundle digests into bundle-digests.properties 
> immediately after the bundle is installed successfully
> 
>
> Key: SLING-1773
> URL: https://issues.apache.org/jira/browse/SLING-1773
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Affects Versions: JCR Installer 3.0.0
> Environment: CQ5.3
>Reporter: zhangchunlong
>Assignee: Carsten Ziegeler
>Priority: Minor
> Fix For: Installer Core 3.0.0
>
>
> Bundle slinginstall:org.apache.sling.osgi.installer-3.0.0-R900409.jar in 
> CQ5.3 only try to store the bundle digests into bundle-digests.properties 
> when the server is shutting down. In case some bundles are installed and the 
> server is not shutdown properly. eg. crash, being killed, next time when 
> CQ5.3 starts, will try to re-install those bundles and leave the bundle 
> status as "installed". It might be good to store such information immediately 
> after any bundle is being installed successfully if possible.
> To reproduce the issue:
> 1. create some test bundle
> 2. start the CQ5.3 instance, install the test bundle into some /install 
> folder.
> 3. kill the CQ5.3 instance.
> 4. start the CQ5.3 instance again.
> 5. from the crx-quickstart/logs/error.log, could see the test bundle is being 
> installed again.
> 6. from Felix console, the test bundle status is "installed".



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1737) Add state management for resources

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1737.
--

> Add state management for resources
> --
>
> Key: SLING-1737
> URL: https://issues.apache.org/jira/browse/SLING-1737
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Affects Versions: Installer Core 3.0.0
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Installer Core 3.0.0
>
> Attachments: ConfigInstallTest-debug.log.gz, debug.zip, 
> RemovedResourceDetectionTest-debug.log.gz
>
>
> Currently there is no state management, so it is hard to tell if a resource 
> has been installed, should be installed, uninstalled etc.
> In some situations this leads to endless loops where something is tried over 
> and over again - although nothing needs to be done anymore or can't be done.
> If we add proper state management to the resources, the installer knows what 
> needs to be done and can act accordingly



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1661) compute the digest when a dictionary is read from the input stream

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1661.
--

> compute the digest when a dictionary is read from the input stream
> --
>
> Key: SLING-1661
> URL: https://issues.apache.org/jira/browse/SLING-1661
> Project: Sling
>  Issue Type: Improvement
>  Components: Installer
>Reporter: Justin Edelson
>Assignee: Carsten Ziegeler
> Fix For: Installer Core 3.0.0
>
> Attachments: ASF.LICENSE.NOT.GRANTED--SLING-1661.patch
>
>
> currently, if this call is made:
> new InstallableResource(id, is, null, null, InstallableResource.TYPE_CONFIG, 
> null)
> an error will be thrown because the digest is null. But this isn't necessary 
> because we can generate the digest from the parsed dictionary



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-2846) Use latest Maven SCR Plugin 1.12.0

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-2846.
--

> Use latest Maven SCR Plugin 1.12.0
> --
>
> Key: SLING-2846
> URL: https://issues.apache.org/jira/browse/SLING-2846
> Project: Sling
>  Issue Type: Improvement
>  Components: General
>Affects Versions: Parent 15
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Parent 16
>
>
> The latest version contains some important bug fixes, especially for metatype 
> generation



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-2481) Update plugin versions

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-2481.
--

> Update plugin versions
> --
>
> Key: SLING-2481
> URL: https://issues.apache.org/jira/browse/SLING-2481
> Project: Sling
>  Issue Type: Improvement
>  Components: General
>Affects Versions: Parent 12
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Parent 13
>
>
> I think we should update these plugins:
> [INFO]   org.apache.felix:maven-scr-plugin  1.7.2 -> 1.7.4
> [INFO]   maven-changes-plugin ... 2.4 -> 2.7.1
> [INFO]   maven-dependency-plugin .. 2.2 -> 2.4
> [INFO]   maven-javadoc-plugin ... 2.8 -> 2.8.1
> [INFO]   maven-release-plugin . 2.1 -> 2.3
> [INFO]   maven-surefire-report-plugin  2.8 -> 2.12
> [INFO]   maven-war-plugin ... 2.1.1 -> 2.2
> [INFO]   org.apache.rat:apache-rat-plugin . 0.7 -> 0.8
> [INFO]   org.apache.sling:maven-jspc-plugin . 2.0.4-incubator -> 2.0.6
> [INFO]   org.apache.sling:maven-launchpad-plugin  2.0.10 -> 2.1.0
> [INFO]   org.apache.sling:maven-sling-plugin  2.0.4-incubator -> 2.1.0
> [INFO]   org.codehaus.cargo:cargo-maven2-plugin ... 1.0.6 -> 1.2.1
> [INFO]   org.codehaus.mojo:build-helper-maven-plugin .. 1.5 -> 1.7



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-2483) Update bundle plugin to 2.3.7 and add bndlib

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-2483.
--

> Update bundle plugin to 2.3.7 and add bndlib
> 
>
> Key: SLING-2483
> URL: https://issues.apache.org/jira/browse/SLING-2483
> Project: Sling
>  Issue Type: Improvement
>  Components: General
>Affects Versions: Parent 12
>Reporter: Felix Meschberger
>Assignee: Felix Meschberger
> Fix For: Parent 13
>
>
> The Sling parent POM currently refers to version 2.0.1 of the bundle plugin 
> which is quite dated. We should update to the latest version 2.3.7 which also 
> includes the latest version of the BND library.
> In addition we should add the bndlib library to the managed dependencies. 
> This allows for easy use of the BND annotations for declaring exported 
> packages instead of using Export-Package configuration elements in the poms.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-2480) Add config for maven-sling-plugin to m2e configuration

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-2480.
--

> Add config for maven-sling-plugin to m2e configuration
> --
>
> Key: SLING-2480
> URL: https://issues.apache.org/jira/browse/SLING-2480
> Project: Sling
>  Issue Type: Improvement
>  Components: General
>Affects Versions: Parent 12
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Parent 13
>
>
> We should add this blog for m2e to our parent pom:
> 
> 
> 
> org.apache.sling
> 
> 
> maven-sling-plugin
> 
> 
> [2.1.0,)
> 
> 
> 
> generate-adapter-metadata
> 
> 
> 
> 
> 
> 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1394) Add AnimalSniffer to Sling Parent POM

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1394.
--

> Add AnimalSniffer to Sling Parent POM
> -
>
> Key: SLING-1394
> URL: https://issues.apache.org/jira/browse/SLING-1394
> Project: Sling
>  Issue Type: Task
>  Components: General
>Affects Versions: Parent 8
>Reporter: Justin Edelson
>Assignee: Justin Edelson
> Fix For: Parent 11
>
>
> This will prevent Java 6-specific APIs from being used (well, not prevent, 
> but fail the build in a useful way)
> http://mojo.codehaus.org/animal-sniffer-maven-plugin/usage.html



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-2127) Build fails (cyclic dependency) with Maven 2.2.1

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-2127.
--

> Build fails (cyclic dependency) with Maven 2.2.1
> 
>
> Key: SLING-2127
> URL: https://issues.apache.org/jira/browse/SLING-2127
> Project: Sling
>  Issue Type: Bug
>  Components: General
>Affects Versions: Parent 10
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
> Fix For: Parent 11
>
>
> Running Maven 2.2.1 at the top of the revision 1143359 tree fails with
> The projects in the reactor contain a cyclic reference: Edge between 
> 'Vertex{label='org.apache.sling:org.apache.sling.commons.testing'}' and 
> 'Vertex{label='org.apache.sling:org.apache.sling.api'}' introduces to cycle 
> in the graph org.apache.sling:org.apache.sling.api --> 
> org.apache.sling:org.apache.sling.commons.testing --> 
> org.apache.sling:org.apache.sling.api
> But we don't really have a cycle, if we take the version numbers into account.
> org.apache.sling.commons.testing : 2.0.9-SNAPSHOT depends on
> org.apache.sling:org.apache.sling.api:jar:2.1.0:compile
> org.apache.sling.api 2.2.1-SNAPSHOT depends on
> org.apache.sling:org.apache.sling.commons.testing:jar:2.0.6:test
> We need to either remove the (perceived) cycle to work around what looks like 
> a Maven bug, or require Maven 3. 
> Build works fine for me with 3.0.2.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-2164) Suppress m2eclipse errors

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-2164.
--

> Suppress m2eclipse errors
> -
>
> Key: SLING-2164
> URL: https://issues.apache.org/jira/browse/SLING-2164
> Project: Sling
>  Issue Type: Improvement
>  Components: General
>Reporter: Justin Edelson
>Assignee: Justin Edelson
> Fix For: Parent 11
>
>
> The Indigo version of m2eclipse produces ugly errors when it encounters a 
> plugin which it doesn't recognize. This can be suppressed by adding some 
> configuration to our parent POM.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-2032) Upgrade SCR Plugin to 1.7.0/Annotations 1.5.0

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-2032.
--

> Upgrade SCR Plugin to 1.7.0/Annotations 1.5.0
> -
>
> Key: SLING-2032
> URL: https://issues.apache.org/jira/browse/SLING-2032
> Project: Sling
>  Issue Type: Improvement
>  Components: General
>Affects Versions: Parent 10
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Parent 11
>
>
> We have developed a new Maven SCR Plugin along with some improvements to the
> annotations. See
> http://svn.apache.org/repos/asf/felix/trunk/scrplugin/maven-scr-plugin/changelog.txt
> for a full list.
> I think we should upgrade to this new version to be able to use the new
> features



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-3802) Fields for dynamic references must be volatile

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-3802.
--

> Fields for dynamic references must be volatile
> --
>
> Key: SLING-3802
> URL: https://issues.apache.org/jira/browse/SLING-3802
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting Core 2.0.26
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Scripting Core 2.0.28
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-2150) Update plugins to use the latest available versions

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-2150.
--

> Update plugins to use the latest available versions
> ---
>
> Key: SLING-2150
> URL: https://issues.apache.org/jira/browse/SLING-2150
> Project: Sling
>  Issue Type: Task
>  Components: General
>Affects Versions: Parent 10
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Parent 11
>
>
> [INFO]   org.apache.felix:maven-bundle-plugin . 2.0.1 -> 2.3.5
> [INFO]   org.apache.felix:maven-scr-plugin  1.7.0 -> 1.7.2
> [INFO]   maven-antrun-plugin .. 1.3 -> 1.6
> [INFO]   maven-changes-plugin . 2.3 -> 2.4
> [INFO]   maven-compiler-plugin  2.0.2 -> 2.3.2
> [INFO]   maven-dependency-plugin .. 2.1 -> 2.2
> [INFO]   maven-enforcer-plugin . 1.0-beta-1 -> 1.0
> [INFO]   maven-javadoc-plugin . 2.5 -> 2.7
> [INFO]   maven-release-plugin .. 2.0-beta-9 -> 2.1
> [INFO]   maven-source-plugin .. 2.1.1 -> 2.1.2
> [INFO]   maven-surefire-report-plugin ... 2.4.3 -> 2.8
> [INFO]   maven-war-plugin  2.1-beta-1 -> 2.1.1
> [INFO]   org.apache.rat:apache-rat-plugin . 0.6 -> 0.7
> [INFO]   org.apache.sling:maven-launchpad-plugin  2.0.6 -> 2.0.10
> [INFO]   org.codehaus.cargo:cargo-maven2-plugin . 1.0 -> 1.0.6
> [INFO]   org.codehaus.mojo:animal-sniffer-maven-plugin  1.5 -> 1.6
> [INFO]   org.codehaus.mojo:emma-maven-plugin .. 1.0-alpha-2 -> 1.0-alpha-3
> [INFO]   org.mortbay.jetty:maven-jetty-plugin ... 6.1.20 -> 6.1.26
> In addition we should update:
> [INFO]   junit:junit ... 4.8.1 -> 
> 4.8.2
> [INFO]   org.apache.felix:org.apache.felix.scr.annotations . 1.5.0 -> 
> 1.6.0



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1469) Fix displaySourceFragments and let the option default to false

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1469.
--

> Fix displaySourceFragments and let the option default to false
> --
>
> Key: SLING-1469
> URL: https://issues.apache.org/jira/browse/SLING-1469
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting JSP 2.0.8
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Scripting JSP 2.0.10
>
>
> The displaySourceFragments is currently not working as the jasper code 
> assumes the generated class files to be in the filesystem.
> The default of this option should be false, as this would allow to use the 
> jsp scripting in production environments without any additional configuration.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1638) Reload jsp if used classloader is invalid

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1638.
--

> Reload jsp if used classloader is invalid
> -
>
> Key: SLING-1638
> URL: https://issues.apache.org/jira/browse/SLING-1638
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Affects Versions: Scripting JSP 2.0.8
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Scripting JSP 2.0.10
>
>
> The jsp scripting should use the new dynamic class loader interface to check 
> if the used class loaders for a jsp are still valid.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1319) JSP Script Engine is missing Names

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1319.
--

> JSP Script Engine is missing Names
> --
>
> Key: SLING-1319
> URL: https://issues.apache.org/jira/browse/SLING-1319
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Affects Versions: Scripting JSP 2.0.8
>Reporter: Justin Edelson
>Assignee: Justin Edelson
> Fix For: Scripting JSP 2.0.10
>
>
> The JSP ScriptEngineFactory does not register any Names. This can be seen by 
> going to the ScriptEngine admin page.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1111) RhinoJavaScriptEngine does not preserve scope between eval()s

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-.
--

> RhinoJavaScriptEngine does not preserve scope between eval()s
> -
>
> Key: SLING-
> URL: https://issues.apache.org/jira/browse/SLING-
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions:  Scripting JavaScript 2.0.4
>Reporter: Vidar S. Ramdal
>Assignee: Carsten Ziegeler
> Fix For: Scripting JavaScript 2.0.8
>
> Attachments: SLING-.patch
>
>
> The RhinoJavaScriptEngine does not preserve it scope, so that the scope is 
> reset between each call to eval().
> So that:
> RhinoJavaScriptEngineFactory factory = new RhinoJavaScriptEngineFactory();
> ScriptEngine engine = factory.getScriptEngine();
> engine.eval("var f = 1");
> engine.eval("f += 1");
> ... fails with a "ReferenceError: "f" is not defined"
> The problem seems to be that "scope" is a local variable in 
> RhinoJavaScriptEngine.eval(), while it should have been a class field. 
> I have prepared a patch and a test (coming up), but I'm not familiar with the 
> script engine code, so the fix might very likely break other stuff.
> So please review this.
> More background: 
> http://www.coderanch.com/t/460570/Other-JSE-JEE-APIs/java/javax-script-Save-state-scope



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1038) Recompile jsps on modifications and avoid periodic check

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1038.
--

> Recompile jsps on modifications and avoid periodic check
> 
>
> Key: SLING-1038
> URL: https://issues.apache.org/jira/browse/SLING-1038
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Affects Versions: Scripting JSP 2.0.6
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Scripting JSP 2.0.10
>
>
> Currently the jsp script handler checks a jsp for modifications when the jsp 
> is called. This check has a configurable time intervall.
> With the latest changes we have resource events and therefore could recheck 
> the jsps on events and avoid the per request check completly.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1631) Classloading problems when taglibs are used.

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1631.
--

> Classloading problems when taglibs are used.
> 
>
> Key: SLING-1631
> URL: https://issues.apache.org/jira/browse/SLING-1631
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting JSP 2.0.8
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Scripting JSP 2.0.10
>
>
> When taglibs are used together with jsp scripting there are several problems:
> 1. The taglib cache does not detect changes to taglibs (contained in bundles) 
> like the general classloading mechanism through the dynamic classloader - 
> this can result in inconsistencies and classloading problems.
> 2. The last modified check for taglibs does not work as expected. As soon as 
> tags are used, they are considered as changed which results in recompilation 
> of the jsp and of the tag where the second invalidates the classloader of the 
> jsp. This classloader is later on used and then a classloading exception is 
> thrown



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1284) MemoryLeak: ThreadLocal variable is never cleared

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1284.
--

> MemoryLeak: ThreadLocal variable is never cleared
> -
>
> Key: SLING-1284
> URL: https://issues.apache.org/jira/browse/SLING-1284
> Project: Sling
>  Issue Type: Bug
>Affects Versions: Scripting JSP 2.0.8
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>Priority: Critical
> Fix For: Scripting JSP 2.0.10
>
>
> The JspFactoryImpl by default uses a thread local for caching a page context 
> pool. This thread local is never cleared creating a memory leak.
> I think the easiest solution is to disable the pool - don't know if this has 
> a real performance impact



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1277) Make dependency to jcr api optional

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1277.
--

> Make dependency to jcr api optional
> ---
>
> Key: SLING-1277
> URL: https://issues.apache.org/jira/browse/SLING-1277
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Affects Versions: Scripting JSP-Taglib 2.0.6
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Scripting JSP-Taglib 2.1.0
>
>
> The taglib has a hard dependency to the jcr api - this makes the taglib 
> unusable if the api is not available. The dependency can easily be made 
> optional.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-3664) TEI Classes Breaking Integration Tests

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-3664.
--

> TEI Classes Breaking Integration Tests
> --
>
> Key: SLING-3664
> URL: https://issues.apache.org/jira/browse/SLING-3664
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting JSP-Taglib 2.2.0
>Reporter: Dan Klco
>Assignee: Dan Klco
> Fix For: Scripting JSP-Taglib 2.2.2
>
>
> It seems like the addition of the TagExtraInfo (TEI) classes in SLING-3475 is 
> causing the integration tests to fail.  You can reproduce this by running the 
> integration tests at sling-builder/launchpad/integration-tests with:
> mvn test -Dtest=SlingJSPTaglibTest
> It seems like the issue is that the TEI classes provide more information to 
> the JSP compiler which causes it to compile the code differently.  While this 
> might possibly improve performance it leads to some different behavior.  
> Previously, when you attempted to adapt an object into a class which did not 
> exist, you would get null.  Now it actually causes the JSP to fail to compile.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1649) AbstractDispatcherTagHandler should override release() and free resources

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1649.
--

> AbstractDispatcherTagHandler should override release() and free resources
> -
>
> Key: SLING-1649
> URL: https://issues.apache.org/jira/browse/SLING-1649
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Reporter: Tobias Bocanegra
>Assignee: Felix Meschberger
>Priority: Minor
> Fix For: Scripting JSP-Taglib 2.1.0
>
>
> especially: resource 
> see: 
> http://download-llnw.oracle.com/javaee/1.4/api/javax/servlet/jsp/tagext/Tag.html#release()



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1479) Add JSP Tag for new script resolution

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1479.
--

> Add JSP Tag for new script resolution
> -
>
> Key: SLING-1479
> URL: https://issues.apache.org/jira/browse/SLING-1479
> Project: Sling
>  Issue Type: New Feature
>  Components: Scripting
>Affects Versions: Scripting JSP-Taglib 2.0.6
>Reporter: Felix Meschberger
>Assignee: Carsten Ziegeler
> Fix For: Scripting JSP-Taglib 2.1.0
>
>
> SLING-585 brings new Script/Servlet resolution API to find an explicitly 
> named script according to a resource type hiearchy.
> This functionality should be reflected in a new JSP tag, e.g. along the lines:
>  />
> where:
> script is a path to a script
> resource is a resource whose resource type hierarchy is used to resolve 
> the script
> resourceType is a resource type hierarchy to resolve the script
> noResourceType prevents using resource type hiearchy if set to true 
> (default: false)
> If neither resource nor resource type are declared, the script is resolved 
> according to the type hierarchy of the request's resource.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-3459) sling:call should not log exceptions with the full stacktrace

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-3459.
--

> sling:call should not log exceptions with the full stacktrace
> -
>
> Key: SLING-3459
> URL: https://issues.apache.org/jira/browse/SLING-3459
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting JSP-Taglib 2.1.8
>Reporter: Konrad Windszus
> Fix For: Scripting JSP-Taglib 2.2.2
>
>
> Currently within the sling:call tag all exceptions are both logged on error 
> level and rethrown 
> (https://fisheye6.atlassian.com/browse/~br=trunk/sling/trunk/bundles/scripting/jsp-taglib/src/main/java/org/apache/sling/scripting/jsp/taglib/CallTag.java?r=1398589=1520554=1398589#to139).
>  That is not a good practice, because the same stack traces would appear 
> twice in the log (once for the generic exception, logged by the CallTag and 
> once for the wrapped JspException).
> Rather do not log the exception within the CallTag and leave that to other 
> handlers.  Just rewrapping the exception into the JspException should be 
> enough. No information would be lost that way, and stack traces would only be 
> logged once (by the code responsible to catch the JspException).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-3475) TagExtraInfo implementations for Sling Taglib

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-3475.
--

> TagExtraInfo implementations for Sling Taglib
> -
>
> Key: SLING-3475
> URL: https://issues.apache.org/jira/browse/SLING-3475
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Affects Versions: Scripting JSP-Taglib 2.2.0
>Reporter: Julian Sedding
>Assignee: Justin Edelson
> Fix For: Scripting JSP-Taglib 2.2.2
>
> Attachments: SLING-3475.patch
>
>
> Currently no TagExtraInfo is defined for any but the DefineObjects tag.
> It would be nice to allow IDEs to provide assistance to developers for all 
> tags.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-3665) Support XSS Encoding

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-3665.
--

> Support XSS Encoding
> 
>
> Key: SLING-3665
> URL: https://issues.apache.org/jira/browse/SLING-3665
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting JSP-Taglib 2.2.0
>Reporter: Dan Klco
>Assignee: Dan Klco
>Priority: Minor
>  Labels: patch
> Fix For: Scripting JSP-Taglib 2.2.2
>
> Attachments: SLING-3665.diff
>
>
> I'd propose we should support proper XSS encoding through the Sling JSP 
> Taglib.  Nothing too elaborate, just more than is provided by the JSTL 
> Commons Out tag as that's not sufficient to provide true XSS protection.
> I'll attach a patch with a new tag which uses the OWASP ESAPI's encoder 
> service to encode content in several different ways depending on how it 
> should be used.  This API is available under the BSD license, so I believe it 
> is compatible.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-3512) All dependencies referenced from TEI classes should have "compile" scope

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-3512.
--

> All dependencies referenced from TEI classes should have "compile" scope
> 
>
> Key: SLING-3512
> URL: https://issues.apache.org/jira/browse/SLING-3512
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting JSP-Taglib 2.2.0
>Reporter: Konrad Windszus
>Assignee: Justin Edelson
> Fix For: Scripting JSP-Taglib 2.2.2
>
>
> Currently some classes which are referenced from TEI classes (e.g. 
> DefineObjectsTEI) cannot be resolved within an IDE, because the according 
> dependency is given with scope "provided". Since provided dependencies are 
> not evaluated if given in a transitive way [0], the classpath of the 
> referencing JSP does not necessarily contain those transitive dependencies, 
> but they are necessary for the TEI to be instanciated within the IDE.
> For example the DefineObjectsTEI references classes from org.apache.sling.api 
> and slf4j-api. Therefore both dependencies should have the "compile" scope.
> [0] - 
> http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#Dependency_Scope



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-3776) JsonRendererServlet should provide a way to list children as an array

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-3776.
--

> JsonRendererServlet should provide a way to list children as an array
> -
>
> Key: SLING-3776
> URL: https://issues.apache.org/jira/browse/SLING-3776
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Affects Versions: Servlets Get 2.1.8
>Reporter: Damien Antipa
>Assignee: Bertrand Delacretaz
>Priority: Minor
> Fix For: Servlets Get 2.1.10
>
>
> The default JSON renderer prints all children of a node as another key-value 
> attribute. But browsers do not respect the order printed in the response of 
> object attributes (since the standard does not describe this).
> In a lot of cases I continue writing my own servlets to print the children as 
> a json array which respects the order. Imo the default renderer should 
> provide a selector to change the output and print children in an array.
> PR: https://github.com/apache/sling/pull/23



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-3508) NPE in JSON rendering

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-3508.
--

> NPE in JSON rendering
> -
>
> Key: SLING-3508
> URL: https://issues.apache.org/jira/browse/SLING-3508
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Servlets Get 2.1.8
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Servlets Get 2.1.10
>
>
> If the property value to render is null, an NPE might occur:
> java.lang.NullPointerException: null
>   at 
> org.apache.sling.servlets.get.impl.helpers.JsonObjectCreator.getValue(JsonObjectCreator.java:150)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-6027) Support existing Chunked upload functionality in streaming mode.

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-6027.
--

> Support existing Chunked upload functionality in streaming mode.
> 
>
> Key: SLING-6027
> URL: https://issues.apache.org/jira/browse/SLING-6027
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Servlets Post 2.3.12
>Reporter: Ian Boston
>Assignee: Ian Boston
> Fix For: Servlets Post 2.3.14
>
>
> The non streaming uploads support a  partial upload protocol implemented in 
> request parameters that is known in Sling terms as "Chunked" upload and 
> documented at 
> https://cwiki.apache.org/confluence/display/SLING/Chunked+File+Upload+Support 
>  (not to be confused with Chunked Transfer encoding or the use of Http Range 
> headers).
> Sling Chunked uploading sends a sequence of POSTs containing multiple parts 
> of a file upload. When all the parts are uploaded a final request is sent 
> that causes all the parts to be merged into a single file in the JCR. From a 
> streaming point of view, each part can be streamed with the streaming 
> implementation supported by SLING-5948. Some additional code will be required 
> to set the file name appropriately and the struture.
> However, when the upload is completed, Sling must merge all the parts. To 
> maintain the streaming nature of the upload, this must be achieved without 
> incurring any local IO, otherwise the benefits of a streamed upload are lost.
> I am not certain how to achieve the merge given the limitations of the JCR 
> API other than by transferring all the body parts via the local JVM. That 
> won't incur local Disk IO but will multiply the overall IO requirement by 3x.
> If JCR/Oak had the functionality to concatenate Binaries it could do this 
> more efficiently depending on the DS implementation. If JCR/Oak exposed an 
> Seekable OutputStream the Application could avoid needing to save uploads to 
> the JCR as individual files. If JCR/Oak allowed an update to a binary to 
> start at a known location, again this could be avoided.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1965) RedirectServlet does not append current querystring to redirect target if desired target is not an absolute URL

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1965.
--

> RedirectServlet does not append current querystring to redirect target if 
> desired target is not an absolute URL
> ---
>
> Key: SLING-1965
> URL: https://issues.apache.org/jira/browse/SLING-1965
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Servlets Get 2.1.0
>Reporter: Felix Meschberger
>Assignee: Felix Meschberger
> Fix For: Servlets Get 2.1.2
>
>
> The RedirectServlet appends the current query string to the redirect target 
> in the toRedirectPath method which is only called if the target path is an 
> absolute URL.
> The correct location to append the request query string is in the doGet 
> method before setting the Location: header.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1983) Post servlet: Patching multi-value properties

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1983.
--

> Post servlet: Patching multi-value properties
> -
>
> Key: SLING-1983
> URL: https://issues.apache.org/jira/browse/SLING-1983
> Project: Sling
>  Issue Type: New Feature
>  Components: Servlets
>Affects Versions: Servlets Post 2.1.0
>Reporter: Alexander Klimetschek
>Assignee: Felix Meschberger
> Fix For: Servlets Post 2.1.2
>
> Attachments: SLING-1983.patch
>
>
> As described on the sling list 
> http://sling.markmail.org/thread/xxaaqowtx7jgfo3p , allow patching of 
> multi-value properties:
> New "@Patch" suffix:
> my:property@TypeHint=String[]
> my:property@Patch=true
> my:property=+value1
> my:property=-value1
> When "@Patch" is present, each of the property values from the request are 
> expected to start with either "+" or "-", followed by the actual value. These 
> two would represent the operations you want to have executed on the set.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-2223) add an SPI interface for injecting custom/alternate PostResponse implementations

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-2223.
--

> add an SPI interface for injecting custom/alternate PostResponse 
> implementations
> 
>
> Key: SLING-2223
> URL: https://issues.apache.org/jira/browse/SLING-2223
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Reporter: Justin Edelson
>Assignee: Justin Edelson
> Fix For: Servlets Post 2.1.2
>
>
> This was discussed in SLING-2156, but not necessarily tied to that issue.
> Basically, it should be possible to implement an interface which can produce 
> an implementation of the PostResponse interface. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1725) Register internal post operations as services for consumption by servlets other than the SlingPostServlet

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1725.
--

> Register internal post operations as services for consumption by servlets 
> other than the SlingPostServlet
> -
>
> Key: SLING-1725
> URL: https://issues.apache.org/jira/browse/SLING-1725
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Affects Versions: Servlets Post 2.0.4
>Reporter: Felix Meschberger
>Assignee: Bertrand Delacretaz
> Fix For: Servlets Post 2.1.2
>
> Attachments: SLING-1725.patch
>
>
> As discussed in [1] it would be useful to have the internal operations of the 
> Sling POST Servlet available as services for other bundles to reuse.
> [1] http://markmail.org/message/a7vrtyhictf7tv4m



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-2035) Import does not properly handle replace import

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-2035.
--

> Import does not properly handle replace import
> --
>
> Key: SLING-2035
> URL: https://issues.apache.org/jira/browse/SLING-2035
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Servlets Post 2.1.0
>Reporter: Felix Meschberger
>Assignee: Felix Meschberger
> Fix For: Servlets Post 2.1.2
>
>
> Importing (system view) content has several flaws:
> (1) if :name request parameter is given and a node exists of that name the 
> request fails with a RepositoryException. Rather the request should either 
> replace the existing node (if the :replace request parameter is true) or 
> terminate the request with a 412/PRECONDITION FAILED otherwise
> (2) If the import operation replaces an existing node, the request is 
> actually not a creation request but a modification request. The response 
> status should thus (in case of success) be 200/OK and not 201/CREATED.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-2120) Add functionality to ignore some parameters from POST requests

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-2120.
--

> Add functionality to ignore some parameters from POST requests
> --
>
> Key: SLING-2120
> URL: https://issues.apache.org/jira/browse/SLING-2120
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Affects Versions: Servlets Post 2.1.0
>Reporter: Felix Meschberger
>Assignee: Felix Meschberger
> Fix For: Servlets Post 2.1.2
>
>
> In certain situations a POST request is accompanied with request parameters 
> that are to be ignored. Currently the Sling POST Servlet has two mechanisms 
> to handle such parameters:
>   - any parameter starting with a colon (:) is ignored, e.g. :operation
>   - only parameters starting with "./" are considered if at least one 
> parameter has this format
> In certain situations, more parameters might be submitted ending in the POST 
> Servlet and then being written to the repository. For example if a user tries 
> to authenticated with form based authentication supplying j_username and 
> j_password parameters then if the Sling POST Servlet is erroneously hit, 
> these values might get written to the repository.
> We should add functionality to specify regular expressions for parameters 
> which are to be ignored (apart from the existing mechanism). The default 
> would be "j_.*" to ignore any parameters starting with j_ generally used for 
> authentication



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-2143) SlingPostServlet ImportOperation :content parameter overrides _charset_ parameter with system default encoding

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-2143.
--

> SlingPostServlet ImportOperation :content parameter overrides _charset_ 
> parameter with system default encoding
> --
>
> Key: SLING-2143
> URL: https://issues.apache.org/jira/browse/SLING-2143
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Servlets Post 2.1.0
> Environment: OS: Windows 2k8, Windows 7
> Web Servers: Tomcat 6
> Sling 6
>Reporter: Stephen Sanchez
>Assignee: Eric Norman
> Fix For: Servlets Post 2.1.2
>
>   Original Estimate: 2h
>  Remaining Estimate: 2h
>
> The ImportOperation on the SlingPostServlet (2.1.0 to Trunk) does not support 
> encoding specified in the form _charset_ parameter on a POST request. 
> REPRODUCTION STEPS:
> Create a POST request using the SlingPostServlet and ImportOperation:
> curl -F":operation=import" -F"_charset_=UTF-8" -F":contentType=json" 
> -F":replace=true" -F":replaceProperties=true" -F":content={'latin':'øµå', 
> 'chinese':'玄牛'}" http://admin:admin@localhost:8080
> PROPOSED SOLUTION:
> In ImportOperation.java, line 137 (as of 2.1.0 tag):
> contentStream = new ByteArrayInputStream(content.getBytes());
> This line will take the :content parameter on a request, properly encoded 
> (ex. UTF-8) and get the bytes using system-level encoding. This causes all 
> unicode characters in the content to be encoded, on windows, with the wrong 
> encoding. 
> The simple fix, which resolves the issue and allows UTF-8 encoding across all 
> operating systems:
> contentStream = new ByteArrayInputStream(content.getBytes("UTF-8"));
> My proposed fix, is to support the form parameter _charset_, since :content 
> is a parameter on the form in the post request:
> RequestParameter encodingParam = request.getRequestParameter("_charset_");
> byte[] contentBytes;
> if (encodingParam != null && encodingParam.getString() != null) {
>   contentBytes = content.getBytes(encodingParam.getString());
> } else {
>   contentBytes = content.getBytes();
> }
> contentStream = new ByteArrayInputStream(contentBytes);



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-2090) Simplify deletion of child nodes through the Sling Post Servlet

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-2090.
--

> Simplify deletion of child nodes through the Sling Post Servlet
> ---
>
> Key: SLING-2090
> URL: https://issues.apache.org/jira/browse/SLING-2090
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Affects Versions: Servlets Post 2.1.0
>Reporter: Tobias Bocanegra
>Priority: Minor
> Fix For: Servlets Post 2.1.2
>
>
> use case is to delete all child nodes of a specific node in one request. 
> currently it's only possible by providing a bunch of ":applyTo" parameters.
> would be nice if it supports something like: ":applyTo=/content/testnode/*".
> or even a POST to: /content/testnode/* with an :operation=delete parameter.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-2227) Add configuration to skip session.save in AbstractPostOperation

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-2227.
--

> Add configuration to skip session.save in AbstractPostOperation
> ---
>
> Key: SLING-2227
> URL: https://issues.apache.org/jira/browse/SLING-2227
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Reporter: Markus Joschko
>Assignee: Justin Edelson
> Fix For: Servlets Post 2.1.2
>
> Attachments: session_skip_changed_name.diff, session_skip.diff
>
>
> With SLING-1725 the postservlet operations have been exposed as services to 
> be consumed by other servlets.
> I use that to create two nodes with the ModifyOperation in one request. 
> However the second node creation might fail because of the postprocessors.
> In that case I want to return an error to the user and have nothing stored. 
> This can't be done at the moment as the AbstractPostOperation always saves 
> independently from its context (so first node gets saved, second node not).
> I think it makes a lot of sense to let the caller of the operation have 
> control over when the session is saved and introduced a flag to skip the save 
> when requested.
> It is modeled after the isSkipCheckin flag. 



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1704) Add support for modifying jcr:primaryType

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1704.
--

> Add support for modifying jcr:primaryType
> -
>
> Key: SLING-1704
> URL: https://issues.apache.org/jira/browse/SLING-1704
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Reporter: Justin Edelson
>Assignee: Justin Edelson
> Fix For: Servlets Post 2.1.2
>
>
> JCR 2 added a setPrimaryNodeType method, which we should use



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-2453) HtmlResponseProxy constructor always throws NPE

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-2453.
--

> HtmlResponseProxy constructor always throws NPE
> ---
>
> Key: SLING-2453
> URL: https://issues.apache.org/jira/browse/SLING-2453
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>Priority: Minor
> Fix For: Servlets Post 2.1.2
>
>
> The HtmlResponseProxy added for SLING-1725 cannot possibly work, its 
> constructor will always throw an NPE due to the base class calling 
> setCreateRequest(false) before the postResponse member is initialized.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-2415) Ability to delete child nodes, without deleting the parent node in SlingPostServlet

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-2415.
--

> Ability to delete child nodes, without deleting the parent node in 
> SlingPostServlet
> ---
>
> Key: SLING-2415
> URL: https://issues.apache.org/jira/browse/SLING-2415
> Project: Sling
>  Issue Type: New Feature
>  Components: Servlets
>Reporter: Chaitanya Atreya
>Assignee: Eric Norman
> Fix For: Servlets Post 2.1.2
>
>
> Provide a way to delete all the child nodes of a given node in the 
> SlingPostServlet, without deleting the parent node itself.
> There are many situations where one might want to delete only the child 
> nodes, while keeping the parent node intact. 
> One way to do this now is to use the :applyTo request parameter for each 
> child node. However, this requires first fetching all the child nodes, which 
> can be avoided with this feature.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1741) An exception should be thrown when trying to add a subnode to an nt:file-node

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1741.
--

> An exception should be thrown when trying to add a subnode to an nt:file-node
> -
>
> Key: SLING-1741
> URL: https://issues.apache.org/jira/browse/SLING-1741
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Reporter: Clemens Wyss
>Assignee: Justin Edelson
> Fix For: Servlets Post 2.1.2
>
>
> The nt:file nodetype (without any other mixin node types assigned to the 
> node) only supports one single child
> node whose name is "jcr:content". Hence when you try to add a subnode to an 
> nt:file node you should be getting an error/exception... 
> This is not the case though



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-2517) Add validity checks to CopyFrom POST operation paths

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-2517.
--

> Add validity checks to CopyFrom POST operation paths
> 
>
> Key: SLING-2517
> URL: https://issues.apache.org/jira/browse/SLING-2517
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Servlets Post 2.1.0
>Reporter: Bertrand Delacretaz
>Assignee: Bertrand Delacretaz
>Priority: Minor
> Fix For: Servlets Post 2.1.2
>
>
> It would be good to have a few additional checks on the to /from paths, as 
> not all combinations make sense



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1816) Make Sling POST Servlet dynamically configurable

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1816.
--

> Make Sling POST Servlet dynamically configurable
> 
>
> Key: SLING-1816
> URL: https://issues.apache.org/jira/browse/SLING-1816
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Reporter: Felix Meschberger
>Assignee: Felix Meschberger
> Fix For: Servlets Post 2.1.2
>
>
> Currently the SlingPostServlet is a regaular DS 1.0 component which is 
> stopped and restarted for updated OSGi configuration. This gives a certain 
> amount of down-time during configuration update and also places some load on 
> the system.
> To make configuration updates as transparent and low latency as possible, it 
> would probably be good support the new DS 1.0 functionality for dynamic 
> configuration update using the "modify" method.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1727) Access Denied Exceptions fill up the logs with tracebacks that give no additional information

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1727.
--

> Access Denied Exceptions fill up the logs with tracebacks that give no 
> additional information
> -
>
> Key: SLING-1727
> URL: https://issues.apache.org/jira/browse/SLING-1727
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Servlets Post 2.0.4
>Reporter: Ian Boston
>Assignee: Ian Boston
> Fix For: Servlets Post 2.1.0
>
>   Original Estimate: 10m
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> All errors in AbstractSlingPostOperation are logged with full tracebacks, 
> however AccessDeniedExceptions all happen on the Save operation and so the 
> traceback just fills the log up without providing any extra information 
> The traceback should happen at debug level, with a one line message at info 
> level.
> currently the traceback is
> 03.09.2010 11:02:27.298 *ERROR* [0:0:0:0:0:0:0:1%0 [1283508147295] POST 
> /test/authztest/node1283508146/childnode.html HTTP/1.1] 
> org.apache.sling.servlets.post.impl.operations.ModifyOperation Exception 
> during response processing. javax.jcr.AccessDeniedException: 
> /test/authztest/node1283508146/childnode/user2-1283508146: not allowed to add 
> or modify item
>   at 
> org.apache.jackrabbit.core.ItemImpl.validateTransientItems(ItemImpl.java:411)
>   at org.apache.jackrabbit.core.ItemImpl.save(ItemImpl.java:1097)
>   at org.apache.jackrabbit.core.SessionImpl.save(SessionImpl.java:920)
>   at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
>   at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>   at java.lang.reflect.Method.invoke(Method.java:597)
>   at 
> org.apache.sling.jcr.base.SessionProxyHandler$SessionProxyInvocationHandler.invoke(SessionProxyHandler.java:109)
>   at $Proxy11.save(Unknown Source)
>   at 
> org.apache.sling.servlets.post.AbstractSlingPostOperation.run(AbstractSlingPostOperation.java:125)
>   at 
> org.apache.sling.servlets.post.impl.SlingPostServlet.doPost(SlingPostServlet.java:242)
>   at 
> org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:148)
>   at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:344)
>   at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:375)
>   at 
> org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:523)
>   at 
> org.apache.sling.engine.impl.SlingMainServlet.processRequest(SlingMainServlet.java:427)
>   at 
> org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:48)
>   at 
> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:64)
>   at 
> org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:59)
>   at 
> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
>   at 
> org.sakaiproject.nakamura.batch.RequestEventsFilter.doFilter(RequestEventsFilter.java:96)
>   at 
> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
>   at 
> org.sakaiproject.nakamura.files.pool.ContentPoolFilter.doFilter(ContentPoolFilter.java:78)
>   at 
> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
>   at 
> org.sakaiproject.nakamura.privacy.RestPrivacyFilter.doFilter(RestPrivacyFilter.java:81)
>   at 
> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
>   at 
> org.sakaiproject.nakamura.persistence.TransactionManagerFilter.doFilter(TransactionManagerFilter.java:95)
>   at 
> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
>   at 
> org.sakaiproject.nakamura.cluster.ClusterTrackingFilter.doFilter(ClusterTrackingFilter.java:87)
>   at 
> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
>   at 
> org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:313)
>   at 
> org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:207)
>   at 
> org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
>   at 
> org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389)
>   at 
> 

[jira] [Closed] (SLING-1608) unsafe cast in AbstractSlingPostOperation

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1608.
--

> unsafe cast in AbstractSlingPostOperation
> -
>
> Key: SLING-1608
> URL: https://issues.apache.org/jira/browse/SLING-1608
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Reporter: Justin Edelson
>Assignee: Justin Edelson
> Fix For: Servlets Post 2.1.0
>
>
> AbstractSlingPostOperation.checkin() assumes that the paths it gets are node 
> paths when they can be property paths as well.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1573) Support for Versionable nodes in post servlet

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1573.
--

> Support for Versionable nodes in post servlet
> -
>
> Key: SLING-1573
> URL: https://issues.apache.org/jira/browse/SLING-1573
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Reporter: Justin Edelson
>Assignee: Justin Edelson
> Fix For: Servlets Post 2.1.0
>
>
> SLING-608 mentions versions (and SLING-848 talks about accessing versionable 
> nodes), but we don't have an issue for creating and modifying versionable 
> nodes as well as performing basic checkin and checkout operations.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1206) Sling Post servlet incorrectly parses ISO8601 date formats with timezone offset (as used by JCR)

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1206.
--

> Sling Post servlet incorrectly parses ISO8601 date formats with timezone 
> offset (as used by JCR)
> 
>
> Key: SLING-1206
> URL: https://issues.apache.org/jira/browse/SLING-1206
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Servlets Post 2.0.2, Servlets Post 2.0.4
>Reporter: Alexander Klimetschek
>Assignee: Felix Meschberger
>Priority: Minor
> Fix For: Servlets Post 2.1.0
>
>
> An ISO8601 date format, as it is returned by javax.jcr.Property.getString() 
> for date properties, looks like this:
> 2009-11-18T11:30:00+10:30
> When roundtripping this string by posting it to the sling post servlet (using 
> @TypeHint=Date), it will be parsed by this pattern "-MM-dd'T'HH:mm:ss", 
> configured as third in the SlingPostServlet's servlet.post.dateFormats 
> config. But then timezone information is lost and the default timezone of the 
> server will be used, which produces a wrong date in the end.
> The problem is that Java's SimpleDateFormat used in the SlingPostServlet 
> (DateParser class), does not support the ISO8601 way of specifying timezone 
> offsets at all. It either supports "GMT+10:30", where "GMT" must be present, 
> or the RFC-822 style "+1030", without the colon.
> To support proper round-tripping, with date strings rendered directly from a 
> JCR property, I suggest to
> a) introduce a special pattern string such as "iso8601" that uses the ISO8601 
> utility class from jackrabbit-jcr-commons
> b) set this format as second one in the servlet.post.dateFormats list (before 
> the problematic ones, but after the ECMA date format, which is needed for 
> roundtripping with Sling JSON exports)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1083) Node copy with :replace fails

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1083.
--

> Node copy with :replace fails
> -
>
> Key: SLING-1083
> URL: https://issues.apache.org/jira/browse/SLING-1083
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Servlets Post 2.0.2
> Environment: J2SE 1.6.0_14-b08, Debian Linux
>Reporter: Arthur Taylor
>Assignee: Ian Boston
> Fix For: Servlets Post 2.1.0
>
> Attachments: test-replace.sh
>
>
> Attempting to copy a node to the location of an existing node fails with a 
> PathNotFoundException, generated by the call to session.getItem() at line 136 
> of AbstractMoveCopyOperation.java. The attached script demonstrates the 
> failure.
> By introducing a breakpoint in CopyOperation.java's copy(Node src, Node 
> dstParent, String name) anywhere after the replacement node is created (line 
> 109), I've been able to make requests succeed. It seems as though there must 
> be a race or a caching issue there.
> Stack trace:
> 13.08.2009 13:16:10.374 *ERROR* [127.0.0.1 [1250165770368] POST /d1 HTTP/1.1] 
> org.apache.sling.servlets.post.impl.operations.CopyOperation Exception during 
> response processing. javax.jcr.PathNotFoundException: /d2
>   at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:442)
>   at org.apache.jackrabbit.core.SessionImpl.getItem(SessionImpl.java:805)
>   at 
> org.apache.sling.jcr.base.internal.PooledSession.getItem(PooledSession.java:158)
>   at 
> org.apache.sling.servlets.post.impl.operations.AbstractCopyMoveOperation.doRun(AbstractCopyMoveOperation.java:136)
>   at 
> org.apache.sling.servlets.post.AbstractSlingPostOperation.run(AbstractSlingPostOperation.java:87)
>   at 
> org.apache.sling.servlets.post.impl.SlingPostServlet.doPost(SlingPostServlet.java:172)
>   at 
> org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:143)
>   at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:338)
>   at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:369)
>   at 
> org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:520)
>   at 
> org.apache.sling.engine.impl.SlingMainServlet.processRequest(SlingMainServlet.java:409)
>   at 
> org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:48)
>   at 
> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:59)
>   at 
> org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:59)
>   at 
> org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:57)
>   at 
> org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:296)
>   at 
> org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:183)
>   at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
>   at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:389)
>   at 
> org.ops4j.pax.web.service.internal.HttpServiceServletHandler.handle(HttpServiceServletHandler.java:64)
>   at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
>   at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
>   at 
> org.ops4j.pax.web.service.internal.HttpServiceContext.handle(HttpServiceContext.java:111)
>   at 
> org.ops4j.pax.web.service.internal.JettyServerHandlerCollection.handle(JettyServerHandlerCollection.java:64)
>   at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
>   at org.mortbay.jetty.Server.handle(Server.java:324)
>   at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
>   at 
> org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:880)
>   at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
>   at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
>   at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
>   at 
> org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
>   at 
> org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1336) Let SlingPostServlet return JSON

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1336.
--

> Let SlingPostServlet return JSON
> 
>
> Key: SLING-1336
> URL: https://issues.apache.org/jira/browse/SLING-1336
> Project: Sling
>  Issue Type: New Feature
>  Components: Servlets
>Affects Versions: Servlets Post 2.0.4
>Reporter: Vidar S. Ramdal
>Assignee: Bertrand Delacretaz
> Fix For: Servlets Post 2.1.0
>
> Attachments: SLING-1336-2.patch, SLING-1336.patch
>
>
> From http://markmail.org/thread/ic2752rha4iy2s2c
> In many scenarios it would be nice to get JSON in response to a POST. You 
> could write your own post servlet to do that, but then you will not benefit 
> from the registered SlingPostOperations and SlingPostProcessors that are 
> executed by the default SlingPostServlet.
> In the case of SlingPostOperation, an implementing class is passed a 
> HtmlResponse object when run(). The HtmlResponse object is pretty agnostic to 
> response format though, the only HTML related work is in the send() method. 
> Thus, it should be possible ot replace/extend/abstract HtmlResponse with a 
> more generic response object. The send() functionality is then moved to 
> SlingPostServlet, which determines which format to return based on these 
> criteria (in order):
> 1. The Accept HTTP header - if set to "application/json" return JSON, 
> otherwise return HTML
> 2. Possibly also an :accept form field, with the same meaning as the HTTP 
> header, in case it is proven that setting the HTTP header does not work in 
> all browsers
> 3. The format of the posted data - if JSON is posted (see SLING-1172), return 
> JSON, otherwise return HTML



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1749) sling.js prevents baseurl being detected correctly when the webapp isn't on the / docroot

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1749.
--

> sling.js prevents baseurl being detected correctly when the webapp isn't on 
> the / docroot
> -
>
> Key: SLING-1749
> URL: https://issues.apache.org/jira/browse/SLING-1749
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Reporter: Tom Barber
>Assignee: Justin Edelson
> Fix For: Servlets Post 2.1.0
>
>
> Running the svn checkout from this morning the sling.js file located in 
> sling/bundles/servlets/post has a bug on line 416. 
> The "/" being appended breaks the substring and the baseurl is always "".



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1509) Add a nicer toString() method to Modification

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1509.
--

> Add a nicer toString() method to Modification
> -
>
> Key: SLING-1509
> URL: https://issues.apache.org/jira/browse/SLING-1509
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Reporter: Justin Edelson
>Assignee: Justin Edelson
>Priority: Trivial
> Fix For: Servlets Post 2.1.0
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-897) Updating a property fires the wrong JCR events

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-897.
-

> Updating a property fires the wrong JCR events
> --
>
> Key: SLING-897
> URL: https://issues.apache.org/jira/browse/SLING-897
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Servlets Post 2.0.2
>Reporter: christian
>Assignee: Eric Norman
>Priority: Minor
> Fix For: Servlets Post 2.1.0
>
>
> If you set a single value Proeprty with a Post handled by the PostServlet,
> the related property is removed first and than the value is set.
> While the effect is the desired change of the Property's value, it has 
> side-effects.
> Et least the connected session has to have remove-privilege to set the 
> property.
> Eventing may be unexpected, and other may result.
> Example: 
> String path = "/content/node1";
> String pName = "property1";
> Node node = (Node) session.getRootNode().getIem(path);
> try {
>  session.checkPermission(path+"/"+pName, "set_property")
>   //==allowed
> } catch (AccessControlException) {
> }
> But 
> POST "/content/node1"
> property1=test
> => AccessDenied



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1703) Mixin types aren't modified for sub nodes

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1703.
--

> Mixin types aren't modified for sub nodes
> -
>
> Key: SLING-1703
> URL: https://issues.apache.org/jira/browse/SLING-1703
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Reporter: Justin Edelson
>Assignee: Justin Edelson
> Fix For: Servlets Post 2.1.0
>
>
> curl -F./jcr:mixinTypes=mix:created http://localhost:/test/content/child
> sets the mixin type for /test/content/child if that node exists, but
> curl -F./child/jcr:mixinTypes=mix:created http://localhost:/test/content
> doesn't.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1615) When importing content all the nodes to the parent node must exists, whereas a Sling POST creates the node.

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1615.
--

> When importing content all the nodes to the parent node must exists, whereas 
> a Sling POST creates the node.
> ---
>
> Key: SLING-1615
> URL: https://issues.apache.org/jira/browse/SLING-1615
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Reporter: Ian Boston
>Assignee: Ian Boston
> Fix For: Servlets Post 2.1.0
>
>
> If a POST with a that invokes the import operation is made to a path where 
> the resource does not exist a 404 results.
> But if I do a normal Sling POST the node is created.
> This is inconsistent and requires http clients to make 2 posts where one 
> would have worked.
> Perhaps the Import Operation should check to see of the resource is a 
> NonExstingResource and create the path if not, at about line 88 of 
> ImportOperation ?



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1412) Add support for a @IgnoreBlanks hint

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1412.
--

> Add support for a @IgnoreBlanks hint
> 
>
> Key: SLING-1412
> URL: https://issues.apache.org/jira/browse/SLING-1412
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Reporter: Justin Edelson
>Assignee: Justin Edelson
> Fix For: Servlets Post 2.1.0
>
>
> Given these post parameters:
> ./stringProperty@TypeHint=String[]
> ./stringProperty@IgnoreBlanks=true
> ./stringProperty=foo
> ./stringProperty=bar
> ./stringProperty=
> stringProperty will be set to an array of two values
> ALSO...
> ./stringProperty@IgnoreBlanks=true
> ./stringProperty=
> makes the post sevlet behave as if neither param had been passed. Same thing 
> is true for a mutli-value property if all params are blank:
> ./stringProperty@TypeHint=String[]
> ./stringProperty@IgnoreBlanks=true
> ./stringProperty=
> ./stringProperty=
> ./stringProperty=
> As I mentioned on the dev list, this is really a UI issue, but it seems like 
> something Sling can easily handle.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1796) Make versioning non-default

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1796.
--

> Make versioning non-default
> ---
>
> Key: SLING-1796
> URL: https://issues.apache.org/jira/browse/SLING-1796
> Project: Sling
>  Issue Type: Task
>  Components: Servlets
>Reporter: Felix Meschberger
>Assignee: Felix Meschberger
> Fix For: Servlets Post 2.1.0
>
>
> SLING-1573 introduced support for automatic versioning operations. Such 
> support per-se is a good thing. But this should probably not be the default.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1569) WeakReference hinted properties are created as Reference properties

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1569.
--

> WeakReference hinted properties are created as Reference properties
> ---
>
> Key: SLING-1569
> URL: https://issues.apache.org/jira/browse/SLING-1569
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Reporter: Justin Edelson
>Assignee: Justin Edelson
>Priority: Critical
> Fix For: Servlets Post 2.1.0
>
>
> I think I can do this without making servlets.post depend upon jcr 2



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1333) POST Servlet should handle @TypeHint = Reference and value is a path

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1333.
--

> POST Servlet should handle @TypeHint = Reference and value is a path
> 
>
> Key: SLING-1333
> URL: https://issues.apache.org/jira/browse/SLING-1333
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Reporter: Justin Edelson
>Assignee: Justin Edelson
> Fix For: Servlets Post 2.1.0
>
> Attachments: SLING-1333.patch
>
>
> If
> param = /some/path
> param@TypeHint = Reference
> then
> node.param = UUID of node at /some/path



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1753) sling.js seems very dependent upon being the last script tag on the page

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1753.
--

> sling.js seems very dependent upon being the last script tag on the page
> 
>
> Key: SLING-1753
> URL: https://issues.apache.org/jira/browse/SLING-1753
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Reporter: Justin Edelson
>Assignee: Justin Edelson
> Fix For: Servlets Post 2.1.0
>
>
> need to look at this some more, but I'm pretty sure that unless sling.js is 
> the last script tag, baseurl won't be set correctly.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1504) Enable pluggable node name generation

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1504.
--

> Enable pluggable node name generation
> -
>
> Key: SLING-1504
> URL: https://issues.apache.org/jira/browse/SLING-1504
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Reporter: Justin Edelson
>Assignee: Justin Edelson
> Fix For: Servlets Post 2.1.0
>
>
> Bundles should be able to implement a NodeNameGenerator interface and 
> customize the node name generation logic.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1178) Preserve request parameter order throughout the entire request stack

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1178.
--

> Preserve request parameter order throughout the entire request stack
> 
>
> Key: SLING-1178
> URL: https://issues.apache.org/jira/browse/SLING-1178
> Project: Sling
>  Issue Type: Improvement
>  Components: Engine, Servlets
>Affects Versions: Servlets Post 2.0.4, Engine 2.0.6
>Reporter: Tobias Bocanegra
>Assignee: Felix Meschberger
>Priority: Minor
> Fix For: Servlets Post 2.1.0, Engine 2.1.0
>
> Attachments: ordered_params-r834673.patch
>
>
> When posting a form to the sling post servlet i encountered that the order of 
> the request parameters is not preserved,
> even the browser sends the params according to the submitted form.
> for example the following form:
> 
>
> Address 0: 
>Text 0: 
> Address 1: 
>Text 1: 
> Address 2: 
>Text 2: 
>
> 
> results in:
> deleted("/content/testform/sendTo");
> created("/content/testform/sendTo");
> created("/content/testform/sendTo/2");
> modified("/content/testform/sendTo/2/address");
> modified("/content/testform/sendTo/2/text");
> created("/content/testform/sendTo/1");
> modified("/content/testform/sendTo/1/text");
> created("/content/testform/sendTo/0");
> modified("/content/testform/sendTo/0/text");
> modified("/content/testform/sendTo/0/address");
> modified("/content/testform/sendTo/1/address");
> i first thought it's just the ModifyOperation which uses a HashMap instead of 
> a LinkedHashMap:
>   Map reqProperties = new HashMap RequestProperty>();
> but the params arrive out of order already from the request.getParameterMap().
> i guess the "ParameterMap" needs to extend from LinkedHashMap, too:
> class ParameterMap extends LinkedHashMap ...
> after fixing those 2 classes, the order is correct:
> deleted("/content/testform/sendTo");
> created("/content/testform/sendTo");
> created("/content/testform/sendTo/0");
> modified("/content/testform/sendTo/0/address");
> modified("/content/testform/sendTo/0/text");
> created("/content/testform/sendTo/1");
> modified("/content/testform/sendTo/1/address");
> modified("/content/testform/sendTo/1/text");
> created("/content/testform/sendTo/2");
> modified("/content/testform/sendTo/2/address");
> modified("/content/testform/sendTo/2/text");
> i'll attach the patch



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1281) Copy Move operations dont work.

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1281.
--

> Copy Move operations dont work.
> ---
>
> Key: SLING-1281
> URL: https://issues.apache.org/jira/browse/SLING-1281
> Project: Sling
>  Issue Type: Bug
>Affects Versions: Servlets Post 2.1.0, JCR Jackrabbit Server 2.0.6
>Reporter: Ian Boston
>Assignee: Ian Boston
> Fix For: Servlets Post 2.1.0
>
> Attachments: test-SLING-1281.sh
>
>
> To reproduce: 
> Create 2 content items: 
> * curl -X POST http://localhost:8080/d1 -u admin:admin 
> * curl -X POST http://localhost:8080/d2 -u admin:admin 
> Attempt to copy one item on top of the other: 
> * curl -F ":operation=copy" -F ":dest=d2" http://localhost:8080/d1 -u 
> admin:admin 
> Correctly encounter: 412 "Cannot copy JcrNodeResource, type=nt:unstructured, 
> path=/d1 to /d2: destination exists" 
> Attempt to copy one item on top of the other with :replace set to true: 
> * curl -F ":operation=copy" -F ":dest=d2" -F ":replace=true" 
> http://localhost:8080/d1 -u admin:admin 
> This should now succeed, however, it is returning: 
> 500 javax.jcr.PathNotFoundException: /d2 
> and we know for sure /d2 exists! 
> I think this might be related to changes in the pooling.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1207) Change registration of SlingPostServlet

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1207.
--

> Change registration of SlingPostServlet
> ---
>
> Key: SLING-1207
> URL: https://issues.apache.org/jira/browse/SLING-1207
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Affects Versions: Servlets Post 2.0.4
>Reporter: Felix Meschberger
>Assignee: Felix Meschberger
> Fix For: Servlets Post 2.1.0
>
>
> The SlingPostServlet currently registers with these properties:
> sling.servlet.resourceTypes = "sling/servlet/default"
> sling.servlet.methods = "POST"
> It is probably better to register the SlingPostServlet with the 
> sling.servlet.paths property like this:
> sling.servlet.paths = "sling/servlet/default/POST"



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-649) checkboxes not handled by SlingPostServlet

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-649.
-

> checkboxes not handled by SlingPostServlet
> --
>
> Key: SLING-649
> URL: https://issues.apache.org/jira/browse/SLING-649
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
> Environment: Ubuntu AMD64 FF3
>Reporter: Renaud Richardet
>Assignee: Justin Edelson
>Priority: Minor
> Fix For: Servlets Post 2.1.0
>
> Attachments: SLING-649.patch
>
>
> I am trying to use checkboxes with the SlingPostServlet, as described in 
> http://incubator.apache.org/sling/site/manipulating-content-the-slingpostservlet.html
> 
> 
> 
> 
> 
>...
> 
> 
> All elements work fine, excepte the checkbox: the "checked" node property is 
> always set to false in JCR after a POST. Can anyone confirm?
> I guess it's because the POST request parameters are:
>  width 1234
>  width@TypeHint Long
>  checked on
>  checked@TypeHint Boolean
> So, the passed checkbox parameter is "on" instead of "true" 
> I guess I would have to modify SlingPropertyValueHandler.setPropertyAsIs() to 
> handle "on" values as "true" if @TypeHint is Boolean. Similar to how dates 
> values are handled if @TypeHint = date.
> If it's the right way to go, I will create a patch.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1609) ImportOperation fails on non-default workspace path

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1609.
--

> ImportOperation fails on non-default workspace path
> ---
>
> Key: SLING-1609
> URL: https://issues.apache.org/jira/browse/SLING-1609
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Reporter: Justin Edelson
>Assignee: Justin Edelson
> Fix For: Servlets Post 2.1.0
>
>
> node generation assumes path is in the default workspace



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1091) POST to URL ending in /* with :name and no :nameHint should fail if named node exists

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1091.
--

> POST to URL ending in /* with :name and no :nameHint should fail if named 
> node exists
> -
>
> Key: SLING-1091
> URL: https://issues.apache.org/jira/browse/SLING-1091
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Launchpad Builder 6
> Environment: latest debian, 5.0 lenny?
>Reporter: Peter Chiochetti
>Assignee: Eric Norman
>Priority: Minor
> Fix For: Servlets Post 2.1.0, Launchpad Testing 6
>
>
> The "Algorithm for Node Name Creation" does not behave as documented here: 
> "http://sling.apache.org/site/manipulating-content-the-slingpostservlet-servletspost.html#ManipulatingContent-TheSlingPostServlet(servlets.post)-AlgorithmforNodeNameCreation"
> It adds numbers to nodenames, even though a ":name" form field is supplied, 
> i.e. it performs both steps one and four, while they are said to happen 
> "otherwise".
> Steps to reproduce (this happens also when only the ":name" field gets 
> supplied) - the two last curl commands should make the POST servlet fail:
> curl -F"title=NewNode" http://.../content/N
> ==> Content created /content/N
> curl -F"title=UpdateNode" http://.../content/N
> ==> Content modified /content/N
> curl -F"title=NewNode" -F":nameHint=N" http://.../content/*
> ==> Content created /content/n
> curl -F"title=Bug!" -F":name=N" http://.../content/*
> ==> Content created /content/N_0 
> curl -F":name=N" http://.../content/*
> ==> Content created /content/N_1



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1797) Looking for versionable ancestor may cause failure

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1797.
--

> Looking for versionable ancestor may cause failure
> --
>
> Key: SLING-1797
> URL: https://issues.apache.org/jira/browse/SLING-1797
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Reporter: Felix Meschberger
>Assignee: Felix Meschberger
> Fix For: Servlets Post 2.1.0
>
>
> The AbstractSlingPostOperation.findVersionableAncestor method tries to find a 
> versionable ancestor to the node to be modified during the request by 
> repeatedly calling Item.getParent() until the root or a versionable node is 
> reached.
> If the current request does not have access to an ancestor thus visited an 
> AccessDeniedException is thrown by the getParent() method thus failing the 
> POST request early and probably unrelated to any actually requested operation.
> Fix is to catch the AccessDeniedException and assume no versionable ancestor. 
> If the operation then fails, it will fail due to the actual operation failing 
> possibly because an ancestor which should be checked out.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1619) attempting to automatically set a protected property shouldn't cause a failure

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1619.
--

> attempting to automatically set a protected property shouldn't cause a failure
> --
>
> Key: SLING-1619
> URL: https://issues.apache.org/jira/browse/SLING-1619
> Project: Sling
>  Issue Type: Improvement
>  Components: Servlets
>Reporter: Justin Edelson
>Assignee: Justin Edelson
> Fix For: Servlets Post 2.1.0
>
>
> this:
> curl -u admin:admin "-Fjcr:created=" "-Fjcr:primaryType=sling:Folder" 
> http://localhost:/test/content/folder
> currently returns an error because jcr:created is a protected property in 
> nt:hierarchyNode.
> We should just skip this property



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-1501) JSONResponse doesn't set the status code on the response

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-1501.
--

> JSONResponse doesn't set the status code on the response
> 
>
> Key: SLING-1501
> URL: https://issues.apache.org/jira/browse/SLING-1501
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Servlets Post 2.1.0
>Reporter: Simon Gaeremynck
>Assignee: Vidar S. Ramdal
>  Labels: jsonresponse, sling, statuscode
> Fix For: Servlets Post 2.1.0
>
> Attachments: jsonresponse.patch
>
>
> When  we are doing POST operations we use the Accept header set to 
> application/json so we get a json response back.
> However, when an operation fails for some reason, there is no status code set 
> on the response. (It is defined in the json response itself though).
> This patch should set a status code.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-6864) Service User Mapping: webconsole.configurationFactory.nameHint Property has to be part of OCD

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-6864.
--

> Service User Mapping: webconsole.configurationFactory.nameHint Property has 
> to be part of OCD
> -
>
> Key: SLING-6864
> URL: https://issues.apache.org/jira/browse/SLING-6864
> Project: Sling
>  Issue Type: Bug
>  Components: Extensions
>Affects Versions: Service User Mapper 1.3.0
>Reporter: Stefan Seifert
>Assignee: Stefan Seifert
> Fix For: Service User Mapper 1.3.2
>
>
> via the service property {{webconsole.configurationFactory.nameHint}} a name 
> hint pattern can be defined to produce nice names for factory config items in 
> web console.
> this only works if this property definition is part of the OCD - so when 
> migrating from felix to osgi annotations it has to be part of the 
> configuration annotation class.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-3465) Wrong description for "user.mapping" property of ServiceUserMapperImpl

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-3465.
--

> Wrong description for "user.mapping" property of ServiceUserMapperImpl
> --
>
> Key: SLING-3465
> URL: https://issues.apache.org/jira/browse/SLING-3465
> Project: Sling
>  Issue Type: Bug
>  Components: Service User Mapper
>Affects Versions: Service User Mapper 1.0.0
>Reporter: Tobias Bocanegra
>Assignee: Carsten Ziegeler
>Priority: Minor
> Fix For: Service User Mapper 1.0.4
>
> Attachments: sling-3465-r1579316.patch
>
>
> the description of the "user.mapping" property of the ServiceUserMapperImpl   
> is wrong.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-6397) Error logged by ServiceUserMapperImpl while unregistering an already unregistered service

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-6397.
--

> Error logged by ServiceUserMapperImpl while unregistering an already 
> unregistered service
> -
>
> Key: SLING-6397
> URL: https://issues.apache.org/jira/browse/SLING-6397
> Project: Sling
>  Issue Type: Bug
>  Components: Service User Mapper
>Affects Versions: Service User Mapper 1.2.2
>Reporter: Mohit Arora
>Assignee: Carsten Ziegeler
>Priority: Minor
> Fix For: Service User Mapper 1.2.4
>
>
> On shutdown of AEM, errors like below are logged in error logs - 
> {code}
> *ERROR* [pool-44-thread-1] 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl cannot 
> unregister ServiceUserMapped Mapping 
> [serviceName=com.adobe.cq.social.cq-social-jcr-provider, 
> subServiceName=ugc-writer, userName=communities-ugc-writer]
> java.lang.IllegalStateException: Service already unregistered.
>   at 
> org.apache.felix.framework.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:140)
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.executeServiceRegistrations(ServiceUserMapperImpl.java:315)
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.access$000(ServiceUserMapperImpl.java:77)
>   at 
> org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl$1.run(ServiceUserMapperImpl.java:295)
>   at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
>   at java.util.concurrent.FutureTask.run(Unknown Source)
>   at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
>   at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
>   at java.lang.Thread.run(Unknown Source)
> {code}
> The service has already been rightfully unregistered and hence this is valid 
> condition. So this message should not be logged at *error* level but maybe at 
> *debug* level.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (SLING-7127) slingstart-maven-plugin should respect JAVA_HOME when set

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu resolved SLING-7127.

   Resolution: Duplicate
Fix Version/s: (was: Slingstart Maven Plugin 1.7.10)

> slingstart-maven-plugin should respect JAVA_HOME when set
> -
>
> Key: SLING-7127
> URL: https://issues.apache.org/jira/browse/SLING-7127
> Project: Sling
>  Issue Type: Improvement
>  Components: Maven Plugins and Archetypes
>Reporter: Robert Munteanu
>Assignee: Robert Munteanu
>
> The typical way of configuring a different Java binary to use is by setting 
> the JAVA_HOME environment variable. This allows for instance using a 
> different JVM version than the default one.
> The slingstart-maven-plugin ( in LauncherCallable ) unconditionally uses 
> 'java' as the command name. We should allow for a custom JAVA_HOME to be set.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Resolved] (SLING-7131) Move javaversion-maven-plugin to attic

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu resolved SLING-7131.

Resolution: Done

> Move javaversion-maven-plugin to attic
> --
>
> Key: SLING-7131
> URL: https://issues.apache.org/jira/browse/SLING-7131
> Project: Sling
>  Issue Type: Task
>Reporter: Konrad Windszus
>Assignee: Robert Munteanu
>
> With SLING-7129 the {{javaversion-maven-plugin}} is no longer in use. We 
> should move it to the attic.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-6091) Make dependency on jackrabbit-jcr-rmi as optional in jcr base

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-6091.
--

> Make dependency on jackrabbit-jcr-rmi as optional in jcr base
> -
>
> Key: SLING-6091
> URL: https://issues.apache.org/jira/browse/SLING-6091
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR
>Reporter: Chetan Mehrotra
>Assignee: Chetan Mehrotra
>Priority: Minor
> Fix For: JCR Base 2.4.2
>
>
> Currently {{org.apache.sling.jcr.base}} has a required dependency on 
> {{jackrabbit-jcr-rmi}}. The rmi usage is only for util class 
> {{RepositoryAccessor}} and is an optional feature.
> We should mark this dependency as optional so as to allow usage of this 
> bundle in setups where the {{jackrabbit-jcr-rmi}} is not present



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-5135) Whitelist legit usages of loginAdministrative and administrative ResourceResolver

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-5135.
--

> Whitelist legit usages of loginAdministrative and administrative 
> ResourceResolver
> -
>
> Key: SLING-5135
> URL: https://issues.apache.org/jira/browse/SLING-5135
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Reporter: Antonio Sanso
>Assignee: Julian Sedding
> Fix For: JCR Base 2.4.2
>
> Attachments: SLING-5135.patch, SLING-5135.patch
>
>
> {{AbstractSlingRepositoryManager}} contains a method that disable 
> loginAdministrative support
> {code}
> /**
>  * Returns whether to disable the
>  * {@code SlingRepository.loginAdministrative} method or not.
>  *
>  * @return {@code true} if {@code SlingRepository.loginAdministrative} is
>  * disabled.
>  */
> public final boolean isDisableLoginAdministrative() 
> {code}
> This is a global configuration. It would be nice to have an extension of such 
> mechanism that contains a white list of (few) legit usage of 
> {{loginAdministrative}}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-6263) Dependency problem between RepositoryInitializer and AbstractSlingRepositoryManager

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-6263.
--

> Dependency problem between RepositoryInitializer and 
> AbstractSlingRepositoryManager
> ---
>
> Key: SLING-6263
> URL: https://issues.apache.org/jira/browse/SLING-6263
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>Priority: Blocker
> Fix For: JCR Base 2.4.2
>
>
> As we can currently see on our Jenkins:
> https://builds.apache.org/job/sling-launchpad-builder-1.8/lastSuccessfulBuild/artifact/target/_-32861/sling/logs/error.log
> there is a dependency problem with the repository and repoinit.
> When the repository is started, there is no RepositoryInitializer
> service and the repository starts up fine. When the
> RepositoryInitializer arrives later it is completely ignored.
> I'm not 100% sure how to fix this, easiest fix would be to make a
> RepositoryInitializer required, but then this would mean only one of
> them is required.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-6269) DynamicClassLoaderIT fails when the org.apache.sling.commons.osgi:2.1.0 Maven artifact is not available locally

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-6269.
--

> DynamicClassLoaderIT fails when the org.apache.sling.commons.osgi:2.1.0 Maven 
> artifact is not available locally
> ---
>
> Key: SLING-6269
> URL: https://issues.apache.org/jira/browse/SLING-6269
> Project: Sling
>  Issue Type: Bug
>  Components: Commons
>Reporter: Robert Munteanu
>Assignee: Robert Munteanu
>  Labels: sling-IT
> Fix For: Commons ClassLoader 1.3.8
>
>
> The following code snippet tries to load the OSGi bundle from the filesystem
> {code}
> final URL url = new URL(mavenBundle("org.apache.sling", 
> "org.apache.sling.commons.osgi", "2.1.0").getURL());
> final InputStream is = url.openStream();
> Bundle osgiBundle = null;
> try {
> osgiBundle = 
> this.bundleContext.installBundle(url.toExternalForm(), is);
> } finally {
> try { is.close(); } catch ( final IOException ignore) {}
> }
> assertNotNull(osgiBundle);
> assertEquals(Bundle.INSTALLED, osgiBundle.getState());
> {code}
> Even though it's wrapped in a {{mavenBundle}} call, the bundle is not 
> actually downloaded, so if the bundle is not available locally the test will 
> fail.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-6449) Remove unused Executor service reference

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-6449.
--

> Remove unused Executor service reference
> 
>
> Key: SLING-6449
> URL: https://issues.apache.org/jira/browse/SLING-6449
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR
>Affects Versions: JCR Resource 2.9.2
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: JCR Resource 3.0.0
>
>
> The JcrResourceProvider has an unused, optional service reference to an 
> executor service. This can be removed



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-5983) Remove deprecated jcr resource API

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-5983.
--

> Remove deprecated jcr resource API
> --
>
> Key: SLING-5983
> URL: https://issues.apache.org/jira/browse/SLING-5983
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR
>Reporter: Carsten Ziegeler
>Assignee: Karl Pauls
> Fix For: JCR Resource 3.0.0
>
> Attachments: SLING-5983.patch
>
>
> The jcr resource API has been deprecated for some time and not used anymore 
> in our codebase, we should now remove it from the jcr resource bundle
> We should also remove the deprecated PathMapper



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-6498) DavEx: Login fails

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-6498.
--

> DavEx: Login fails
> --
>
> Key: SLING-6498
> URL: https://issues.apache.org/jira/browse/SLING-6498
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
> Environment: Apache Karaf 4.1.0-SNAPSHOT
> Sling Launchpad 9-SNAPSHOT
>Reporter: Oliver Lietz
>Assignee: Robert Munteanu
> Fix For: JCR Davex 1.3.8
>
>
> {noformat}
> 2017-01-30T09:36:20,104 | DEBUG | qtp970611410-129 | HttpChannel  
> | 72 - org.eclipse.jetty.util - 9.3.15.v20161220 | REQUEST for 
> //localhost:8181/server/ on 
> HttpChannelOverHttp@381fd32f{r=1,c=false,a=IDLE,uri=//localhost:8181/server/}
> OPTIONS //localhost:8181/server/ HTTP/1.1
> User-Agent: Transmit/4.4.10 neon/0.29.3
> Keep-Alive: 
> Connection: TE, Keep-Alive
> TE: trailers
> Host: localhost:8181
> 2017-01-30T09:36:20,104 | DEBUG | qtp970611410-129 | HttpChannel  
> | 72 - org.eclipse.jetty.util - 9.3.15.v20161220 | 
> HttpChannelOverHttp@381fd32f{r=1,c=false,a=IDLE,uri=//localhost:8181/server/} 
> onRequestComplete
> 2017-01-30T09:36:20,104 | DEBUG | qtp970611410-129 | HttpInput
> | 72 - org.eclipse.jetty.util - 9.3.15.v20161220 | 
> HttpInputOverHTTP@cf04085[c=0,q=1,[0]=EOF,s=STREAM] addContent EOF
> 2017-01-30T09:36:20,104 | DEBUG | qtp970611410-129 | HttpConnection   
> | 72 - org.eclipse.jetty.util - 9.3.15.v20161220 | 
> HttpConnection@be8ba01[SelectChannelEndPoint@4bbe2802{/127.0.0.1:58514<->8181,Open,in,out,-,-,4/3,HttpConnection@be8ba01}{io=0/0,kio=0,kro=1}][p=HttpParser{s=END,0
>  of 
> 0},g=HttpGenerator@312c6d46{s=START},c=HttpChannelOverHttp@381fd32f{r=1,c=false,a=IDLE,uri=//localhost:8181/server/}]
>  parsed true HttpParser{s=END,0 of 0}
> 2017-01-30T09:36:20,104 | DEBUG | qtp970611410-129 | HttpConnection   
> | 72 - org.eclipse.jetty.util - 9.3.15.v20161220 | 
> releaseRequestBuffer 
> HttpConnection@be8ba01[SelectChannelEndPoint@4bbe2802{/127.0.0.1:58514<->8181,Open,in,out,-,-,4/3,HttpConnection@be8ba01}{io=0/0,kio=0,kro=1}][p=HttpParser{s=END,0
>  of 
> 0},g=HttpGenerator@312c6d46{s=START},c=HttpChannelOverHttp@381fd32f{r=1,c=false,a=IDLE,uri=//localhost:8181/server/}]
> 2017-01-30T09:36:20,104 | DEBUG | qtp970611410-129 | HttpChannel  
> | 72 - org.eclipse.jetty.util - 9.3.15.v20161220 | 
> HttpChannelOverHttp@381fd32f{r=1,c=false,a=IDLE,uri=//localhost:8181/server/} 
> handle //localhost:8181/server/ 
> 2017-01-30T09:36:20,105 | DEBUG | qtp970611410-129 | HttpChannelState 
> | 72 - org.eclipse.jetty.util - 9.3.15.v20161220 | 
> HttpChannelState@165f70b7{s=IDLE a=NOT_ASYNC i=true r=!P!U w=false} handling 
> IDLE
> 2017-01-30T09:36:20,105 | DEBUG | qtp970611410-129 | HttpChannel  
> | 72 - org.eclipse.jetty.util - 9.3.15.v20161220 | 
> HttpChannelOverHttp@381fd32f{r=1,c=false,a=DISPATCHED,uri=//localhost:8181/server/}
>  action DISPATCH
> 2017-01-30T09:36:20,105 | DEBUG | qtp970611410-129 | Server   
> | 72 - org.eclipse.jetty.util - 9.3.15.v20161220 | REQUEST OPTIONS 
> /server/ on 
> HttpChannelOverHttp@381fd32f{r=1,c=false,a=DISPATCHED,uri=//localhost:8181/server/}
> 2017-01-30T09:36:20,105 | DEBUG | qtp970611410-129 | ServerModel  
> | 91 - org.ops4j.pax.web.pax-web-spi - 6.0.2 | Matching [/server/]...
> 2017-01-30T09:36:20,105 | DEBUG | qtp970611410-129 | ServerModel  
> | 91 - org.ops4j.pax.web.pax-web-spi - 6.0.2 | Path [/server/] 
> matched to 
> {pattern=/server/.*,model=ServletModel{id=org.ops4j.pax.web.service.spi.model.ServletModel-52,name=org.ops4j.pax.web.service.spi.model.ServletModel-52,urlPatterns=[/server/*],alias=null,servlet=org.apache.sling.jcr.davex.impl.servlets.SlingDavExServlet@736cbf61,initParams={csrf-protection=disabled,
>  createAbsoluteURI=true, 
> resource-path-prefix=/server},context=ContextModel{id=org.ops4j.pax.web.service.spi.model.ContextModel-47,name=,httpContext=org.ops4j.pax.web.extender.whiteboard.internal.WebApplication$1@2b9e3a45,contextParams={httpContext.shared=true,
>  webapp.context=},virtualHosts={},connectors={
> 2017-01-30T09:36:20,105 | DEBUG | qtp970611410-129 | ContextHandler   
> | 72 - org.eclipse.jetty.util - 9.3.15.v20161220 | scope 
> null||/server/ @ 
> HttpServiceContext{httpContext=org.ops4j.pax.web.extender.whiteboard.internal.WebApplication$1@2b9e3a45}
> 2017-01-30T09:36:20,105 | DEBUG | qtp970611410-129 | ContextHandler   
> | 72 - org.eclipse.jetty.util - 9.3.15.v20161220 | context=||/server/ 
> @ 
> HttpServiceContext{httpContext=org.ops4j.pax.web.extender.whiteboard.internal.WebApplication$1@2b9e3a45}
> 

[jira] [Closed] (SLING-6378) Unclosed ResourceResolver in davex AuthHttpContext

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-6378.
--

> Unclosed ResourceResolver in davex AuthHttpContext
> --
>
> Key: SLING-6378
> URL: https://issues.apache.org/jira/browse/SLING-6378
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Affects Versions: JCR Davex 1.3.4
>Reporter: Julian Sedding
>Assignee: Felix Meschberger
> Fix For: JCR Davex 1.3.8
>
>
> The changes in SLING-6375 reveal an unclosed ResourceResolver in 
> {{org.apache.sling.jcr.davex.impl.servlets.AuthHttpContext}}. The 
> {{AuthHttpContext}} delegates to {{SlingAuthenticator}} to open the RR. 
> However, {{SlingAuthenticator}} relies on 
> {{ServletRequestListener##requestDestroyed}} to be called in order to close 
> the RR. It seems that this does not happen in this case, as 
> {{SlingAuthenticator}} is called directly in this case.
> {noformat}
> 08.12.2016 14:43:19.385 *INFO* [Apache Sling Resource Resolver Finalizer 
> Thread] 
> org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl 
> Unclosed ResourceResolver was created here: 
> java.lang.Exception: null
> at 
> org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl$ResolverReference.(CommonResourceResolverFactoryImpl.java:466)
> at 
> org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl.register(CommonResourceResolverFactoryImpl.java:200)
> at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.(ResourceResolverImpl.java:117)
> at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.(ResourceResolverImpl.java:110)
> at 
> org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl.getResourceResolverInternal(CommonResourceResolverFactoryImpl.java:245)
> at 
> org.apache.sling.resourceresolver.impl.CommonResourceResolverFactoryImpl.getResourceResolver(CommonResourceResolverFactoryImpl.java:155)
> at 
> org.apache.sling.resourceresolver.impl.ResourceResolverFactoryImpl.getResourceResolver(ResourceResolverFactoryImpl.java:101)
> at 
> org.apache.sling.auth.core.impl.SlingAuthenticator.getAnonymousResolver(SlingAuthenticator.java:869)
> at 
> org.apache.sling.auth.core.impl.SlingAuthenticator.doHandleSecurity(SlingAuthenticator.java:500)
> at 
> org.apache.sling.auth.core.impl.SlingAuthenticator.handleSecurity(SlingAuthenticator.java:459)
> at 
> org.apache.sling.jcr.davex.impl.servlets.AuthHttpContext.handleSecurity(AuthHttpContext.java:85)
> at 
> org.apache.felix.http.base.internal.service.ServletContextImpl.handleSecurity(ServletContextImpl.java:421)
> at 
> org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:57)
> at 
> org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:128)
> at 
> org.apache.felix.http.base.internal.dispatch.DispatcherServlet.service(DispatcherServlet.java:49)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
> at 
> org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:845)
> at 
> org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)
> at 
> org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:224)
> at 
> org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)
> at 
> org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:511)
> at 
> org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
> at 
> org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)
> at 
> org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at 
> org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)
> at 
> org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)
> at org.eclipse.jetty.server.Server.handle(Server.java:523)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)
> at 
> org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)
> at 
> org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
> at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
> at 
> org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
> at 
> org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
> at 
> 

[jira] [Closed] (SLING-6499) SlingDavExServlet protectedhandlers-config parameter not propagated to ServletConfig

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-6499.
--

> SlingDavExServlet protectedhandlers-config parameter not propagated to 
> ServletConfig
> 
>
> Key: SLING-6499
> URL: https://issues.apache.org/jira/browse/SLING-6499
> Project: Sling
>  Issue Type: Bug
>  Components: JCR
>Reporter: Robert Munteanu
>Assignee: Robert Munteanu
>Priority: Critical
> Fix For: JCR Davex 1.3.8
>
>
> I've noticed while testing the new 1.3.6 release that a warning is logged 
> when starting up the Launchpad:
> {noformat}30.01.2017 18:14:04.829 *WARN* [Apache Sling Repository Startup 
> Thread] org.apache.jackrabbit.server.remoting.davex.ProtectedRemoveManager 
> protectedhandlers-config is missing -> DIFF processing can fail for the 
> Remove operation if the content toremove is protected!{noformat}
> Tracing back the code, I see that the service registration parameters are 
> properly added in {{SlingDavExServlet.activate}}:
> {noformat}initProps = {servlet.init.csrf-protection=disabled, 
> servlet.init.resource-path-prefix=/crx/server, service.vendor=The Apache 
> Software Foundation, sling.auth.requirements=-/crx/server, 
> protectedhandlers-config=org.apache.jackrabbit.server.remoting.davex.AclRemoveHandler,
>  osgi.http.whiteboard.servlet.pattern=/crx/server/*, 
> servlet.init.createAbsoluteURI=true, service.description=Sling JcrRemoting 
> Servlet, 
> osgi.http.whiteboard.context.select=(osgi.http.whiteboard.context.name=DavExAuthHttpContext)}{noformat}
> but they are not propagated to {{JcrRemotingServlet.init}}
> {noformat}config = 
> org.apache.felix.http.base.internal.handler.ServletConfigImpl@3a275518
> {
>   context = 
> org.apache.felix.http.base.internal.whiteboard.PerBundleServletContextImpl@1107e18,
>   initParams = {csrf-protection=disabled, createAbsoluteURI=true, 
> resource-path-prefix=/crx/server}
>   name = org.apache.sling.jcr.davex.impl.servlets.SlingDavExServlet
> }
> {noformat}
> This reverting the fix for SLING-6378 solves the issue, but I'd like to not 
> revert that and instead find the root cause.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-5832) Update Jackrabbit to 2.12.2

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-5832.
--

> Update Jackrabbit to 2.12.2
> ---
>
> Key: SLING-5832
> URL: https://issues.apache.org/jira/browse/SLING-5832
> Project: Sling
>  Issue Type: Task
>  Components: JCR, Karaf, Launchpad, Testing
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
> Fix For: Commons Testing 2.0.26, Karaf Features 0.2.0, Karaf 
> Integration Tests 0.2.0, Launchpad Builder 9, JCR Davex 1.3.8, JCR Webdav 
> 2.3.8
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


[jira] [Closed] (SLING-6706) Migrate to R6 annotations, clean up dependencies

2017-09-20 Thread Robert Munteanu (JIRA)

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

Robert Munteanu closed SLING-6706.
--

> Migrate to R6 annotations, clean up dependencies
> 
>
> Key: SLING-6706
> URL: https://issues.apache.org/jira/browse/SLING-6706
> Project: Sling
>  Issue Type: Improvement
>  Components: Engine
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
> Fix For: Engine 2.6.8
>
>




--
This message was sent by Atlassian JIRA
(v6.4.14#64029)


<    1   2   3   4   5   >