[jira] [Commented] (SLING-2534) Strings of zero length on update in post servlet delete the property

2018-12-04 Thread Hanish Bansal (JIRA)


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

Hanish Bansal commented on SLING-2534:
--

[~cziegeler] I have provided an updated patch on top of latest master - 
{{SLING-2534-diff.txt}}

> Strings of zero length on update in post servlet delete the property
> 
>
> Key: SLING-2534
> URL: https://issues.apache.org/jira/browse/SLING-2534
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Servlets Post 2.1.2
>Reporter: Endolf
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Servlets Post 2.3.26
>
> Attachments: SLING-2534-diff.txt, blankstrings.patch
>
>
> According to JCR specs, for string type properties, a blank string should be 
> a valid value. Currently the post servlet delets any property where 1 or less 
> values are specifed and the 1 value has a 0 length. I think string properties 
> with a zero length should be blanked instead of deleted.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SLING-2534) Strings of zero length on update in post servlet delete the property

2018-12-04 Thread Hanish Bansal (JIRA)


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

Hanish Bansal updated SLING-2534:
-
Attachment: SLING-2534-diff.txt

> Strings of zero length on update in post servlet delete the property
> 
>
> Key: SLING-2534
> URL: https://issues.apache.org/jira/browse/SLING-2534
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Servlets Post 2.1.2
>Reporter: Endolf
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Servlets Post 2.3.26
>
> Attachments: SLING-2534-diff.txt, blankstrings.patch
>
>
> According to JCR specs, for string type properties, a blank string should be 
> a valid value. Currently the post servlet delets any property where 1 or less 
> values are specifed and the 1 value has a 0 length. I think string properties 
> with a zero length should be blanked instead of deleted.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SLING-2534) Strings of zero length on update in post servlet delete the property

2018-12-04 Thread Hanish Bansal (JIRA)


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

Hanish Bansal updated SLING-2534:
-
Attachment: (was: SLING-2534-diff.txt)

> Strings of zero length on update in post servlet delete the property
> 
>
> Key: SLING-2534
> URL: https://issues.apache.org/jira/browse/SLING-2534
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Servlets Post 2.1.2
>Reporter: Endolf
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Servlets Post 2.3.26
>
> Attachments: blankstrings.patch
>
>
> According to JCR specs, for string type properties, a blank string should be 
> a valid value. Currently the post servlet delets any property where 1 or less 
> values are specifed and the 1 value has a 0 length. I think string properties 
> with a zero length should be blanked instead of deleted.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SLING-2534) Strings of zero length on update in post servlet delete the property

2018-12-04 Thread Hanish Bansal (JIRA)


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

Hanish Bansal updated SLING-2534:
-
Attachment: SLING-2534-diff.txt

> Strings of zero length on update in post servlet delete the property
> 
>
> Key: SLING-2534
> URL: https://issues.apache.org/jira/browse/SLING-2534
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Affects Versions: Servlets Post 2.1.2
>Reporter: Endolf
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Servlets Post 2.3.26
>
> Attachments: SLING-2534-diff.txt, blankstrings.patch
>
>
> According to JCR specs, for string type properties, a blank string should be 
> a valid value. Currently the post servlet delets any property where 1 or less 
> values are specifed and the 1 value has a 0 length. I think string properties 
> with a zero length should be blanked instead of deleted.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (SLING-8162) CMS - UI - Fix Missing Titles & Dialog Cleanup

2018-12-04 Thread Dan Klco (JIRA)


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

Dan Klco reassigned SLING-8162:
---

Assignee: Dan Klco

> CMS - UI - Fix Missing Titles & Dialog Cleanup
> --
>
> Key: SLING-8162
> URL: https://issues.apache.org/jira/browse/SLING-8162
> Project: Sling
>  Issue Type: Bug
>Affects Versions: App CMS 0.11.2
>Reporter: Dan Klco
>Assignee: Dan Klco
>Priority: Major
> Fix For: Version App CMS 0.11.4
>
>
> There are a few minor issues missed:
>  * Site Editor won't save
>  * Site editor has duplicate title
>  * Optimizer doesn't open in a modal in the static console
>  * Add template has a duplicate label



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SLING-8163) CMS - UI - Use Ajax for Refreshing Context

2018-12-04 Thread Dan Klco (JIRA)


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

Dan Klco updated SLING-8163:

Affects Version/s: App CMS 0.10.0
Fix Version/s: Version App CMS 0.11.4

> CMS - UI - Use Ajax for Refreshing Context
> --
>
> Key: SLING-8163
> URL: https://issues.apache.org/jira/browse/SLING-8163
> Project: Sling
>  Issue Type: Improvement
>Affects Versions: App CMS 0.10.0
>Reporter: Dan Klco
>Assignee: Dan Klco
>Priority: Major
> Fix For: Version App CMS 0.11.4
>
>
> Currently, all saves, deletes, etc in the Sling CMS use a full page refresh. 
> Instead, it would be better to fetch the updated content and update the DOM. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SLING-8163) CMS - UI - Use Ajax for Refreshing Context

2018-12-04 Thread Dan Klco (JIRA)


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

Dan Klco resolved SLING-8163.
-
Resolution: Fixed

Fixed in 
https://github.com/apache/sling-org-apache-sling-app-cms/commit/7638c6ab7b0b79d9845bf64c47a831bffbee7fe5

> CMS - UI - Use Ajax for Refreshing Context
> --
>
> Key: SLING-8163
> URL: https://issues.apache.org/jira/browse/SLING-8163
> Project: Sling
>  Issue Type: Improvement
>Affects Versions: App CMS 0.10.0
>Reporter: Dan Klco
>Assignee: Dan Klco
>Priority: Major
> Fix For: Version App CMS 0.11.4
>
>
> Currently, all saves, deletes, etc in the Sling CMS use a full page refresh. 
> Instead, it would be better to fetch the updated content and update the DOM. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (SLING-8163) CMS - UI - Use Ajax for Refreshing Context

2018-12-04 Thread Dan Klco (JIRA)
Dan Klco created SLING-8163:
---

 Summary: CMS - UI - Use Ajax for Refreshing Context
 Key: SLING-8163
 URL: https://issues.apache.org/jira/browse/SLING-8163
 Project: Sling
  Issue Type: Improvement
Reporter: Dan Klco
Assignee: Dan Klco


Currently, all saves, deletes, etc in the Sling CMS use a full page refresh. 
Instead, it would be better to fetch the updated content and update the DOM. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-8162) CMS - UI - Fix Missing Titles & Dialog Cleanup

2018-12-04 Thread Dan Klco (JIRA)


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

Dan Klco commented on SLING-8162:
-

Fixed in the following commits:

[https://github.com/apache/sling-org-apache-sling-app-cms/commit/dfab4a01adf3913c0051e5cb02f57840a26458e8]

[https://github.com/apache/sling-org-apache-sling-app-cms/commit/be715d6420fd1c9f58eb3e5ce82d68dd31730677]

https://github.com/apache/sling-org-apache-sling-app-cms/commit/98b6a757b0b7a05975d9c339d1dbd84ba6ab0347

> CMS - UI - Fix Missing Titles & Dialog Cleanup
> --
>
> Key: SLING-8162
> URL: https://issues.apache.org/jira/browse/SLING-8162
> Project: Sling
>  Issue Type: Bug
>Affects Versions: App CMS 0.11.2
>Reporter: Dan Klco
>Assignee: Dan Klco
>Priority: Major
> Fix For: Version App CMS 0.11.4
>
>
> There are a few minor issues missed:
>  * Site Editor won't save
>  * Site editor has duplicate title
>  * Optimizer doesn't open in a modal in the static console
>  * Add template has a duplicate label



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (SLING-8162) CMS - UI - Fix Missing Titles & Dialog Cleanup

2018-12-04 Thread Dan Klco (JIRA)
Dan Klco created SLING-8162:
---

 Summary: CMS - UI - Fix Missing Titles & Dialog Cleanup
 Key: SLING-8162
 URL: https://issues.apache.org/jira/browse/SLING-8162
 Project: Sling
  Issue Type: Bug
Affects Versions: App CMS 0.11.2
Reporter: Dan Klco
 Fix For: Version App CMS 0.11.4


There are a few minor issues missed:
 * Site Editor won't save
 * Site editor has duplicate title
 * Optimizer doesn't open in a modal in the static console
 * Add template has a duplicate label



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SLING-8071) CMS - UI - Show References

2018-12-04 Thread Dan Klco (JIRA)


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

Dan Klco updated SLING-8071:

Fix Version/s: Version App CMS 0.11.4

> CMS - UI - Show References
> --
>
> Key: SLING-8071
> URL: https://issues.apache.org/jira/browse/SLING-8071
> Project: Sling
>  Issue Type: Improvement
>Affects Versions: App CMS 0.10.0
>Reporter: Dan Klco
>Assignee: Dan Klco
>Priority: Major
> Fix For: Version App CMS 0.11.4
>
>
> It would be helpful to show references to a resource for taxonomies, pages, 
> files and templates.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SLING-8071) CMS - UI - Show References

2018-12-04 Thread Dan Klco (JIRA)


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

Dan Klco resolved SLING-8071.
-
Resolution: Fixed

Fixed in 
https://github.com/apache/sling-org-apache-sling-app-cms/commit/642d1efe1c0105b02f3648d946c39ba206001f81

> CMS - UI - Show References
> --
>
> Key: SLING-8071
> URL: https://issues.apache.org/jira/browse/SLING-8071
> Project: Sling
>  Issue Type: Improvement
>Affects Versions: App CMS 0.10.0
>Reporter: Dan Klco
>Assignee: Dan Klco
>Priority: Major
> Fix For: Version App CMS 0.11.4
>
>
> It would be helpful to show references to a resource for taxonomies, pages, 
> files and templates.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] JEBailey opened a new pull request #1: Sling 3270

2018-12-04 Thread GitBox
JEBailey opened a new pull request #1: Sling 3270
URL: https://github.com/apache/sling-org-apache-sling-commons-html/pull/1
 
 
   Adding a new non-validating parser to Support HTML5 as well as some 
additional classes to utilize this parser in other classes other then via the 
HTMLParser interface
   
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services


Re: [VOTE] Release Apache Sling Servlets Get 2.1.40

2018-12-04 Thread Jason E Bailey
Try again, it had encountered issues closing the first time

- Jason

On Tue, Dec 4, 2018, at 12:23 PM, Robert Munteanu wrote:
> On Tue, 2018-12-04 at 12:13 -0500, Jason E Bailey wrote:
> > Staging repository:
> > https://repository.apache.org/content/repositories/orgapachesling-2021/
> 
> Hi Jason,
> 
> I get a 404, I think forgot to close the staging repo.
> 
> Robert
> 


Re: [VOTE] Release Apache Sling Servlets Get 2.1.40

2018-12-04 Thread Robert Munteanu
On Tue, 2018-12-04 at 12:13 -0500, Jason E Bailey wrote:
> Staging repository:
> https://repository.apache.org/content/repositories/orgapachesling-2021/

Hi Jason,

I get a 404, I think forgot to close the staging repo.

Robert



[VOTE] Release Apache Sling Servlets Get 2.1.40

2018-12-04 Thread Jason E Bailey
Hi,

We solved 1 issue in this release:
https://issues.apache.org/jira/projects/SLING/versions/12344595

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

You can use this UNIX script to download the release and verify the signatures:
https://gitbox.apache.org/repos/asf?p=sling-tooling-release.git;a=blob;f=check_staged_release.sh;hb=HEAD

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

Please vote to approve this release:

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

This majority vote is open for at least 72 hours.

- Jason


[jira] [Resolved] (SLING-8155) AuthRequestLoginTest and SlingSessionInfoTest fail with org.mozilla.javascript.EvaluatorException: syntax error

2018-12-04 Thread Jason E Bailey (JIRA)


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

Jason E Bailey resolved SLING-8155.
---
Resolution: Fixed

> AuthRequestLoginTest and SlingSessionInfoTest fail with 
> org.mozilla.javascript.EvaluatorException: syntax error
> ---
>
> Key: SLING-8155
> URL: https://issues.apache.org/jira/browse/SLING-8155
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Reporter: Robert Munteanu
>Assignee: Jason E Bailey
>Priority: Major
> Fix For: Servlets Get 2.1.40
>
>
> Sometimes after Sling 11 we started getting IT failures does to JS errors 
> when evaluated on the client side, in the ITs:
> {noformat}[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time 
> elapsed: 0.007 s <<< FAILURE! - in 
> org.apache.sling.launchpad.webapp.integrationtest.login.AuthRequestLoginTest
> [ERROR] 
> testForcedLogin(org.apache.sling.launchpad.webapp.integrationtest.login.AuthRequestLoginTest)
>   Time elapsed: 0.007 s  <<< ERROR!
> java.io.IOException: While executing 
> [out.println(data.userID)]:org.mozilla.javascript.EvaluatorException: syntax 
> error (JavascriptEngine#1)
>   at 
> org.apache.sling.launchpad.webapp.integrationtest.login.AuthRequestLoginTest.testForcedLogin(AuthRequestLoginTest.java:41)
> Caused by: org.mozilla.javascript.EvaluatorException: syntax error 
> (JavascriptEngine#1)
>   at 
> org.apache.sling.launchpad.webapp.integrationtest.login.AuthRequestLoginTest.testForcedLogin(AuthRequestLoginTest.java:41)
> [ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.006 
> s <<< FAILURE! - in 
> org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingSessionInfoTest
> [ERROR] 
> testSessionInfo(org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingSessionInfoTest)
>   Time elapsed: 0.001 s  <<< ERROR!
> java.io.IOException: While executing [out.println(data.userID + '.' + typeof 
> data.authType)]:org.mozilla.javascript.EvaluatorException: syntax error 
> (JavascriptEngine#1)
>   at 
> org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingSessionInfoTest.testSessionInfo(SlingSessionInfoTest.java:35)
> Caused by: org.mozilla.javascript.EvaluatorException: syntax error 
> (JavascriptEngine#1)
>   at 
> org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingSessionInfoTest.testSessionInfo(SlingSessionInfoTest.java:35)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (SLING-8161) MockSlingHttpServletResponse.sendError(int sc, String msg) does not save msg String

2018-12-04 Thread Rob McDougall (JIRA)
Rob McDougall created SLING-8161:


 Summary: MockSlingHttpServletResponse.sendError(int sc, String 
msg) does not save msg String
 Key: SLING-8161
 URL: https://issues.apache.org/jira/browse/SLING-8161
 Project: Sling
  Issue Type: Improvement
  Components: Servlets, Testing
Affects Versions: Servlet Helpers 1.1.8, Servlet Helpers 1.1.10
Reporter: Rob McDougall


org.apache.sling.servlethelpers.MockSlingHttpServletResponse.sendError(int sc, 
String msg) saves the sc parameter, but discards the msg parameter.  This makes 
it impossible to verify the contents of the message in unit tests that use this 
mock.

It would be trivial to add a member variable of type String to the class in 
order to store that message and then add a getter to retrieve it.  This would 
make it possible to verify the contents of the message in a unit test.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SLING-8160) Polling inhibits InterruptedException

2018-12-04 Thread Andrei Dulvac (JIRA)


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

Andrei Dulvac resolved SLING-8160.
--
   Resolution: Fixed
 Assignee: Andrei Dulvac
Fix Version/s: Apache Sling Testing Clients 1.2.2

Fixed by https://github.com/apache/sling-org-apache-sling-testing-clients/pull/9

> Polling inhibits InterruptedException
> -
>
> Key: SLING-8160
> URL: https://issues.apache.org/jira/browse/SLING-8160
> Project: Sling
>  Issue Type: Bug
>  Components: Apache Sling Testing Clients
>Affects Versions: Apache Sling Testing Clients 1.2.0
>Reporter: Valentin Olteanu
>Assignee: Andrei Dulvac
>Priority: Major
> Fix For: Apache Sling Testing Clients 1.2.2
>
>
> [Polling|https://github.com/apache/sling-org-apache-sling-testing-clients/blob/master/src/main/java/org/apache/sling/testing/clients/util/poller/Polling.java#L118]
>  catches all the exceptions thrown by {{call()}}, included 
> {{InterruptedException}}. This should be re-thrown instead of inhibiting it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-8160) Polling inhibits InterruptedException

2018-12-04 Thread Valentin Olteanu (JIRA)


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

Valentin Olteanu commented on SLING-8160:
-

Created https://github.com/apache/sling-org-apache-sling-testing-clients/pull/9

> Polling inhibits InterruptedException
> -
>
> Key: SLING-8160
> URL: https://issues.apache.org/jira/browse/SLING-8160
> Project: Sling
>  Issue Type: Bug
>  Components: Apache Sling Testing Clients
>Affects Versions: Apache Sling Testing Clients 1.2.0
>Reporter: Valentin Olteanu
>Priority: Major
>
> [Polling|https://github.com/apache/sling-org-apache-sling-testing-clients/blob/master/src/main/java/org/apache/sling/testing/clients/util/poller/Polling.java#L118]
>  catches all the exceptions thrown by {{call()}}, included 
> {{InterruptedException}}. This should be re-thrown instead of inhibiting it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (SLING-8114) Allow to do polling of code failing on asserts

2018-12-04 Thread Valentin Olteanu (JIRA)


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

Valentin Olteanu edited comment on SLING-8114 at 12/4/18 1:05 PM:
--

[~petitbear68], I (partially) like the DSL provided by {{awaitility}}, but I 
wouldn't include it in {{sling.testing.clients}} because it brings too many 
dependencies (junit, hamcrest), which we kept away on purpose and moved the 
related classes to {{sling.testing.rules}}. 
Including it would also mean exposing all its classes as part of our API, so we 
would be susceptible to breaking changes introduced by new versions. But we 
_could_ introduce a similar DSL to {{Polling}} :D

Back to the original problem, [catching Throwable is a bad 
practice|https://stackoverflow.com/questions/6083248/is-it-a-bad-practice-to-catch-throwable],
 especially for {{Error}} s. So I wouldn't even add this, but change the test 
code to throw another exception (why not {{ClientException}} ?). I suppose we 
need to better document this in the Polling.

Note: I just realised we are already too greedy with catching {{Exception}} and 
we should re-throw {{InterruptedException}} - created SLING-8160 for this.


was (Author: volteanu):
[~petitbear68], I (partially) like the DSL provided by {{awaitility}}, but I 
wouldn't include it in {{sling.testing.clients}} because it brings too many 
dependencies (junit, hamcrest), which we kept away on purpose and moved the 
related classes to {{sling.testing.rules}}. 
Including it would also mean exposing all its classes as part of our API, so we 
would be susceptible to breaking changes introduced by new versions. But we 
_could_ introduce a similar DSL to {{Polling}} :D

Back to the original problem, [catching Throwable is a bad 
practice|https://stackoverflow.com/questions/6083248/is-it-a-bad-practice-to-catch-throwable],
 especially for {{Error}}s. So I wouldn't even add this, but change the test 
code to throw another exception (why not {{ClientException}} ?). I suppose we 
need to better document this in the Polling.

Note: I just realised we are already too greedy with catching {{Exception}} and 
we should re-throw {{InterruptedException}} - created SLING-8160 for this.

> Allow to do polling of code failing on asserts
> --
>
> Key: SLING-8114
> URL: https://issues.apache.org/jira/browse/SLING-8114
> Project: Sling
>  Issue Type: Improvement
>  Components: Apache Sling Testing Clients
>Affects Versions: Apache Sling Testing Clients 1.2.0
>Reporter: Thierry Ygé
>Priority: Major
>
> Currently if you polling check uses assertions , it will not be retried, this 
> is due to this line
> [https://github.com/apache/sling-org-apache-sling-testing-clients/blob/master/src/main/java/org/apache/sling/testing/clients/util/poller/Polling.java#L118]
> Which is only catching Exceptions while failing Assertions are an error kind 
> (AssertionError).
> It would be nice to handle it so that code wouldn't have to "transform" it to 
> exception.
> To reproduce simply use assertion in your polling check and let it fail if a 
> counter is lower than a value. make the polling retries so that at the next 
> retry counter it should pass.
>  
> {quote}int count = 0;
> new Polling(() -> {  count++;   Assert.assertTrue(count == 2);  return true;  
>        }
> ).poll(2000, 500);
> {quote}
> Observation: it exist the poll directly as the assert fail already.
> Expected: It should have polled until the check pass here.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (SLING-8160) Polling inhibits InterruptedException

2018-12-04 Thread Valentin Olteanu (JIRA)
Valentin Olteanu created SLING-8160:
---

 Summary: Polling inhibits InterruptedException
 Key: SLING-8160
 URL: https://issues.apache.org/jira/browse/SLING-8160
 Project: Sling
  Issue Type: Bug
  Components: Apache Sling Testing Clients
Affects Versions: Apache Sling Testing Clients 1.2.0
Reporter: Valentin Olteanu


[Polling|https://github.com/apache/sling-org-apache-sling-testing-clients/blob/master/src/main/java/org/apache/sling/testing/clients/util/poller/Polling.java#L118]
 catches all the exceptions thrown by {{call()}}, included 
{{InterruptedException}}. This should be re-thrown instead of inhibiting it.





--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-8114) Allow to do polling of code failing on asserts

2018-12-04 Thread Valentin Olteanu (JIRA)


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

Valentin Olteanu commented on SLING-8114:
-

[~petitbear68], I (partially) like the DSL provided by {{awaitility}}, but I 
wouldn't include it in {{sling.testing.clients}} because it brings too many 
dependencies (junit, hamcrest), which we kept away on purpose and moved the 
related classes to {{sling.testing.rules}}. 
Including it would also mean exposing all its classes as part of our API, so we 
would be susceptible to breaking changes introduced by new versions. But we 
_could_ introduce a similar DSL to {{Polling}} :D

Back to the original problem, [catching Throwable is a bad 
practice|https://stackoverflow.com/questions/6083248/is-it-a-bad-practice-to-catch-throwable],
 especially for {{Error}}s. So I wouldn't even add this, but change the test 
code to throw another exception (why not {{ClientException}} ?). I suppose we 
need to better document this in the Polling.

Note: I just realised we are already too greedy with catching {{Exception}} and 
we should re-throw {{InterruptedException}} - created SLING-8160 for this.

> Allow to do polling of code failing on asserts
> --
>
> Key: SLING-8114
> URL: https://issues.apache.org/jira/browse/SLING-8114
> Project: Sling
>  Issue Type: Improvement
>  Components: Apache Sling Testing Clients
>Affects Versions: Apache Sling Testing Clients 1.2.0
>Reporter: Thierry Ygé
>Priority: Major
>
> Currently if you polling check uses assertions , it will not be retried, this 
> is due to this line
> [https://github.com/apache/sling-org-apache-sling-testing-clients/blob/master/src/main/java/org/apache/sling/testing/clients/util/poller/Polling.java#L118]
> Which is only catching Exceptions while failing Assertions are an error kind 
> (AssertionError).
> It would be nice to handle it so that code wouldn't have to "transform" it to 
> exception.
> To reproduce simply use assertion in your polling check and let it fail if a 
> counter is lower than a value. make the polling retries so that at the next 
> retry counter it should pass.
>  
> {quote}int count = 0;
> new Polling(() -> {  count++;   Assert.assertTrue(count == 2);  return true;  
>        }
> ).poll(2000, 500);
> {quote}
> Observation: it exist the poll directly as the assert fail already.
> Expected: It should have polled until the check pass here.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (SLING-7984) Make dependency to web console optional

2018-12-04 Thread Radu Cotescu (JIRA)


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

Radu Cotescu closed SLING-7984.
---

> Make dependency to web console optional
> ---
>
> Key: SLING-7984
> URL: https://issues.apache.org/jira/browse/SLING-7984
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Carsten Ziegeler
>Assignee: Carsten Ziegeler
>Priority: Major
> Fix For: Scripting Core 2.0.56
>
>
> The scripting core bundle currently requires the web console to be installed 
> for the web console plugin. However this bundle should work without the web 
> console being present



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (SLING-7545) Groovy Scripting Engine not loading in Apache Sling 10

2018-12-04 Thread Radu Cotescu (JIRA)


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

Radu Cotescu closed SLING-7545.
---

> Groovy Scripting Engine not loading in Apache Sling 10
> --
>
> Key: SLING-7545
> URL: https://issues.apache.org/jira/browse/SLING-7545
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting Core 2.0.54
>Reporter: Ben Fortuna
>Assignee: Bertrand Delacretaz
>Priority: Major
> Fix For: Scripting Core 2.0.56
>
>
> With the latest release of Apache Sling (10) the Groovy Scripting engine is 
> no longer loading.
> The impact is that scripts with a (*.groovy) extension aren't rendering.
> This works with Apache Sling 9, so I believe there was a change in the Apache 
> Sling Scripting Core that broke the Groovy implementation.
>  
> How to reproduce:
> Load groovy-all JAR into Apache Sling as a bundle, under the url 
> [http://localhost:8080/system/console/status-slingscripting] the following 
> should display:
> {code:java}
> Groovy Scripting Engine 2.0
> -
> - Language : Groovy, 2.4.14
> - Extensions : groovy
> - MIME Types : application/x-groovy
> - Names : groovy, Groovy{code}
>  
> This works with Apache Sling 9, not with Sling 10



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (SLING-8141) ScriptCacheImpl throws IllegalStateException on deactivate

2018-12-04 Thread Radu Cotescu (JIRA)


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

Radu Cotescu closed SLING-8141.
---

> ScriptCacheImpl throws IllegalStateException on deactivate
> --
>
> Key: SLING-8141
> URL: https://issues.apache.org/jira/browse/SLING-8141
> Project: Sling
>  Issue Type: Bug
>  Components: Scripting
>Affects Versions: Scripting Core 2.0.54
>Reporter: Karl Pauls
>Assignee: Radu Cotescu
>Priority: Major
> Fix For: Scripting Core 2.0.56
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> The ScriptCacheImpl can throw an IllegalStateException as the unregister call 
> on the resourceChangeListener in the deactivate method can race with the 
> unregister call in the configureCache method invoked from the handleEvent 
> method.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Closed] (SLING-7424) Use bnd Maven plugins

2018-12-04 Thread Radu Cotescu (JIRA)


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

Radu Cotescu closed SLING-7424.
---

> Use bnd Maven plugins
> -
>
> Key: SLING-7424
> URL: https://issues.apache.org/jira/browse/SLING-7424
> Project: Sling
>  Issue Type: Improvement
>  Components: Scripting
>Reporter: Oliver Lietz
>Assignee: Oliver Lietz
>Priority: Major
> Fix For: Scripting Core 2.0.56
>
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[RESULT][VOTE] Release Apache Sling Scripting Core 2.0.56

2018-12-04 Thread Radu Cotescu
Hi,

The release was successful, with 6 binding +1 votes from: Robert Munteanu, Karl 
Pauls, David Bosschaert, Oliver Lietz, Julian Sedding and Daniel Klco.

I’ll start promoting the artifacts and finish the release process.

Cheers,
Radu

[jira] [Comment Edited] (SLING-8114) Allow to do polling of code failing on asserts

2018-12-04 Thread JIRA


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

Thierry Ygé edited comment on SLING-8114 at 12/4/18 12:05 PM:
--

[~rombert] actually I think best would be to change and use awaitibility 
library which already implements a "untilAsserted" mechanism (1). And so we 
could "deprecate" Polling completely in favor of this library.

see [https://github.com/awaitility/awaitility] , maybe we could simply add it 
as part of the pom dependency so that it would be already available for use.

 

(1) 
[https://static.javadoc.io/org.awaitility/awaitility/3.1.3/org/awaitility/core/ConditionFactory.html#untilAsserted-org.awaitility.core.ThrowingRunnable-]

 


was (Author: petitbear68):
[~rombert] actually I think best would be to change and use awaitibility 
library which already implements a "untilAsserted" mechanism (1).

see [https://github.com/awaitility/awaitility] , maybe we could simply add it 
as part of the pom dependency so that it would be already available for use.

 

(1) 
https://static.javadoc.io/org.awaitility/awaitility/3.1.3/org/awaitility/core/ConditionFactory.html#untilAsserted-org.awaitility.core.ThrowingRunnable-

 

> Allow to do polling of code failing on asserts
> --
>
> Key: SLING-8114
> URL: https://issues.apache.org/jira/browse/SLING-8114
> Project: Sling
>  Issue Type: Improvement
>  Components: Apache Sling Testing Clients
>Affects Versions: Apache Sling Testing Clients 1.2.0
>Reporter: Thierry Ygé
>Priority: Major
>
> Currently if you polling check uses assertions , it will not be retried, this 
> is due to this line
> [https://github.com/apache/sling-org-apache-sling-testing-clients/blob/master/src/main/java/org/apache/sling/testing/clients/util/poller/Polling.java#L118]
> Which is only catching Exceptions while failing Assertions are an error kind 
> (AssertionError).
> It would be nice to handle it so that code wouldn't have to "transform" it to 
> exception.
> To reproduce simply use assertion in your polling check and let it fail if a 
> counter is lower than a value. make the polling retries so that at the next 
> retry counter it should pass.
>  
> {quote}int count = 0;
> new Polling(() -> {  count++;   Assert.assertTrue(count == 2);  return true;  
>        }
> ).poll(2000, 500);
> {quote}
> Observation: it exist the poll directly as the assert fail already.
> Expected: It should have polled until the check pass here.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (SLING-8114) Allow to do polling of code failing on asserts

2018-12-04 Thread JIRA


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

Thierry Ygé edited comment on SLING-8114 at 12/4/18 12:04 PM:
--

[~rombert] actually I think best would be to change and use awaitibility 
library which already implements a "untilAsserted" mechanism (1).

see [https://github.com/awaitility/awaitility] , maybe we could simply add it 
as part of the pom dependency so that it would be already available for use.

 

(1) 
https://static.javadoc.io/org.awaitility/awaitility/3.1.3/org/awaitility/core/ConditionFactory.html#untilAsserted-org.awaitility.core.ThrowingRunnable-

 


was (Author: petitbear68):
[~rombert] actually I think best would be to change and use awaitibility 
library which already implements a "untilAsserted" mechanism.

see [https://github.com/awaitility/awaitility] , maybe we could simply add it 
as part of the pom dependency so that it would be already available for use.

 

 

> Allow to do polling of code failing on asserts
> --
>
> Key: SLING-8114
> URL: https://issues.apache.org/jira/browse/SLING-8114
> Project: Sling
>  Issue Type: Improvement
>  Components: Apache Sling Testing Clients
>Affects Versions: Apache Sling Testing Clients 1.2.0
>Reporter: Thierry Ygé
>Priority: Major
>
> Currently if you polling check uses assertions , it will not be retried, this 
> is due to this line
> [https://github.com/apache/sling-org-apache-sling-testing-clients/blob/master/src/main/java/org/apache/sling/testing/clients/util/poller/Polling.java#L118]
> Which is only catching Exceptions while failing Assertions are an error kind 
> (AssertionError).
> It would be nice to handle it so that code wouldn't have to "transform" it to 
> exception.
> To reproduce simply use assertion in your polling check and let it fail if a 
> counter is lower than a value. make the polling retries so that at the next 
> retry counter it should pass.
>  
> {quote}int count = 0;
> new Polling(() -> {  count++;   Assert.assertTrue(count == 2);  return true;  
>        }
> ).poll(2000, 500);
> {quote}
> Observation: it exist the poll directly as the assert fail already.
> Expected: It should have polled until the check pass here.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-8114) Allow to do polling of code failing on asserts

2018-12-04 Thread JIRA


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

Thierry Ygé commented on SLING-8114:


[~rombert] actually I think best would be to change and use awaitibility 
library which already implements a "untilAsserted" mechanism.

see [https://github.com/awaitility/awaitility] , maybe we could simply add it 
as part of the pom dependency so that it would be already available for use.

 

 

> Allow to do polling of code failing on asserts
> --
>
> Key: SLING-8114
> URL: https://issues.apache.org/jira/browse/SLING-8114
> Project: Sling
>  Issue Type: Improvement
>  Components: Apache Sling Testing Clients
>Affects Versions: Apache Sling Testing Clients 1.2.0
>Reporter: Thierry Ygé
>Priority: Major
>
> Currently if you polling check uses assertions , it will not be retried, this 
> is due to this line
> [https://github.com/apache/sling-org-apache-sling-testing-clients/blob/master/src/main/java/org/apache/sling/testing/clients/util/poller/Polling.java#L118]
> Which is only catching Exceptions while failing Assertions are an error kind 
> (AssertionError).
> It would be nice to handle it so that code wouldn't have to "transform" it to 
> exception.
> To reproduce simply use assertion in your polling check and let it fail if a 
> counter is lower than a value. make the polling retries so that at the next 
> retry counter it should pass.
>  
> {quote}int count = 0;
> new Polling(() -> {  count++;   Assert.assertTrue(count == 2);  return true;  
>        }
> ).poll(2000, 500);
> {quote}
> Observation: it exist the poll directly as the assert fail already.
> Expected: It should have polled until the check pass here.
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SLING-8155) AuthRequestLoginTest and SlingSessionInfoTest fail with org.mozilla.javascript.EvaluatorException: syntax error

2018-12-04 Thread Robert Munteanu (JIRA)


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

Robert Munteanu updated SLING-8155:
---
Component/s: (was: Testing)
 Servlets

> AuthRequestLoginTest and SlingSessionInfoTest fail with 
> org.mozilla.javascript.EvaluatorException: syntax error
> ---
>
> Key: SLING-8155
> URL: https://issues.apache.org/jira/browse/SLING-8155
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Reporter: Robert Munteanu
>Assignee: Jason E Bailey
>Priority: Major
> Fix For: Servlets Get 2.1.40
>
>
> Sometimes after Sling 11 we started getting IT failures does to JS errors 
> when evaluated on the client side, in the ITs:
> {noformat}[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time 
> elapsed: 0.007 s <<< FAILURE! - in 
> org.apache.sling.launchpad.webapp.integrationtest.login.AuthRequestLoginTest
> [ERROR] 
> testForcedLogin(org.apache.sling.launchpad.webapp.integrationtest.login.AuthRequestLoginTest)
>   Time elapsed: 0.007 s  <<< ERROR!
> java.io.IOException: While executing 
> [out.println(data.userID)]:org.mozilla.javascript.EvaluatorException: syntax 
> error (JavascriptEngine#1)
>   at 
> org.apache.sling.launchpad.webapp.integrationtest.login.AuthRequestLoginTest.testForcedLogin(AuthRequestLoginTest.java:41)
> Caused by: org.mozilla.javascript.EvaluatorException: syntax error 
> (JavascriptEngine#1)
>   at 
> org.apache.sling.launchpad.webapp.integrationtest.login.AuthRequestLoginTest.testForcedLogin(AuthRequestLoginTest.java:41)
> [ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.006 
> s <<< FAILURE! - in 
> org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingSessionInfoTest
> [ERROR] 
> testSessionInfo(org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingSessionInfoTest)
>   Time elapsed: 0.001 s  <<< ERROR!
> java.io.IOException: While executing [out.println(data.userID + '.' + typeof 
> data.authType)]:org.mozilla.javascript.EvaluatorException: syntax error 
> (JavascriptEngine#1)
>   at 
> org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingSessionInfoTest.testSessionInfo(SlingSessionInfoTest.java:35)
> Caused by: org.mozilla.javascript.EvaluatorException: syntax error 
> (JavascriptEngine#1)
>   at 
> org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingSessionInfoTest.testSessionInfo(SlingSessionInfoTest.java:35)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (SLING-8155) AuthRequestLoginTest and SlingSessionInfoTest fail with org.mozilla.javascript.EvaluatorException: syntax error

2018-12-04 Thread Robert Munteanu (JIRA)


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

Robert Munteanu updated SLING-8155:
---
Fix Version/s: Servlets Get 2.1.40

> AuthRequestLoginTest and SlingSessionInfoTest fail with 
> org.mozilla.javascript.EvaluatorException: syntax error
> ---
>
> Key: SLING-8155
> URL: https://issues.apache.org/jira/browse/SLING-8155
> Project: Sling
>  Issue Type: Bug
>  Components: Servlets
>Reporter: Robert Munteanu
>Assignee: Jason E Bailey
>Priority: Major
> Fix For: Servlets Get 2.1.40
>
>
> Sometimes after Sling 11 we started getting IT failures does to JS errors 
> when evaluated on the client side, in the ITs:
> {noformat}[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time 
> elapsed: 0.007 s <<< FAILURE! - in 
> org.apache.sling.launchpad.webapp.integrationtest.login.AuthRequestLoginTest
> [ERROR] 
> testForcedLogin(org.apache.sling.launchpad.webapp.integrationtest.login.AuthRequestLoginTest)
>   Time elapsed: 0.007 s  <<< ERROR!
> java.io.IOException: While executing 
> [out.println(data.userID)]:org.mozilla.javascript.EvaluatorException: syntax 
> error (JavascriptEngine#1)
>   at 
> org.apache.sling.launchpad.webapp.integrationtest.login.AuthRequestLoginTest.testForcedLogin(AuthRequestLoginTest.java:41)
> Caused by: org.mozilla.javascript.EvaluatorException: syntax error 
> (JavascriptEngine#1)
>   at 
> org.apache.sling.launchpad.webapp.integrationtest.login.AuthRequestLoginTest.testForcedLogin(AuthRequestLoginTest.java:41)
> [ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.006 
> s <<< FAILURE! - in 
> org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingSessionInfoTest
> [ERROR] 
> testSessionInfo(org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingSessionInfoTest)
>   Time elapsed: 0.001 s  <<< ERROR!
> java.io.IOException: While executing [out.println(data.userID + '.' + typeof 
> data.authType)]:org.mozilla.javascript.EvaluatorException: syntax error 
> (JavascriptEngine#1)
>   at 
> org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingSessionInfoTest.testSessionInfo(SlingSessionInfoTest.java:35)
> Caused by: org.mozilla.javascript.EvaluatorException: syntax error 
> (JavascriptEngine#1)
>   at 
> org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingSessionInfoTest.testSessionInfo(SlingSessionInfoTest.java:35)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-8155) AuthRequestLoginTest and SlingSessionInfoTest fail with org.mozilla.javascript.EvaluatorException: syntax error

2018-12-04 Thread Robert Munteanu (JIRA)


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

Robert Munteanu commented on SLING-8155:


Ack, thanks [~jebailey]

> AuthRequestLoginTest and SlingSessionInfoTest fail with 
> org.mozilla.javascript.EvaluatorException: syntax error
> ---
>
> Key: SLING-8155
> URL: https://issues.apache.org/jira/browse/SLING-8155
> Project: Sling
>  Issue Type: Bug
>  Components: Testing
>Reporter: Robert Munteanu
>Assignee: Jason E Bailey
>Priority: Major
>
> Sometimes after Sling 11 we started getting IT failures does to JS errors 
> when evaluated on the client side, in the ITs:
> {noformat}[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time 
> elapsed: 0.007 s <<< FAILURE! - in 
> org.apache.sling.launchpad.webapp.integrationtest.login.AuthRequestLoginTest
> [ERROR] 
> testForcedLogin(org.apache.sling.launchpad.webapp.integrationtest.login.AuthRequestLoginTest)
>   Time elapsed: 0.007 s  <<< ERROR!
> java.io.IOException: While executing 
> [out.println(data.userID)]:org.mozilla.javascript.EvaluatorException: syntax 
> error (JavascriptEngine#1)
>   at 
> org.apache.sling.launchpad.webapp.integrationtest.login.AuthRequestLoginTest.testForcedLogin(AuthRequestLoginTest.java:41)
> Caused by: org.mozilla.javascript.EvaluatorException: syntax error 
> (JavascriptEngine#1)
>   at 
> org.apache.sling.launchpad.webapp.integrationtest.login.AuthRequestLoginTest.testForcedLogin(AuthRequestLoginTest.java:41)
> [ERROR] Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.006 
> s <<< FAILURE! - in 
> org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingSessionInfoTest
> [ERROR] 
> testSessionInfo(org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingSessionInfoTest)
>   Time elapsed: 0.001 s  <<< ERROR!
> java.io.IOException: While executing [out.println(data.userID + '.' + typeof 
> data.authType)]:org.mozilla.javascript.EvaluatorException: syntax error 
> (JavascriptEngine#1)
>   at 
> org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingSessionInfoTest.testSessionInfo(SlingSessionInfoTest.java:35)
> Caused by: org.mozilla.javascript.EvaluatorException: syntax error 
> (JavascriptEngine#1)
>   at 
> org.apache.sling.launchpad.webapp.integrationtest.servlets.post.SlingSessionInfoTest.testSessionInfo(SlingSessionInfoTest.java:35)
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-7483) Performance: JackrabbitSession#getItemOrNull still leads to Exception

2018-12-04 Thread Robert Munteanu (JIRA)


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

Robert Munteanu commented on SLING-7483:


[~Tobias Barth] - thanks for confirming

> Performance: JackrabbitSession#getItemOrNull still leads to Exception
> -
>
> Key: SLING-7483
> URL: https://issues.apache.org/jira/browse/SLING-7483
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR, ResourceResolver
>Affects Versions: Resource Resolver 1.4.16
> Environment: Windows 7 64 bit, Java 1.8.131
>Reporter: Tobias Barth
>Priority: Major
>
> In SLING-4585, it was planned to make use of the method 
> "JackrabbitSession#getItemOrNull", so that no Exception is thrown when a non 
> existing Resource is looked up. Now, With Sling Resource Resolver 1.4.16 and 
> Jackrabbit OAK 1.4.13, I get the following stacktrace:
> {noformat}
> at java.lang.Throwable.fillInStackTrace(Native Method)
> at java.lang.Throwable.fillInStackTrace(Throwable.java:783)
> - locked <0x7ce7422f> (a javax.jcr.RepositoryException)
> at java.lang.Throwable.(Throwable.java:265)
> at java.lang.Exception.(Exception.java:66)
> at javax.jcr.RepositoryException.(RepositoryException.java:28)
> at 
> org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPathOrThrow(SessionContext.java:359)
> at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl.getOakPathOrThrow(SessionImpl.java:149)
> at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl.access$100(SessionImpl.java:81)
> at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl$3.performNullable(SessionImpl.java:228)
> at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl$3.performNullable(SessionImpl.java:225)
> at 
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performNullable(SessionDelegate.java:243)
> at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl.getItemOrNull(SessionImpl.java:225)
> at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.apache.sling.jcr.base.SessionProxyHandler$SessionProxyInvocationHandler.invoke(SessionProxyHandler.java:116)
> at com.sun.proxy.$Proxy7.getItemOrNull(Unknown Source)
> at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.getItemOrNull(JcrItemResourceFactory.java:184)
> at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.createResource(JcrItemResourceFactory.java:96)
> at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.getResource(JcrResourceProvider.java:283)
> at 
> org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider.getResource(AuthenticatedResourceProvider.java:135)
> at 
> org.apache.sling.resourceresolver.impl.helper.ResourceResolverControl.getResource(ResourceResolverControl.java:218)
> at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.getAbsoluteResourceInternal(ResourceResolverImpl.java:1067)
> at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolveInternal(ResourceResolverImpl.java:899)
> at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolveInternal(ResourceResolverImpl.java:371)
> at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolve(ResourceResolverImpl.java:267){noformat}
> Seems like the JCR implementation still throws Exceptions on non existing 
> paths. What is going wrong there?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Resolved] (SLING-7483) Performance: JackrabbitSession#getItemOrNull still leads to Exception

2018-12-04 Thread Tobias Barth (JIRA)


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

Tobias Barth resolved SLING-7483.
-
Resolution: Not A Bug

> Performance: JackrabbitSession#getItemOrNull still leads to Exception
> -
>
> Key: SLING-7483
> URL: https://issues.apache.org/jira/browse/SLING-7483
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR, ResourceResolver
>Affects Versions: Resource Resolver 1.4.16
> Environment: Windows 7 64 bit, Java 1.8.131
>Reporter: Tobias Barth
>Priority: Major
>
> In SLING-4585, it was planned to make use of the method 
> "JackrabbitSession#getItemOrNull", so that no Exception is thrown when a non 
> existing Resource is looked up. Now, With Sling Resource Resolver 1.4.16 and 
> Jackrabbit OAK 1.4.13, I get the following stacktrace:
> {noformat}
> at java.lang.Throwable.fillInStackTrace(Native Method)
> at java.lang.Throwable.fillInStackTrace(Throwable.java:783)
> - locked <0x7ce7422f> (a javax.jcr.RepositoryException)
> at java.lang.Throwable.(Throwable.java:265)
> at java.lang.Exception.(Exception.java:66)
> at javax.jcr.RepositoryException.(RepositoryException.java:28)
> at 
> org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPathOrThrow(SessionContext.java:359)
> at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl.getOakPathOrThrow(SessionImpl.java:149)
> at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl.access$100(SessionImpl.java:81)
> at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl$3.performNullable(SessionImpl.java:228)
> at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl$3.performNullable(SessionImpl.java:225)
> at 
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performNullable(SessionDelegate.java:243)
> at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl.getItemOrNull(SessionImpl.java:225)
> at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.apache.sling.jcr.base.SessionProxyHandler$SessionProxyInvocationHandler.invoke(SessionProxyHandler.java:116)
> at com.sun.proxy.$Proxy7.getItemOrNull(Unknown Source)
> at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.getItemOrNull(JcrItemResourceFactory.java:184)
> at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.createResource(JcrItemResourceFactory.java:96)
> at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.getResource(JcrResourceProvider.java:283)
> at 
> org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider.getResource(AuthenticatedResourceProvider.java:135)
> at 
> org.apache.sling.resourceresolver.impl.helper.ResourceResolverControl.getResource(ResourceResolverControl.java:218)
> at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.getAbsoluteResourceInternal(ResourceResolverImpl.java:1067)
> at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolveInternal(ResourceResolverImpl.java:899)
> at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolveInternal(ResourceResolverImpl.java:371)
> at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolve(ResourceResolverImpl.java:267){noformat}
> Seems like the JCR implementation still throws Exceptions on non existing 
> paths. What is going wrong there?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (SLING-7483) Performance: JackrabbitSession#getItemOrNull still leads to Exception

2018-12-04 Thread Tobias Barth (JIRA)


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

Tobias Barth commented on SLING-7483:
-

Sorry for my late response. You are right, the error appears for invalid 
pathes, and these pathes should be sorted out before. So I will close this 
ticket.

> Performance: JackrabbitSession#getItemOrNull still leads to Exception
> -
>
> Key: SLING-7483
> URL: https://issues.apache.org/jira/browse/SLING-7483
> Project: Sling
>  Issue Type: Improvement
>  Components: JCR, ResourceResolver
>Affects Versions: Resource Resolver 1.4.16
> Environment: Windows 7 64 bit, Java 1.8.131
>Reporter: Tobias Barth
>Priority: Major
>
> In SLING-4585, it was planned to make use of the method 
> "JackrabbitSession#getItemOrNull", so that no Exception is thrown when a non 
> existing Resource is looked up. Now, With Sling Resource Resolver 1.4.16 and 
> Jackrabbit OAK 1.4.13, I get the following stacktrace:
> {noformat}
> at java.lang.Throwable.fillInStackTrace(Native Method)
> at java.lang.Throwable.fillInStackTrace(Throwable.java:783)
> - locked <0x7ce7422f> (a javax.jcr.RepositoryException)
> at java.lang.Throwable.(Throwable.java:265)
> at java.lang.Exception.(Exception.java:66)
> at javax.jcr.RepositoryException.(RepositoryException.java:28)
> at 
> org.apache.jackrabbit.oak.jcr.session.SessionContext.getOakPathOrThrow(SessionContext.java:359)
> at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl.getOakPathOrThrow(SessionImpl.java:149)
> at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl.access$100(SessionImpl.java:81)
> at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl$3.performNullable(SessionImpl.java:228)
> at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl$3.performNullable(SessionImpl.java:225)
> at 
> org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performNullable(SessionDelegate.java:243)
> at 
> org.apache.jackrabbit.oak.jcr.session.SessionImpl.getItemOrNull(SessionImpl.java:225)
> at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at 
> org.apache.sling.jcr.base.SessionProxyHandler$SessionProxyInvocationHandler.invoke(SessionProxyHandler.java:116)
> at com.sun.proxy.$Proxy7.getItemOrNull(Unknown Source)
> at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.getItemOrNull(JcrItemResourceFactory.java:184)
> at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.createResource(JcrItemResourceFactory.java:96)
> at 
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProvider.getResource(JcrResourceProvider.java:283)
> at 
> org.apache.sling.resourceresolver.impl.providers.stateful.AuthenticatedResourceProvider.getResource(AuthenticatedResourceProvider.java:135)
> at 
> org.apache.sling.resourceresolver.impl.helper.ResourceResolverControl.getResource(ResourceResolverControl.java:218)
> at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.getAbsoluteResourceInternal(ResourceResolverImpl.java:1067)
> at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolveInternal(ResourceResolverImpl.java:899)
> at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolveInternal(ResourceResolverImpl.java:371)
> at 
> org.apache.sling.resourceresolver.impl.ResourceResolverImpl.resolve(ResourceResolverImpl.java:267){noformat}
> Seems like the JCR implementation still throws Exceptions on non existing 
> paths. What is going wrong there?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)