[jira] [Commented] (SLING-10000) Switch to Jakarta APIs

2021-05-10 Thread Eric Norman (Jira)


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

Eric Norman commented on SLING-1:
-

Requires an update to the org.apache.felix.http.jetty bundle.

Jetty 11.x is the release that switched to the JakartaEE namespaces, but 
o.a.f.http.jetty is still using the 9.x release of jetty.

> Switch to Jakarta APIs
> --
>
> Key: SLING-1
> URL: https://issues.apache.org/jira/browse/SLING-1
> Project: Sling
>  Issue Type: Task
>  Components: API
>Reporter: Oliver Lietz
>Priority: Major
>
> Java EE APIs are switching from {{javax}} to {{jakarta}}.
> Jakarta Specifications: [https://jakarta.ee/specifications/]
> *Candidates*
>  * {{javax.activation}}
>  * {{javax.servlet}}
>  * {{javax.mail}}
> *Discovery*
>  * Should we have branch {{jakarta}} in each module which needs to switch?
>  * Should we use the breaking change (major version increase in most APIs) to 
> clean up and improve our current API or limit it to the package switch?
> *Tooling*
>  * [Eclipse Transformer|https://github.com/eclipse/transformer]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-10366) Adjust HTTP status codes for SlingPostServlet integration tests

2021-05-10 Thread Eric Norman (Jira)


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

Eric Norman commented on SLING-10366:
-

[~olli] Thanks!  It looks like the sling-org-apache-sling-launchpad-testing 
tests are back to successful now.

> Adjust HTTP status codes for SlingPostServlet integration tests
> ---
>
> Key: SLING-10366
> URL: https://issues.apache.org/jira/browse/SLING-10366
> Project: Sling
>  Issue Type: Task
>  Components: Servlets, Testing
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Minor
> Fix For: Launchpad Integration Tests 12
>
>
> Failures caused by {{org.apache.sling.servlets.post}} {{2.4.3-SNAPSHOT}}:
> {noformat}
> [ERROR] Failures: 
> [ERROR]   
> PostServletAtCopyTest.testCopyAncestor:232->HttpTestBase.assertPostStatus:412 
> Expecting status 500 expected:<500> but was:<409>
> [ERROR]   
> PostServletCopyTest.testCopyAncestor:619->HttpTestBase.assertPostStatus:412 
> Expecting status 500 expected:<500> but was:<409>
> [ERROR]   
> PostServletCreateTest.testCreateNodeWithInvalidExactName:196->HttpTestBase.assertPostStatus:410
>  expected:<500> but was:<409>
> [ERROR]   
> PostServletCreateTest.testCreatingNodeUnderFile:255->HttpTestBase.assertPostStatus:412
>  Response to creating a child under nt:file should fail. expected:<500> but 
> was:<409>
> [ERROR]   
> PostServletImportTest.testImportAutoCheckoutNodes:326->HttpTestBase.assertPostStatus:412
>  Expected error from VersionException expected:<500> but was:<409>
> [ERROR]   
> PostServletImportTest.testImportNodeWithInvalidExactName:765->HttpTestBase.assertPostStatus:410
>  expected:<500> but was:<409>
> [INFO] 
> [ERROR] Tests run: 665, Failures: 6, Errors: 0, Skipped: 1
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[Jenkins] Sling » Modules » sling-org-apache-sling-launchpad-testing » master #465 is FIXED

2021-05-10 Thread Apache Jenkins Server
Please see 
https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-launchpad-testing/job/master/465/
 for details.

No further emails will be sent until the status of the build is changed.

[jira] [Reopened] (SLING-10366) Adjust HTTP status codes for SlingPostServlet integration tests

2021-05-10 Thread Oliver Lietz (Jira)


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

Oliver Lietz reopened SLING-10366:
--

* 
[https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-launchpad-testing/job/master/]
 * 
[https://ci-builds.apache.org/job/Sling/job/modules/job/sling-org-apache-sling-karaf-launchpad-oak-tar-integration-tests/job/master/]

> Adjust HTTP status codes for SlingPostServlet integration tests
> ---
>
> Key: SLING-10366
> URL: https://issues.apache.org/jira/browse/SLING-10366
> Project: Sling
>  Issue Type: Task
>  Components: Servlets, Testing
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Minor
> Fix For: Launchpad Integration Tests 12
>
>
> Failures caused by {{org.apache.sling.servlets.post}} {{2.4.3-SNAPSHOT}}:
> {noformat}
> [ERROR] Failures: 
> [ERROR]   
> PostServletAtCopyTest.testCopyAncestor:232->HttpTestBase.assertPostStatus:412 
> Expecting status 500 expected:<500> but was:<409>
> [ERROR]   
> PostServletCopyTest.testCopyAncestor:619->HttpTestBase.assertPostStatus:412 
> Expecting status 500 expected:<500> but was:<409>
> [ERROR]   
> PostServletCreateTest.testCreateNodeWithInvalidExactName:196->HttpTestBase.assertPostStatus:410
>  expected:<500> but was:<409>
> [ERROR]   
> PostServletCreateTest.testCreatingNodeUnderFile:255->HttpTestBase.assertPostStatus:412
>  Response to creating a child under nt:file should fail. expected:<500> but 
> was:<409>
> [ERROR]   
> PostServletImportTest.testImportAutoCheckoutNodes:326->HttpTestBase.assertPostStatus:412
>  Expected error from VersionException expected:<500> but was:<409>
> [ERROR]   
> PostServletImportTest.testImportNodeWithInvalidExactName:765->HttpTestBase.assertPostStatus:410
>  expected:<500> but was:<409>
> [INFO] 
> [ERROR] Tests run: 665, Failures: 6, Errors: 0, Skipped: 1
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-10366) Adjust HTTP status codes for SlingPostServlet integration tests

2021-05-10 Thread Oliver Lietz (Jira)


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

Oliver Lietz commented on SLING-10366:
--

[~enorman], Sure! I already had a quick chat with [~joerghoh] to create a new 
release soon. In the meantime I moved the changes to branch 
[SLING-10366|https://github.com/apache/sling-org-apache-sling-launchpad-integration-tests/tree/SLING-10366].

> Adjust HTTP status codes for SlingPostServlet integration tests
> ---
>
> Key: SLING-10366
> URL: https://issues.apache.org/jira/browse/SLING-10366
> Project: Sling
>  Issue Type: Task
>  Components: Servlets, Testing
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Minor
> Fix For: Launchpad Integration Tests 12
>
>
> Failures caused by {{org.apache.sling.servlets.post}} {{2.4.3-SNAPSHOT}}:
> {noformat}
> [ERROR] Failures: 
> [ERROR]   
> PostServletAtCopyTest.testCopyAncestor:232->HttpTestBase.assertPostStatus:412 
> Expecting status 500 expected:<500> but was:<409>
> [ERROR]   
> PostServletCopyTest.testCopyAncestor:619->HttpTestBase.assertPostStatus:412 
> Expecting status 500 expected:<500> but was:<409>
> [ERROR]   
> PostServletCreateTest.testCreateNodeWithInvalidExactName:196->HttpTestBase.assertPostStatus:410
>  expected:<500> but was:<409>
> [ERROR]   
> PostServletCreateTest.testCreatingNodeUnderFile:255->HttpTestBase.assertPostStatus:412
>  Response to creating a child under nt:file should fail. expected:<500> but 
> was:<409>
> [ERROR]   
> PostServletImportTest.testImportAutoCheckoutNodes:326->HttpTestBase.assertPostStatus:412
>  Expected error from VersionException expected:<500> but was:<409>
> [ERROR]   
> PostServletImportTest.testImportNodeWithInvalidExactName:765->HttpTestBase.assertPostStatus:410
>  expected:<500> but was:<409>
> [INFO] 
> [ERROR] Tests run: 665, Failures: 6, Errors: 0, Skipped: 1
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-10366) Adjust HTTP status codes for SlingPostServlet integration tests

2021-05-10 Thread Eric Norman (Jira)


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

Eric Norman commented on SLING-10366:
-

[~olli] Can we rollback this revision until there is a released version of 
org.apache.sling.servlets.post that functions with these changes and the 
starter is updated to use that released version?  I believe what you are seeing 
are caused by the changes for SLING-10087 

Your updates don't work with the org.apache.sling.servlets.post version 2.4.2 
that is currently used by the starter project.

> Adjust HTTP status codes for SlingPostServlet integration tests
> ---
>
> Key: SLING-10366
> URL: https://issues.apache.org/jira/browse/SLING-10366
> Project: Sling
>  Issue Type: Task
>  Components: Servlets, Testing
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Minor
> Fix For: Launchpad Integration Tests 12
>
>
> Failures caused by {{org.apache.sling.servlets.post}} {{2.4.3-SNAPSHOT}}:
> {noformat}
> [ERROR] Failures: 
> [ERROR]   
> PostServletAtCopyTest.testCopyAncestor:232->HttpTestBase.assertPostStatus:412 
> Expecting status 500 expected:<500> but was:<409>
> [ERROR]   
> PostServletCopyTest.testCopyAncestor:619->HttpTestBase.assertPostStatus:412 
> Expecting status 500 expected:<500> but was:<409>
> [ERROR]   
> PostServletCreateTest.testCreateNodeWithInvalidExactName:196->HttpTestBase.assertPostStatus:410
>  expected:<500> but was:<409>
> [ERROR]   
> PostServletCreateTest.testCreatingNodeUnderFile:255->HttpTestBase.assertPostStatus:412
>  Response to creating a child under nt:file should fail. expected:<500> but 
> was:<409>
> [ERROR]   
> PostServletImportTest.testImportAutoCheckoutNodes:326->HttpTestBase.assertPostStatus:412
>  Expected error from VersionException expected:<500> but was:<409>
> [ERROR]   
> PostServletImportTest.testImportNodeWithInvalidExactName:765->HttpTestBase.assertPostStatus:410
>  expected:<500> but was:<409>
> [INFO] 
> [ERROR] Tests run: 665, Failures: 6, Errors: 0, Skipped: 1
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[Jenkins] Sling » Modules » sling-org-apache-sling-launchpad-testing » master #463 is BROKEN

2021-05-10 Thread Apache Jenkins Server
=org.apache.sling.launchpad.testservices.servlets.R6WhiteboardServlet,
 objectClass=[javax.servlet.Servlet], 
osgi.http.whiteboard.context.select=(osgi.http.whiteboard.context.name=org.apache.sling),
 osgi.http.whiteboard.servlet.pattern=/whiteboard_r6, service.bundleid=38, 
service.id=78, 
service.pid=org.apache.sling.launchpad.testservices.servlets.R6WhiteboardServlet,
 service.scope=bundle, service.vendor=The Apache Software Foundation}] Ignoring 
unmatching Servlet service
[INFO] Apachde Felix Http Whiteboard Service stopped
[INFO] Stopped Jetty.
[INFO] 
[INFO] --- ianal-maven-plugin:1.0-alpha-1:verify-legal-files (default) @ 
org.apache.sling.launchpad.testing ---
[INFO] Checking legal files in: 
org.apache.sling.launchpad.testing-12-SNAPSHOT.jar
[INFO] Checking legal files in: 
org.apache.sling.launchpad.testing-12-SNAPSHOT-sources.jar
[INFO] 
[INFO] --- apache-rat-plugin:0.11:check (default) @ 
org.apache.sling.launchpad.testing ---
[INFO] 51 implicit excludes (use -debug for more details).
[INFO] Exclude: DEPENDENCIES
[INFO] Exclude: src/main/appended-resources/META-INF/*
[INFO] Exclude: velocity.log
[INFO] Exclude: target/*
[INFO] Exclude: README.md
[INFO] Exclude: maven-eclipse.xml
[INFO] Exclude: .*
[INFO] Exclude: .*/**
[INFO] Exclude: **/*.json
[INFO] Exclude: DEPENDENCIES
[INFO] Exclude: **/*.rej
[INFO] Exclude: hs_err_*.log
[INFO] Exclude: **/repository/index/*/index-details.txt
[INFO] Exclude: bnd.bnd
[INFO] 6 resources included (use -debug for more details)
[INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 
approved: 5 licence.
[INFO] 
[INFO] --- maven-failsafe-plugin:2.21.0:verify (default) @ 
org.apache.sling.launchpad.testing ---
[INFO] 
[INFO] BUILD FAILURE
[INFO] 
[INFO] Total time:  03:18 min
[INFO] Finished at: 2021-05-10T17:51:51Z
[INFO] 
[WARNING] The requested profile "ci" could not be activated because it does not 
exist.
[INFO] [jenkins-event-spy] Generated 
/home/jenkins/workspace/e-sling-launchpad-testing_master@tmp/withMavenfb1564e4/maven-spy-20210510-174832-1118456784967562601517.log
[ERROR] Failed to execute goal 
org.apache.maven.plugins:maven-failsafe-plugin:2.21.0:verify (default) on 
project org.apache.sling.launchpad.testing: There are test failures.
[ERROR] 
[ERROR] Please refer to 
/home/jenkins/workspace/e-sling-launchpad-testing_master/target/failsafe-reports
 for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date]-jvmRun[N].dump, 
[date].dumpstream and [date]-jvmRun[N].dumpstream.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please 
read the following articles:
[ERROR] [Help 1] 
http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
[Pipeline] }
[withMaven] junitPublisher - Archive test results for Maven artifact 
org.apache.sling:org.apache.sling.launchpad.testing:jar:12-SNAPSHOT generated 
by maven-surefire-plugin:test (default-test): target/surefire-reports/*.xml
Recording test results
None of the test reports contained any result
[withMaven] junitPublisher - Archive test results for Maven artifact 
org.apache.sling:org.apache.sling.launchpad.testing:jar:12-SNAPSHOT generated 
by maven-failsafe-plugin:integration-test (default): 
target/failsafe-reports/*.xml
Recording test results
[DevOpticsMavenPublisher] dependencies consumed: 93, artifacts produced: 0
[withMaven] Publishers: Pipeline Graph Publisher: 1 ms, Generated Artifacts 
Publisher: 518 ms, Junit Publisher: 82078 ms, Dependencies Fingerprint 
Publisher: 695 ms, Open Task Scanner Publisher: 341 ms, CloudBees DevOptics 
Gate Artifact Publisher: 33396 ms
[Pipeline] // withMaven
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // timeout
[Pipeline] stage
[Pipeline] { (Notifications)
[Pipeline] echo
Status change is BROKEN, notifications will be sent.
[Pipeline] emailext

[jira] [Updated] (SLING-10362) Sling Starter: trouble when installing packages containing install hooks with OSGi installer

2021-05-10 Thread Konrad Windszus (Jira)


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

Konrad Windszus updated SLING-10362:

Fix Version/s: Starter 12

> Sling Starter: trouble when installing packages containing install hooks with 
> OSGi installer
> 
>
> Key: SLING-10362
> URL: https://issues.apache.org/jira/browse/SLING-10362
> Project: Sling
>  Issue Type: Improvement
>  Components: Starter
>Affects Versions: Starter 12
> Environment:  Sling-Starter 12-SNAPSHOT (commit 0e6a8e41) with JDK 11 
> on MacOS
>Reporter: Hans-Peter Stoerr
>Assignee: Konrad Windszus
>Priority: Minor
> Fix For: Starter 12
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> I'm trying to install some packages into a snapshot of the Starter 12 using 
> the Sling [fileinstaller 
> provider|https://sling.apache.org/documentation/bundles/file-installer-provider.html],
>  which works somewhat but not properly when the package has a setup hook.
> It seems that the packages are internally transformed by the [Content Package 
> Installer 
> Factory|https://sling.apache.org/documentation/bundles/content-package-installer-factory.html],
>  but too early - the packages are unpacked before the repository was properly 
> set up. See the stacktrace below: the package was likely installed when the 
> user 'sling-package-install' wasn't properly set up in the repository yet.
> As workaround I currently set the start level of the 
> org.apache.sling.installer.factory.packages to 21 - a bit later than all the 
> other bundles. That makes the problem disappear. This might be a possibility 
> for the Sling Starter 12, too, but I'm not sure whether it is the right 
> option. Possibly the fileinstaller provider needs more dependencies from some 
> bundles to make sure it's started late enough. Another way would be to give 
> the Sling fileinstaller provider some additional options like the 
> felix.fileinstall.active.level of [Felix File 
> Install|https://felix.apache.org/documentation/subprojects/apache-felix-file-install.html].
>  Or the [run mode 
> support|https://sling.apache.org/documentation/bundles/file-installer-provider.html#run-mode-support-1]
>  of the Sling file installer should be made to work somehow with packages, so 
> that the packages are only installed when the run mode specified in the path 
> is reached. That would be even better, since for packages you often have to 
> specify an order as well, and that would be another option than package 
> dependencies.
> To reproduce the bug you can check out Sling Starter 12 and execute the 
> following commands:
> {code}
> cd target/
>  mkdir fileinstall
>  wget 
> [https://repo1.maven.org/maven2/com/composum/nodes/composum-nodes-sling-package/2.6.1/composum-nodes-sling-package-2.6.1.zip]
>  mv composum-nodes-sling-package-2.6.1.zip fileinstall/
>  java -jar dependency/org.apache.sling.feature.launcher.jar -f 
> org.apache.sling.starter-12-SNAPSHOT-oak_tar_far.far -D 
> felix.startlevel.bundle=30 -D sling.fileinstall.dir=fileinstall/
> {code}
> In the log you get the following stacktrace in the log:
> {code}
> 07.05.2021 16:42:44.945 *INFO* [Apache Sling Repository Startup Thread #1|#1] 
> org.apache.sling.installer.provider.jcr.impl.RootFolderListener Watching 
> /apps to detect potential changes in 
> subfoldersault.packaging.PackageException: Package extraction requires admin 
> session as it has a hook (userid 'sling-package-install' not allowed).
>  at 
> org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.checkAllowanceToInstallPackage(ZipVaultPackage.java:226)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.prepareExtract(ZipVaultPackage.java:199)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:389)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:356)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:342)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.sling.installer.factory.packages.impl.PackageTransformer$InstallPackageTask.doExecute(PackageTransformer.java:337)
>  [org.apache.sling.installer.factory.packages:1.0.4]
>  at 
> org.apache.sling.installer.factory.packages.impl.PackageTransformer$AbstractPackageInstallTask.execute(PackageTransformer.java:269)
>  [org.apache.sling.installer.factory.packages:1.0.4]
>  at 
> org.apache.sling.installer.core.impl.OsgiInstallerImpl.doExecuteTasks(OsgiInstallerImpl.java:918)
>  

[GitHub] [sling-org-apache-sling-starter] sonarcloud[bot] commented on pull request #21: update outdated org.apache.sling and org.apache.felix dependencies

2021-05-10 Thread GitBox


sonarcloud[bot] commented on pull request #21:
URL: 
https://github.com/apache/sling-org-apache-sling-starter/pull/21#issuecomment-836957150


   Kudos, SonarCloud Quality Gate passed!
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-starter=21=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-starter=21=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-starter=21=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-starter=21=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-starter=21=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-starter=21=false=VULNERABILITY)
  
   [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-starter=21=false=SECURITY_HOTSPOT)
 [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-starter=21=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-starter=21=false=SECURITY_HOTSPOT)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-starter=21=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-starter=21=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-starter=21=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-starter=21)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-starter=21=duplicated_lines_density=list)
 No Duplication information
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Updated] (SLING-10369) org.apache.sling.starter dependencies out of date

2021-05-10 Thread Ruben Reusser (Jira)


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

Ruben Reusser updated SLING-10369:
--
Description: 
please accept PR [1] to update the dependencies of the sling starter

the following dependencies were outdated:
{code:java}
[INFO]   org.apache.sling:org.apache.sling.api ... 2.23.0 -> 2.23.4
[INFO]   org.apache.sling:org.apache.sling.serviceusermapper ... 1.5.2 -> 1.5.4
[INFO]   org.apache.felix:org.apache.felix.configadmin ... 1.9.20 -> 1.9.22
[INFO]   org.apache.felix:org.apache.felix.http.jetty .. 4.1.6 -> 
4.1.8{code}
 [1] [https://github.com/apache/sling-org-apache-sling-starter/pull/21] 

  was:
please accept PR [1] to update the dependencies of the sling starter

the following dependencies were outdated:
{code:java}
[INFO] org.apache.sling:org.apache.sling.auth.core ... 1.5.0 -> 1.5.2
[INFO] org.apache.sling:org.apache.sling.engine .. 2.7.2 -> 2.7.4
[INFO] org.apache.sling:org.apache.sling.repoinit.parser . 1.6.6 -> 1.6.8
[INFO] org.apache.sling:org.apache.sling.resourceresolver  1.7.2 -> 1.7.4
[INFO] org.apache.sling:org.apache.sling.xss  2.2.8 -> 2.2.12
[INFO] com.composum.nodes:composum-nodes-commons . 2.3.0 -> 2.6.1
[INFO] com.composum.nodes:composum-nodes-console . 2.3.0 -> 2.6.1
[INFO] com.composum.nodes:composum-nodes-jslibs .. 2.3.0 -> 2.6.1
[INFO] com.composum.nodes:composum-nodes-pckgmgr . 2.3.0 -> 2.6.1
[INFO] com.composum.nodes:composum-nodes-usermgr . 2.3.0 -> 2.6.1
[INFO] org.apache.felix:org.apache.felix.http.jetty .. 4.1.4 -> 4.1.6
[INFO] org.apache.felix:org.apache.felix.scr ... 2.1.24 -> 2.1.26
[INFO] org.apache.felix:org.apache.felix.utils . 1.11.6 -> 
1.11.8{code}
also had to move org.apache.sling.commons.metrics and 
io.dropwizard.metrics:metrics-core from start-level 15 to start-level 5 to be 
able to build the project due to
{code:java}
[ERROR] org.apache.sling:org.apache.sling.auth.core:1.5.2: is importing 
package(s) org.apache.sling.commons.metrics in start level 5 but no bundle is 
exporting these for that start level.
[ERROR] Analyser detected errors on feature 
'org.apache.sling:org.apache.sling.starter:slingosgifeature:nosample_base:12-SNAPSHOT'.
 See log output for error messages.{code}
 [1] https://github.com/apache/sling-org-apache-sling-starter/pull/19


> org.apache.sling.starter dependencies out of date
> -
>
> Key: SLING-10369
> URL: https://issues.apache.org/jira/browse/SLING-10369
> Project: Sling
>  Issue Type: Improvement
>  Components: Starter
>Reporter: Ruben Reusser
>Assignee: Bertrand Delacretaz
>Priority: Critical
>
> please accept PR [1] to update the dependencies of the sling starter
> the following dependencies were outdated:
> {code:java}
> [INFO]   org.apache.sling:org.apache.sling.api ... 2.23.0 -> 
> 2.23.4
> [INFO]   org.apache.sling:org.apache.sling.serviceusermapper ... 1.5.2 -> 
> 1.5.4
> [INFO]   org.apache.felix:org.apache.felix.configadmin ... 1.9.20 -> 
> 1.9.22
> [INFO]   org.apache.felix:org.apache.felix.http.jetty .. 4.1.6 -> 
> 4.1.8{code}
>  [1] [https://github.com/apache/sling-org-apache-sling-starter/pull/21] 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (SLING-10369) org.apache.sling.starter dependencies out of date

2021-05-10 Thread Ruben Reusser (Jira)
Ruben Reusser created SLING-10369:
-

 Summary: org.apache.sling.starter dependencies out of date
 Key: SLING-10369
 URL: https://issues.apache.org/jira/browse/SLING-10369
 Project: Sling
  Issue Type: Improvement
  Components: Starter
Reporter: Ruben Reusser
Assignee: Bertrand Delacretaz


please accept PR [1] to update the dependencies of the sling starter

the following dependencies were outdated:
{code:java}
[INFO] org.apache.sling:org.apache.sling.auth.core ... 1.5.0 -> 1.5.2
[INFO] org.apache.sling:org.apache.sling.engine .. 2.7.2 -> 2.7.4
[INFO] org.apache.sling:org.apache.sling.repoinit.parser . 1.6.6 -> 1.6.8
[INFO] org.apache.sling:org.apache.sling.resourceresolver  1.7.2 -> 1.7.4
[INFO] org.apache.sling:org.apache.sling.xss  2.2.8 -> 2.2.12
[INFO] com.composum.nodes:composum-nodes-commons . 2.3.0 -> 2.6.1
[INFO] com.composum.nodes:composum-nodes-console . 2.3.0 -> 2.6.1
[INFO] com.composum.nodes:composum-nodes-jslibs .. 2.3.0 -> 2.6.1
[INFO] com.composum.nodes:composum-nodes-pckgmgr . 2.3.0 -> 2.6.1
[INFO] com.composum.nodes:composum-nodes-usermgr . 2.3.0 -> 2.6.1
[INFO] org.apache.felix:org.apache.felix.http.jetty .. 4.1.4 -> 4.1.6
[INFO] org.apache.felix:org.apache.felix.scr ... 2.1.24 -> 2.1.26
[INFO] org.apache.felix:org.apache.felix.utils . 1.11.6 -> 
1.11.8{code}
also had to move org.apache.sling.commons.metrics and 
io.dropwizard.metrics:metrics-core from start-level 15 to start-level 5 to be 
able to build the project due to
{code:java}
[ERROR] org.apache.sling:org.apache.sling.auth.core:1.5.2: is importing 
package(s) org.apache.sling.commons.metrics in start level 5 but no bundle is 
exporting these for that start level.
[ERROR] Analyser detected errors on feature 
'org.apache.sling:org.apache.sling.starter:slingosgifeature:nosample_base:12-SNAPSHOT'.
 See log output for error messages.{code}
 [1] https://github.com/apache/sling-org-apache-sling-starter/pull/19



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [sling-org-apache-sling-starter] reusr1 opened a new pull request #21: update outdated org.apache.sling and org.apache.felix dependencies

2021-05-10 Thread GitBox


reusr1 opened a new pull request #21:
URL: https://github.com/apache/sling-org-apache-sling-starter/pull/21


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Updated] (SLING-10362) Sling Starter: trouble when installing packages containing install hooks with OSGi installer

2021-05-10 Thread Konrad Windszus (Jira)


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

Konrad Windszus updated SLING-10362:

Summary: Sling Starter: trouble when installing packages containing install 
hooks with OSGi installer  (was: Sling Starter: trouble when installing 
packages with OSGi installer)

> Sling Starter: trouble when installing packages containing install hooks with 
> OSGi installer
> 
>
> Key: SLING-10362
> URL: https://issues.apache.org/jira/browse/SLING-10362
> Project: Sling
>  Issue Type: Improvement
>  Components: Starter
>Affects Versions: Starter 12
> Environment:  Sling-Starter 12-SNAPSHOT (commit 0e6a8e41) with JDK 11 
> on MacOS
>Reporter: Hans-Peter Stoerr
>Assignee: Konrad Windszus
>Priority: Minor
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> I'm trying to install some packages into a snapshot of the Starter 12 using 
> the Sling [fileinstaller 
> provider|https://sling.apache.org/documentation/bundles/file-installer-provider.html],
>  which works somewhat but not properly when the package has a setup hook.
> It seems that the packages are internally transformed by the [Content Package 
> Installer 
> Factory|https://sling.apache.org/documentation/bundles/content-package-installer-factory.html],
>  but too early - the packages are unpacked before the repository was properly 
> set up. See the stacktrace below: the package was likely installed when the 
> user 'sling-package-install' wasn't properly set up in the repository yet.
> As workaround I currently set the start level of the 
> org.apache.sling.installer.factory.packages to 21 - a bit later than all the 
> other bundles. That makes the problem disappear. This might be a possibility 
> for the Sling Starter 12, too, but I'm not sure whether it is the right 
> option. Possibly the fileinstaller provider needs more dependencies from some 
> bundles to make sure it's started late enough. Another way would be to give 
> the Sling fileinstaller provider some additional options like the 
> felix.fileinstall.active.level of [Felix File 
> Install|https://felix.apache.org/documentation/subprojects/apache-felix-file-install.html].
>  Or the [run mode 
> support|https://sling.apache.org/documentation/bundles/file-installer-provider.html#run-mode-support-1]
>  of the Sling file installer should be made to work somehow with packages, so 
> that the packages are only installed when the run mode specified in the path 
> is reached. That would be even better, since for packages you often have to 
> specify an order as well, and that would be another option than package 
> dependencies.
> To reproduce the bug you can check out Sling Starter 12 and execute the 
> following commands:
> {code}
> cd target/
>  mkdir fileinstall
>  wget 
> [https://repo1.maven.org/maven2/com/composum/nodes/composum-nodes-sling-package/2.6.1/composum-nodes-sling-package-2.6.1.zip]
>  mv composum-nodes-sling-package-2.6.1.zip fileinstall/
>  java -jar dependency/org.apache.sling.feature.launcher.jar -f 
> org.apache.sling.starter-12-SNAPSHOT-oak_tar_far.far -D 
> felix.startlevel.bundle=30 -D sling.fileinstall.dir=fileinstall/
> {code}
> In the log you get the following stacktrace in the log:
> {code}
> 07.05.2021 16:42:44.945 *INFO* [Apache Sling Repository Startup Thread #1|#1] 
> org.apache.sling.installer.provider.jcr.impl.RootFolderListener Watching 
> /apps to detect potential changes in 
> subfoldersault.packaging.PackageException: Package extraction requires admin 
> session as it has a hook (userid 'sling-package-install' not allowed).
>  at 
> org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.checkAllowanceToInstallPackage(ZipVaultPackage.java:226)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.prepareExtract(ZipVaultPackage.java:199)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:389)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:356)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:342)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.sling.installer.factory.packages.impl.PackageTransformer$InstallPackageTask.doExecute(PackageTransformer.java:337)
>  [org.apache.sling.installer.factory.packages:1.0.4]
>  at 
> org.apache.sling.installer.factory.packages.impl.PackageTransformer$AbstractPackageInstallTask.execute(PackageTransformer.java:269)
>  [org.apache.sling.installer.factory.packages:1.0.4]
>  at 
> 

[jira] [Commented] (SLING-10309) GraphQL results pagination

2021-05-10 Thread Bertrand Delacretaz (Jira)


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

Bertrand Delacretaz commented on SLING-10309:
-

I've pushed a 
[commit|https://github.com/apache/sling-org-apache-sling-graphql-core/commit/189fc7f8ed55b1c29b6ae282ae27f1ff44856b5d]
 to the new {{SLING-10309/experiment}} branch, which uses the graphql.relay 
interfaces to generate paginated results as per 
https://relay.dev/graphql/connections.htm

It's just a quick hack but demonstrates that using the results introspection 
features of graphql-java, we just need to provide results using the appropriate 
interfaces to get the correct results schema,

So I think we need two things, which might be provided by the 
{{RelayConnectionFactory}} mentioned above, but not necessarily as that's not 
too complicated (Famous Last Words):

* Interfaces that help the developers provide paginated data from 
{{SlingDataFetcher}} services
* Ideally a way to generate the pagination part of the schemas based on a 
suitable schema directive. For my quick hack I added those pagination parts 
manually.

> GraphQL results pagination
> --
>
> Key: SLING-10309
> URL: https://issues.apache.org/jira/browse/SLING-10309
> Project: Sling
>  Issue Type: Improvement
>  Components: GraphQL
>Affects Versions: GraphQL Core 0.0.8
>Reporter: Bertrand Delacretaz
>Assignee: Radu Cotescu
>Priority: Major
>
> We need a way to paginate results in the GraphQL Core module.
> We did some research with Radu around this, here are our initial findings:
> * Pagination should be based on cursors, not offsets. There's a good 
> explanation of why at 
> https://uxdesign.cc/why-facebook-says-cursor-pagination-is-the-greatest-d6b98d86b6c0
> * Pagination cursors should be opaque. They are often encoded in Base64 to 
> express that, although that doesn't make much sense from a technical point of 
> view (being easy to decode) but helps convey the "consider this thing as 
> opaque" message.
> * https://relay.dev/graphql/connections.htm defines a commonly accepted way 
> of expressing pagination in GraphQL results.
> * Automatically generating the "plurals" types, like Articles for an Article 
> type, might be interesting and could include adding the required paging 
> fields.
> * https://www.graphql-java-kickstart.com/tools/relay/ mentions the 
> {{RelayConnectionFactory}} as a useful tool to generate the "standard" paging 
> information
> * The {{SlingDataFetcherEnvironment}} needs to provide paging information 
> such as the current cursor value and how many items are expected starting 
> after it
> * The "Just the factoids" section of https://api.slack.com/docs/pagination 
> nicely describes pagination in the Slack API, we should have something like 
> that to clarify our "pagination pattern" and allow that pattern to be reused 
> in other parts of Sling if needed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-10362) Sling Starter: trouble when installing packages with OSGi installer

2021-05-10 Thread Konrad Windszus (Jira)


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

Konrad Windszus updated SLING-10362:

Summary: Sling Starter: trouble when installing packages with OSGi 
installer  (was: Sling Starter: trouble when installing packages with 
fileinstall provider)

> Sling Starter: trouble when installing packages with OSGi installer
> ---
>
> Key: SLING-10362
> URL: https://issues.apache.org/jira/browse/SLING-10362
> Project: Sling
>  Issue Type: Improvement
>  Components: Starter
>Affects Versions: Starter 12
> Environment:  Sling-Starter 12-SNAPSHOT (commit 0e6a8e41) with JDK 11 
> on MacOS
>Reporter: Hans-Peter Stoerr
>Assignee: Konrad Windszus
>Priority: Minor
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> I'm trying to install some packages into a snapshot of the Starter 12 using 
> the Sling [fileinstaller 
> provider|https://sling.apache.org/documentation/bundles/file-installer-provider.html],
>  which works somewhat but not properly when the package has a setup hook.
> It seems that the packages are internally transformed by the [Content Package 
> Installer 
> Factory|https://sling.apache.org/documentation/bundles/content-package-installer-factory.html],
>  but too early - the packages are unpacked before the repository was properly 
> set up. See the stacktrace below: the package was likely installed when the 
> user 'sling-package-install' wasn't properly set up in the repository yet.
> As workaround I currently set the start level of the 
> org.apache.sling.installer.factory.packages to 21 - a bit later than all the 
> other bundles. That makes the problem disappear. This might be a possibility 
> for the Sling Starter 12, too, but I'm not sure whether it is the right 
> option. Possibly the fileinstaller provider needs more dependencies from some 
> bundles to make sure it's started late enough. Another way would be to give 
> the Sling fileinstaller provider some additional options like the 
> felix.fileinstall.active.level of [Felix File 
> Install|https://felix.apache.org/documentation/subprojects/apache-felix-file-install.html].
>  Or the [run mode 
> support|https://sling.apache.org/documentation/bundles/file-installer-provider.html#run-mode-support-1]
>  of the Sling file installer should be made to work somehow with packages, so 
> that the packages are only installed when the run mode specified in the path 
> is reached. That would be even better, since for packages you often have to 
> specify an order as well, and that would be another option than package 
> dependencies.
> To reproduce the bug you can check out Sling Starter 12 and execute the 
> following commands:
> {code}
> cd target/
>  mkdir fileinstall
>  wget 
> [https://repo1.maven.org/maven2/com/composum/nodes/composum-nodes-sling-package/2.6.1/composum-nodes-sling-package-2.6.1.zip]
>  mv composum-nodes-sling-package-2.6.1.zip fileinstall/
>  java -jar dependency/org.apache.sling.feature.launcher.jar -f 
> org.apache.sling.starter-12-SNAPSHOT-oak_tar_far.far -D 
> felix.startlevel.bundle=30 -D sling.fileinstall.dir=fileinstall/
> {code}
> In the log you get the following stacktrace in the log:
> {code}
> 07.05.2021 16:42:44.945 *INFO* [Apache Sling Repository Startup Thread #1|#1] 
> org.apache.sling.installer.provider.jcr.impl.RootFolderListener Watching 
> /apps to detect potential changes in 
> subfoldersault.packaging.PackageException: Package extraction requires admin 
> session as it has a hook (userid 'sling-package-install' not allowed).
>  at 
> org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.checkAllowanceToInstallPackage(ZipVaultPackage.java:226)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.prepareExtract(ZipVaultPackage.java:199)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:389)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:356)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:342)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.sling.installer.factory.packages.impl.PackageTransformer$InstallPackageTask.doExecute(PackageTransformer.java:337)
>  [org.apache.sling.installer.factory.packages:1.0.4]
>  at 
> org.apache.sling.installer.factory.packages.impl.PackageTransformer$AbstractPackageInstallTask.execute(PackageTransformer.java:269)
>  [org.apache.sling.installer.factory.packages:1.0.4]
>  at 
> 

[jira] [Commented] (SLING-10362) Sling Starter: trouble when installing packages with fileinstall provider

2021-05-10 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on SLING-10362:
-

I already opened 
https://github.com/apache/sling-org-apache-sling-starter/pull/20 to fix this. 
This is no security issue, as this doesn't open other options than already the 
ones with Bundles (which are deployed automatically when put below 
{{/apps/.../install}. I will add a hint to 
https://sling.apache.org/documentation/bundles/content-package-installer-factory.html#configuration
 as well.

Regarding 
https://github.com/apache/sling-org-apache-sling-feature-extension-content/blob/master/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java:
 It writes an OSGi configuration for 
https://github.com/apache/sling-org-apache-sling-jcr-packageinit/blob/dd2685bfe7d690e6514e9073c00221151ffa3cc7/src/main/java/org/apache/sling/jcr/packageinit/impl/ExecutionPlanRepoInitializer.java#L141
 which uses an admin session under the hood and therefore needs no dedicated 
configuration.

> Sling Starter: trouble when installing packages with fileinstall provider
> -
>
> Key: SLING-10362
> URL: https://issues.apache.org/jira/browse/SLING-10362
> Project: Sling
>  Issue Type: Improvement
>  Components: Starter
>Affects Versions: Starter 12
> Environment:  Sling-Starter 12-SNAPSHOT (commit 0e6a8e41) with JDK 11 
> on MacOS
>Reporter: Hans-Peter Stoerr
>Assignee: Konrad Windszus
>Priority: Minor
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> I'm trying to install some packages into a snapshot of the Starter 12 using 
> the Sling [fileinstaller 
> provider|https://sling.apache.org/documentation/bundles/file-installer-provider.html],
>  which works somewhat but not properly when the package has a setup hook.
> It seems that the packages are internally transformed by the [Content Package 
> Installer 
> Factory|https://sling.apache.org/documentation/bundles/content-package-installer-factory.html],
>  but too early - the packages are unpacked before the repository was properly 
> set up. See the stacktrace below: the package was likely installed when the 
> user 'sling-package-install' wasn't properly set up in the repository yet.
> As workaround I currently set the start level of the 
> org.apache.sling.installer.factory.packages to 21 - a bit later than all the 
> other bundles. That makes the problem disappear. This might be a possibility 
> for the Sling Starter 12, too, but I'm not sure whether it is the right 
> option. Possibly the fileinstaller provider needs more dependencies from some 
> bundles to make sure it's started late enough. Another way would be to give 
> the Sling fileinstaller provider some additional options like the 
> felix.fileinstall.active.level of [Felix File 
> Install|https://felix.apache.org/documentation/subprojects/apache-felix-file-install.html].
>  Or the [run mode 
> support|https://sling.apache.org/documentation/bundles/file-installer-provider.html#run-mode-support-1]
>  of the Sling file installer should be made to work somehow with packages, so 
> that the packages are only installed when the run mode specified in the path 
> is reached. That would be even better, since for packages you often have to 
> specify an order as well, and that would be another option than package 
> dependencies.
> To reproduce the bug you can check out Sling Starter 12 and execute the 
> following commands:
> {code}
> cd target/
>  mkdir fileinstall
>  wget 
> [https://repo1.maven.org/maven2/com/composum/nodes/composum-nodes-sling-package/2.6.1/composum-nodes-sling-package-2.6.1.zip]
>  mv composum-nodes-sling-package-2.6.1.zip fileinstall/
>  java -jar dependency/org.apache.sling.feature.launcher.jar -f 
> org.apache.sling.starter-12-SNAPSHOT-oak_tar_far.far -D 
> felix.startlevel.bundle=30 -D sling.fileinstall.dir=fileinstall/
> {code}
> In the log you get the following stacktrace in the log:
> {code}
> 07.05.2021 16:42:44.945 *INFO* [Apache Sling Repository Startup Thread #1|#1] 
> org.apache.sling.installer.provider.jcr.impl.RootFolderListener Watching 
> /apps to detect potential changes in 
> subfoldersault.packaging.PackageException: Package extraction requires admin 
> session as it has a hook (userid 'sling-package-install' not allowed).
>  at 
> org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.checkAllowanceToInstallPackage(ZipVaultPackage.java:226)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.prepareExtract(ZipVaultPackage.java:199)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:389)
>  

[jira] [Comment Edited] (SLING-10362) Sling Starter: trouble when installing packages with fileinstall provider

2021-05-10 Thread Konrad Windszus (Jira)


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

Konrad Windszus edited comment on SLING-10362 at 5/10/21, 4:30 PM:
---

I already opened 
https://github.com/apache/sling-org-apache-sling-starter/pull/20 to fix this. 
This is no security issue, as this doesn't open other options than already the 
ones with Bundles (which are deployed automatically when put below 
{{/apps/.../install}}. I will add a hint to 
https://sling.apache.org/documentation/bundles/content-package-installer-factory.html#configuration
 as well.

Regarding 
https://github.com/apache/sling-org-apache-sling-feature-extension-content/blob/master/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java:
 It writes an OSGi configuration for 
https://github.com/apache/sling-org-apache-sling-jcr-packageinit/blob/dd2685bfe7d690e6514e9073c00221151ffa3cc7/src/main/java/org/apache/sling/jcr/packageinit/impl/ExecutionPlanRepoInitializer.java#L141
 which uses an admin session under the hood and therefore needs no dedicated 
configuration.


was (Author: kwin):
I already opened 
https://github.com/apache/sling-org-apache-sling-starter/pull/20 to fix this. 
This is no security issue, as this doesn't open other options than already the 
ones with Bundles (which are deployed automatically when put below 
{{/apps/.../install}. I will add a hint to 
https://sling.apache.org/documentation/bundles/content-package-installer-factory.html#configuration
 as well.

Regarding 
https://github.com/apache/sling-org-apache-sling-feature-extension-content/blob/master/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java:
 It writes an OSGi configuration for 
https://github.com/apache/sling-org-apache-sling-jcr-packageinit/blob/dd2685bfe7d690e6514e9073c00221151ffa3cc7/src/main/java/org/apache/sling/jcr/packageinit/impl/ExecutionPlanRepoInitializer.java#L141
 which uses an admin session under the hood and therefore needs no dedicated 
configuration.

> Sling Starter: trouble when installing packages with fileinstall provider
> -
>
> Key: SLING-10362
> URL: https://issues.apache.org/jira/browse/SLING-10362
> Project: Sling
>  Issue Type: Improvement
>  Components: Starter
>Affects Versions: Starter 12
> Environment:  Sling-Starter 12-SNAPSHOT (commit 0e6a8e41) with JDK 11 
> on MacOS
>Reporter: Hans-Peter Stoerr
>Assignee: Konrad Windszus
>Priority: Minor
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> I'm trying to install some packages into a snapshot of the Starter 12 using 
> the Sling [fileinstaller 
> provider|https://sling.apache.org/documentation/bundles/file-installer-provider.html],
>  which works somewhat but not properly when the package has a setup hook.
> It seems that the packages are internally transformed by the [Content Package 
> Installer 
> Factory|https://sling.apache.org/documentation/bundles/content-package-installer-factory.html],
>  but too early - the packages are unpacked before the repository was properly 
> set up. See the stacktrace below: the package was likely installed when the 
> user 'sling-package-install' wasn't properly set up in the repository yet.
> As workaround I currently set the start level of the 
> org.apache.sling.installer.factory.packages to 21 - a bit later than all the 
> other bundles. That makes the problem disappear. This might be a possibility 
> for the Sling Starter 12, too, but I'm not sure whether it is the right 
> option. Possibly the fileinstaller provider needs more dependencies from some 
> bundles to make sure it's started late enough. Another way would be to give 
> the Sling fileinstaller provider some additional options like the 
> felix.fileinstall.active.level of [Felix File 
> Install|https://felix.apache.org/documentation/subprojects/apache-felix-file-install.html].
>  Or the [run mode 
> support|https://sling.apache.org/documentation/bundles/file-installer-provider.html#run-mode-support-1]
>  of the Sling file installer should be made to work somehow with packages, so 
> that the packages are only installed when the run mode specified in the path 
> is reached. That would be even better, since for packages you often have to 
> specify an order as well, and that would be another option than package 
> dependencies.
> To reproduce the bug you can check out Sling Starter 12 and execute the 
> following commands:
> {code}
> cd target/
>  mkdir fileinstall
>  wget 
> [https://repo1.maven.org/maven2/com/composum/nodes/composum-nodes-sling-package/2.6.1/composum-nodes-sling-package-2.6.1.zip]
>  mv composum-nodes-sling-package-2.6.1.zip fileinstall/
>  java -jar 

[jira] [Updated] (SLING-10362) Sling Starter: trouble when installing packages with fileinstall provider

2021-05-10 Thread Konrad Windszus (Jira)


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

Konrad Windszus updated SLING-10362:

Description: 
I'm trying to install some packages into a snapshot of the Starter 12 using the 
Sling [fileinstaller 
provider|https://sling.apache.org/documentation/bundles/file-installer-provider.html],
 which works somewhat but not properly when the package has a setup hook.

It seems that the packages are internally transformed by the [Content Package 
Installer 
Factory|https://sling.apache.org/documentation/bundles/content-package-installer-factory.html],
 but too early - the packages are unpacked before the repository was properly 
set up. See the stacktrace below: the package was likely installed when the 
user 'sling-package-install' wasn't properly set up in the repository yet.

As workaround I currently set the start level of the 
org.apache.sling.installer.factory.packages to 21 - a bit later than all the 
other bundles. That makes the problem disappear. This might be a possibility 
for the Sling Starter 12, too, but I'm not sure whether it is the right option. 
Possibly the fileinstaller provider needs more dependencies from some bundles 
to make sure it's started late enough. Another way would be to give the Sling 
fileinstaller provider some additional options like the 
felix.fileinstall.active.level of [Felix File 
Install|https://felix.apache.org/documentation/subprojects/apache-felix-file-install.html].
 Or the [run mode 
support|https://sling.apache.org/documentation/bundles/file-installer-provider.html#run-mode-support-1]
 of the Sling file installer should be made to work somehow with packages, so 
that the packages are only installed when the run mode specified in the path is 
reached. That would be even better, since for packages you often have to 
specify an order as well, and that would be another option than package 
dependencies.

To reproduce the bug you can check out Sling Starter 12 and execute the 
following commands:
{code}
cd target/
 mkdir fileinstall
 wget 
[https://repo1.maven.org/maven2/com/composum/nodes/composum-nodes-sling-package/2.6.1/composum-nodes-sling-package-2.6.1.zip]
 mv composum-nodes-sling-package-2.6.1.zip fileinstall/
 java -jar dependency/org.apache.sling.feature.launcher.jar -f 
org.apache.sling.starter-12-SNAPSHOT-oak_tar_far.far -D 
felix.startlevel.bundle=30 -D sling.fileinstall.dir=fileinstall/
{code}
In the log you get the following stacktrace in the log:
{code}
07.05.2021 16:42:44.945 *INFO* [Apache Sling Repository Startup Thread #1|#1] 
org.apache.sling.installer.provider.jcr.impl.RootFolderListener Watching /apps 
to detect potential changes in subfoldersault.packaging.PackageException: 
Package extraction requires admin session as it has a hook (userid 
'sling-package-install' not allowed).
 at 
org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.checkAllowanceToInstallPackage(ZipVaultPackage.java:226)
 [org.apache.jackrabbit.vault:3.4.10]
 at 
org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.prepareExtract(ZipVaultPackage.java:199)
 [org.apache.jackrabbit.vault:3.4.10]
 at 
org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:389)
 [org.apache.jackrabbit.vault:3.4.10]
 at 
org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:356)
 [org.apache.jackrabbit.vault:3.4.10]
 at 
org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:342)
 [org.apache.jackrabbit.vault:3.4.10]
 at 
org.apache.sling.installer.factory.packages.impl.PackageTransformer$InstallPackageTask.doExecute(PackageTransformer.java:337)
 [org.apache.sling.installer.factory.packages:1.0.4]
 at 
org.apache.sling.installer.factory.packages.impl.PackageTransformer$AbstractPackageInstallTask.execute(PackageTransformer.java:269)
 [org.apache.sling.installer.factory.packages:1.0.4]
 at 
org.apache.sling.installer.core.impl.OsgiInstallerImpl.doExecuteTasks(OsgiInstallerImpl.java:918)
 [org.apache.sling.installer.core:3.11.4]
 at 
org.apache.sling.installer.core.impl.OsgiInstallerImpl.executeTasks(OsgiInstallerImpl.java:755)
 [org.apache.sling.installer.core:3.11.4]
 at 
org.apache.sling.installer.core.impl.OsgiInstallerImpl.run(OsgiInstallerImpl.java:304)
 [org.apache.sling.installer.core:3.11.4]
 at java.base/java.lang.Thread.run(Thread.java:834)
{code}
In some cases I also got the following stacktrace, which seems to indicate that 
a repository wasn't available or properly initialized:
{code}
java.lang.NullPointerException: null
 at 
org.apache.sling.jcr.oak.server.internal.OakSlingRepository$2.run(OakSlingRepository.java:99)
 [org.apache.sling.jcr.oak.server:1.2.10]
 at 
org.apache.sling.jcr.oak.server.internal.OakSlingRepository$2.run(OakSlingRepository.java:96)
 [org.apache.sling.jcr.oak.server:1.2.10]
 at java.base/java.security.AccessController.doPrivileged(Native 

[jira] [Assigned] (SLING-10362) Sling Starter: trouble when installing packages with fileinstall provider

2021-05-10 Thread Konrad Windszus (Jira)


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

Konrad Windszus reassigned SLING-10362:
---

Assignee: Konrad Windszus

> Sling Starter: trouble when installing packages with fileinstall provider
> -
>
> Key: SLING-10362
> URL: https://issues.apache.org/jira/browse/SLING-10362
> Project: Sling
>  Issue Type: Improvement
>  Components: Starter
>Affects Versions: Starter 12
> Environment:  Sling-Starter 12-SNAPSHOT (commit 0e6a8e41) with JDK 11 
> on MacOS
>Reporter: Hans-Peter Stoerr
>Assignee: Konrad Windszus
>Priority: Minor
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> I'm trying to install some packages into a snapshot of the Starter 12 using 
> the Sling [fileinstaller 
> provider|https://sling.apache.org/documentation/bundles/file-installer-provider.html],
>  which works somewhat but not properly when the package has a setup hook.
> It seems that the packages are internally transformed by the [Content Package 
> Installer 
> Factory|https://sling.apache.org/documentation/bundles/content-package-installer-factory.html],
>  but too early - the packages are unpacked before the repository was properly 
> set up. See the stacktrace below: the package was likely installed when the 
> user 'sling-package-install' wasn't properly set up in the repository yet.
> As workaround I currently set the start level of the 
> org.apache.sling.installer.factory.packages to 21 - a bit later than all the 
> other bundles. That makes the problem disappear. This might be a possibility 
> for the Sling Starter 12, too, but I'm not sure whether it is the right 
> option. Possibly the fileinstaller provider needs more dependencies from some 
> bundles to make sure it's started late enough. Another way would be to give 
> the Sling fileinstaller provider some additional options like the 
> felix.fileinstall.active.level of [Felix File 
> Install|https://felix.apache.org/documentation/subprojects/apache-felix-file-install.html].
>  Or the [run mode 
> support|https://sling.apache.org/documentation/bundles/file-installer-provider.html#run-mode-support-1]
>  of the Sling file installer should be made to work somehow with packages, so 
> that the packages are only installed when the run mode specified in the path 
> is reached. That would be even better, since for packages you often have to 
> specify an order as well, and that would be another option than package 
> dependencies.
> To reproduce the bug you can check out Sling Starter 12 and execute the 
> following commands:
> cd target/
>  mkdir fileinstall
>  wget 
> [https://repo1.maven.org/maven2/com/composum/nodes/composum-nodes-sling-package/2.6.1/composum-nodes-sling-package-2.6.1.zip]
>  mv composum-nodes-sling-package-2.6.1.zip fileinstall/
>  java -jar dependency/org.apache.sling.feature.launcher.jar -f 
> org.apache.sling.starter-12-SNAPSHOT-oak_tar_far.far -D 
> felix.startlevel.bundle=30 -D sling.fileinstall.dir=fileinstall/
> In the log you get the following stacktrace in the log:
> 07.05.2021 16:42:44.945 *INFO* [Apache Sling Repository Startup Thread #1|#1] 
> org.apache.sling.installer.provider.jcr.impl.RootFolderListener Watching 
> /apps to detect potential changes in 
> subfoldersault.packaging.PackageException: Package extraction requires admin 
> session as it has a hook (userid 'sling-package-install' not allowed).
>  at 
> org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.checkAllowanceToInstallPackage(ZipVaultPackage.java:226)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.jackrabbit.vault.packaging.impl.ZipVaultPackage.prepareExtract(ZipVaultPackage.java:199)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:389)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:356)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.jackrabbit.vault.packaging.impl.JcrPackageImpl.extract(JcrPackageImpl.java:342)
>  [org.apache.jackrabbit.vault:3.4.10]
>  at 
> org.apache.sling.installer.factory.packages.impl.PackageTransformer$InstallPackageTask.doExecute(PackageTransformer.java:337)
>  [org.apache.sling.installer.factory.packages:1.0.4]
>  at 
> org.apache.sling.installer.factory.packages.impl.PackageTransformer$AbstractPackageInstallTask.execute(PackageTransformer.java:269)
>  [org.apache.sling.installer.factory.packages:1.0.4]
>  at 
> org.apache.sling.installer.core.impl.OsgiInstallerImpl.doExecuteTasks(OsgiInstallerImpl.java:918)
>  [org.apache.sling.installer.core:3.11.4]
>  at 
> 

[jira] [Commented] (SLING-10362) Sling Starter: trouble when installing packages with fileinstall provider

2021-05-10 Thread Hans-Peter Stoerr (Jira)


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

Hans-Peter Stoerr commented on SLING-10362:
---

Ah, indeed, you're right - I somehow got that wrong, even if I raise the bundle 
to level 21, or even wait for complete server startup before I copy the 
packages into the fileinstall directory. But if I add this to a feature:
{code}
  "configurations": {
"org.apache.jackrabbit.vault.packaging.impl.PackagingImpl": {
  "scope": "UNSCOPED",
  "authIdsForHookExecution": [
"sling-package-install"
  ],
  "authIdsForRootInstallation": []
}
  }
{code}
then it works. Since that has security implications, as JCRVLT-427 says, I'm 
not quite sure whether that should be a general configuration for Sling Starter 
12, or something to be added visibly to the documentation, e.g. to 
https://sling.apache.org/documentation/bundles/file-installer-provider.html .

Please note that sling-org-apache-sling-feature-extension-content's  
[ContentHandler|https://github.com/apache/sling-org-apache-sling-feature-extension-content/blob/master/src/main/java/org/apache/sling/feature/extension/content/ContentHandler.java]
 writes a configuration for 
org.apache.jackrabbit.vault.packaging.registry.impl.FSPackageRegistry , 
removing any previous configuration that was done in a feature and sets 
authIdsForHookExecution or authIdsForRootInstallation. In my experiments that 
doesn't seem to be a problem when I'm installing content packages within 
features, as described in https://issues.apache.org/jira/browse/SLING-10339, 
since these seem to be installed as admin, but I'm not sure whether this could 
be a problem somewhere else.

> Sling Starter: trouble when installing packages with fileinstall provider
> -
>
> Key: SLING-10362
> URL: https://issues.apache.org/jira/browse/SLING-10362
> Project: Sling
>  Issue Type: Improvement
>  Components: Starter
>Affects Versions: Starter 12
> Environment:  Sling-Starter 12-SNAPSHOT (commit 0e6a8e41) with JDK 11 
> on MacOS
>Reporter: Hans-Peter Stoerr
>Priority: Minor
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> I'm trying to install some packages into a snapshot of the Starter 12 using 
> the Sling [fileinstaller 
> provider|https://sling.apache.org/documentation/bundles/file-installer-provider.html],
>  which works somewhat but not properly when the package has a setup hook.
> It seems that the packages are internally transformed by the [Content Package 
> Installer 
> Factory|https://sling.apache.org/documentation/bundles/content-package-installer-factory.html],
>  but too early - the packages are unpacked before the repository was properly 
> set up. See the stacktrace below: the package was likely installed when the 
> user 'sling-package-install' wasn't properly set up in the repository yet.
> As workaround I currently set the start level of the 
> org.apache.sling.installer.factory.packages to 21 - a bit later than all the 
> other bundles. That makes the problem disappear. This might be a possibility 
> for the Sling Starter 12, too, but I'm not sure whether it is the right 
> option. Possibly the fileinstaller provider needs more dependencies from some 
> bundles to make sure it's started late enough. Another way would be to give 
> the Sling fileinstaller provider some additional options like the 
> felix.fileinstall.active.level of [Felix File 
> Install|https://felix.apache.org/documentation/subprojects/apache-felix-file-install.html].
>  Or the [run mode 
> support|https://sling.apache.org/documentation/bundles/file-installer-provider.html#run-mode-support-1]
>  of the Sling file installer should be made to work somehow with packages, so 
> that the packages are only installed when the run mode specified in the path 
> is reached. That would be even better, since for packages you often have to 
> specify an order as well, and that would be another option than package 
> dependencies.
> To reproduce the bug you can check out Sling Starter 12 and execute the 
> following commands:
> cd target/
>  mkdir fileinstall
>  wget 
> [https://repo1.maven.org/maven2/com/composum/nodes/composum-nodes-sling-package/2.6.1/composum-nodes-sling-package-2.6.1.zip]
>  mv composum-nodes-sling-package-2.6.1.zip fileinstall/
>  java -jar dependency/org.apache.sling.feature.launcher.jar -f 
> org.apache.sling.starter-12-SNAPSHOT-oak_tar_far.far -D 
> felix.startlevel.bundle=30 -D sling.fileinstall.dir=fileinstall/
> In the log you get the following stacktrace in the log:
> 07.05.2021 16:42:44.945 *INFO* [Apache Sling Repository Startup Thread #1|#1] 
> org.apache.sling.installer.provider.jcr.impl.RootFolderListener Watching 
> /apps to detect potential 

[jira] [Resolved] (SLING-10366) Adjust HTTP status codes for SlingPostServlet integration tests

2021-05-10 Thread Oliver Lietz (Jira)


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

Oliver Lietz resolved SLING-10366.
--
  Assignee: Oliver Lietz  (was: Joerg Hoh)
Resolution: Done

> Adjust HTTP status codes for SlingPostServlet integration tests
> ---
>
> Key: SLING-10366
> URL: https://issues.apache.org/jira/browse/SLING-10366
> Project: Sling
>  Issue Type: Task
>  Components: Servlets, Testing
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Minor
> Fix For: Launchpad Integration Tests 12
>
>
> Failures caused by {{org.apache.sling.servlets.post}} {{2.4.3-SNAPSHOT}}:
> {noformat}
> [ERROR] Failures: 
> [ERROR]   
> PostServletAtCopyTest.testCopyAncestor:232->HttpTestBase.assertPostStatus:412 
> Expecting status 500 expected:<500> but was:<409>
> [ERROR]   
> PostServletCopyTest.testCopyAncestor:619->HttpTestBase.assertPostStatus:412 
> Expecting status 500 expected:<500> but was:<409>
> [ERROR]   
> PostServletCreateTest.testCreateNodeWithInvalidExactName:196->HttpTestBase.assertPostStatus:410
>  expected:<500> but was:<409>
> [ERROR]   
> PostServletCreateTest.testCreatingNodeUnderFile:255->HttpTestBase.assertPostStatus:412
>  Response to creating a child under nt:file should fail. expected:<500> but 
> was:<409>
> [ERROR]   
> PostServletImportTest.testImportAutoCheckoutNodes:326->HttpTestBase.assertPostStatus:412
>  Expected error from VersionException expected:<500> but was:<409>
> [ERROR]   
> PostServletImportTest.testImportNodeWithInvalidExactName:765->HttpTestBase.assertPostStatus:410
>  expected:<500> but was:<409>
> [INFO] 
> [ERROR] Tests run: 665, Failures: 6, Errors: 0, Skipped: 1
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-10365) Sling Model Exporter framework. A HEAD request leads to the java.lang.IllegalArgumentException: setContentLength(0) when already written 273

2021-05-10 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on SLING-10365:
-

There seem to be a custom exporter involved, without knowing that it would be 
hard to fix. Can you reproduce the issue with the Jackson Exporter which ships 
with Sling?

> Sling Model Exporter framework. A HEAD request leads to the 
> java.lang.IllegalArgumentException: setContentLength(0) when already written 
> 273
> 
>
> Key: SLING-10365
> URL: https://issues.apache.org/jira/browse/SLING-10365
> Project: Sling
>  Issue Type: Bug
>Reporter: Olena
>Priority: Major
> Attachments: SlingHead.log
>
>
> We are using the Sling Model Exported framework:
> {code:java}
> @Model(adaptables = Resource.class, resourceType = “myResourceType”)
> @Exporters({
>         @Exporter(name = ExporterA.NAME, selector = "css", extensions = 
> "html"),
>         @Exporter(name = ExporterB.NAME, selector = "js", extensions = "html")
> })
> public class MyModel { {code}
> Sightly script:
> {code:java}
> ${@ resourceType='myResourceType', selectors='css'}"
> {code}
>  
> A HEAD request leads to an error, at the same time, a GET request is 
> processed successfully.
> {code:java}
> java.lang.IllegalArgumentException: setContentLength(0) when already written 
> 273 at org.eclipse.jetty.server.Response.setContentLength(Response.java:876) 
> [org.apache.felix.http.jetty:4.1.6] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> org.apache.sling.engine.impl.log.RequestLoggerResponse.setContentLength(RequestLoggerResponse.java:198)
>  [org.apache.sling.engine:2.7.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:511)
>  [org.apache.sling.api:2.22.0] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:501)
>  [org.apache.sling.api:2.22.0] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet.doHead(SlingSafeMethodsServlet.java:105)
>  [org.apache.sling.api:2.22.0]
> {code}
> Please find the full log attached
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-10366) Adjust HTTP status codes for SlingPostServlet integration tests

2021-05-10 Thread Oliver Lietz (Jira)


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

Oliver Lietz updated SLING-10366:
-
Summary: Adjust HTTP status codes for SlingPostServlet integration tests  
(was: Adjust HTTP codes for SlingPostServlet integration tests)

> Adjust HTTP status codes for SlingPostServlet integration tests
> ---
>
> Key: SLING-10366
> URL: https://issues.apache.org/jira/browse/SLING-10366
> Project: Sling
>  Issue Type: Task
>  Components: Servlets, Testing
>Reporter: Oliver Lietz
>Assignee: Joerg Hoh
>Priority: Minor
> Fix For: Launchpad Integration Tests 12
>
>
> Failures caused by {{org.apache.sling.servlets.post}} {{2.4.3-SNAPSHOT}}:
> {noformat}
> [ERROR] Failures: 
> [ERROR]   
> PostServletAtCopyTest.testCopyAncestor:232->HttpTestBase.assertPostStatus:412 
> Expecting status 500 expected:<500> but was:<409>
> [ERROR]   
> PostServletCopyTest.testCopyAncestor:619->HttpTestBase.assertPostStatus:412 
> Expecting status 500 expected:<500> but was:<409>
> [ERROR]   
> PostServletCreateTest.testCreateNodeWithInvalidExactName:196->HttpTestBase.assertPostStatus:410
>  expected:<500> but was:<409>
> [ERROR]   
> PostServletCreateTest.testCreatingNodeUnderFile:255->HttpTestBase.assertPostStatus:412
>  Response to creating a child under nt:file should fail. expected:<500> but 
> was:<409>
> [ERROR]   
> PostServletImportTest.testImportAutoCheckoutNodes:326->HttpTestBase.assertPostStatus:412
>  Expected error from VersionException expected:<500> but was:<409>
> [ERROR]   
> PostServletImportTest.testImportNodeWithInvalidExactName:765->HttpTestBase.assertPostStatus:410
>  expected:<500> but was:<409>
> [INFO] 
> [ERROR] Tests run: 665, Failures: 6, Errors: 0, Skipped: 1
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (SLING-9659) Namespace http://sling.apache.org/ registered as prefix sling instead of http://sling.apache.org/jcr/sling/1.0

2021-05-10 Thread Konrad Windszus (Jira)


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

Konrad Windszus resolved SLING-9659.

Resolution: Fixed

> Namespace http://sling.apache.org/ registered as prefix sling instead of 
> http://sling.apache.org/jcr/sling/1.0
> --
>
> Key: SLING-9659
> URL: https://issues.apache.org/jira/browse/SLING-9659
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Affects Versions: Testing Sling Mock Oak 2.1.10-1.16.0
>Reporter: Hans-Peter Stoerr
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: Testing Sling Mock Oak 3.0.0-1.16.0
>
> Attachments: slingmocktest.zip
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> When using org.apache.sling.testing.mock.sling.junit.SlingContext with 
> ResourceResolverType.JCR_OAK , the URL [http://sling.apache.org/] is somehow 
> registered as namespace "sling" instead of the usual 
> [http://sling.apache.org/jcr/sling/1.0] . This has the effect that 
> [http://sling.apache.org/jcr/sling/1.0] gets the prefix sling0 , and this can 
> lead to problems when importing content during tests. This does not appear in 
> 2.1.8-1.16.0, so I assume it's a problem of Sling Mock Oak. It can be a 
> problem of the included dependencies, too, of course.
> I'll attach a zip of a example project that reproduces the error. The crucial 
> lines of the failing test are:
> {code:java}
> JackrabbitSession session = (JackrabbitSession) 
> context.resourceResolver().adaptTo(Session.class);
> String slinguri = session.getNamespaceURI("sling");
> Assert.assertEquals("http://sling.apache.org/jcr/sling/1.0;, 
> slinguri);
> // is actually http://sling.apache.org/{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-9659) Namespace http://sling.apache.org/ registered as prefix sling instead of http://sling.apache.org/jcr/sling/1.0

2021-05-10 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on SLING-9659:


Fixed in 
https://github.com/apache/sling-org-apache-sling-testing-sling-mock-oak/commit/322aaad2c22bfe764afc8ec9c40fb078cdf31250

> Namespace http://sling.apache.org/ registered as prefix sling instead of 
> http://sling.apache.org/jcr/sling/1.0
> --
>
> Key: SLING-9659
> URL: https://issues.apache.org/jira/browse/SLING-9659
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Affects Versions: Testing Sling Mock Oak 2.1.10-1.16.0
>Reporter: Hans-Peter Stoerr
>Assignee: Konrad Windszus
>Priority: Major
> Attachments: slingmocktest.zip
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> When using org.apache.sling.testing.mock.sling.junit.SlingContext with 
> ResourceResolverType.JCR_OAK , the URL [http://sling.apache.org/] is somehow 
> registered as namespace "sling" instead of the usual 
> [http://sling.apache.org/jcr/sling/1.0] . This has the effect that 
> [http://sling.apache.org/jcr/sling/1.0] gets the prefix sling0 , and this can 
> lead to problems when importing content during tests. This does not appear in 
> 2.1.8-1.16.0, so I assume it's a problem of Sling Mock Oak. It can be a 
> problem of the included dependencies, too, of course.
> I'll attach a zip of a example project that reproduces the error. The crucial 
> lines of the failing test are:
> {code:java}
> JackrabbitSession session = (JackrabbitSession) 
> context.resourceResolver().adaptTo(Session.class);
> String slinguri = session.getNamespaceURI("sling");
> Assert.assertEquals("http://sling.apache.org/jcr/sling/1.0;, 
> slinguri);
> // is actually http://sling.apache.org/{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9659) Namespace http://sling.apache.org/ registered as prefix sling instead of http://sling.apache.org/jcr/sling/1.0

2021-05-10 Thread Konrad Windszus (Jira)


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

Konrad Windszus updated SLING-9659:
---
Fix Version/s: Testing Sling Mock Oak 3.0.0-1.16.0

> Namespace http://sling.apache.org/ registered as prefix sling instead of 
> http://sling.apache.org/jcr/sling/1.0
> --
>
> Key: SLING-9659
> URL: https://issues.apache.org/jira/browse/SLING-9659
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Affects Versions: Testing Sling Mock Oak 2.1.10-1.16.0
>Reporter: Hans-Peter Stoerr
>Assignee: Konrad Windszus
>Priority: Major
> Fix For: Testing Sling Mock Oak 3.0.0-1.16.0
>
> Attachments: slingmocktest.zip
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> When using org.apache.sling.testing.mock.sling.junit.SlingContext with 
> ResourceResolverType.JCR_OAK , the URL [http://sling.apache.org/] is somehow 
> registered as namespace "sling" instead of the usual 
> [http://sling.apache.org/jcr/sling/1.0] . This has the effect that 
> [http://sling.apache.org/jcr/sling/1.0] gets the prefix sling0 , and this can 
> lead to problems when importing content during tests. This does not appear in 
> 2.1.8-1.16.0, so I assume it's a problem of Sling Mock Oak. It can be a 
> problem of the included dependencies, too, of course.
> I'll attach a zip of a example project that reproduces the error. The crucial 
> lines of the failing test are:
> {code:java}
> JackrabbitSession session = (JackrabbitSession) 
> context.resourceResolver().adaptTo(Session.class);
> String slinguri = session.getNamespaceURI("sling");
> Assert.assertEquals("http://sling.apache.org/jcr/sling/1.0;, 
> slinguri);
> // is actually http://sling.apache.org/{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [sling-org-apache-sling-testing-sling-mock-oak] kwin merged pull request #2: SLING-9659 fix Sling NS URI

2021-05-10 Thread GitBox


kwin merged pull request #2:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-sling-mock-oak/pull/2


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Resolved] (SLING-10368) Add service user mapping for Auth Core

2021-05-10 Thread Oliver Lietz (Jira)


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

Oliver Lietz resolved SLING-10368.
--
Resolution: Done

> Add service user mapping for Auth Core
> --
>
> Key: SLING-10368
> URL: https://issues.apache.org/jira/browse/SLING-10368
> Project: Sling
>  Issue Type: Task
>  Components: Karaf
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Major
> Fix For: Karaf Features 1.0.0, Karaf Configs 1.0.0
>
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (SLING-10368) Add service user mapping for Auth Core

2021-05-10 Thread Oliver Lietz (Jira)
Oliver Lietz created SLING-10368:


 Summary: Add service user mapping for Auth Core
 Key: SLING-10368
 URL: https://issues.apache.org/jira/browse/SLING-10368
 Project: Sling
  Issue Type: Task
  Components: Karaf
Reporter: Oliver Lietz
Assignee: Oliver Lietz
 Fix For: Karaf Features 1.0.0, Karaf Configs 1.0.0






--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Created] (SLING-10367) Update Karaf to 4.3.3

2021-05-10 Thread Oliver Lietz (Jira)
Oliver Lietz created SLING-10367:


 Summary: Update Karaf to 4.3.3
 Key: SLING-10367
 URL: https://issues.apache.org/jira/browse/SLING-10367
 Project: Sling
  Issue Type: Task
  Components: Karaf
Affects Versions: Karaf Launchpad Integration Tests (Oak Tar) 0.0.12, Karaf 
Integration Tests 1.0.0, Karaf Distribution 1.0.0, Karaf Features 1.0.0
Reporter: Oliver Lietz
Assignee: Oliver Lietz






--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Resolved] (SLING-8990) Switch configurations to OSGi R7 configuration format

2021-05-10 Thread Oliver Lietz (Jira)


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

Oliver Lietz resolved SLING-8990.
-
Resolution: Done

Works with Karaf 4.3.2.

> Switch configurations to OSGi R7 configuration format
> -
>
> Key: SLING-8990
> URL: https://issues.apache.org/jira/browse/SLING-8990
> Project: Sling
>  Issue Type: Task
>  Components: Karaf
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Major
> Fix For: Karaf Distribution 1.0.0, Karaf Features 1.0.0, Karaf 
> Configs 1.0.0
>
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-9659) Namespace http://sling.apache.org/ registered as prefix sling instead of http://sling.apache.org/jcr/sling/1.0

2021-05-10 Thread Stefan Seifert (Jira)


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

Stefan Seifert commented on SLING-9659:
---

indeed, that commit was wrong

> Namespace http://sling.apache.org/ registered as prefix sling instead of 
> http://sling.apache.org/jcr/sling/1.0
> --
>
> Key: SLING-9659
> URL: https://issues.apache.org/jira/browse/SLING-9659
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Affects Versions: Testing Sling Mock Oak 2.1.10-1.16.0
>Reporter: Hans-Peter Stoerr
>Assignee: Konrad Windszus
>Priority: Major
> Attachments: slingmocktest.zip
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> When using org.apache.sling.testing.mock.sling.junit.SlingContext with 
> ResourceResolverType.JCR_OAK , the URL [http://sling.apache.org/] is somehow 
> registered as namespace "sling" instead of the usual 
> [http://sling.apache.org/jcr/sling/1.0] . This has the effect that 
> [http://sling.apache.org/jcr/sling/1.0] gets the prefix sling0 , and this can 
> lead to problems when importing content during tests. This does not appear in 
> 2.1.8-1.16.0, so I assume it's a problem of Sling Mock Oak. It can be a 
> problem of the included dependencies, too, of course.
> I'll attach a zip of a example project that reproduces the error. The crucial 
> lines of the failing test are:
> {code:java}
> JackrabbitSession session = (JackrabbitSession) 
> context.resourceResolver().adaptTo(Session.class);
> String slinguri = session.getNamespaceURI("sling");
> Assert.assertEquals("http://sling.apache.org/jcr/sling/1.0;, 
> slinguri);
> // is actually http://sling.apache.org/{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


Custom quality gates in sonarcloud.io

2021-05-10 Thread Konrad Windszus
Hi,
currently we inherit the quality gate from Apache 
https://sonarcloud.io/organizations/apache/quality_gates/show/9 which is very 
generic.
Especially 100% of security hotspots reviewed seems tough as at least I lack 
the rights to review.

Does anyone know how other projects added custom quality gates like 
https://sonarcloud.io/organizations/apache/quality_gates/show/39497?
Thanks,
Konrad

[jira] [Created] (SLING-10366) Adjust HTTP codes for SlingPostServlet integration tests

2021-05-10 Thread Oliver Lietz (Jira)
Oliver Lietz created SLING-10366:


 Summary: Adjust HTTP codes for SlingPostServlet integration tests
 Key: SLING-10366
 URL: https://issues.apache.org/jira/browse/SLING-10366
 Project: Sling
  Issue Type: Task
  Components: Servlets, Testing
Reporter: Oliver Lietz
Assignee: Joerg Hoh
 Fix For: Launchpad Integration Tests 12


Failures caused by {{org.apache.sling.servlets.post}} {{2.4.3-SNAPSHOT}}:
{noformat}
[ERROR] Failures: 
[ERROR]   
PostServletAtCopyTest.testCopyAncestor:232->HttpTestBase.assertPostStatus:412 
Expecting status 500 expected:<500> but was:<409>
[ERROR]   
PostServletCopyTest.testCopyAncestor:619->HttpTestBase.assertPostStatus:412 
Expecting status 500 expected:<500> but was:<409>
[ERROR]   
PostServletCreateTest.testCreateNodeWithInvalidExactName:196->HttpTestBase.assertPostStatus:410
 expected:<500> but was:<409>
[ERROR]   
PostServletCreateTest.testCreatingNodeUnderFile:255->HttpTestBase.assertPostStatus:412
 Response to creating a child under nt:file should fail. expected:<500> but 
was:<409>
[ERROR]   
PostServletImportTest.testImportAutoCheckoutNodes:326->HttpTestBase.assertPostStatus:412
 Expected error from VersionException expected:<500> but was:<409>
[ERROR]   
PostServletImportTest.testImportNodeWithInvalidExactName:765->HttpTestBase.assertPostStatus:410
 expected:<500> but was:<409>
[INFO] 
[ERROR] Tests run: 665, Failures: 6, Errors: 0, Skipped: 1
{noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-10365) Sling Model Exporter framework. A HEAD request leads to the java.lang.IllegalArgumentException: setContentLength(0) when already written 273

2021-05-10 Thread Olena (Jira)


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

Olena updated SLING-10365:
--
Description: 
We are using the Sling Model Exported framework:
{code:java}
@Model(adaptables = Resource.class, resourceType = “myResourceType”)
@Exporters({
        @Exporter(name = ExporterA.NAME, selector = "css", extensions = "html"),
        @Exporter(name = ExporterB.NAME, selector = "js", extensions = "html")
})
public class MyModel { {code}
Sightly script:
{code:java}
${@ resourceType='myResourceType', selectors='css'}"
{code}
 

A HEAD request leads to an error, at the same time, a GET request is processed 
successfully.
{code:java}
java.lang.IllegalArgumentException: setContentLength(0) when already written 
273 at org.eclipse.jetty.server.Response.setContentLength(Response.java:876) 
[org.apache.felix.http.jetty:4.1.6] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
org.apache.sling.engine.impl.log.RequestLoggerResponse.setContentLength(RequestLoggerResponse.java:198)
 [org.apache.sling.engine:2.7.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:511)
 [org.apache.sling.api:2.22.0] at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:501)
 [org.apache.sling.api:2.22.0] at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet.doHead(SlingSafeMethodsServlet.java:105)
 [org.apache.sling.api:2.22.0]
{code}
Please find the full log attached

 

  was:
We are using the Sling Model Exported framework:
{code:java}
@Model(adaptables = Resource.class, resourceType = “myResourceType”)
@Exporters({
        @Exporter(name = ExporterA.NAME, selector = "css", extensions = "html"),
        @Exporter(name = ExporterB.NAME, selector = "js", extensions = "html")
})
{code}
 

HEAD request leads to an error, at the same time, a GET request is processed 
successfully.
{code:java}
java.lang.IllegalArgumentException: setContentLength(0) when already written 
273 at org.eclipse.jetty.server.Response.setContentLength(Response.java:876) 
[org.apache.felix.http.jetty:4.1.6] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
org.apache.sling.engine.impl.log.RequestLoggerResponse.setContentLength(RequestLoggerResponse.java:198)
 [org.apache.sling.engine:2.7.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 

[jira] [Comment Edited] (SLING-10365) Sling Model Exporter framework. A HEAD request leads to the java.lang.IllegalArgumentException: setContentLength(0) when already written 273

2021-05-10 Thread Olena (Jira)


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

Olena edited comment on SLING-10365 at 5/10/21, 9:24 AM:
-

[~kwin] Indeed, this is a HEAD request to an HTML page, where the mentioned 
model is used and the following sightly script is involved:

${@ resourceType='myResourceType', selectors='css'}" 

 


was (Author: slyshkova):
[~kwin] Indeed, this is a HEAD request to an HTML page, where the mentioned 
model is used and the following sightly script is involved:

$\{@ resourceType='myResourceType', selectors='css'}"

 

 

 

 

 

> Sling Model Exporter framework. A HEAD request leads to the 
> java.lang.IllegalArgumentException: setContentLength(0) when already written 
> 273
> 
>
> Key: SLING-10365
> URL: https://issues.apache.org/jira/browse/SLING-10365
> Project: Sling
>  Issue Type: Bug
>Reporter: Olena
>Priority: Major
> Attachments: SlingHead.log
>
>
> We are using the Sling Model Exported framework:
> {code:java}
> @Model(adaptables = Resource.class, resourceType = “myResourceType”)
> @Exporters({
>         @Exporter(name = ExporterA.NAME, selector = "css", extensions = 
> "html"),
>         @Exporter(name = ExporterB.NAME, selector = "js", extensions = "html")
> })
> {code}
>  
> HEAD request leads to an error, at the same time, a GET request is processed 
> successfully.
> {code:java}
> java.lang.IllegalArgumentException: setContentLength(0) when already written 
> 273 at org.eclipse.jetty.server.Response.setContentLength(Response.java:876) 
> [org.apache.felix.http.jetty:4.1.6] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> org.apache.sling.engine.impl.log.RequestLoggerResponse.setContentLength(RequestLoggerResponse.java:198)
>  [org.apache.sling.engine:2.7.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:511)
>  [org.apache.sling.api:2.22.0] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:501)
>  [org.apache.sling.api:2.22.0] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet.doHead(SlingSafeMethodsServlet.java:105)
>  [org.apache.sling.api:2.22.0]
> {code}
> Please find the full log attached
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-10365) Sling Model Exporter framework. A HEAD request leads to the java.lang.IllegalArgumentException: setContentLength(0) when already written 273

2021-05-10 Thread Olena (Jira)


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

Olena commented on SLING-10365:
---

[~kwin] Indeed, this is a HEAD request to an HTML page, where the mentioned 
model is used and the following sightly script is involved:

$\{@ resourceType='myResourceType', selectors='css'}"

 

 

 

 

 

> Sling Model Exporter framework. A HEAD request leads to the 
> java.lang.IllegalArgumentException: setContentLength(0) when already written 
> 273
> 
>
> Key: SLING-10365
> URL: https://issues.apache.org/jira/browse/SLING-10365
> Project: Sling
>  Issue Type: Bug
>Reporter: Olena
>Priority: Major
> Attachments: SlingHead.log
>
>
> We are using the Sling Model Exported framework:
> {code:java}
> @Model(adaptables = Resource.class, resourceType = “myResourceType”)
> @Exporters({
>         @Exporter(name = ExporterA.NAME, selector = "css", extensions = 
> "html"),
>         @Exporter(name = ExporterB.NAME, selector = "js", extensions = "html")
> })
> {code}
>  
> HEAD request leads to an error, at the same time, a GET request is processed 
> successfully.
> {code:java}
> java.lang.IllegalArgumentException: setContentLength(0) when already written 
> 273 at org.eclipse.jetty.server.Response.setContentLength(Response.java:876) 
> [org.apache.felix.http.jetty:4.1.6] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> org.apache.sling.engine.impl.log.RequestLoggerResponse.setContentLength(RequestLoggerResponse.java:198)
>  [org.apache.sling.engine:2.7.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:511)
>  [org.apache.sling.api:2.22.0] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:501)
>  [org.apache.sling.api:2.22.0] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet.doHead(SlingSafeMethodsServlet.java:105)
>  [org.apache.sling.api:2.22.0]
> {code}
> Please find the full log attached
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-10365) Sling Model Exporter framework. A HEAD request leads to the java.lang.IllegalArgumentException: setContentLength(0) when already written 273

2021-05-10 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on SLING-10365:
-

Your exporter is registered for selector {{css}} or {{js}} with extension 
{{html}}. But according to the error log the head request was for {{HEAD 
/content/netcentric-digitalxn-reference/de/en.html}}. So I don't think this has 
anything to do with the exporter. Also the stacktrace does not show any hints 
of the exporter.

> Sling Model Exporter framework. A HEAD request leads to the 
> java.lang.IllegalArgumentException: setContentLength(0) when already written 
> 273
> 
>
> Key: SLING-10365
> URL: https://issues.apache.org/jira/browse/SLING-10365
> Project: Sling
>  Issue Type: Bug
>Reporter: Olena
>Priority: Major
> Attachments: SlingHead.log
>
>
> We are using the Sling Model Exported framework:
> {code:java}
> @Model(adaptables = Resource.class, resourceType = “myResourceType”)
> @Exporters({
>         @Exporter(name = ExporterA.NAME, selector = "css", extensions = 
> "html"),
>         @Exporter(name = ExporterB.NAME, selector = "js", extensions = "html")
> })
> {code}
>  
> HEAD request leads to an error, at the same time, a GET request is processed 
> successfully.
> {code:java}
> java.lang.IllegalArgumentException: setContentLength(0) when already written 
> 273 at org.eclipse.jetty.server.Response.setContentLength(Response.java:876) 
> [org.apache.felix.http.jetty:4.1.6] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> org.apache.sling.engine.impl.log.RequestLoggerResponse.setContentLength(RequestLoggerResponse.java:198)
>  [org.apache.sling.engine:2.7.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:511)
>  [org.apache.sling.api:2.22.0] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:501)
>  [org.apache.sling.api:2.22.0] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet.doHead(SlingSafeMethodsServlet.java:105)
>  [org.apache.sling.api:2.22.0]
> {code}
> Please find the full log attached
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-10365) Sling Model Exporter framework. A HEAD request leads to the java.lang.IllegalArgumentException: setContentLength(0) when already written 273

2021-05-10 Thread Olena (Jira)


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

Olena updated SLING-10365:
--
Summary: Sling Model Exporter framework. A HEAD request leads to the 
java.lang.IllegalArgumentException: setContentLength(0) when already written 
273  (was: Sling Model Exporter Framework. A HEAD request leads to the 
java.lang.IllegalArgumentException: setContentLength(0) when already written 
273)

> Sling Model Exporter framework. A HEAD request leads to the 
> java.lang.IllegalArgumentException: setContentLength(0) when already written 
> 273
> 
>
> Key: SLING-10365
> URL: https://issues.apache.org/jira/browse/SLING-10365
> Project: Sling
>  Issue Type: Bug
>Reporter: Olena
>Priority: Major
> Attachments: SlingHead.log
>
>
> We are using the Sling Model Exported framework:
> {code:java}
> @Model(adaptables = Resource.class, resourceType = “myResourceType”)
> @Exporters({
>         @Exporter(name = ExporterA.NAME, selector = "css", extensions = 
> "html"),
>         @Exporter(name = ExporterB.NAME, selector = "js", extensions = "html")
> })
> {code}
>  
> HEAD request leads to an error, at the same time, a GET request is processed 
> successfully.
> {code:java}
> java.lang.IllegalArgumentException: setContentLength(0) when already written 
> 273 at org.eclipse.jetty.server.Response.setContentLength(Response.java:876) 
> [org.apache.felix.http.jetty:4.1.6] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> org.apache.sling.engine.impl.log.RequestLoggerResponse.setContentLength(RequestLoggerResponse.java:198)
>  [org.apache.sling.engine:2.7.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:511)
>  [org.apache.sling.api:2.22.0] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:501)
>  [org.apache.sling.api:2.22.0] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet.doHead(SlingSafeMethodsServlet.java:105)
>  [org.apache.sling.api:2.22.0]
> {code}
> Please find the full log attached
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-10365) Sling Model Exporter Framework. A HEAD request leads to the java.lang.IllegalArgumentException: setContentLength(0) when already written 273

2021-05-10 Thread Olena (Jira)


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

Olena updated SLING-10365:
--
Description: 
We are using the Sling Model Exported framework:
{code:java}
@Model(adaptables = Resource.class, resourceType = “myResourceType”)
@Exporters({
        @Exporter(name = ExporterA.NAME, selector = "css", extensions = "html"),
        @Exporter(name = ExporterB.NAME, selector = "js", extensions = "html")
})
{code}
 

HEAD request leads to an error, at the same time, a GET request is processed 
successfully.
{code:java}
java.lang.IllegalArgumentException: setContentLength(0) when already written 
273 at org.eclipse.jetty.server.Response.setContentLength(Response.java:876) 
[org.apache.felix.http.jetty:4.1.6] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
org.apache.sling.engine.impl.log.RequestLoggerResponse.setContentLength(RequestLoggerResponse.java:198)
 [org.apache.sling.engine:2.7.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:511)
 [org.apache.sling.api:2.22.0] at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:501)
 [org.apache.sling.api:2.22.0] at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet.doHead(SlingSafeMethodsServlet.java:105)
 [org.apache.sling.api:2.22.0]
{code}
Please find the full log attached

 

  was:
Using the Sling Model Exporter Framework leads to an error when processing a 
HEAD request.

At the same time, a GET request is processed successfully.
{code:java}
java.lang.IllegalArgumentException: setContentLength(0) when already written 
273 at org.eclipse.jetty.server.Response.setContentLength(Response.java:876) 
[org.apache.felix.http.jetty:4.1.6] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
org.apache.sling.engine.impl.log.RequestLoggerResponse.setContentLength(RequestLoggerResponse.java:198)
 [org.apache.sling.engine:2.7.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 

[jira] [Updated] (SLING-10365) Sling Model Exporter Framework. A HEAD request leads to the java.lang.IllegalArgumentException: setContentLength(0) when already written 273

2021-05-10 Thread Olena (Jira)


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

Olena updated SLING-10365:
--
Summary: Sling Model Exporter Framework. A HEAD request leads to the 
java.lang.IllegalArgumentException: setContentLength(0) when already written 
273  (was: Sling Exporter Framework. A HEAD request leads to the 
java.lang.IllegalArgumentException: setContentLength(0) when already written 
273)

> Sling Model Exporter Framework. A HEAD request leads to the 
> java.lang.IllegalArgumentException: setContentLength(0) when already written 
> 273
> 
>
> Key: SLING-10365
> URL: https://issues.apache.org/jira/browse/SLING-10365
> Project: Sling
>  Issue Type: Bug
>Reporter: Olena
>Priority: Major
> Attachments: SlingHead.log
>
>
> Using the Sling Exporter Framework leads to an error when processing a HEAD 
> request.
> At the same time, a GET request is processed successfully.
> {code:java}
> java.lang.IllegalArgumentException: setContentLength(0) when already written 
> 273 at org.eclipse.jetty.server.Response.setContentLength(Response.java:876) 
> [org.apache.felix.http.jetty:4.1.6] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> org.apache.sling.engine.impl.log.RequestLoggerResponse.setContentLength(RequestLoggerResponse.java:198)
>  [org.apache.sling.engine:2.7.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:511)
>  [org.apache.sling.api:2.22.0] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:501)
>  [org.apache.sling.api:2.22.0] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet.doHead(SlingSafeMethodsServlet.java:105)
>  [org.apache.sling.api:2.22.0]
> {code}
> Please find the full log attached
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-10365) Sling Model Exporter Framework. A HEAD request leads to the java.lang.IllegalArgumentException: setContentLength(0) when already written 273

2021-05-10 Thread Olena (Jira)


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

Olena updated SLING-10365:
--
Description: 
Using the Sling Model Exporter Framework leads to an error when processing a 
HEAD request.

At the same time, a GET request is processed successfully.
{code:java}
java.lang.IllegalArgumentException: setContentLength(0) when already written 
273 at org.eclipse.jetty.server.Response.setContentLength(Response.java:876) 
[org.apache.felix.http.jetty:4.1.6] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
org.apache.sling.engine.impl.log.RequestLoggerResponse.setContentLength(RequestLoggerResponse.java:198)
 [org.apache.sling.engine:2.7.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:511)
 [org.apache.sling.api:2.22.0] at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:501)
 [org.apache.sling.api:2.22.0] at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet.doHead(SlingSafeMethodsServlet.java:105)
 [org.apache.sling.api:2.22.0]
{code}
Please find the full log attached

 

  was:
Using the Sling Exporter Framework leads to an error when processing a HEAD 
request.

At the same time, a GET request is processed successfully.
{code:java}
java.lang.IllegalArgumentException: setContentLength(0) when already written 
273 at org.eclipse.jetty.server.Response.setContentLength(Response.java:876) 
[org.apache.felix.http.jetty:4.1.6] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
org.apache.sling.engine.impl.log.RequestLoggerResponse.setContentLength(RequestLoggerResponse.java:198)
 [org.apache.sling.engine:2.7.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 

[jira] [Commented] (SLING-10365) Sling Exporter Framework. A HEAD request leads to the java.lang.IllegalArgumentException: setContentLength(0) when already written 273

2021-05-10 Thread Bertrand Delacretaz (Jira)


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

Bertrand Delacretaz commented on SLING-10365:
-

Could you provide more precise steps to reproduce this problem? Ideally based 
on the Sling Starter, https://github.com/apache/sling-org-apache-sling-starter 
or on the automated tests of the module that's affected.

> Sling Exporter Framework. A HEAD request leads to the 
> java.lang.IllegalArgumentException: setContentLength(0) when already written 
> 273
> --
>
> Key: SLING-10365
> URL: https://issues.apache.org/jira/browse/SLING-10365
> Project: Sling
>  Issue Type: Bug
>Reporter: Olena
>Priority: Major
> Attachments: SlingHead.log
>
>
> Using the Sling Exporter Framework leads to an error when processing a HEAD 
> request.
> At the same time, a GET request is processed successfully.
> {code:java}
> java.lang.IllegalArgumentException: setContentLength(0) when already written 
> 273 at org.eclipse.jetty.server.Response.setContentLength(Response.java:876) 
> [org.apache.felix.http.jetty:4.1.6] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> org.apache.sling.engine.impl.log.RequestLoggerResponse.setContentLength(RequestLoggerResponse.java:198)
>  [org.apache.sling.engine:2.7.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
>  [org.apache.felix.http.servlet-api:1.1.2] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:511)
>  [org.apache.sling.api:2.22.0] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:501)
>  [org.apache.sling.api:2.22.0] at 
> org.apache.sling.api.servlets.SlingSafeMethodsServlet.doHead(SlingSafeMethodsServlet.java:105)
>  [org.apache.sling.api:2.22.0]
> {code}
> Please find the full log attached
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-10365) Sling Exporter Framework. A HEAD request leads to the java.lang.IllegalArgumentException: setContentLength(0) when already written 273

2021-05-10 Thread Olena (Jira)


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

Olena updated SLING-10365:
--
Description: 
Using the Sling Exporter Framework leads to an error when processing a HEAD 
request.

At the same time, a GET request is processed successfully.
{code:java}
java.lang.IllegalArgumentException: setContentLength(0) when already written 
273 at org.eclipse.jetty.server.Response.setContentLength(Response.java:876) 
[org.apache.felix.http.jetty:4.1.6] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
org.apache.sling.engine.impl.log.RequestLoggerResponse.setContentLength(RequestLoggerResponse.java:198)
 [org.apache.sling.engine:2.7.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:511)
 [org.apache.sling.api:2.22.0] at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:501)
 [org.apache.sling.api:2.22.0] at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet.doHead(SlingSafeMethodsServlet.java:105)
 [org.apache.sling.api:2.22.0]
{code}
Please find the full log attached

 

  was:
Using the Sling Exporter Framework leads to an error when processing a HEAD 
request.

At the same time, a GET request is processed successfully.
{code:java}
java.lang.IllegalArgumentException: setContentLength(0) when already written 
273java.lang.IllegalArgumentException: setContentLength(0) when already written 
273 at org.eclipse.jetty.server.Response.setContentLength(Response.java:876) 
[org.apache.felix.http.jetty:4.1.6] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
org.apache.sling.engine.impl.log.RequestLoggerResponse.setContentLength(RequestLoggerResponse.java:198)
 [org.apache.sling.engine:2.7.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 

[jira] [Created] (SLING-10365) Sling Exporter Framework. A HEAD request leads to the java.lang.IllegalArgumentException: setContentLength(0) when already written 273

2021-05-10 Thread Olena (Jira)
Olena created SLING-10365:
-

 Summary: Sling Exporter Framework. A HEAD request leads to the 
java.lang.IllegalArgumentException: setContentLength(0) when already written 273
 Key: SLING-10365
 URL: https://issues.apache.org/jira/browse/SLING-10365
 Project: Sling
  Issue Type: Bug
Reporter: Olena
 Attachments: SlingHead.log

Using the Sling Exporter Framework leads to an error when processing a HEAD 
request.

At the same time, a GET request is processed successfully.
{code:java}
java.lang.IllegalArgumentException: setContentLength(0) when already written 
273java.lang.IllegalArgumentException: setContentLength(0) when already written 
273 at org.eclipse.jetty.server.Response.setContentLength(Response.java:876) 
[org.apache.felix.http.jetty:4.1.6] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
org.apache.sling.engine.impl.log.RequestLoggerResponse.setContentLength(RequestLoggerResponse.java:198)
 [org.apache.sling.engine:2.7.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
javax.servlet.ServletResponseWrapper.setContentLength(ServletResponseWrapper.java:112)
 [org.apache.felix.http.servlet-api:1.1.2] at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:511)
 [org.apache.sling.api:2.22.0] at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet$NoBodyResponse.setContentLength(SlingSafeMethodsServlet.java:501)
 [org.apache.sling.api:2.22.0] at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet.doHead(SlingSafeMethodsServlet.java:105)
 [org.apache.sling.api:2.22.0]
{code}
Please find the full log attached

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Comment Edited] (SLING-9659) Namespace http://sling.apache.org/ registered as prefix sling instead of http://sling.apache.org/jcr/sling/1.0

2021-05-10 Thread Bertrand Delacretaz (Jira)


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

Bertrand Delacretaz edited comment on SLING-9659 at 5/10/21, 8:41 AM:
--

Indeed seems like a regression of 
[https://github.com/apache/sling-org-apache-sling-testing-sling-mock-oak/commit/0ba06bde8eb2bdf6d4fa845606fa12fb9169ba6e]
 


was (Author: kwin):
Indeed seems like a regression of 
[https://github.com/apache/sling-org-apache-sling-testing-sling-mock-oak/commit/0ba06bde8eb2bdf6d4fa845606fa12fb9169ba6e.]
 

> Namespace http://sling.apache.org/ registered as prefix sling instead of 
> http://sling.apache.org/jcr/sling/1.0
> --
>
> Key: SLING-9659
> URL: https://issues.apache.org/jira/browse/SLING-9659
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Affects Versions: Testing Sling Mock Oak 2.1.10-1.16.0
>Reporter: Hans-Peter Stoerr
>Assignee: Konrad Windszus
>Priority: Major
> Attachments: slingmocktest.zip
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> When using org.apache.sling.testing.mock.sling.junit.SlingContext with 
> ResourceResolverType.JCR_OAK , the URL [http://sling.apache.org/] is somehow 
> registered as namespace "sling" instead of the usual 
> [http://sling.apache.org/jcr/sling/1.0] . This has the effect that 
> [http://sling.apache.org/jcr/sling/1.0] gets the prefix sling0 , and this can 
> lead to problems when importing content during tests. This does not appear in 
> 2.1.8-1.16.0, so I assume it's a problem of Sling Mock Oak. It can be a 
> problem of the included dependencies, too, of course.
> I'll attach a zip of a example project that reproduces the error. The crucial 
> lines of the failing test are:
> {code:java}
> JackrabbitSession session = (JackrabbitSession) 
> context.resourceResolver().adaptTo(Session.class);
> String slinguri = session.getNamespaceURI("sling");
> Assert.assertEquals("http://sling.apache.org/jcr/sling/1.0;, 
> slinguri);
> // is actually http://sling.apache.org/{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (SLING-10000) Switch to Jakarta APIs

2021-05-10 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on SLING-1:
-

Also Apache Tomcat provides a migration tool: 
[https://tomcat.apache.org/download-migration.cgi] (compare with 
https://lists.apache.org/thread.html/r31552357788a1671a7eda4d47f57ca1d30964e4150487267f689fdad%40%3Cdev.sling.apache.org%3E)

> Switch to Jakarta APIs
> --
>
> Key: SLING-1
> URL: https://issues.apache.org/jira/browse/SLING-1
> Project: Sling
>  Issue Type: Task
>  Components: API
>Reporter: Oliver Lietz
>Priority: Major
>
> Java EE APIs are switching from {{javax}} to {{jakarta}}.
> Jakarta Specifications: [https://jakarta.ee/specifications/]
> *Candidates*
>  * {{javax.activation}}
>  * {{javax.servlet}}
>  * {{javax.mail}}
> *Discovery*
>  * Should we have branch {{jakarta}} in each module which needs to switch?
>  * Should we use the breaking change (major version increase in most APIs) to 
> clean up and improve our current API or limit it to the package switch?
> *Tooling*
>  * [Eclipse Transformer|https://github.com/eclipse/transformer]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


Fwd: [ANN] Apache Tomcat Migration tool for Jakarta EE 1.0.0

2021-05-10 Thread Robert Munteanu
Hi,

Not sure if we plan to migrate away from javax.* to jakarta.* soon. But
when we do, we should keep this tool in mind.

Thanks,
Robert
--- Begin Message ---

The Apache Tomcat team announces the immediate availability of Apache
Tomcat Migration Tool for Jakarta EE 1.0.0

Apache Tomcat Migration Tool for Jakarta EE is an open source software
tool for migrating binary web applications (WAR files) and other binary
artefacts from Java EE 8 to Jakarta EE 9.

The notable changes since 0.2.0 include:

- Further fixes to exclude javax.xml packages that are not part of
  Java EE from the migration

- The class transformer now validates that the target classes in the
  Jakarta namespace exist in the runtime environment

Please refer to the change log for the complete list of changes:
https://github.com/apache/tomcat-jakartaee-migration/blob/master/CHANGES.md

Downloads:
http://tomcat.apache.org/download-migration.cgi

Enjoy!

- The Apache Tomcat team

--- End Message ---


[GitHub] [sling-org-apache-sling-testing-sling-mock-oak] sonarcloud[bot] commented on pull request #2: SLING-9659 fix Sling NS URI

2021-05-10 Thread GitBox


sonarcloud[bot] commented on pull request #2:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-sling-mock-oak/pull/2#issuecomment-836317694


   Kudos, SonarCloud Quality Gate passed!
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock-oak=2=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock-oak=2=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock-oak=2=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock-oak=2=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock-oak=2=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock-oak=2=false=VULNERABILITY)
  
   [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-sling-mock-oak=2=false=SECURITY_HOTSPOT)
 [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-sling-mock-oak=2=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-testing-sling-mock-oak=2=false=SECURITY_HOTSPOT)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock-oak=2=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock-oak=2=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-testing-sling-mock-oak=2=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-sling-mock-oak=2=new_coverage=list)
 [100.0% 
Coverage](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-sling-mock-oak=2=new_coverage=list)
  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-sling-mock-oak=2=new_duplicated_lines_density=list)
 [0.0% 
Duplication](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-testing-sling-mock-oak=2=new_duplicated_lines_density=list)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Assigned] (SLING-9659) Namespace http://sling.apache.org/ registered as prefix sling instead of http://sling.apache.org/jcr/sling/1.0

2021-05-10 Thread Konrad Windszus (Jira)


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

Konrad Windszus reassigned SLING-9659:
--

Assignee: Konrad Windszus

> Namespace http://sling.apache.org/ registered as prefix sling instead of 
> http://sling.apache.org/jcr/sling/1.0
> --
>
> Key: SLING-9659
> URL: https://issues.apache.org/jira/browse/SLING-9659
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Affects Versions: Testing Sling Mock Oak 2.1.10-1.16.0
>Reporter: Hans-Peter Stoerr
>Assignee: Konrad Windszus
>Priority: Major
> Attachments: slingmocktest.zip
>
>
> When using org.apache.sling.testing.mock.sling.junit.SlingContext with 
> ResourceResolverType.JCR_OAK , the URL [http://sling.apache.org/] is somehow 
> registered as namespace "sling" instead of the usual 
> [http://sling.apache.org/jcr/sling/1.0] . This has the effect that 
> [http://sling.apache.org/jcr/sling/1.0] gets the prefix sling0 , and this can 
> lead to problems when importing content during tests. This does not appear in 
> 2.1.8-1.16.0, so I assume it's a problem of Sling Mock Oak. It can be a 
> problem of the included dependencies, too, of course.
> I'll attach a zip of a example project that reproduces the error. The crucial 
> lines of the failing test are:
> {code:java}
> JackrabbitSession session = (JackrabbitSession) 
> context.resourceResolver().adaptTo(Session.class);
> String slinguri = session.getNamespaceURI("sling");
> Assert.assertEquals("http://sling.apache.org/jcr/sling/1.0;, 
> slinguri);
> // is actually http://sling.apache.org/{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [sling-org-apache-sling-testing-sling-mock-oak] kwin opened a new pull request #2: SLING-9659 fix Sling NS URI

2021-05-10 Thread GitBox


kwin opened a new pull request #2:
URL: 
https://github.com/apache/sling-org-apache-sling-testing-sling-mock-oak/pull/2


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Commented] (SLING-9659) Namespace http://sling.apache.org/ registered as prefix sling instead of http://sling.apache.org/jcr/sling/1.0

2021-05-10 Thread Konrad Windszus (Jira)


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

Konrad Windszus commented on SLING-9659:


Indeed seems like a regression of 
[https://github.com/apache/sling-org-apache-sling-testing-sling-mock-oak/commit/0ba06bde8eb2bdf6d4fa845606fa12fb9169ba6e.]
 

> Namespace http://sling.apache.org/ registered as prefix sling instead of 
> http://sling.apache.org/jcr/sling/1.0
> --
>
> Key: SLING-9659
> URL: https://issues.apache.org/jira/browse/SLING-9659
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Affects Versions: Testing Sling Mock Oak 2.1.10-1.16.0
>Reporter: Hans-Peter Stoerr
>Priority: Major
> Attachments: slingmocktest.zip
>
>
> When using org.apache.sling.testing.mock.sling.junit.SlingContext with 
> ResourceResolverType.JCR_OAK , the URL [http://sling.apache.org/] is somehow 
> registered as namespace "sling" instead of the usual 
> [http://sling.apache.org/jcr/sling/1.0] . This has the effect that 
> [http://sling.apache.org/jcr/sling/1.0] gets the prefix sling0 , and this can 
> lead to problems when importing content during tests. This does not appear in 
> 2.1.8-1.16.0, so I assume it's a problem of Sling Mock Oak. It can be a 
> problem of the included dependencies, too, of course.
> I'll attach a zip of a example project that reproduces the error. The crucial 
> lines of the failing test are:
> {code:java}
> JackrabbitSession session = (JackrabbitSession) 
> context.resourceResolver().adaptTo(Session.class);
> String slinguri = session.getNamespaceURI("sling");
> Assert.assertEquals("http://sling.apache.org/jcr/sling/1.0;, 
> slinguri);
> // is actually http://sling.apache.org/{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [sling-org-apache-sling-starter] sonarcloud[bot] commented on pull request #20: SLING-10362 allow hook execution for service user

2021-05-10 Thread GitBox


sonarcloud[bot] commented on pull request #20:
URL: 
https://github.com/apache/sling-org-apache-sling-starter/pull/20#issuecomment-836270490


   Kudos, SonarCloud Quality Gate passed!
   
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-starter=20=false=BUG)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-starter=20=false=BUG)
 [0 
Bugs](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-starter=20=false=BUG)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-starter=20=false=VULNERABILITY)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-starter=20=false=VULNERABILITY)
 [0 
Vulnerabilities](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-starter=20=false=VULNERABILITY)
  
   [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-starter=20=false=SECURITY_HOTSPOT)
 [](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-starter=20=false=SECURITY_HOTSPOT)
 [0 Security 
Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_sling-org-apache-sling-starter=20=false=SECURITY_HOTSPOT)
  
   [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-starter=20=false=CODE_SMELL)
 [](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-starter=20=false=CODE_SMELL)
 [0 Code 
Smells](https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-starter=20=false=CODE_SMELL)
   
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-starter=20)
 No Coverage information  
   [](https://sonarcloud.io/component_measures?id=apache_sling-org-apache-sling-starter=20=duplicated_lines_density=list)
 No Duplication information
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [sling-org-apache-sling-starter] kwin opened a new pull request #20: SLING-10362 allow hook execution for service user

2021-05-10 Thread GitBox


kwin opened a new pull request #20:
URL: https://github.com/apache/sling-org-apache-sling-starter/pull/20


   This enables installation of packages containing hooks via the OSGi
   Installer Factory


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Created] (SLING-10364) sling-feature-launcher-maven-plugin: Optionally wait with shutdown until key is pressed

2021-05-10 Thread Konrad Windszus (Jira)
Konrad Windszus created SLING-10364:
---

 Summary: sling-feature-launcher-maven-plugin: Optionally wait with 
shutdown until key is pressed
 Key: SLING-10364
 URL: https://issues.apache.org/jira/browse/SLING-10364
 Project: Sling
  Issue Type: Improvement
  Components: Feature Model, Maven Plugins and Archetypes
Affects Versions: Feature Launcher Maven Plugin 0.1.0
Reporter: Konrad Windszus
Assignee: Konrad Windszus
 Fix For: Feature Launcher Maven Plugin 0.1.2


Similar to 
[https://github.com/apache/sling-slingstart-maven-plugin/blob/b3abd6d811f895a126870ac241ba5d51d4be135c/src/main/java/org/apache/sling/maven/slingstart/run/AbstractStartStopMojo.java#L71]
 it is sometimes handy to defer the shutdown of the Sling instance to perform 
additional manual tests.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Updated] (SLING-9659) Namespace http://sling.apache.org/ registered as prefix sling instead of http://sling.apache.org/jcr/sling/1.0

2021-05-10 Thread Hans-Peter Stoerr (Jira)


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

Hans-Peter Stoerr updated SLING-9659:
-
Priority: Major  (was: Minor)

> Namespace http://sling.apache.org/ registered as prefix sling instead of 
> http://sling.apache.org/jcr/sling/1.0
> --
>
> Key: SLING-9659
> URL: https://issues.apache.org/jira/browse/SLING-9659
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Affects Versions: Testing Sling Mock Oak 2.1.10-1.16.0
>Reporter: Hans-Peter Stoerr
>Priority: Major
> Attachments: slingmocktest.zip
>
>
> When using org.apache.sling.testing.mock.sling.junit.SlingContext with 
> ResourceResolverType.JCR_OAK , the URL [http://sling.apache.org/] is somehow 
> registered as namespace "sling" instead of the usual 
> [http://sling.apache.org/jcr/sling/1.0] . This has the effect that 
> [http://sling.apache.org/jcr/sling/1.0] gets the prefix sling0 , and this can 
> lead to problems when importing content during tests. This does not appear in 
> 2.1.8-1.16.0, so I assume it's a problem of Sling Mock Oak. It can be a 
> problem of the included dependencies, too, of course.
> I'll attach a zip of a example project that reproduces the error. The crucial 
> lines of the failing test are:
> {code:java}
> JackrabbitSession session = (JackrabbitSession) 
> context.resourceResolver().adaptTo(Session.class);
> String slinguri = session.getNamespaceURI("sling");
> Assert.assertEquals("http://sling.apache.org/jcr/sling/1.0;, 
> slinguri);
> // is actually http://sling.apache.org/{code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)