[jira] [Comment Edited] (SLING-6783) Updates for Commons HTML
[ https://issues.apache.org/jira/browse/SLING-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16462390#comment-16462390 ] Jason E Bailey edited comment on SLING-6783 at 5/3/18 4:17 PM: --- [EDIT] I don't see any additional reason to support any other Parser properties at this time unless there was an ask. I'd rather focus on HTML compliance. was (Author: jebailey): We should either support them or at least document what is and isn't supported from a features perspective. At this point I would just say documentation, I'm much more interested in finding a way to make this html5 compliant then features that no one has yet asked for. > Updates for Commons HTML > > > Key: SLING-6783 > URL: https://issues.apache.org/jira/browse/SLING-6783 > Project: Sling > Issue Type: Improvement > Components: Commons >Reporter: Jason E Bailey >Assignee: Oliver Lietz >Priority: Minor > Fix For: Commons HTML 1.0.2 > > Attachments: sling.patch > > > Following updates: > Updated tagsoup lib to 1.2.1 which has the following modifications > * DOCTYPE is now recognized even in lower case. > * We make sure to buffer the reader, eliminating a long-standing bug that > would crash on certain inputs, such as & followed by CR+LF. > * The HTML scanner's table is precompiled at run time for efficiency, causing > a 4x speedup on large input documents. > * ]] within a CDATA section no longer causes input to be discarded. > * Remove bogus newline after printing children of the root element. > * Allow the noscript element anywhere, the same as the script element. > * Updated to the 2011 edition of the W3C character entity list. > Additionally: > Updated license with new home page for tagsoup > Updated annotations to OSGi annotations > Added the ability to specify additional features/properties for the parser > Documented available settings > Javadoc fixed > Prepared for different parsers by renaming HtmlParserImpl and adding > component properties > Configuration improved -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-6783) Updates for Commons HTML
[ https://issues.apache.org/jira/browse/SLING-6783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16462390#comment-16462390 ] Jason E Bailey commented on SLING-6783: --- We should either support them or at least document what is and isn't supported from a features perspective. At this point I would just say documentation, I'm much more interested in finding a way to make this html5 compliant then features that no one has yet asked for. > Updates for Commons HTML > > > Key: SLING-6783 > URL: https://issues.apache.org/jira/browse/SLING-6783 > Project: Sling > Issue Type: Improvement > Components: Commons >Reporter: Jason E Bailey >Assignee: Oliver Lietz >Priority: Minor > Fix For: Commons HTML 1.0.2 > > Attachments: sling.patch > > > Following updates: > Updated tagsoup lib to 1.2.1 which has the following modifications > * DOCTYPE is now recognized even in lower case. > * We make sure to buffer the reader, eliminating a long-standing bug that > would crash on certain inputs, such as & followed by CR+LF. > * The HTML scanner's table is precompiled at run time for efficiency, causing > a 4x speedup on large input documents. > * ]] within a CDATA section no longer causes input to be discarded. > * Remove bogus newline after printing children of the root element. > * Allow the noscript element anywhere, the same as the script element. > * Updated to the 2011 edition of the W3C character entity list. > Additionally: > Updated license with new home page for tagsoup > Updated annotations to OSGi annotations > Added the ability to specify additional features/properties for the parser > Documented available settings > Javadoc fixed > Prepared for different parsers by renaming HtmlParserImpl and adding > component properties > Configuration improved -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SLING-7751) Commons Html - Underlying parser implementation uses system charset
[ https://issues.apache.org/jira/browse/SLING-7751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey updated SLING-7751: -- Summary: Commons Html - Underlying parser implementation uses system charset (was: Underlying parser implementation uses system charset to create Reader) > Commons Html - Underlying parser implementation uses system charset > --- > > Key: SLING-7751 > URL: https://issues.apache.org/jira/browse/SLING-7751 > Project: Sling > Issue Type: Bug >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Fix For: Commons HTML 1.0.4 > > > While re-writing the underlying tagsoup library I discovered that, by > default, the internal InputStreamReader is created with the system default > charset. > This can be overridden with a custom AutoDetector. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SLING-7751) Underlying parser implementation uses system charset to create Reader
Jason E Bailey created SLING-7751: - Summary: Underlying parser implementation uses system charset to create Reader Key: SLING-7751 URL: https://issues.apache.org/jira/browse/SLING-7751 Project: Sling Issue Type: Bug Reporter: Jason E Bailey Assignee: Jason E Bailey Fix For: Commons HTML 1.0.4 While re-writing the underlying tagsoup library I discovered that, by default, the internal InputStreamReader is created with the system default charset. This can be overridden with a custom AutoDetector. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7699) Add ability to stream a Resource tree to the API bundle
[ https://issues.apache.org/jira/browse/SLING-7699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16562190#comment-16562190 ] Jason E Bailey commented on SLING-7699: --- I had added a method to the API to provide a Stream of the resource and it's descendants and attempted a release. This created a lengthy discussion on the mailing list about the merits of this being in the API. Due to lack of consensus I pulled the modification and worked on implementing it separately so that the benefits could be demonstrated. On pulling all of this out and resetting commits, I missed that this Jira status had been set to resolved. > Add ability to stream a Resource tree to the API bundle > > > Key: SLING-7699 > URL: https://issues.apache.org/jira/browse/SLING-7699 > Project: Sling > Issue Type: Improvement > Components: API >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Time Spent: 3h 10m > Remaining Estimate: 0h > > Add an ability to stream a Resource tree starting from a specific resource -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SLING-7699) Add ability to stream a Resource tree to Sling
[ https://issues.apache.org/jira/browse/SLING-7699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey updated SLING-7699: -- Summary: Add ability to stream a Resource tree to Sling (was: Add ability to stream a Resource tree to the API bundle) > Add ability to stream a Resource tree to Sling > -- > > Key: SLING-7699 > URL: https://issues.apache.org/jira/browse/SLING-7699 > Project: Sling > Issue Type: Improvement > Components: API >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Time Spent: 3h 10m > Remaining Estimate: 0h > > Add an ability to stream a Resource tree starting from a specific resource -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SLING-7699) Add ability to stream a Resource tree to Sling
[ https://issues.apache.org/jira/browse/SLING-7699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey updated SLING-7699: -- Fix Version/s: Resource Filter 1.0.0 > Add ability to stream a Resource tree to Sling > -- > > Key: SLING-7699 > URL: https://issues.apache.org/jira/browse/SLING-7699 > Project: Sling > Issue Type: Improvement > Components: API >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Fix For: Resource Filter 1.0.0 > > Time Spent: 3h 10m > Remaining Estimate: 0h > > Add an ability to stream a Resource tree starting from a specific resource -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SLING-7699) Add ability to stream a Resource tree to Sling
[ https://issues.apache.org/jira/browse/SLING-7699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey resolved SLING-7699. --- Resolution: Fixed > Add ability to stream a Resource tree to Sling > -- > > Key: SLING-7699 > URL: https://issues.apache.org/jira/browse/SLING-7699 > Project: Sling > Issue Type: Improvement > Components: API >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Fix For: Resource Filter 1.0.0 > > Time Spent: 3h 10m > Remaining Estimate: 0h > > Add an ability to stream a Resource tree starting from a specific resource -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SLING-7795) Get Servlets - JsonGenerator may not close properly on exception
Jason E Bailey created SLING-7795: - Summary: Get Servlets - JsonGenerator may not close properly on exception Key: SLING-7795 URL: https://issues.apache.org/jira/browse/SLING-7795 Project: Sling Issue Type: Improvement Reporter: Jason E Bailey Assignee: Jason E Bailey Fix For: Servlets Get 2.1.34 During the json rendering an exception may cause the JsonGenerator to never close. This could occur in the SlingInfoServlet and the JsonRenderer -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SLING-7795) Get Servlets - JsonGenerator may not close properly on exception
[ https://issues.apache.org/jira/browse/SLING-7795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey resolved SLING-7795. --- Resolution: Fixed > Get Servlets - JsonGenerator may not close properly on exception > > > Key: SLING-7795 > URL: https://issues.apache.org/jira/browse/SLING-7795 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Fix For: Servlets Get 2.1.34 > > > During the json rendering an exception may cause the JsonGenerator to never > close. This could occur in the SlingInfoServlet and the JsonRenderer -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SLING-7795) Get Servlets - JsonGenerator may not close properly on exception
[ https://issues.apache.org/jira/browse/SLING-7795?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey updated SLING-7795: -- Issue Type: Bug (was: Improvement) > Get Servlets - JsonGenerator may not close properly on exception > > > Key: SLING-7795 > URL: https://issues.apache.org/jira/browse/SLING-7795 > Project: Sling > Issue Type: Bug >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Fix For: Servlets Get 2.1.34 > > > During the json rendering an exception may cause the JsonGenerator to never > close. This could occur in the SlingInfoServlet and the JsonRenderer -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SLING-7797) Servlet Helpers - SimpleDateFormatter not thread safe
[ https://issues.apache.org/jira/browse/SLING-7797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey reassigned SLING-7797: - Assignee: Jason E Bailey > Servlet Helpers - SimpleDateFormatter not thread safe > - > > Key: SLING-7797 > URL: https://issues.apache.org/jira/browse/SLING-7797 > Project: Sling > Issue Type: Bug >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Fix For: Servlet Helpers 1.1.10 > > > SimpleDateFormatter in the HeaderSupport class is not thread safe. Updated > java version to 8 and replaced SimpleDateFormatter with with thread safe > DateTimeFormatter which has the appropriate RFC1123 support OOTB -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SLING-7797) Servlet Helpers - SimpleDateFormatter not thread safe
Jason E Bailey created SLING-7797: - Summary: Servlet Helpers - SimpleDateFormatter not thread safe Key: SLING-7797 URL: https://issues.apache.org/jira/browse/SLING-7797 Project: Sling Issue Type: Bug Reporter: Jason E Bailey Fix For: Servlet Helpers 1.1.10 SimpleDateFormatter in the HeaderSupport class is not thread safe. Updated java version to 8 and replaced SimpleDateFormatter with with thread safe DateTimeFormatter which has the appropriate RFC1123 support OOTB -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SLING-7797) Servlet Helpers - SimpleDateFormatter not thread safe
[ https://issues.apache.org/jira/browse/SLING-7797?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey resolved SLING-7797. --- Resolution: Fixed > Servlet Helpers - SimpleDateFormatter not thread safe > - > > Key: SLING-7797 > URL: https://issues.apache.org/jira/browse/SLING-7797 > Project: Sling > Issue Type: Bug >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Fix For: Servlet Helpers 1.1.10 > > > SimpleDateFormatter in the HeaderSupport class is not thread safe. Updated > java version to 8 and replaced SimpleDateFormatter with with thread safe > DateTimeFormatter which has the appropriate RFC1123 support OOTB -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7796) Documentation: More details needed regarding ResourceResolver and /etc/map sling:redirect RegEx processing.
[ https://issues.apache.org/jira/browse/SLING-7796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16565278#comment-16565278 ] Jason E Bailey commented on SLING-7796: --- Hi [~mc...@umich.edu], This is a great question that would be better handled by submitting it to the sling users mailing list ( [us...@sling.apache.org|mailto:us...@sling.apache.org] ) or , since this is an issue with AEM's documentation. You may want to check out their user forums. Jira is primarily used as a ticketing system for when there is a problem and questions can often be overlooked. > Documentation: More details needed regarding ResourceResolver and /etc/map > sling:redirect RegEx processing. > --- > > Key: SLING-7796 > URL: https://issues.apache.org/jira/browse/SLING-7796 > Project: Sling > Issue Type: Task > Components: ResourceResolver > Environment: Adobe Experience Manager 6.3 >Reporter: Matthew >Priority: Minor > Labels: documentation > > +Primary Question:+ > How does the ResourceResolver RegEx engine process sling:redirect rules? > > +Details:+ > Studying this page: > [http://localhost:4502/system/console/jcrresolver] > And referencing this documentation: > > [https://helpx.adobe.com/experience-manager/6-3/sites/deploying/using/resource-mapping.html#ViewingMappingDefinitions] > I have some questions about the regEx processing. > This excerpt taken from the reference document above does not make sense when > evaluating the regEx: > > {noformat} > For example, the: > Pattern ^[^/]+/[^/]+/welcome$ > will trigger the: > Replacement /libs/cq/core/content/welcome.html. > to redirect a request: > http://localhost:4503/welcome > to: > http://localhost:4503/libs/cq/core/content/welcome.html > {noformat} > > This regEx pattern reads as: "Match any string that does not start with a '/' > character up to a '/' character and then any number of characters after the > '/' that are not a '/' until a '/' is reached and then the characters > 'welcome' that end the string with an 'e'. > matches up to "http:/" but then does not match the rest of the string because > there is a second '/'. > The regEx would need to be: > {noformat} > ^[^/]+//[^/]+/welcome$ > {noformat} > Notice the use of '//'. > I have read all about namespace mangling and unmangling but I still cannot > figure out how this rule matches. > Further study took me into the /system/console/jcrresolver where I studied > some ootb rules and some internal redirects that were created by configuring > "vanity urls". > An example internal ootb rule is: > {noformat} > ^[^/]+/[^/]+/sites$ => /libs/wcm/core/content/sites.html > {noformat} > Two example vanity urls are: > {noformat} > ^[^/]+/[^/]+/2015DepartmentColloquia$ => > /content/michigan-lsa/physics/en/news-events/all-events/archived-events/department-colloquia/2015-department-colloquium.html > ^[^/]+/[^/]+/content/ii-directory/lrccs/en/educationalresources$ => > /content/ii-directory/lrccs/en.html > {noformat} > And finally an example external url: > {noformat} > ^[^/]+/[^/]+/content/michigan-lsa/neurosci/en/studentinvolvement(\..*) => > /content/michigan-lsa/neurosci/en/undergraduates/student-involvement$1 > {noformat} > All of these examples have the same starting part of the regEx in common > which is: > {noformat} > ^[^/]+/[^/]+/ > {noformat} > Which would fail on all of the following test urls but somehow they work! > {noformat} > http://localhost:4502/welcome > http://localhost:4502/sites > http://localhost:4502/2015DepartmentColloquia > http://localhost:4502/content/ii-directory/lrccs/en/educationalresources > http://localhost:4502/content/michigan-lsa/neurosci/en/studentinvolvement > These work too: (https protocol vs http: same urls) > https://localhost:4502/welcome > https://localhost:4502/sites > https://localhost:4502/2015DepartmentColloquia > https://localhost:4502/content/ii-directory/lrccs/en/educationalresources > https://localhost:4502/content/michigan-lsa/neurosci/en/studentinvolvement > {noformat} > From studying it, I understand that somehow it must be consuming the '//' and > then matching on the rest of the expression but I cannot understand how. I > have also studied the following java code from Apache Sling: > org.apache.sling.resourceresolver-1.6.0 but am not able to pinpoint how this > is working. > > Questions: > How is this regEx processing working and why? -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7811) NPE when repository is starting up
[ https://issues.apache.org/jira/browse/SLING-7811?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16571880#comment-16571880 ] Jason E Bailey commented on SLING-7811: --- Naive question. Couldn't you handle this by modifying the start levels as well so that the LoginAdminWhitelist is activated first? > NPE when repository is starting up > -- > > Key: SLING-7811 > URL: https://issues.apache.org/jira/browse/SLING-7811 > Project: Sling > Issue Type: Bug > Components: JCR >Affects Versions: JCR Oak Server 1.1.4, JCR Base 3.0.4 >Reporter: Carsten Ziegeler >Assignee: Robert Munteanu >Priority: Major > Fix For: JCR Base 3.0.6, JCR Oak Server 1.2.2 > > > With the latest Sling Starter, the following NPE occurs in the logs. It seems > to be harmless, nevertheless we should fix it: > For now I assigned it to both, JCR Base and Oak Server, as it's unclear which > one it is. Interestingly we've released Oak Server 1.2.0 but are not using it > in the starter. > {noformat} > 06.08.2018 15:45:18.396 *ERROR* [Apache Sling Repository Startup Thread] > org.apache.sling.jcr.oak.server.internal.OakSlingRepositoryManager start: > Uncaught Throwable trying to access Repository, calling stopRepository() > java.lang.NullPointerException: null > at > com.google.common.base.Preconditions.checkNotNull(Preconditions.java:192) > [com.google.guava:15.0.0] > at org.apache.jackrabbit.oak.jcr.Jcr.with(Jcr.java:296) > [org.apache.jackrabbit.oak-jcr:1.6.8] > at > org.apache.sling.jcr.oak.server.internal.OakSlingRepositoryManager.acquireRepository(OakSlingRepositoryManager.java:161) > [org.apache.sling.jcr.oak.server:1.1.4] > at > org.apache.sling.jcr.base.AbstractSlingRepositoryManager.initializeAndRegisterRepositoryService(AbstractSlingRepositoryManager.java:471) > [org.apache.sling.jcr.base:3.0.4] > at > org.apache.sling.jcr.base.AbstractSlingRepositoryManager.access$300(AbstractSlingRepositoryManager.java:85) > [org.apache.sling.jcr.base:3.0.4] > at > org.apache.sling.jcr.base.AbstractSlingRepositoryManager$4.run(AbstractSlingRepositoryManager.java:455) > [org.apache.sling.jcr.base:3.0.4] > {noformat} > The stack trace points to a null workspace name ( see > https://github.com/apache/jackrabbit-oak/blob/jackrabbit-oak-1.6.8/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/Jcr.java#L296 > ). -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7833) BundleContentTest.testBundleContentParentFromMultipleBundles fails: Expected sling.js in the /system folder
[ https://issues.apache.org/jira/browse/SLING-7833?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16584293#comment-16584293 ] Jason E Bailey commented on SLING-7833: --- [~rombert] any idea why that particular change caused the regression? > BundleContentTest.testBundleContentParentFromMultipleBundles fails: Expected > sling.js in the /system folder > --- > > Key: SLING-7833 > URL: https://issues.apache.org/jira/browse/SLING-7833 > Project: Sling > Issue Type: Bug > Components: Testing >Reporter: Robert Munteanu >Assignee: Robert Munteanu >Priority: Major > Labels: sling-IT > Fix For: Resource Resolver 1.6.6 > > > This test consistently fails locally and on Jenkins: > {noformat} > junit.framework.AssertionFailedError: Expected sling.js in the /system folder > at > org.apache.sling.launchpad.webapp.integrationtest.BundleContentTest.testBundleContentParentFromMultipleBundles(BundleContentTest.java:54) > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7858) Convert CSS to a Framework
[ https://issues.apache.org/jira/browse/SLING-7858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16595543#comment-16595543 ] Jason E Bailey commented on SLING-7858: --- [~jsedding] you should check out the SLING-7858 branch on the CMS app. It will give you a feel of where it's going. > Convert CSS to a Framework > -- > > Key: SLING-7858 > URL: https://issues.apache.org/jira/browse/SLING-7858 > Project: Sling > Issue Type: Improvement > Components: App CMS >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Minor > Fix For: App CMS 0.9.2 > > > To improve the overall UI, convert the UI to a theme-able CSS framework -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7858) Convert CSS to a Framework
[ https://issues.apache.org/jira/browse/SLING-7858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16593566#comment-16593566 ] Jason E Bailey commented on SLING-7858: --- [~jsedding] I was initially looking at [bulma|https://bulma.io/] but I intentionally left the issue generic in case a better framework was mentioned or bulma didn't work out. I'll take a look at semantic ui and see how that fits. > Convert CSS to a Framework > -- > > Key: SLING-7858 > URL: https://issues.apache.org/jira/browse/SLING-7858 > Project: Sling > Issue Type: Improvement > Components: App CMS >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Minor > Fix For: App CMS 0.9.2 > > > To improve the overall UI, convert the UI to a theme-able CSS framework -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7844) Format change in JSON date format due to SLING-7670
[ https://issues.apache.org/jira/browse/SLING-7844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16588819#comment-16588819 ] Jason E Bailey commented on SLING-7844: --- This was discussed here [http://apache-sling.73963.n3.nabble.com/Discussion-Date-handling-inconsistencies-resend-td4082548.html] There is a configuration option in place right now, so if there is a need to change the default, it's a simple change. I stand by the original logic though that the format that was being used is a deprecated format and that, since it will need to eventually go away, changing the default now rather then later is appropriate. > Format change in JSON date format due to SLING-7670 > --- > > Key: SLING-7844 > URL: https://issues.apache.org/jira/browse/SLING-7844 > Project: Sling > Issue Type: Bug > Components: Servlets >Affects Versions: Servlets Get 2.1.32 >Reporter: Carsten Ziegeler >Assignee: Robert Munteanu >Priority: Major > Fix For: Servlets Get 2.1.34 > > > SLING-7670 changes the default rendering of a date in JSON by default which > is an incompatible change and potentially breaks clients. > The default of the servlet should generate the old format, the new format > must require a config change. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7844) Format change in JSON date format due to SLING-7670
[ https://issues.apache.org/jira/browse/SLING-7844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16588863#comment-16588863 ] Jason E Bailey commented on SLING-7844: --- Having spent years on the receiving side of these minor changes that breaks everything under the sun. I appreciate that thought. And yes, someone somewhere wrote a custom piece of code to parse that specific format to do something very specific and highly important. However on the other side of that, anyone coming to Sling or writing something new to access that legacy date string will have to write something custom, or in the case of a browser rely on the default failover handling once it fails to parse as an ISO8601. I'm not against the changing of the default value, I just don't agree. If my disagreement prevents a change going in that others want, I'll change it to a frown. > Format change in JSON date format due to SLING-7670 > --- > > Key: SLING-7844 > URL: https://issues.apache.org/jira/browse/SLING-7844 > Project: Sling > Issue Type: Bug > Components: Servlets >Affects Versions: Servlets Get 2.1.32 >Reporter: Carsten Ziegeler >Assignee: Robert Munteanu >Priority: Major > Fix For: Servlets Get 2.1.34 > > > SLING-7670 changes the default rendering of a date in JSON by default which > is an incompatible change and potentially breaks clients. > The default of the servlet should generate the old format, the new format > must require a config change. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7670) Default JSON Get Servlet provide ISO-8601 formatted date
[ https://issues.apache.org/jira/browse/SLING-7670?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16589098#comment-16589098 ] Jason E Bailey commented on SLING-7670: --- Yes, that's correct > Default JSON Get Servlet provide ISO-8601 formatted date > > > Key: SLING-7670 > URL: https://issues.apache.org/jira/browse/SLING-7670 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Fix For: Servlets Get 2.1.32 > > > Default JSON Get Servlet was providing an ECMA formatted date string by > default. Changed to ISO-8601 formatted date and added configurations to > enable the older format if desired. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7844) Format change in JSON date format due to SLING-7670
[ https://issues.apache.org/jira/browse/SLING-7844?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16589102#comment-16589102 ] Jason E Bailey commented on SLING-7844: --- I'm good. Is there a protocol for who does the fix? I can make the changes now. > Format change in JSON date format due to SLING-7670 > --- > > Key: SLING-7844 > URL: https://issues.apache.org/jira/browse/SLING-7844 > Project: Sling > Issue Type: Bug > Components: Servlets >Affects Versions: Servlets Get 2.1.32 >Reporter: Carsten Ziegeler >Assignee: Robert Munteanu >Priority: Major > Fix For: Servlets Get 2.1.34 > > > SLING-7670 changes the default rendering of a date in JSON by default which > is an incompatible change and potentially breaks clients. > The default of the servlet should generate the old format, the new format > must require a config change. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SLING-7844) Format change in JSON date format due to SLING-7670
[ https://issues.apache.org/jira/browse/SLING-7844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey reassigned SLING-7844: - Assignee: Jason E Bailey (was: Robert Munteanu) > Format change in JSON date format due to SLING-7670 > --- > > Key: SLING-7844 > URL: https://issues.apache.org/jira/browse/SLING-7844 > Project: Sling > Issue Type: Bug > Components: Servlets >Affects Versions: Servlets Get 2.1.32 >Reporter: Carsten Ziegeler >Assignee: Jason E Bailey >Priority: Major > Fix For: Servlets Get 2.1.34 > > > SLING-7670 changes the default rendering of a date in JSON by default which > is an incompatible change and potentially breaks clients. > The default of the servlet should generate the old format, the new format > must require a config change. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SLING-7844) Format change in JSON date format due to SLING-7670
[ https://issues.apache.org/jira/browse/SLING-7844?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey resolved SLING-7844. --- Resolution: Fixed Updated wording and defaulted ECMA support to true for both the default GET servlet and the VersionInfo servlet. > Format change in JSON date format due to SLING-7670 > --- > > Key: SLING-7844 > URL: https://issues.apache.org/jira/browse/SLING-7844 > Project: Sling > Issue Type: Bug > Components: Servlets >Affects Versions: Servlets Get 2.1.32 >Reporter: Carsten Ziegeler >Assignee: Jason E Bailey >Priority: Major > Fix For: Servlets Get 2.1.34 > > > SLING-7670 changes the default rendering of a date in JSON by default which > is an incompatible change and potentially breaks clients. > The default of the servlet should generate the old format, the new format > must require a config change. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SLING-7858) Convert CSS to a Framework
Jason E Bailey created SLING-7858: - Summary: Convert CSS to a Framework Key: SLING-7858 URL: https://issues.apache.org/jira/browse/SLING-7858 Project: Sling Issue Type: Improvement Components: App CMS Reporter: Jason E Bailey Assignee: Jason E Bailey Fix For: App CMS 0.9.2 To improve the overall UI, convert the UI to a theme-able CSS framework -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SLING-7782) Update Default Compiler to JRE 8
Jason E Bailey created SLING-7782: - Summary: Update Default Compiler to JRE 8 Key: SLING-7782 URL: https://issues.apache.org/jira/browse/SLING-7782 Project: Sling Issue Type: Improvement Reporter: Jason E Bailey Sets the default compilation for projects to Java 8 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SLING-7782) Update Default Compiler to JRE 8
[ https://issues.apache.org/jira/browse/SLING-7782?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey reassigned SLING-7782: - Assignee: Jason E Bailey > Update Default Compiler to JRE 8 > > > Key: SLING-7782 > URL: https://issues.apache.org/jira/browse/SLING-7782 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > > Sets the default compilation for projects to Java 8 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SLING-7858) Convert CSS to a Framework
[ https://issues.apache.org/jira/browse/SLING-7858?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey resolved SLING-7858. --- Resolution: Fixed > Convert CSS to a Framework > -- > > Key: SLING-7858 > URL: https://issues.apache.org/jira/browse/SLING-7858 > Project: Sling > Issue Type: Improvement > Components: App CMS >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Minor > Fix For: App CMS 0.9.2 > > > To improve the overall UI, convert the UI to a theme-able CSS framework -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7890) JSON-related IT failures when upgrading sling.servlets to 2.1.34
[ https://issues.apache.org/jira/browse/SLING-7890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16607120#comment-16607120 ] Jason E Bailey commented on SLING-7890: --- There's a number of tests failing related to my changes beyond this specific error. So I'm running through all of them and fixing what I can. Some of these are fails because the test included a very explicit String check that failed. e.g. It was looking for "dumped by PlainTextRendererServlet" and I had changed the name of the class to PlainTextRenderer because it was no longer a Servlet, and I changed the wording as well. > JSON-related IT failures when upgrading sling.servlets to 2.1.34 > > > Key: SLING-7890 > URL: https://issues.apache.org/jira/browse/SLING-7890 > Project: Sling > Issue Type: Bug > Components: Servlets >Affects Versions: Servlets Get 2.1.34 >Reporter: Robert Munteanu >Assignee: Jason E Bailey >Priority: Major > Fix For: Servlets Get 2.1.36 > > > With the following change in the sling starter > {noformat}diff --git a/src/main/provisioning/sling.txt > b/src/main/provisioning/sling.txt > index 0f76c0b..4904fc3 100644 > --- a/src/main/provisioning/sling.txt > +++ b/src/main/provisioning/sling.txt > @@ -62,7 +62,7 @@ > org.apache.sling/org.apache.sling.resourceresolver/1.6.6 > org.apache.sling/org.apache.sling.serviceusermapper/1.4.0 > org.apache.sling/org.apache.sling.serviceuser.webconsole/1.0.0 > -org.apache.sling/org.apache.sling.servlets.get/2.1.30 > +org.apache.sling/org.apache.sling.servlets.get/2.1.34 > org.apache.sling/org.apache.sling.servlets.post/2.3.26 > org.apache.sling/org.apache.sling.servlets.resolver/2.4.22 > org.apache.sling/org.apache.sling.xss/2.0.12 > {noformat} > I get multiple IT failures, and the root cause seems top be > {noformat}java.lang.ClassCastException: > org.apache.johnzon.core.JsonObjectImpl cannot be cast to javax.json.JsonArray > at > org.apache.sling.servlets.get.impl.util.JsonToText.valueToString(JsonToText.java:164) > at > org.apache.sling.servlets.get.impl.util.JsonToText.prettyPrint(JsonToText.java:209) > at > org.apache.sling.servlets.get.impl.VersionInfoServlet.doGet(VersionInfoServlet.java:124) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:266) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) > at > org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552) > at > org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282) > at > org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > at > org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:107) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) > at > org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:47) > at > org.apache.sling.launchpad.testservices.filters.NoPropertyFilter.doFilter(NoPropertyFilter.java:25) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:47) > at > org.apache.sling.launchpad.testservices.filters.SlingFilter.doFilter(SlingFilter.java:25) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151) > at > org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:234) > at >
[jira] [Updated] (SLING-7890) JSON-related IT failures when upgrading sling.servlets to 2.1.34
[ https://issues.apache.org/jira/browse/SLING-7890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey updated SLING-7890: -- Fix Version/s: Launchpad Integration Tests 1.0.8 > JSON-related IT failures when upgrading sling.servlets to 2.1.34 > > > Key: SLING-7890 > URL: https://issues.apache.org/jira/browse/SLING-7890 > Project: Sling > Issue Type: Bug > Components: Servlets >Affects Versions: Servlets Get 2.1.34 >Reporter: Robert Munteanu >Assignee: Jason E Bailey >Priority: Major > Fix For: Launchpad Integration Tests 1.0.8, Servlets Get 2.1.36 > > > With the following change in the sling starter > {noformat}diff --git a/src/main/provisioning/sling.txt > b/src/main/provisioning/sling.txt > index 0f76c0b..4904fc3 100644 > --- a/src/main/provisioning/sling.txt > +++ b/src/main/provisioning/sling.txt > @@ -62,7 +62,7 @@ > org.apache.sling/org.apache.sling.resourceresolver/1.6.6 > org.apache.sling/org.apache.sling.serviceusermapper/1.4.0 > org.apache.sling/org.apache.sling.serviceuser.webconsole/1.0.0 > -org.apache.sling/org.apache.sling.servlets.get/2.1.30 > +org.apache.sling/org.apache.sling.servlets.get/2.1.34 > org.apache.sling/org.apache.sling.servlets.post/2.3.26 > org.apache.sling/org.apache.sling.servlets.resolver/2.4.22 > org.apache.sling/org.apache.sling.xss/2.0.12 > {noformat} > I get multiple IT failures, and the root cause seems top be > {noformat}java.lang.ClassCastException: > org.apache.johnzon.core.JsonObjectImpl cannot be cast to javax.json.JsonArray > at > org.apache.sling.servlets.get.impl.util.JsonToText.valueToString(JsonToText.java:164) > at > org.apache.sling.servlets.get.impl.util.JsonToText.prettyPrint(JsonToText.java:209) > at > org.apache.sling.servlets.get.impl.VersionInfoServlet.doGet(VersionInfoServlet.java:124) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:266) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) > at > org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552) > at > org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282) > at > org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > at > org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:107) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) > at > org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:47) > at > org.apache.sling.launchpad.testservices.filters.NoPropertyFilter.doFilter(NoPropertyFilter.java:25) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:47) > at > org.apache.sling.launchpad.testservices.filters.SlingFilter.doFilter(SlingFilter.java:25) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151) > at > org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:234) > at > org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:120) > at > org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:86) > at > org.apache.sling.junit.impl.servlet.TestLogServlet$TestNameLoggingFilter.doFilter(TestLogServlet.java:257) > at > org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135) > at >
[jira] [Commented] (SLING-7890) JSON-related IT failures when upgrading sling.servlets to 2.1.34
[ https://issues.apache.org/jira/browse/SLING-7890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16607251#comment-16607251 ] Jason E Bailey commented on SLING-7890: --- [~rombert] I've committed changes to both the default servlets and the integration tests. The last issue I'd like another opinion on. They current problem is that the json response for the VersionHistory was incorrectly returning a boolean property of true as "true" the integration test was set up to match on the String. It's now correctly responding with the boolean value. However this is a break if someone was expecting a String like the integration test. > JSON-related IT failures when upgrading sling.servlets to 2.1.34 > > > Key: SLING-7890 > URL: https://issues.apache.org/jira/browse/SLING-7890 > Project: Sling > Issue Type: Bug > Components: Servlets >Affects Versions: Servlets Get 2.1.34 >Reporter: Robert Munteanu >Assignee: Jason E Bailey >Priority: Major > Fix For: Launchpad Integration Tests 1.0.8, Servlets Get 2.1.36 > > > With the following change in the sling starter > {noformat}diff --git a/src/main/provisioning/sling.txt > b/src/main/provisioning/sling.txt > index 0f76c0b..4904fc3 100644 > --- a/src/main/provisioning/sling.txt > +++ b/src/main/provisioning/sling.txt > @@ -62,7 +62,7 @@ > org.apache.sling/org.apache.sling.resourceresolver/1.6.6 > org.apache.sling/org.apache.sling.serviceusermapper/1.4.0 > org.apache.sling/org.apache.sling.serviceuser.webconsole/1.0.0 > -org.apache.sling/org.apache.sling.servlets.get/2.1.30 > +org.apache.sling/org.apache.sling.servlets.get/2.1.34 > org.apache.sling/org.apache.sling.servlets.post/2.3.26 > org.apache.sling/org.apache.sling.servlets.resolver/2.4.22 > org.apache.sling/org.apache.sling.xss/2.0.12 > {noformat} > I get multiple IT failures, and the root cause seems top be > {noformat}java.lang.ClassCastException: > org.apache.johnzon.core.JsonObjectImpl cannot be cast to javax.json.JsonArray > at > org.apache.sling.servlets.get.impl.util.JsonToText.valueToString(JsonToText.java:164) > at > org.apache.sling.servlets.get.impl.util.JsonToText.prettyPrint(JsonToText.java:209) > at > org.apache.sling.servlets.get.impl.VersionInfoServlet.doGet(VersionInfoServlet.java:124) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:266) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) > at > org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552) > at > org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282) > at > org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > at > org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:107) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) > at > org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:47) > at > org.apache.sling.launchpad.testservices.filters.NoPropertyFilter.doFilter(NoPropertyFilter.java:25) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:47) > at > org.apache.sling.launchpad.testservices.filters.SlingFilter.doFilter(SlingFilter.java:25) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151) > at >
[jira] [Created] (SLING-7900) App CMS UI enhancements
Jason E Bailey created SLING-7900: - Summary: App CMS UI enhancements Key: SLING-7900 URL: https://issues.apache.org/jira/browse/SLING-7900 Project: Sling Issue Type: Improvement Components: App CMS Reporter: Jason E Bailey Rework the base UI to provide better context and usability. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Closed] (SLING-7699) Add ability to stream a Resource tree to Sling
[ https://issues.apache.org/jira/browse/SLING-7699?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey closed SLING-7699. - > Add ability to stream a Resource tree to Sling > -- > > Key: SLING-7699 > URL: https://issues.apache.org/jira/browse/SLING-7699 > Project: Sling > Issue Type: Improvement > Components: API >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Fix For: Resource Filter 1.0.0 > > Time Spent: 3h 10m > Remaining Estimate: 0h > > Add an ability to stream a Resource tree starting from a specific resource -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7890) JSON-related IT failures when upgrading sling.servlets to 2.1.34
[ https://issues.apache.org/jira/browse/SLING-7890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16609761#comment-16609761 ] Jason E Bailey commented on SLING-7890: --- [~bdelacretaz] yes there is a difference in the output, "baseVersion" is now returning a boolean {code:java} "baseVersion": true{code} > JSON-related IT failures when upgrading sling.servlets to 2.1.34 > > > Key: SLING-7890 > URL: https://issues.apache.org/jira/browse/SLING-7890 > Project: Sling > Issue Type: Bug > Components: Servlets >Affects Versions: Servlets Get 2.1.34 >Reporter: Robert Munteanu >Assignee: Jason E Bailey >Priority: Major > Fix For: Launchpad Integration Tests 1.0.8, Servlets Get 2.1.36 > > > With the following change in the sling starter > {noformat}diff --git a/src/main/provisioning/sling.txt > b/src/main/provisioning/sling.txt > index 0f76c0b..4904fc3 100644 > --- a/src/main/provisioning/sling.txt > +++ b/src/main/provisioning/sling.txt > @@ -62,7 +62,7 @@ > org.apache.sling/org.apache.sling.resourceresolver/1.6.6 > org.apache.sling/org.apache.sling.serviceusermapper/1.4.0 > org.apache.sling/org.apache.sling.serviceuser.webconsole/1.0.0 > -org.apache.sling/org.apache.sling.servlets.get/2.1.30 > +org.apache.sling/org.apache.sling.servlets.get/2.1.34 > org.apache.sling/org.apache.sling.servlets.post/2.3.26 > org.apache.sling/org.apache.sling.servlets.resolver/2.4.22 > org.apache.sling/org.apache.sling.xss/2.0.12 > {noformat} > I get multiple IT failures, and the root cause seems top be > {noformat}java.lang.ClassCastException: > org.apache.johnzon.core.JsonObjectImpl cannot be cast to javax.json.JsonArray > at > org.apache.sling.servlets.get.impl.util.JsonToText.valueToString(JsonToText.java:164) > at > org.apache.sling.servlets.get.impl.util.JsonToText.prettyPrint(JsonToText.java:209) > at > org.apache.sling.servlets.get.impl.VersionInfoServlet.doGet(VersionInfoServlet.java:124) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:266) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) > at > org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552) > at > org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282) > at > org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > at > org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:107) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) > at > org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:47) > at > org.apache.sling.launchpad.testservices.filters.NoPropertyFilter.doFilter(NoPropertyFilter.java:25) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:47) > at > org.apache.sling.launchpad.testservices.filters.SlingFilter.doFilter(SlingFilter.java:25) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151) > at > org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:234) > at > org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:120) > at > org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:86) > at >
[jira] [Commented] (SLING-7890) JSON-related IT failures when upgrading sling.servlets to 2.1.34
[ https://issues.apache.org/jira/browse/SLING-7890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16609975#comment-16609975 ] Jason E Bailey commented on SLING-7890: --- [~bdelacretaz] So something is odd here. The reason this is being returned as a String is that in 2.1.30 all boolean values are being returned as Strings when you add the tidy selector to the URL. This is effecting the default json as well. I don't think this was always the case. I'm researching. > JSON-related IT failures when upgrading sling.servlets to 2.1.34 > > > Key: SLING-7890 > URL: https://issues.apache.org/jira/browse/SLING-7890 > Project: Sling > Issue Type: Bug > Components: Servlets >Affects Versions: Servlets Get 2.1.34 >Reporter: Robert Munteanu >Assignee: Jason E Bailey >Priority: Major > Fix For: Launchpad Integration Tests 1.0.8, Servlets Get 2.1.36 > > > With the following change in the sling starter > {noformat}diff --git a/src/main/provisioning/sling.txt > b/src/main/provisioning/sling.txt > index 0f76c0b..4904fc3 100644 > --- a/src/main/provisioning/sling.txt > +++ b/src/main/provisioning/sling.txt > @@ -62,7 +62,7 @@ > org.apache.sling/org.apache.sling.resourceresolver/1.6.6 > org.apache.sling/org.apache.sling.serviceusermapper/1.4.0 > org.apache.sling/org.apache.sling.serviceuser.webconsole/1.0.0 > -org.apache.sling/org.apache.sling.servlets.get/2.1.30 > +org.apache.sling/org.apache.sling.servlets.get/2.1.34 > org.apache.sling/org.apache.sling.servlets.post/2.3.26 > org.apache.sling/org.apache.sling.servlets.resolver/2.4.22 > org.apache.sling/org.apache.sling.xss/2.0.12 > {noformat} > I get multiple IT failures, and the root cause seems top be > {noformat}java.lang.ClassCastException: > org.apache.johnzon.core.JsonObjectImpl cannot be cast to javax.json.JsonArray > at > org.apache.sling.servlets.get.impl.util.JsonToText.valueToString(JsonToText.java:164) > at > org.apache.sling.servlets.get.impl.util.JsonToText.prettyPrint(JsonToText.java:209) > at > org.apache.sling.servlets.get.impl.VersionInfoServlet.doGet(VersionInfoServlet.java:124) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:266) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) > at > org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552) > at > org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282) > at > org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > at > org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:107) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) > at > org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:47) > at > org.apache.sling.launchpad.testservices.filters.NoPropertyFilter.doFilter(NoPropertyFilter.java:25) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:47) > at > org.apache.sling.launchpad.testservices.filters.SlingFilter.doFilter(SlingFilter.java:25) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151) > at > org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:234) > at > org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:120) > at >
[jira] [Commented] (SLING-7890) JSON-related IT failures when upgrading sling.servlets to 2.1.34
[ https://issues.apache.org/jira/browse/SLING-7890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16607027#comment-16607027 ] Jason E Bailey commented on SLING-7890: --- I see the problem. I'll work on the fix and a unit test. > JSON-related IT failures when upgrading sling.servlets to 2.1.34 > > > Key: SLING-7890 > URL: https://issues.apache.org/jira/browse/SLING-7890 > Project: Sling > Issue Type: Bug > Components: Servlets >Affects Versions: Servlets Get 2.1.34 >Reporter: Robert Munteanu >Priority: Major > Fix For: Servlets Get 2.1.36 > > > With the following change in the sling starter > {noformat}diff --git a/src/main/provisioning/sling.txt > b/src/main/provisioning/sling.txt > index 0f76c0b..4904fc3 100644 > --- a/src/main/provisioning/sling.txt > +++ b/src/main/provisioning/sling.txt > @@ -62,7 +62,7 @@ > org.apache.sling/org.apache.sling.resourceresolver/1.6.6 > org.apache.sling/org.apache.sling.serviceusermapper/1.4.0 > org.apache.sling/org.apache.sling.serviceuser.webconsole/1.0.0 > -org.apache.sling/org.apache.sling.servlets.get/2.1.30 > +org.apache.sling/org.apache.sling.servlets.get/2.1.34 > org.apache.sling/org.apache.sling.servlets.post/2.3.26 > org.apache.sling/org.apache.sling.servlets.resolver/2.4.22 > org.apache.sling/org.apache.sling.xss/2.0.12 > {noformat} > I get multiple IT failures, and the root cause seems top be > {noformat}java.lang.ClassCastException: > org.apache.johnzon.core.JsonObjectImpl cannot be cast to javax.json.JsonArray > at > org.apache.sling.servlets.get.impl.util.JsonToText.valueToString(JsonToText.java:164) > at > org.apache.sling.servlets.get.impl.util.JsonToText.prettyPrint(JsonToText.java:209) > at > org.apache.sling.servlets.get.impl.VersionInfoServlet.doGet(VersionInfoServlet.java:124) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:266) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) > at > org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552) > at > org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282) > at > org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > at > org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:107) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) > at > org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:47) > at > org.apache.sling.launchpad.testservices.filters.NoPropertyFilter.doFilter(NoPropertyFilter.java:25) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:47) > at > org.apache.sling.launchpad.testservices.filters.SlingFilter.doFilter(SlingFilter.java:25) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151) > at > org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:234) > at > org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:120) > at > org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:86) > at > org.apache.sling.junit.impl.servlet.TestLogServlet$TestNameLoggingFilter.doFilter(TestLogServlet.java:257) > at > org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135) > at >
[jira] [Assigned] (SLING-7890) JSON-related IT failures when upgrading sling.servlets to 2.1.34
[ https://issues.apache.org/jira/browse/SLING-7890?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey reassigned SLING-7890: - Assignee: Jason E Bailey > JSON-related IT failures when upgrading sling.servlets to 2.1.34 > > > Key: SLING-7890 > URL: https://issues.apache.org/jira/browse/SLING-7890 > Project: Sling > Issue Type: Bug > Components: Servlets >Affects Versions: Servlets Get 2.1.34 >Reporter: Robert Munteanu >Assignee: Jason E Bailey >Priority: Major > Fix For: Servlets Get 2.1.36 > > > With the following change in the sling starter > {noformat}diff --git a/src/main/provisioning/sling.txt > b/src/main/provisioning/sling.txt > index 0f76c0b..4904fc3 100644 > --- a/src/main/provisioning/sling.txt > +++ b/src/main/provisioning/sling.txt > @@ -62,7 +62,7 @@ > org.apache.sling/org.apache.sling.resourceresolver/1.6.6 > org.apache.sling/org.apache.sling.serviceusermapper/1.4.0 > org.apache.sling/org.apache.sling.serviceuser.webconsole/1.0.0 > -org.apache.sling/org.apache.sling.servlets.get/2.1.30 > +org.apache.sling/org.apache.sling.servlets.get/2.1.34 > org.apache.sling/org.apache.sling.servlets.post/2.3.26 > org.apache.sling/org.apache.sling.servlets.resolver/2.4.22 > org.apache.sling/org.apache.sling.xss/2.0.12 > {noformat} > I get multiple IT failures, and the root cause seems top be > {noformat}java.lang.ClassCastException: > org.apache.johnzon.core.JsonObjectImpl cannot be cast to javax.json.JsonArray > at > org.apache.sling.servlets.get.impl.util.JsonToText.valueToString(JsonToText.java:164) > at > org.apache.sling.servlets.get.impl.util.JsonToText.prettyPrint(JsonToText.java:209) > at > org.apache.sling.servlets.get.impl.VersionInfoServlet.doGet(VersionInfoServlet.java:124) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:266) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) > at > org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552) > at > org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282) > at > org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > at > org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:107) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) > at > org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:47) > at > org.apache.sling.launchpad.testservices.filters.NoPropertyFilter.doFilter(NoPropertyFilter.java:25) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:47) > at > org.apache.sling.launchpad.testservices.filters.SlingFilter.doFilter(SlingFilter.java:25) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151) > at > org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:234) > at > org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:120) > at > org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:86) > at > org.apache.sling.junit.impl.servlet.TestLogServlet$TestNameLoggingFilter.doFilter(TestLogServlet.java:257) > at > org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135) > at >
[jira] [Commented] (SLING-7744) MockRequestPathInfo: Add Setter for SuffixResource
[ https://issues.apache.org/jira/browse/SLING-7744?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16533068#comment-16533068 ] Jason E Bailey commented on SLING-7744: --- [~kwin] I've found the throwing of an error on a method that's not implemented counter productive. Yes it communicates that the method won't work as expected. But there is then no way to make that method work. I was unable to mock a method that does nothing but throw an error message. So if you are working with pre-existing code that calls that method. You're kinda hosed. So I agree with your suggestion but I think the PR is better then what's there. > MockRequestPathInfo: Add Setter for SuffixResource > -- > > Key: SLING-7744 > URL: https://issues.apache.org/jira/browse/SLING-7744 > Project: Sling > Issue Type: Improvement > Components: Servlets, Testing >Affects Versions: Servlet Helpers 1.1.6 >Reporter: Jens Lauterbach >Priority: Minor > Attachments: SLING-7744.patch > > Time Spent: 1h 20m > Remaining Estimate: 0h > > The {{org.apache.sling.servlethelpers.MockRequestPathInfo}} allows consumers > to set almost every field except the {{suffixResource}}. Currently, the > {{getSuffixResource()}} just throws a {{UnsupportedOperationException}}. > *I propose implementing a {{setSuffixResource}} method equivalent to all the > other setters in this mock.* > As far as I can tell this can be easily implemented (see attached patch) and > would improve usability of this mock a little bit. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-6767) Jackrabbit Usermanager: Allow to detect whether a POST request was treated by the default POST servlet or the jackrabbit.usermanager
[ https://issues.apache.org/jira/browse/SLING-6767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16610808#comment-16610808 ] Jason E Bailey commented on SLING-6767: --- I've ran into issues where this impacts me with package installation. So I'd welcome something as long as it's not too intrusive. I personally like the relaxed option it would centralize the code for this in the default Post handler and it would be straight forward to add a key of some sort that would say "don't handle this request" > Jackrabbit Usermanager: Allow to detect whether a POST request was treated by > the default POST servlet or the jackrabbit.usermanager > > > Key: SLING-6767 > URL: https://issues.apache.org/jira/browse/SLING-6767 > Project: Sling > Issue Type: Improvement > Components: JCR >Reporter: Konrad Windszus >Priority: Major > Fix For: JCR Jackrabbit User Manager 2.2.8 > > > Currently it is impossible to tell from the response whether a POST request > has been answered by either the Default Sling POST servlet or the Jackrabbit > Usermanager. Both the JSON and the HTML look exactly the same no matter, who > answered. It should be possible to see from the client-side whether a request > has been treated by one or the other. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (SLING-7890) JSON-related IT failures when upgrading sling.servlets to 2.1.34
[ https://issues.apache.org/jira/browse/SLING-7890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16610625#comment-16610625 ] Jason E Bailey edited comment on SLING-7890 at 9/11/18 1:56 PM: Additional information The issue that is occurring is happening in two use cases, in the VersionInfo servlet and in the Default JSON Renderer when the selector of "tidy" is used. In these cases all values are being returned as Strings. This was introduced in release 2.1.26 as part of the change to apache johnzon json implementation. The class org.apache.sling.servlets.get.impl.util.JsonRenderer was added and the method valueToString(Object value) incorrectly handled numbers and booleans. Here is a version request prior to 2.1.26 {code:java} { "versions": { "jcr:rootVersion": { "created": "Mon Sep 10 2018 08:50:23 GMT-0400", "successors": ["1.0"], "predecessors": [], "labels": [], "baseVersion": false }, "1.0": { "created": "Tue Sep 11 2018 09:26:52 GMT-0400", "successors": [], "predecessors": ["jcr:rootVersion"], "labels": [], "baseVersion": true } } }{code} The same request via 2.1.30 {code:java} { "versions": { "jcr:rootVersion": { "created": "Mon Sep 10 2018 08:50:23 GMT-0400", "successors": ["1.0"], "predecessors": [], "labels": [], "baseVersion": "false" }, "1.0": { "created": "Tue Sep 11 2018 09:26:52 GMT-0400", "successors": [], "predecessors": ["jcr:rootVersion"], "labels": [], "baseVersion": "true" } } }{code} Notice that the booleans are being returned as boolean. I suspect the issue came about with how JsonObject.getString is being implemented. In the old library it would convert a value to String, where as in Johnzon it's expecting a JsonString. So when the change was made to Johnzon and the results were changed to return a String rather than a boolean, no errors were detected. Here is the same issue in 2.1.30 appearing with the default JSON Renderer: [http://localhost:8080/content/apache/sling-apache-org/index.json] {code:java} { "jcr:primaryType": "nt:unstructured", "jcr:title": "Apache Sling - Bringing Back the Fun!", "sling:template": "/conf/global/site/templates/base-page", "sling:taxonomy": "/etc/taxonomy/reference/community", "sling:resourceType": "reference/components/pages/base", "published": true, "hideInSitemap": false }{code} and with tidy: [http://localhost:8080/content/apache/sling-apache-org/index.tidy.json] {code:java} { "jcr:primaryType": "nt:unstructured", "jcr:title": "Apache Sling - Bringing Back the Fun!", "sling:template": "/conf/global/site/templates/base-page", "sling:taxonomy": "/etc/taxonomy/reference/community", "sling:resourceType": "reference/components/pages/base", "published": "true", "hideInSitemap": "false" }{code} I would say that if this hasn't shown up as a bug yet, that it will, because the boolean as a String is a fairly recent development. was (Author: jebailey): Additional information The issue that is occurring is happening in two use cases, in the VersionInfo servlet and in the Default JSON Renderer when the selector of "tidy" is used. In these cases all values are being returned as Strings. This was introduced in release 2.1.26 as part of the change to apache johnzon json implementation. The class org.apache.sling.servlets.get.impl.util.JsonRenderer was added and the method valueToString(Object value) incorrectly handled numbers and booleans. Here is a version request prior to 2.1.26 {code:java} { "versions": { "jcr:rootVersion": { "created": "Mon Sep 10 2018 08:50:23 GMT-0400", "successors": ["1.0"], "predecessors": [], "labels": [], "baseVersion": false }, "1.0": { "created": "Tue Sep 11 2018 09:26:52 GMT-0400", "successors": [], "predecessors": ["jcr:rootVersion"], "labels": [], "baseVersion": true } } }{code} The same request via 2.1.30 {code:java} { "versions": { "jcr:rootVersion": { "created": "Mon Sep 10 2018 08:50:23 GMT-0400", "successors": ["1.0"], "predecessors": [], "labels": [], "baseVersion": "false" }, "1.0": { "created": "Tue Sep 11 2018 09:26:52 GMT-0400", "successors": [], "predecessors": ["jcr:rootVersion"], "labels": [], "baseVersion": "true" } } }{code} Notice that the booleans are being returned as boolean. I suspect
[jira] [Commented] (SLING-7890) JSON-related IT failures when upgrading sling.servlets to 2.1.34
[ https://issues.apache.org/jira/browse/SLING-7890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16610720#comment-16610720 ] Jason E Bailey commented on SLING-7890: --- [~rombert] Correct. > JSON-related IT failures when upgrading sling.servlets to 2.1.34 > > > Key: SLING-7890 > URL: https://issues.apache.org/jira/browse/SLING-7890 > Project: Sling > Issue Type: Bug > Components: Servlets >Affects Versions: Servlets Get 2.1.34 >Reporter: Robert Munteanu >Assignee: Jason E Bailey >Priority: Major > Fix For: Launchpad Integration Tests 1.0.8, Servlets Get 2.1.36 > > > With the following change in the sling starter > {noformat}diff --git a/src/main/provisioning/sling.txt > b/src/main/provisioning/sling.txt > index 0f76c0b..4904fc3 100644 > --- a/src/main/provisioning/sling.txt > +++ b/src/main/provisioning/sling.txt > @@ -62,7 +62,7 @@ > org.apache.sling/org.apache.sling.resourceresolver/1.6.6 > org.apache.sling/org.apache.sling.serviceusermapper/1.4.0 > org.apache.sling/org.apache.sling.serviceuser.webconsole/1.0.0 > -org.apache.sling/org.apache.sling.servlets.get/2.1.30 > +org.apache.sling/org.apache.sling.servlets.get/2.1.34 > org.apache.sling/org.apache.sling.servlets.post/2.3.26 > org.apache.sling/org.apache.sling.servlets.resolver/2.4.22 > org.apache.sling/org.apache.sling.xss/2.0.12 > {noformat} > I get multiple IT failures, and the root cause seems top be > {noformat}java.lang.ClassCastException: > org.apache.johnzon.core.JsonObjectImpl cannot be cast to javax.json.JsonArray > at > org.apache.sling.servlets.get.impl.util.JsonToText.valueToString(JsonToText.java:164) > at > org.apache.sling.servlets.get.impl.util.JsonToText.prettyPrint(JsonToText.java:209) > at > org.apache.sling.servlets.get.impl.VersionInfoServlet.doGet(VersionInfoServlet.java:124) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:266) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) > at > org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552) > at > org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282) > at > org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > at > org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:107) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:78) > at > org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:47) > at > org.apache.sling.launchpad.testservices.filters.NoPropertyFilter.doFilter(NoPropertyFilter.java:25) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.launchpad.testservices.filters.TestFilter.doFilter(TestFilter.java:47) > at > org.apache.sling.launchpad.testservices.filters.SlingFilter.doFilter(SlingFilter.java:25) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131) > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151) > at > org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:234) > at > org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:120) > at > org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:86) > at > org.apache.sling.junit.impl.servlet.TestLogServlet$TestNameLoggingFilter.doFilter(TestLogServlet.java:257) > at > org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135) >
[jira] [Commented] (SLING-7890) JSON-related IT failures when upgrading sling.servlets to 2.1.34
[ https://issues.apache.org/jira/browse/SLING-7890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16610625#comment-16610625 ] Jason E Bailey commented on SLING-7890: --- Additional information The issue that is occurring is happening in two use cases, in the VersionInfo servlet and in the Default JSON Renderer when the selector of "tidy" is used. In these cases all values are being returned as Strings. This was introduced in release 2.1.26 as part of the change to apache johnzon json implementation. The class org.apache.sling.servlets.get.impl.util.JsonRenderer was added and the method valueToString(Object value) incorrectly handled numbers and booleans. Here is a version request prior to 2.1.26 {code:java} { "versions": { "jcr:rootVersion": { "created": "Mon Sep 10 2018 08:50:23 GMT-0400", "successors": ["1.0"], "predecessors": [], "labels": [], "baseVersion": false }, "1.0": { "created": "Tue Sep 11 2018 09:26:52 GMT-0400", "successors": [], "predecessors": ["jcr:rootVersion"], "labels": [], "baseVersion": true } } }{code} The same request via 2.1.30 {code:java} { "versions": { "jcr:rootVersion": { "created": "Mon Sep 10 2018 08:50:23 GMT-0400", "successors": ["1.0"], "predecessors": [], "labels": [], "baseVersion": "false" }, "1.0": { "created": "Tue Sep 11 2018 09:26:52 GMT-0400", "successors": [], "predecessors": ["jcr:rootVersion"], "labels": [], "baseVersion": "true" } } }{code} Notice that the booleans are being returned as boolean. I suspect the issue came about with how JsonObject.getString is being implemented. In the old library it would convert a value to String, where as in Johnzon it's expecting a JsonString. So when the change was made to Johnzon and the results were changed to return a String rather than a boolean, no errors were detected. Here is the same issue in 2.1.30 appearing with the default JSON Renderer: http://localhost:8080/content/apache/sling-apache-org/index.json {code:java} { "jcr:primaryType": "nt:unstructured", "jcr:title": "Apache Sling - Bringing Back the Fun!", "sling:template": "/conf/global/site/templates/base-page", "sling:taxonomy": "/etc/taxonomy/reference/community", "sling:resourceType": "reference/components/pages/base", "published": true, "hideInSitemap": false }{code} and with tidy: http://localhost:8080/content/apache/sling-apache-org/index.tidy.json { "jcr:primaryType": "nt:unstructured", "jcr:title": "Apache Sling - Bringing Back the Fun!", "sling:template": "/conf/global/site/templates/base-page", "sling:taxonomy": "/etc/taxonomy/reference/community", "sling:resourceType": "reference/components/pages/base", "published": "true", "hideInSitemap": "false" } I would say that if this hasn't shown up as a bug yet, that it will, because the boolean as a String is a fairly recent development. > JSON-related IT failures when upgrading sling.servlets to 2.1.34 > > > Key: SLING-7890 > URL: https://issues.apache.org/jira/browse/SLING-7890 > Project: Sling > Issue Type: Bug > Components: Servlets >Affects Versions: Servlets Get 2.1.34 >Reporter: Robert Munteanu >Assignee: Jason E Bailey >Priority: Major > Fix For: Launchpad Integration Tests 1.0.8, Servlets Get 2.1.36 > > > With the following change in the sling starter > {noformat}diff --git a/src/main/provisioning/sling.txt > b/src/main/provisioning/sling.txt > index 0f76c0b..4904fc3 100644 > --- a/src/main/provisioning/sling.txt > +++ b/src/main/provisioning/sling.txt > @@ -62,7 +62,7 @@ > org.apache.sling/org.apache.sling.resourceresolver/1.6.6 > org.apache.sling/org.apache.sling.serviceusermapper/1.4.0 > org.apache.sling/org.apache.sling.serviceuser.webconsole/1.0.0 > -org.apache.sling/org.apache.sling.servlets.get/2.1.30 > +org.apache.sling/org.apache.sling.servlets.get/2.1.34 > org.apache.sling/org.apache.sling.servlets.post/2.3.26 > org.apache.sling/org.apache.sling.servlets.resolver/2.4.22 > org.apache.sling/org.apache.sling.xss/2.0.12 > {noformat} > I get multiple IT failures, and the root cause seems top be > {noformat}java.lang.ClassCastException: > org.apache.johnzon.core.JsonObjectImpl cannot be cast to javax.json.JsonArray > at > org.apache.sling.servlets.get.impl.util.JsonToText.valueToString(JsonToText.java:164) > at > org.apache.sling.servlets.get.impl.util.JsonToText.prettyPrint(JsonToText.java:209) > at
[jira] [Created] (SLING-7540) Sling Query - Iterator improvements
Jason E Bailey created SLING-7540: - Summary: Sling Query - Iterator improvements Key: SLING-7540 URL: https://issues.apache.org/jira/browse/SLING-7540 Project: Sling Issue Type: Improvement Components: Sling Query Reporter: Jason E Bailey Assignee: Jason E Bailey Cover some minor improvements to Iterators, specifically AlternativeIterator - prevent iterator from continuing with iteration after item to be returned has been discovered. LastIterator - current design predetermines end item. Removes that and makes it more "lazy" SuppIterator - removes recursion -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Deleted] (SLING-7254) Donating Sling Resource Encryption Utils
[ https://issues.apache.org/jira/browse/SLING-7254?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey deleted SLING-7254: -- > Donating Sling Resource Encryption Utils > > > Key: SLING-7254 > URL: https://issues.apache.org/jira/browse/SLING-7254 > Project: Sling > Issue Type: Task >Reporter: Jason E Bailey >Priority: Major > > Issue to track donation of Sling resource encryption > Codebase > https://github.com/JEBailey/sling-encrypt > source code is attached with sha1 checksum of > 717e84c0ec45191d14d93cebbe8795961b393610 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SLING-7520) Sling Query - shortened URL goes to non apache site
[ https://issues.apache.org/jira/browse/SLING-7520?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey reassigned SLING-7520: - Assignee: Jason E Bailey > Sling Query - shortened URL goes to non apache site > --- > > Key: SLING-7520 > URL: https://issues.apache.org/jira/browse/SLING-7520 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Trivial > > Warning is generated out of Sling Query which contains a shortened url that > links to the previous site before it was merged. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SLING-7520) Sling Query - shortened URL goes to non apache site
[ https://issues.apache.org/jira/browse/SLING-7520?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey updated SLING-7520: -- Component/s: Sling Query > Sling Query - shortened URL goes to non apache site > --- > > Key: SLING-7520 > URL: https://issues.apache.org/jira/browse/SLING-7520 > Project: Sling > Issue Type: Improvement > Components: Sling Query >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Trivial > > Warning is generated out of Sling Query which contains a shortened url that > links to the previous site before it was merged. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SLING-7520) Sling Query - shortened URL goes to non apache site
[ https://issues.apache.org/jira/browse/SLING-7520?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey resolved SLING-7520. --- Resolution: Fixed url updated > Sling Query - shortened URL goes to non apache site > --- > > Key: SLING-7520 > URL: https://issues.apache.org/jira/browse/SLING-7520 > Project: Sling > Issue Type: Improvement > Components: Sling Query >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Trivial > > Warning is generated out of Sling Query which contains a shortened url that > links to the previous site before it was merged. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SLING-7520) Sling Query - shortened URL goes to non apache site
[ https://issues.apache.org/jira/browse/SLING-7520?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey updated SLING-7520: -- Fix Version/s: Sling Query 4.0.2 > Sling Query - shortened URL goes to non apache site > --- > > Key: SLING-7520 > URL: https://issues.apache.org/jira/browse/SLING-7520 > Project: Sling > Issue Type: Improvement > Components: Sling Query >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Trivial > Fix For: Sling Query 4.0.2 > > > Warning is generated out of Sling Query which contains a shortened url that > links to the previous site before it was merged. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SLING-7524) Sling Query - unique function does not not remove all duplicates
[ https://issues.apache.org/jira/browse/SLING-7524?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey resolved SLING-7524. --- Resolution: Fixed Fix Version/s: Sling Query 4.0.2 > Sling Query - unique function does not not remove all duplicates > > > Key: SLING-7524 > URL: https://issues.apache.org/jira/browse/SLING-7524 > Project: Sling > Issue Type: Improvement > Components: Sling Query >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Fix For: Sling Query 4.0.2 > > > the function for unique does not match the contract a unique function usually > provides including JQuery, rather it's providing a sequential deduplicator. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SLING-7540) Sling Query - Iterator improvements
[ https://issues.apache.org/jira/browse/SLING-7540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey resolved SLING-7540. --- Resolution: Fixed Fix Version/s: Sling Query 4.0.2 > Sling Query - Iterator improvements > --- > > Key: SLING-7540 > URL: https://issues.apache.org/jira/browse/SLING-7540 > Project: Sling > Issue Type: Improvement > Components: Sling Query >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Fix For: Sling Query 4.0.2 > > > Cover some minor improvements to Iterators, specifically > AlternativeIterator - prevent iterator from continuing with iteration after > item to be returned has been discovered. > LastIterator - current design predetermines end item. Removes that and makes > it more "lazy" > SuppIterator - removes recursion -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7590) Content Loaders not respecting time zone for Dates
[ https://issues.apache.org/jira/browse/SLING-7590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16442411#comment-16442411 ] Jason E Bailey commented on SLING-7590: --- [~sseif...@pro-vision.de] This gets confusing because each module has come up with it's own way of doing things. The content loader *only* recognizes an ISO-8601 format as a Date, but doesn't use the ISO8601 utility class, and so it doesn't keep the offset. So right now, if you use a GET for JSON and turn around and POST that JSON back into sling it won't recognize the date string as a date. Browsers now use the ISO-8601 format for dates and will fall back to the ECMA format as a fail over. I don't know why we're returning a JSON date using that format because it;s not the format that the XML response used. The XM used the ISO-8601. Which is a standard, and we should switch things to use a standard, at least as the default. I'll write something up for the mailing list. > Content Loaders not respecting time zone for Dates > -- > > Key: SLING-7590 > URL: https://issues.apache.org/jira/browse/SLING-7590 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Priority: Major > > When importing content, the JCR supports the setting of the time zone for a > jcr Date. However we currently have several processes that fail to set the > time zone correctly. > org.apache.sling.jcr.contentparser.impl.ParserHelper > org.apache.sling.jcr.contentloader.internal.DefaultContentCreator > org.apache.sling.servlets.post.impl.helper.DateParser > Take a String based time representation that includes a time offset and > convert it to Date that looses that information, before conversion to a > Calendar object. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SLING-7590) Content Loaders not respecting time zone for Dates
Jason E Bailey created SLING-7590: - Summary: Content Loaders not respecting time zone for Dates Key: SLING-7590 URL: https://issues.apache.org/jira/browse/SLING-7590 Project: Sling Issue Type: Improvement Reporter: Jason E Bailey When importing content, the JCR supports the setting of the time zone for a jcr Date. However we currently have several processes that fail to set the time zone correctly. org.apache.sling.jcr.contentparser.impl.ParserHelper in sling-org-apache-sling-jcr-contentparser org.apache.sling.jcr.contentloader.internal.DefaultContentCreator in sling-org-apache-sling-jcr-contentloader Both take a String based time representation that includes a time offset and convert it to Date that looses that information, before conversion to a Calendar object. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SLING-7590) Content Loaders not respecting time zone for Dates
[ https://issues.apache.org/jira/browse/SLING-7590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey updated SLING-7590: -- Fix Version/s: JCR ContentLoader 2.2.6 > Content Loaders not respecting time zone for Dates > -- > > Key: SLING-7590 > URL: https://issues.apache.org/jira/browse/SLING-7590 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Fix For: JCR ContentLoader 2.2.6, JCR Content Parser 1.2.6 > > Time Spent: 20m > Remaining Estimate: 0h > > When importing content, the JCR supports the setting of the time zone for a > jcr Date. However we currently have several processes that fail to set the > time zone correctly. > org.apache.sling.jcr.contentparser.impl.ParserHelper > org.apache.sling.jcr.contentloader.internal.DefaultContentCreator > org.apache.sling.servlets.post.impl.helper.DateParser > Take a String based time representation that includes a time offset and > convert it to Date that looses that information, before conversion to a > Calendar object. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SLING-7590) Content Loaders not respecting time zone for Dates
[ https://issues.apache.org/jira/browse/SLING-7590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey reassigned SLING-7590: - Assignee: Jason E Bailey > Content Loaders not respecting time zone for Dates > -- > > Key: SLING-7590 > URL: https://issues.apache.org/jira/browse/SLING-7590 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Fix For: JCR Content Parser 1.2.6 > > Time Spent: 20m > Remaining Estimate: 0h > > When importing content, the JCR supports the setting of the time zone for a > jcr Date. However we currently have several processes that fail to set the > time zone correctly. > org.apache.sling.jcr.contentparser.impl.ParserHelper > org.apache.sling.jcr.contentloader.internal.DefaultContentCreator > org.apache.sling.servlets.post.impl.helper.DateParser > Take a String based time representation that includes a time offset and > convert it to Date that looses that information, before conversion to a > Calendar object. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SLING-7590) Content Loaders not respecting time zone for Dates
[ https://issues.apache.org/jira/browse/SLING-7590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey updated SLING-7590: -- Fix Version/s: JCR Content Parser 1.2.6 > Content Loaders not respecting time zone for Dates > -- > > Key: SLING-7590 > URL: https://issues.apache.org/jira/browse/SLING-7590 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Priority: Major > Fix For: JCR Content Parser 1.2.6 > > Time Spent: 10m > Remaining Estimate: 0h > > When importing content, the JCR supports the setting of the time zone for a > jcr Date. However we currently have several processes that fail to set the > time zone correctly. > org.apache.sling.jcr.contentparser.impl.ParserHelper > org.apache.sling.jcr.contentloader.internal.DefaultContentCreator > org.apache.sling.servlets.post.impl.helper.DateParser > Take a String based time representation that includes a time offset and > convert it to Date that looses that information, before conversion to a > Calendar object. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7590) Content Loaders not respecting time zone for Dates
[ https://issues.apache.org/jira/browse/SLING-7590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16441402#comment-16441402 ] Jason E Bailey commented on SLING-7590: --- This has ended up creating a disconnect with how dates are handled depending on the format and the consumer of the data. Take an ISO88601 formatted String 'foo' which includes an offset. * As part of a form post with a TypeHint of Date the offset is preserved * The content loader will not preserve the offset * The content parser will preserve the offset for foo Other Date formats do not preserve the offset. There is a way to update the current usage to the java.time package in Java8, that will move these packages to require the Java 8 jre. > Content Loaders not respecting time zone for Dates > -- > > Key: SLING-7590 > URL: https://issues.apache.org/jira/browse/SLING-7590 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Priority: Major > > When importing content, the JCR supports the setting of the time zone for a > jcr Date. However we currently have several processes that fail to set the > time zone correctly. > org.apache.sling.jcr.contentparser.impl.ParserHelper > org.apache.sling.jcr.contentloader.internal.DefaultContentCreator > org.apache.sling.servlets.post.impl.helper.DateParser > Take a String based time representation that includes a time offset and > convert it to Date that looses that information, before conversion to a > Calendar object. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SLING-7590) Content Loaders not respecting time zone for Dates
[ https://issues.apache.org/jira/browse/SLING-7590?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey updated SLING-7590: -- Description: When importing content, the JCR supports the setting of the time zone for a jcr Date. However we currently have several processes that fail to set the time zone correctly. org.apache.sling.jcr.contentparser.impl.ParserHelper org.apache.sling.jcr.contentloader.internal.DefaultContentCreator org.apache.sling.servlets.post.impl.helper.DateParser Take a String based time representation that includes a time offset and convert it to Date that looses that information, before conversion to a Calendar object. was: When importing content, the JCR supports the setting of the time zone for a jcr Date. However we currently have several processes that fail to set the time zone correctly. org.apache.sling.jcr.contentparser.impl.ParserHelper in sling-org-apache-sling-jcr-contentparser org.apache.sling.jcr.contentloader.internal.DefaultContentCreator in sling-org-apache-sling-jcr-contentloader Both take a String based time representation that includes a time offset and convert it to Date that looses that information, before conversion to a Calendar object. > Content Loaders not respecting time zone for Dates > -- > > Key: SLING-7590 > URL: https://issues.apache.org/jira/browse/SLING-7590 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Priority: Major > > When importing content, the JCR supports the setting of the time zone for a > jcr Date. However we currently have several processes that fail to set the > time zone correctly. > org.apache.sling.jcr.contentparser.impl.ParserHelper > org.apache.sling.jcr.contentloader.internal.DefaultContentCreator > org.apache.sling.servlets.post.impl.helper.DateParser > Take a String based time representation that includes a time offset and > convert it to Date that looses that information, before conversion to a > Calendar object. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7590) Content Loaders not respecting time zone for Dates
[ https://issues.apache.org/jira/browse/SLING-7590?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16441462#comment-16441462 ] Jason E Bailey commented on SLING-7590: --- [~sseif...@pro-vision.de] It only works in two out of three places if you specifically use the ISO 8601 format. There is currently a pull request to fix it for the ECMA format that the content parser uses. [https://github.com/apache/sling-org-apache-sling-jcr-contentparser/pull/1] which started this review. Another option would be that instead of raising the JRE to 8 we could default outputs and inputs to the ISO8601 standard. > Content Loaders not respecting time zone for Dates > -- > > Key: SLING-7590 > URL: https://issues.apache.org/jira/browse/SLING-7590 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Priority: Major > > When importing content, the JCR supports the setting of the time zone for a > jcr Date. However we currently have several processes that fail to set the > time zone correctly. > org.apache.sling.jcr.contentparser.impl.ParserHelper > org.apache.sling.jcr.contentloader.internal.DefaultContentCreator > org.apache.sling.servlets.post.impl.helper.DateParser > Take a String based time representation that includes a time offset and > convert it to Date that looses that information, before conversion to a > Calendar object. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SLING-7619) Redirect Servlet - consolidate configuration
Jason E Bailey created SLING-7619: - Summary: Redirect Servlet - consolidate configuration Key: SLING-7619 URL: https://issues.apache.org/jira/browse/SLING-7619 Project: Sling Issue Type: Improvement Components: Servlets Reporter: Jason E Bailey Assignee: Jason E Bailey Currently the Redirect Servlet handles a GET for a node with a sling:resourceType of sling:redirect and a .json extension like generic GET request however it does it separately from the the DefaultGetServlets implementation. This then requires a separate configuration for the JSONRendererServlet. This modifies the RedirectServlet so that a request it receives with the .json extension is handed off to the DefaultGetServlet for completion. This centralizes the configuration for the json renderer. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SLING-7619) Redirect Servlet - consolidate configuration
[ https://issues.apache.org/jira/browse/SLING-7619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey updated SLING-7619: -- Fix Version/s: Servlets Get 2.1.32 > Redirect Servlet - consolidate configuration > > > Key: SLING-7619 > URL: https://issues.apache.org/jira/browse/SLING-7619 > Project: Sling > Issue Type: Improvement > Components: Servlets >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Fix For: Servlets Get 2.1.32 > > > Currently the Redirect Servlet handles a GET for a node with a > sling:resourceType of sling:redirect and a .json extension like generic GET > request however it does it separately from the the DefaultGetServlets > implementation. This then requires a separate configuration for the > JSONRendererServlet. > This modifies the RedirectServlet so that a request it receives with the > .json extension is handed off to the DefaultGetServlet for completion. This > centralizes the configuration for the json renderer. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SLING-7593) ResourceTraversor doesn't support ResourceDecorator pattern
[ https://issues.apache.org/jira/browse/SLING-7593?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey updated SLING-7593: -- Fix Version/s: (was: Servlets Get 2.1.30) Servlets Get 2.1.32 > ResourceTraversor doesn't support ResourceDecorator pattern > --- > > Key: SLING-7593 > URL: https://issues.apache.org/jira/browse/SLING-7593 > Project: Sling > Issue Type: Bug > Components: API, Servlets >Reporter: Joanna Jasnowska >Assignee: Carsten Ziegeler >Priority: Blocker > Fix For: API 2.18.2, Servlets Get 2.1.32 > > Attachments: > calling_deprecated_ResourceUtil_listChildren(resource)_replaced_with_resource_listChildren.patch, > listChildren_method_fixed.patch > > > In my current project, we are using ResourceDecorator pattern. In one case we > would like to decorate a resource with additional children. Unfortunately > ResourceTraversor object doesn't accept information about children from > ResourceDecorator. It is caused by usage of > ResourceUtil.listChildren(resource) method (inside ResourceTraversor class) > which is deprecated. Under the hood the method invokes > resource.getResourceResolver.listChildren(resource) method which reads data > directly from repo. In result our additional children are not returned. > Moreover, we don't have a place to add them to the list returned from > resourceResolver.listChildren method. > When we change the approach and we invoke resource.listChildren() method > instead of ResourceUtil.listChildren(resource) then we get solution which is > compatible with ResourceDecorator pattern and on the other hand when > resources are not decorated then no changes should be observed. > Additionally I have one additional question about > org.apache.sling.servlets.get bundle imported packages. Why do we have the > following dependency org.apache.sling.api.resource.external;version="[1.0,2)" > in the latest released version? On the other hand the same bundle has > dependency on org.apache.sling.api.resource; version="[2.10,3)". Is it > expected? If yes then how to provide > org.apache.sling.api.resource.external;version="[1.0,2)" on my environment, > because now I don't have it. > In the attachment section, you could find patch containing fix for the > described scenario. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SLING-7524) Sling Query - unique function does not not remove all duplicates
Jason E Bailey created SLING-7524: - Summary: Sling Query - unique function does not not remove all duplicates Key: SLING-7524 URL: https://issues.apache.org/jira/browse/SLING-7524 Project: Sling Issue Type: Improvement Components: Sling Query Reporter: Jason E Bailey Assignee: Jason E Bailey the function for unique does not match the contract a unique function usually provides including JQuery, rather it's providing a sequential deduplicator. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7524) Sling Query - unique function does not not remove all duplicates
[ https://issues.apache.org/jira/browse/SLING-7524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16383836#comment-16383836 ] Jason E Bailey commented on SLING-7524: --- [~tomek.rekawek] I like the laziness as well :) the jQuery equivalent doesn't do ordering any more as of 1.4 it just returns unique items in the order that they were seen. So I'm seeing this as similar to the distinct method in the Streams api. I've got a solution for this that works in the same manner as the distinct method. I'll create a PR for you to take a look at > Sling Query - unique function does not not remove all duplicates > > > Key: SLING-7524 > URL: https://issues.apache.org/jira/browse/SLING-7524 > Project: Sling > Issue Type: Improvement > Components: Sling Query >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > > the function for unique does not match the contract a unique function usually > provides including JQuery, rather it's providing a sequential deduplicator. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7520) Sling Query - shortened URL goes to non apache site
[ https://issues.apache.org/jira/browse/SLING-7520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16378672#comment-16378672 ] Jason E Bailey commented on SLING-7520: --- replacing with apache shortened URL > Sling Query - shortened URL goes to non apache site > --- > > Key: SLING-7520 > URL: https://issues.apache.org/jira/browse/SLING-7520 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Priority: Trivial > > Warning is generated out of Sling Query which contains a shortened url that > links to the previous site before it was merged. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SLING-7520) Sling Query - shortened URL goes to non apache site
Jason E Bailey created SLING-7520: - Summary: Sling Query - shortened URL goes to non apache site Key: SLING-7520 URL: https://issues.apache.org/jira/browse/SLING-7520 Project: Sling Issue Type: Improvement Reporter: Jason E Bailey Warning is generated out of Sling Query which contains a shortened url that links to the previous site before it was merged. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7524) Sling Query - unique function does not not remove all duplicates
[ https://issues.apache.org/jira/browse/SLING-7524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16383651#comment-16383651 ] Jason E Bailey commented on SLING-7524: --- [~tomek.rekawek] not sure if this was deliberate or not. > Sling Query - unique function does not not remove all duplicates > > > Key: SLING-7524 > URL: https://issues.apache.org/jira/browse/SLING-7524 > Project: Sling > Issue Type: Improvement > Components: Sling Query >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > > the function for unique does not match the contract a unique function usually > provides including JQuery, rather it's providing a sequential deduplicator. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7524) Sling Query - unique function does not not remove all duplicates
[ https://issues.apache.org/jira/browse/SLING-7524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16387741#comment-16387741 ] Jason E Bailey commented on SLING-7524: --- [~tomek.rekawek] unique functions are useful, which is why JQuery, the Stream api, and most bulk processing interfaces have them. Any thoughts on an implementation that would be acceptable? > Sling Query - unique function does not not remove all duplicates > > > Key: SLING-7524 > URL: https://issues.apache.org/jira/browse/SLING-7524 > Project: Sling > Issue Type: Improvement > Components: Sling Query >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > > the function for unique does not match the contract a unique function usually > provides including JQuery, rather it's providing a sequential deduplicator. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7748) Value of Month from jcr:lastModified is INCORRECT when org.apache.sling.api.resource.Resource.getValueMap() is used
[ https://issues.apache.org/jira/browse/SLING-7748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16526664#comment-16526664 ] Jason E Bailey commented on SLING-7748: --- The jcr:lastModified property exists in most nodes. You are providing a screenshot of the jcr:content node, but the json you are providing contains data that is coming from the metadata node. The code snippet you provided also mentions metadata which seems to indicate that the person who wrote this was trying to get the asset metadata. I am unable to reproduce this issue. !12928514_how-to-create2.png! > Value of Month from jcr:lastModified is INCORRECT when > org.apache.sling.api.resource.Resource.getValueMap() is used > --- > > Key: SLING-7748 > URL: https://issues.apache.org/jira/browse/SLING-7748 > Project: Sling > Issue Type: Bug > Components: API >Affects Versions: API 2.16.2 >Reporter: Suren Konathala >Priority: Major > Attachments: 12928514_how-to-create2.png, Screen Shot 2018-06-19 at > 4.09.38 PM.png, Screen Shot 2018-06-19 at 4.09.56 PM.png, how-to-create.png, > how-to-create.png, indy.png, indy2.png, sand.png, sand.png, > service-result.png, service-result.png > > > When using *org.apache.sling.api.resource.Resource* , the method *getValueMap > (* > [https://sling.apache.org/apidocs/sling9/org/apache/sling/api/resource/Resource.html#getValueMap--] > ), returns a ValueMap of all the properties. > We observed that the "*month*" in "*jcr:lastModified*" is off by 1 month. > While Year, Day, Hour, Min, Seconds are all correct. Please see the > attachments. And this is the same for all Nodes. > The last date modified was > "2018-*{color:#d04437}05{color}*-29T10:31:49.123-05:00" while the value from > the above method returned as below: > {color:#33}jcr:lastModified\"{\"year\":2018,*\"month\":4,\{color}*"dayOfMonth\":29,\"hourOfDay\":10,\"minute\":31,\"second\":49}{color} > We did not test this on all nodes though. > > Sample code: > {code:java} > Resource jcrdataResource = resource.getChild("jcr:content"); > ValueMap jcrProperties = ResourceUtil.getValueMap(jcrdataResource); > ... > JsonObject assetMetadataJson.addProperty(hit.getPath(), new > Gson().toJson(allProperties)); > ... > JsonElement assetMetadataJsonElement = new > Gson().fromJson(assetMetadataJson.toString(), JsonElement.class); > ... > JsonObject mainjsonObject.add("assets", assetMetadataJsonElement); > return mainjsonObject; > {code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SLING-7748) Value of Month from jcr:lastModified is INCORRECT when org.apache.sling.api.resource.Resource.getValueMap() is used
[ https://issues.apache.org/jira/browse/SLING-7748?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey updated SLING-7748: -- Attachment: 12928514_how-to-create2.png > Value of Month from jcr:lastModified is INCORRECT when > org.apache.sling.api.resource.Resource.getValueMap() is used > --- > > Key: SLING-7748 > URL: https://issues.apache.org/jira/browse/SLING-7748 > Project: Sling > Issue Type: Bug > Components: API >Affects Versions: API 2.16.2 >Reporter: Suren Konathala >Priority: Major > Attachments: 12928514_how-to-create2.png, Screen Shot 2018-06-19 at > 4.09.38 PM.png, Screen Shot 2018-06-19 at 4.09.56 PM.png, how-to-create.png, > how-to-create.png, indy.png, indy2.png, sand.png, sand.png, > service-result.png, service-result.png > > > When using *org.apache.sling.api.resource.Resource* , the method *getValueMap > (* > [https://sling.apache.org/apidocs/sling9/org/apache/sling/api/resource/Resource.html#getValueMap--] > ), returns a ValueMap of all the properties. > We observed that the "*month*" in "*jcr:lastModified*" is off by 1 month. > While Year, Day, Hour, Min, Seconds are all correct. Please see the > attachments. And this is the same for all Nodes. > The last date modified was > "2018-*{color:#d04437}05{color}*-29T10:31:49.123-05:00" while the value from > the above method returned as below: > {color:#33}jcr:lastModified\"{\"year\":2018,*\"month\":4,\{color}*"dayOfMonth\":29,\"hourOfDay\":10,\"minute\":31,\"second\":49}{color} > We did not test this on all nodes though. > > Sample code: > {code:java} > Resource jcrdataResource = resource.getChild("jcr:content"); > ValueMap jcrProperties = ResourceUtil.getValueMap(jcrdataResource); > ... > JsonObject assetMetadataJson.addProperty(hit.getPath(), new > Gson().toJson(allProperties)); > ... > JsonElement assetMetadataJsonElement = new > Gson().fromJson(assetMetadataJson.toString(), JsonElement.class); > ... > JsonObject mainjsonObject.add("assets", assetMetadataJsonElement); > return mainjsonObject; > {code} > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SLING-7986) CMS - introduce new js lib to decorate elems on dom insertion
[ https://issues.apache.org/jira/browse/SLING-7986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey reassigned SLING-7986: - Assignee: Jason E Bailey > CMS - introduce new js lib to decorate elems on dom insertion > - > > Key: SLING-7986 > URL: https://issues.apache.org/jira/browse/SLING-7986 > Project: Sling > Issue Type: Improvement > Components: App CMS >Affects Versions: App CMS 0.10.2 >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > > added a new js lib and broke out several of the old decorators into new files > and re-wrote them to fit the new lib. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SLING-7986) CMS - introduce new js lib to decorate elems on dom insertion
[ https://issues.apache.org/jira/browse/SLING-7986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey updated SLING-7986: -- Affects Version/s: (was: App CMS 0.10.2) > CMS - introduce new js lib to decorate elems on dom insertion > - > > Key: SLING-7986 > URL: https://issues.apache.org/jira/browse/SLING-7986 > Project: Sling > Issue Type: Improvement > Components: App CMS >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Fix For: App CMS 0.10.2 > > > added a new js lib and broke out several of the old decorators into new files > and re-wrote them to fit the new lib. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7934) Add the ability for a resource to adapt to a JSONObject
[ https://issues.apache.org/jira/browse/SLING-7934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16642282#comment-16642282 ] Jason E Bailey commented on SLING-7934: --- [~karlpauls] I'm honestly fine with either of those suggestions, however I'm not sure of the validity of that argument since it would be valid with any use of adaptTo which is used throughout the framework > Add the ability for a resource to adapt to a JSONObject > --- > > Key: SLING-7934 > URL: https://issues.apache.org/jira/browse/SLING-7934 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Priority: Major > > There are multiple implementations all doing the same process of converting a > resource to a JSONObject. If it's that common we should just add the ability > to adapt the resource and centralize the implementation so that it's > consistent. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SLING-3270) html-generator to support html5
[ https://issues.apache.org/jira/browse/SLING-3270?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey reassigned SLING-3270: - Assignee: Jason E Bailey > html-generator to support html5 > --- > > Key: SLING-3270 > URL: https://issues.apache.org/jira/browse/SLING-3270 > Project: Sling > Issue Type: Improvement > Components: Extensions >Affects Versions: Rewriter 1.0.2 >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Attachments: 218.patch > > > Given the following fragment of HTML > > This is invalid html4 and valid html5, as html5 allows anchor tags to contain > block elements. > The current html-generator corrects the bad html4 and produces the following > output > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SLING-7927) JSON Content Loading errors out import on malformed json
[ https://issues.apache.org/jira/browse/SLING-7927?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey reassigned SLING-7927: - Assignee: Jason E Bailey > JSON Content Loading errors out import on malformed json > > > Key: SLING-7927 > URL: https://issues.apache.org/jira/browse/SLING-7927 > Project: Sling > Issue Type: Bug >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Fix For: JCR Content Parser 1.2.8 > > > Current Behaviour: > During the importing of json content from a bundle. If one of the files > contains malformed json the load process is discontinued and exits. This > stops the loading of any other, correctly formatted, data. > > Expected Behaviour: > If a single file contains malformed content, that specific file should > discontinue, the error logged and then the process continues to import the > rest of the provided content. > As it is right now, it's possible to load the bundle and have the application > in an unworkable state. preventing the ability to trouble shoot and > investigate the root cause. > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SLING-7760) Contextual Additional Response Headers
[ https://issues.apache.org/jira/browse/SLING-7760?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey reassigned SLING-7760: - Assignee: Jason E Bailey > Contextual Additional Response Headers > -- > > Key: SLING-7760 > URL: https://issues.apache.org/jira/browse/SLING-7760 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > > Currently, for us to set the global response headers we need to add these to > the Sling Main Servlet. > The problem with this is > * Any changes to the Sling Main Servlet ends up with the service restarting. > This has a negative overall effect to the environment > * We run multiple domains out of a single instance. For a > Content-Security-Header we end up putting in exemptions that should apply to > one site for all sites. This is problematic from a security perspective > Ideally we would be able to configure headers based on the domain that's > being requested -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SLING-7926) JSON Content Loading should support namespace mangling
[ https://issues.apache.org/jira/browse/SLING-7926?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey reassigned SLING-7926: - Assignee: Jason E Bailey > JSON Content Loading should support namespace mangling > -- > > Key: SLING-7926 > URL: https://issues.apache.org/jira/browse/SLING-7926 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Fix For: JCR Content Parser 1.2.8 > > > Currently it's possible to define a json file with a name that matches a > mangled namespace. Which then makes the file unable to be accessed from the > ResourceResolver > i.e. importing a file `_jcr_content.json` will create the node `_jcr_content` > which cannot then be resolved as the resource resolver will attempt to > convert `_jcr_content` to `jcr:content` supporting namespace mangling will > additionally provide a cleaner `colon` support then the current > recommendation of a url mangled colon of `%3A` > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (SLING-7986) CMS - introduce new js lib to decorate elems on dom insertion
[ https://issues.apache.org/jira/browse/SLING-7986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey updated SLING-7986: -- Fix Version/s: App CMS 0.10.2 > CMS - introduce new js lib to decorate elems on dom insertion > - > > Key: SLING-7986 > URL: https://issues.apache.org/jira/browse/SLING-7986 > Project: Sling > Issue Type: Improvement > Components: App CMS >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Fix For: App CMS 0.10.2 > > > added a new js lib and broke out several of the old decorators into new files > and re-wrote them to fit the new lib. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SLING-7934) Add the ability for a resource to adapt to a JSONObject
[ https://issues.apache.org/jira/browse/SLING-7934?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey reassigned SLING-7934: - Assignee: Jason E Bailey > Add the ability for a resource to adapt to a JSONObject > --- > > Key: SLING-7934 > URL: https://issues.apache.org/jira/browse/SLING-7934 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > > There are multiple implementations all doing the same process of converting a > resource to a JSONObject. If it's that common we should just add the ability > to adapt the resource and centralize the implementation so that it's > consistent. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SLING-7989) Sling Resource Provider implementation
Jason E Bailey created SLING-7989: - Summary: Sling Resource Provider implementation Key: SLING-7989 URL: https://issues.apache.org/jira/browse/SLING-7989 Project: Sling Issue Type: Improvement Reporter: Jason E Bailey Assignee: Jason E Bailey Create a new resource provider implementation that is self contained. I.e. does not require an external data store. Resource Provider must # Implement all Resource Provider interfaces. # Requires minimal configuration # Support a Query Language -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SLING-8011) Accessing the info.sessionInfo.json endpoint always logs an error: Writer has already been closed
[ https://issues.apache.org/jira/browse/SLING-8011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey reassigned SLING-8011: - Assignee: Jason E Bailey > Accessing the info.sessionInfo.json endpoint always logs an error: Writer has > already been closed > - > > Key: SLING-8011 > URL: https://issues.apache.org/jira/browse/SLING-8011 > Project: Sling > Issue Type: Bug > Components: Servlets >Affects Versions: Servlets Get 2.1.34 >Reporter: Robert Munteanu >Assignee: Jason E Bailey >Priority: Major > Fix For: Servlets Get 2.1.38 > > > I noticed that the Sling starter logs are full of errors regarding an already > closed writer. Taking a closer look, I think the root cause is the fix for > SLING-7795 - now the response writer is being and then a flush call is issues. > {noformat}13.10.2018 01:02:12.584 *ERROR* [0:0:0:0:0:0:0:1 [1539381732583] > GET /system/sling/info.sessionInfo.json HTTP/1.1] > org.apache.sling.engine.impl.SlingRequestProcessorImpl Writer has already > been closed. > org.apache.sling.engine.impl.SlingHttpServletResponseImpl$WriterAlreadyClosedException: > null > at > org.apache.sling.engine.impl.SlingHttpServletResponseImpl$1.checkClosed(SlingHttpServletResponseImpl.java:190) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.SlingHttpServletResponseImpl$1.flush(SlingHttpServletResponseImpl.java:227) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.servlets.get.impl.SlingInfoServlet.renderJson(SlingInfoServlet.java:122) > [org.apache.sling.servlets.get:2.1.36] > at > org.apache.sling.servlets.get.impl.SlingInfoServlet.doGet(SlingInfoServlet.java:96) > [org.apache.sling.servlets.get:2.1.36] > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:266) > [org.apache.sling.api:2.18.4] > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) > [org.apache.sling.api:2.18.4] > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) > [org.apache.sling.api:2.18.4] > at > org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:107) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > [org.apache.sling.engine:2.6.14] > at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131) > [org.apache.sling.i18n:2.5.14] > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:234) > [org.apache.sling.engine:2.6.14] > at > org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:120) > [org.apache.felix.http.jetty:4.0.6] > at > org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:86) > [org.apache.felix.http.jetty:4.0.6] > at > org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:96) > [org.apache.felix.http.sslfilter:1.2.4] > at > org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135) > [org.apache.felix.http.jetty:4.0.6] > at > org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81) > [org.apache.felix.http.jetty:4.0.6] > at
[jira] [Commented] (SLING-8011) Accessing the info.sessionInfo.json endpoint always logs an error: Writer has already been closed
[ https://issues.apache.org/jira/browse/SLING-8011?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16648689#comment-16648689 ] Jason E Bailey commented on SLING-8011: --- Yep, I'll fix it. > Accessing the info.sessionInfo.json endpoint always logs an error: Writer has > already been closed > - > > Key: SLING-8011 > URL: https://issues.apache.org/jira/browse/SLING-8011 > Project: Sling > Issue Type: Bug > Components: Servlets >Affects Versions: Servlets Get 2.1.34 >Reporter: Robert Munteanu >Assignee: Jason E Bailey >Priority: Major > Fix For: Servlets Get 2.1.38 > > > I noticed that the Sling starter logs are full of errors regarding an already > closed writer. Taking a closer look, I think the root cause is the fix for > SLING-7795 - now the response writer is being and then a flush call is issues. > {noformat}13.10.2018 01:02:12.584 *ERROR* [0:0:0:0:0:0:0:1 [1539381732583] > GET /system/sling/info.sessionInfo.json HTTP/1.1] > org.apache.sling.engine.impl.SlingRequestProcessorImpl Writer has already > been closed. > org.apache.sling.engine.impl.SlingHttpServletResponseImpl$WriterAlreadyClosedException: > null > at > org.apache.sling.engine.impl.SlingHttpServletResponseImpl$1.checkClosed(SlingHttpServletResponseImpl.java:190) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.SlingHttpServletResponseImpl$1.flush(SlingHttpServletResponseImpl.java:227) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.servlets.get.impl.SlingInfoServlet.renderJson(SlingInfoServlet.java:122) > [org.apache.sling.servlets.get:2.1.36] > at > org.apache.sling.servlets.get.impl.SlingInfoServlet.doGet(SlingInfoServlet.java:96) > [org.apache.sling.servlets.get:2.1.36] > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:266) > [org.apache.sling.api:2.18.4] > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) > [org.apache.sling.api:2.18.4] > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) > [org.apache.sling.api:2.18.4] > at > org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:107) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > [org.apache.sling.engine:2.6.14] > at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131) > [org.apache.sling.i18n:2.5.14] > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:234) > [org.apache.sling.engine:2.6.14] > at > org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:120) > [org.apache.felix.http.jetty:4.0.6] > at > org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:86) > [org.apache.felix.http.jetty:4.0.6] > at > org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:96) > [org.apache.felix.http.sslfilter:1.2.4] > at > org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135) > [org.apache.felix.http.jetty:4.0.6] > at > org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81) > [org.apache.felix.http.jetty:4.0.6] > at
[jira] [Commented] (SLING-7950) Fix ITs with Oak 1.8
[ https://issues.apache.org/jira/browse/SLING-7950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16650530#comment-16650530 ] Jason E Bailey commented on SLING-7950: --- [~rombert] I pushed a fix for the null pointer exception that was occurring after the session information was written out. That may resolve this > Fix ITs with Oak 1.8 > > > Key: SLING-7950 > URL: https://issues.apache.org/jira/browse/SLING-7950 > Project: Sling > Issue Type: Sub-task > Components: Launchpad, Oak, Testing >Reporter: Robert Munteanu >Assignee: Robert Munteanu >Priority: Major > Fix For: Starter 11 > > > Updating to Oak 1.8.7 results in the following failures: > {noformat}[ERROR] Failures: > [ERROR] AnonymousAccessTest.testAnonymousContent:99->assertContent:85 > Expected status 200 for > http://localhost:41000/ANON_CAN_READ/AnonymousAccessTest/789235c4-d3b2-43b3-a163-aadb95cdd56b/test_text_789235c4_d.txt > (content=) expected:<200> but was:<401> > [ERROR] AnonymousAccessTest.testAnonymousContent:101 Expecting status 404 > when testing outside of anonymous access subtree expected:<404> but was:<401> > [ERROR] > AuthRequestLoginTest.testForcedLogin:40->HttpTestBase.getContent:419->HttpTestBase.getContent:424->HttpTestBase.getContent:432->HttpTestBase.getContent:457 > Expected status 200 for > http://localhost:41000/system/sling/info.sessionInfo.json (content=) > expected:<200> but was:<401> > [ERROR] RedirectOnLogoutTest.testRedirectToResourceAfterLogout:70 Expected > redirect expected:<302> but was:<401> > [ERROR] Errors: > [ERROR] DavExDisabledAnonAccessTest>DavExIntegrationTest.setUp:47 » > NoClassDefFound or... > [ERROR] DavExDisabledAnonAccessTest>DavExIntegrationTest.setUp:47 » > NoClassDefFound or... > [ERROR] DavExIntegrationTest.setUp:47 » NoClassDefFound > org/apache/jackrabbit/webdav/c... > [ERROR] DavExIntegrationTest.setUp:47 » NoClassDefFound > org/apache/jackrabbit/webdav/c... > [INFO] > [ERROR] Tests run: 655, Failures: 4, Errors: 4, Skipped: 1{noformat} > The changes that support this are at > https://github.com/apache/sling-org-apache-sling-starter/tree/feature/oak-1.8 -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SLING-8062) CMS - UI move modal structure to resource
Jason E Bailey created SLING-8062: - Summary: CMS - UI move modal structure to resource Key: SLING-8062 URL: https://issues.apache.org/jira/browse/SLING-8062 Project: Sling Issue Type: Improvement Components: App CMS Reporter: Jason E Bailey Assignee: Jason E Bailey Fix For: App CMS 0.10.2 Currently requests for a modal page is wrapped with the html to structure the modal from the client side. a new modal page template has been created, and the modal structure can be placed in that, reducing javascript. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SLING-8063) CMS - UI restructure action resources
Jason E Bailey created SLING-8063: - Summary: CMS - UI restructure action resources Key: SLING-8063 URL: https://issues.apache.org/jira/browse/SLING-8063 Project: Sling Issue Type: Improvement Components: App CMS Reporter: Jason E Bailey Assignee: Jason E Bailey Fix For: App CMS 0.10.2 Currently modals which represent actions are individually located under specific views. By separating these out to a structure which represents all the actions allows us to create a single location where we can view all potential actions and cognitively separates them from a view. Making the actions independent end points. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SLING-8000) CMS - Convert modal dialog pages to a modal base
[ https://issues.apache.org/jira/browse/SLING-8000?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey resolved SLING-8000. --- Resolution: Fixed updated > CMS - Convert modal dialog pages to a modal base > > > Key: SLING-8000 > URL: https://issues.apache.org/jira/browse/SLING-8000 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Fix For: App CMS 0.10.2 > > > currently the request for dialogs is returning the full page with a > subsection to be pulled out for the modal dialog. > create a new base page of modal and convert the pages to be a subtype of this > page type where appropriate. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SLING-7986) CMS - introduce new js lib to decorate elems on dom insertion
[ https://issues.apache.org/jira/browse/SLING-7986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey resolved SLING-7986. --- Resolution: Fixed new nomnom.js has been introduced to handle element decoration > CMS - introduce new js lib to decorate elems on dom insertion > - > > Key: SLING-7986 > URL: https://issues.apache.org/jira/browse/SLING-7986 > Project: Sling > Issue Type: Improvement > Components: App CMS >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > Fix For: App CMS 0.10.2 > > > added a new js lib and broke out several of the old decorators into new files > and re-wrote them to fit the new lib. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SLING-8047) Rendered/exported JSON requested via SlingRequestProcessor is not written to output stream
[ https://issues.apache.org/jira/browse/SLING-8047?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey reassigned SLING-8047: - Assignee: Jason E Bailey > Rendered/exported JSON requested via SlingRequestProcessor is not written to > output stream > -- > > Key: SLING-8047 > URL: https://issues.apache.org/jira/browse/SLING-8047 > Project: Sling > Issue Type: Bug > Components: Feature Model, Servlets >Reporter: Philip Mundt >Assignee: Jason E Bailey >Priority: Major > Attachments: > SLING-8047-DefaultGetServlet-does-not-write-to-output-stream.patch, > SLING-8047-ExportServlet-does-not-write-to-output-stream.patch > > Time Spent: 10m > Remaining Estimate: 0h > > While trying to facilitate the {{SlingRequestProcessor}} to get a rendered or > exported JSON representation of a resource, we ran into the problem of the > response always being empty. The HTML rendering worked without any issue. > (See example code of [Get the rendered HTML for an AEM resource, component or > page|http://www.nateyolles.com/blog/2015/10/get-rendered-html-for-an-aem-resource-or-component] > or [https://stackoverflow.com/a/34218708]) > Main, observed difference seem to be the method calls to print writer: > h4. JsonRenderer > {{org.apache.sling.servlets.get.impl.helpers.JsonRenderer#render}} uses > {{#write}} method of response's print writer. > h4. ExportServlet (via JacksonExporter) > {{org.apache.sling.models.impl.ExportServlet#doGet}} uses {{#write}} method > of response's print writer. > h4. HTMLRenderer > {{org.apache.sling.servlets.get.impl.helpers.HtmlRenderer#render}} uses > {{#print}} and {{#println}} methods of response's print writer. > h3. Further observations > When the print writer's {{autoFlush}} property is set to true and one uses > the {{#println}} method instead of {{#write}}, the {{JsonRenderer}} will > flush the print writer's buffer to the output stream. Due to wrapping the > response in > {{org.apache.sling.scripting.core.impl.helper.OnDemandWriterResponse}} (where > {{autoFlush=false}}) this does not work for the {{ExportServlet}}. > When adding implicit {{#flush()}} calls to both classes, both request > scenarios will work. According to the servlet specification, it should not be > necessary to flush the print writer, as the container must immediately flush > all remaining content to the client upon "termination of the service method > of the servlet". > Please find two test cases for (where implicit {{#flush()}} calls were added): > * JsonRenderer ({{sling-org-apache-sling-servlets-get}}): > [^SLING-8047-DefaultGetServlet-does-not-write-to-output-stream.patch] > * ExportServlet ({{sling-org-apache-sling-models-impl}}): > [^SLING-8047-ExportServlet-does-not-write-to-output-stream.patch] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-8047) Rendered/exported JSON requested via SlingRequestProcessor is not written to output stream
[ https://issues.apache.org/jira/browse/SLING-8047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16664263#comment-16664263 ] Jason E Bailey commented on SLING-8047: --- Thank you for raising this issue! I see you also created a pull request against the models. Could you do one for the default get servlets as well? > Rendered/exported JSON requested via SlingRequestProcessor is not written to > output stream > -- > > Key: SLING-8047 > URL: https://issues.apache.org/jira/browse/SLING-8047 > Project: Sling > Issue Type: Bug > Components: Feature Model, Servlets >Reporter: Philip Mundt >Assignee: Jason E Bailey >Priority: Major > Attachments: > SLING-8047-DefaultGetServlet-does-not-write-to-output-stream.patch, > SLING-8047-ExportServlet-does-not-write-to-output-stream.patch > > Time Spent: 10m > Remaining Estimate: 0h > > While trying to facilitate the {{SlingRequestProcessor}} to get a rendered or > exported JSON representation of a resource, we ran into the problem of the > response always being empty. The HTML rendering worked without any issue. > (See example code of [Get the rendered HTML for an AEM resource, component or > page|http://www.nateyolles.com/blog/2015/10/get-rendered-html-for-an-aem-resource-or-component] > or [https://stackoverflow.com/a/34218708]) > Main, observed difference seem to be the method calls to print writer: > h4. JsonRenderer > {{org.apache.sling.servlets.get.impl.helpers.JsonRenderer#render}} uses > {{#write}} method of response's print writer. > h4. ExportServlet (via JacksonExporter) > {{org.apache.sling.models.impl.ExportServlet#doGet}} uses {{#write}} method > of response's print writer. > h4. HTMLRenderer > {{org.apache.sling.servlets.get.impl.helpers.HtmlRenderer#render}} uses > {{#print}} and {{#println}} methods of response's print writer. > h3. Further observations > When the print writer's {{autoFlush}} property is set to true and one uses > the {{#println}} method instead of {{#write}}, the {{JsonRenderer}} will > flush the print writer's buffer to the output stream. Due to wrapping the > response in > {{org.apache.sling.scripting.core.impl.helper.OnDemandWriterResponse}} (where > {{autoFlush=false}}) this does not work for the {{ExportServlet}}. > When adding implicit {{#flush()}} calls to both classes, both request > scenarios will work. According to the servlet specification, it should not be > necessary to flush the print writer, as the container must immediately flush > all remaining content to the client upon "termination of the service method > of the servlet". > Please find two test cases for (where implicit {{#flush()}} calls were added): > * JsonRenderer ({{sling-org-apache-sling-servlets-get}}): > [^SLING-8047-DefaultGetServlet-does-not-write-to-output-stream.patch] > * ExportServlet ({{sling-org-apache-sling-models-impl}}): > [^SLING-8047-ExportServlet-does-not-write-to-output-stream.patch] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7934) Add the ability for a resource to adapt to a JSONObject
[ https://issues.apache.org/jira/browse/SLING-7934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16688051#comment-16688051 ] Jason E Bailey commented on SLING-7934: --- By converting the get(string,class) method to a default method in the interface? One that uses the converter. Then we modify the implementations where we can to use the default method. We couldn't stop people overwriting that but it becomes less likely. > Add the ability for a resource to adapt to a JSONObject > --- > > Key: SLING-7934 > URL: https://issues.apache.org/jira/browse/SLING-7934 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > > There are multiple implementations all doing the same process of converting a > resource to a JSONObject. If it's that common we should just add the ability > to adapt the resource and centralize the implementation so that it's > consistent. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7934) Add the ability for a resource to adapt to a JSONObject
[ https://issues.apache.org/jira/browse/SLING-7934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16686583#comment-16686583 ] Jason E Bailey commented on SLING-7934: --- So here is a real world scenario that I currently deal with. * I have form submissions that come in and get stored as resources * I then process those resources through a workflow. * One of the final steps of the workflow is to take the content of the resource as it is and send it as json object to an internal message queue. With your input, which I really appreciate, I don't think the adaptTo solution would work. However I feel the current process of converting a resource to JSON is to cumbersome. We have an explicit set of possible value types that we work with in a map. I feel there should be a solution somewhere, maybe a utility, that takes a generic Map and converts it to JSON. > Add the ability for a resource to adapt to a JSONObject > --- > > Key: SLING-7934 > URL: https://issues.apache.org/jira/browse/SLING-7934 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > > There are multiple implementations all doing the same process of converting a > resource to a JSONObject. If it's that common we should just add the ability > to adapt the resource and centralize the implementation so that it's > consistent. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (SLING-8011) Accessing the info.sessionInfo.json endpoint always logs an error: Writer has already been closed
[ https://issues.apache.org/jira/browse/SLING-8011?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey resolved SLING-8011. --- Resolution: Fixed > Accessing the info.sessionInfo.json endpoint always logs an error: Writer has > already been closed > - > > Key: SLING-8011 > URL: https://issues.apache.org/jira/browse/SLING-8011 > Project: Sling > Issue Type: Bug > Components: Servlets >Affects Versions: Servlets Get 2.1.34 >Reporter: Robert Munteanu >Assignee: Jason E Bailey >Priority: Major > Fix For: Servlets Get 2.1.38 > > > I noticed that the Sling starter logs are full of errors regarding an already > closed writer. Taking a closer look, I think the root cause is the fix for > SLING-7795 - now the response writer is being and then a flush call is issues. > {noformat}13.10.2018 01:02:12.584 *ERROR* [0:0:0:0:0:0:0:1 [1539381732583] > GET /system/sling/info.sessionInfo.json HTTP/1.1] > org.apache.sling.engine.impl.SlingRequestProcessorImpl Writer has already > been closed. > org.apache.sling.engine.impl.SlingHttpServletResponseImpl$WriterAlreadyClosedException: > null > at > org.apache.sling.engine.impl.SlingHttpServletResponseImpl$1.checkClosed(SlingHttpServletResponseImpl.java:190) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.SlingHttpServletResponseImpl$1.flush(SlingHttpServletResponseImpl.java:227) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.servlets.get.impl.SlingInfoServlet.renderJson(SlingInfoServlet.java:122) > [org.apache.sling.servlets.get:2.1.36] > at > org.apache.sling.servlets.get.impl.SlingInfoServlet.doGet(SlingInfoServlet.java:96) > [org.apache.sling.servlets.get:2.1.36] > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:266) > [org.apache.sling.api:2.18.4] > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:342) > [org.apache.sling.api:2.18.4] > at > org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:374) > [org.apache.sling.api:2.18.4] > at > org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:552) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:44) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:282) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:82) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:107) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > [org.apache.sling.engine:2.6.14] > at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131) > [org.apache.sling.i18n:2.5.14] > at > org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:72) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.SlingRequestProcessorImpl.doProcessRequest(SlingRequestProcessorImpl.java:151) > [org.apache.sling.engine:2.6.14] > at > org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:234) > [org.apache.sling.engine:2.6.14] > at > org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:120) > [org.apache.felix.http.jetty:4.0.6] > at > org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:86) > [org.apache.felix.http.jetty:4.0.6] > at > org.apache.felix.http.sslfilter.internal.SslFilter.doFilter(SslFilter.java:96) > [org.apache.felix.http.sslfilter:1.2.4] > at > org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:135) > [org.apache.felix.http.jetty:4.0.6] > at > org.apache.felix.http.base.internal.dispatch.InvocationChain.doFilter(InvocationChain.java:81) > [org.apache.felix.http.jetty:4.0.6] > at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:131) >
[jira] [Resolved] (SLING-8062) CMS - UI move modal structure to resource
[ https://issues.apache.org/jira/browse/SLING-8062?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey resolved SLING-8062. --- Resolution: Fixed > CMS - UI move modal structure to resource > - > > Key: SLING-8062 > URL: https://issues.apache.org/jira/browse/SLING-8062 > Project: Sling > Issue Type: Improvement > Components: App CMS >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Minor > Fix For: App CMS 0.10.2 > > > Currently requests for a modal page is wrapped with the html to structure the > modal from the client side. a new modal page template has been created, and > the modal structure can be placed in that, reducing javascript. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7934) Add the ability for a resource to adapt to a JSONObject
[ https://issues.apache.org/jira/browse/SLING-7934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16684342#comment-16684342 ] Jason E Bailey commented on SLING-7934: --- I'm not sure what you're definition of easily done is in this case. There's a whole class, org.apache.sling.servlets.get.impl.util.JsonObjectCreator, which was created to convert a resource to a JsonObject via a ValueMap and that is an internal class. If someone would like to do the same thing they would need to copy this class over or write their own. > Add the ability for a resource to adapt to a JSONObject > --- > > Key: SLING-7934 > URL: https://issues.apache.org/jira/browse/SLING-7934 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > > There are multiple implementations all doing the same process of converting a > resource to a JSONObject. If it's that common we should just add the ability > to adapt the resource and centralize the implementation so that it's > consistent. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7934) Add the ability for a resource to adapt to a JSONObject
[ https://issues.apache.org/jira/browse/SLING-7934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16686926#comment-16686926 ] Jason E Bailey commented on SLING-7934: --- I tend to have long conversations in my head and then come out with a statement that has a fully reasoned path that no one else follows. That's relevant here and I'm working on it. I wouldn't go with the .getJSONType() Because it's too specific to JSON and there's a part of me that bulks at doing a double lookup in a map, one to find the object and then another to get it's type. The problem comes back to is that a Map is really wider then what we use or need. From a resource perspective the value is either a String, Number, Boolean, or an Instant/Calendar object with array support. So my own stupid proposal would be, that if I had to change the ValueMap object I would rather change it to a Map which most people would never notice, because they are requesting a specific class type when they do their get. The change, however, would be really useful to anyone who needs to introspect the value type during processing. You could then do things such as ResourceValue.isArray() ResourceValue.getType() <- prefer an enum here ResourceValue.getOriginalType() ResourceValue.getValue() Though that could be implemented as part of existing interface as a supported type that internal conversions handle. meaning that it stays but you could just do a .get(mykey, ResourceValue.class). Of course now I just typed all of this and I just had this moment of "woah" cause we could probably do .get(myKey,JsonValue.class) as well and then you would have to go through half the work that you otherwise would need to,. > Add the ability for a resource to adapt to a JSONObject > --- > > Key: SLING-7934 > URL: https://issues.apache.org/jira/browse/SLING-7934 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Assignee: Jason E Bailey >Priority: Major > > There are multiple implementations all doing the same process of converting a > resource to a JSONObject. If it's that common we should just add the ability > to adapt the resource and centralize the implementation so that it's > consistent. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7934) Add the ability for a resource to adapt to a JSONObject
[ https://issues.apache.org/jira/browse/SLING-7934?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16631869#comment-16631869 ] Jason E Bailey commented on SLING-7934: --- The JSONObjectCreator in the Default GET servlets is a private class and not exposed by the Bundle. I only see the use of JSON when you are sending data, either as a response to a query or you are posting the data elsewhere. The use case of Posting the content of the resource is something that I have done several times downstream. The answer to your follow up questions is No. My thoughts was that this was a utility to assist in creating a JSON from a resource and not tied back to the underlying resource provider. Although that would be cool. > Add the ability for a resource to adapt to a JSONObject > --- > > Key: SLING-7934 > URL: https://issues.apache.org/jira/browse/SLING-7934 > Project: Sling > Issue Type: Improvement >Reporter: Jason E Bailey >Priority: Major > > There are multiple implementations all doing the same process of converting a > resource to a JSONObject. If it's that common we should just add the ability > to adapt the resource and centralize the implementation so that it's > consistent. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SLING-7986) CMS - introduce new js lib to decorate elems on dom insertion
Jason E Bailey created SLING-7986: - Summary: CMS - introduce new js lib to decorate elems on dom insertion Key: SLING-7986 URL: https://issues.apache.org/jira/browse/SLING-7986 Project: Sling Issue Type: Improvement Components: App CMS Affects Versions: App CMS 0.10.2 Reporter: Jason E Bailey added a new js lib and broke out several of the old decorators into new files and re-wrote them to fit the new lib. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (SLING-8000) CMS - Convert modal dialog pages to a modal base
Jason E Bailey created SLING-8000: - Summary: CMS - Convert modal dialog pages to a modal base Key: SLING-8000 URL: https://issues.apache.org/jira/browse/SLING-8000 Project: Sling Issue Type: Improvement Reporter: Jason E Bailey Assignee: Jason E Bailey Fix For: App CMS 0.10.2 currently the request for dialogs is returning the full page with a subsection to be pulled out for the modal dialog. create a new base page of modal and convert the pages to be a subtype of this page type where appropriate. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (SLING-7931) SlingQuery - Last method doesn't work as expected
[ https://issues.apache.org/jira/browse/SLING-7931?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16626161#comment-16626161 ] Jason E Bailey commented on SLING-7931: --- Thanks for the bug report! I'll get the fix for this in it's next release. > SlingQuery - Last method doesn't work as expected > - > > Key: SLING-7931 > URL: https://issues.apache.org/jira/browse/SLING-7931 > Project: Sling > Issue Type: Bug > Components: Sling Query >Affects Versions: Sling Query 4.0.2 > Environment: Java 8, AEM 6.4 SP1, Linux x64 Fedora >Reporter: Michele Scala >Priority: Critical > Labels: sling-query > Attachments: sling-query-test-result.jpg, test-sling-query.groovy, > test-sling-query.infinity.json > > > Last() method of the Sling Query doesn't return the correct value in case you > have filtered the resources before. I'll try to describe the problem with an > example. > *Expected* > [ 1 , 2 , 3 , 4 ] –> FILTER ([n=1]) = [ 1 ] –> LAST = [ 1 ] > *Current behavior* > [ 1 , 2 , 3 , 4 ] –> FILTER ([n=1]) = [ 1 ] –> LAST = NULL > I think the problem is related to last iterator that doesn't check if the > next element is an empty option or a valid one. > As attachment there is and an example that shows the bug. > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Assigned] (SLING-7931) SlingQuery - Last method doesn't work as expected
[ https://issues.apache.org/jira/browse/SLING-7931?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason E Bailey reassigned SLING-7931: - Assignee: Jason E Bailey > SlingQuery - Last method doesn't work as expected > - > > Key: SLING-7931 > URL: https://issues.apache.org/jira/browse/SLING-7931 > Project: Sling > Issue Type: Bug > Components: Sling Query >Affects Versions: Sling Query 4.0.2 > Environment: Java 8, AEM 6.4 SP1, Linux x64 Fedora >Reporter: Michele Scala >Assignee: Jason E Bailey >Priority: Critical > Labels: sling-query > Attachments: sling-query-test-result.jpg, test-sling-query.groovy, > test-sling-query.infinity.json > > > Last() method of the Sling Query doesn't return the correct value in case you > have filtered the resources before. I'll try to describe the problem with an > example. > *Expected* > [ 1 , 2 , 3 , 4 ] –> FILTER ([n=1]) = [ 1 ] –> LAST = [ 1 ] > *Current behavior* > [ 1 , 2 , 3 , 4 ] –> FILTER ([n=1]) = [ 1 ] –> LAST = NULL > I think the problem is related to last iterator that doesn't check if the > next element is an empty option or a valid one. > As attachment there is and an example that shows the bug. > > -- This message was sent by Atlassian JIRA (v7.6.3#76005)