[jira] [Commented] (SLING-7223) Spikes in RRD after restart
[ https://issues.apache.org/jira/browse/SLING-7223?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16226250#comment-16226250 ] Chetan Mehrotra commented on SLING-7223: [~mreutegg] You can also send PR now with https://github.com/apache/sling-org-apache-sling-commons-metrics-rrd4j. Let me know if you want to send a PR or I should apply this patch > Spikes in RRD after restart > --- > > Key: SLING-7223 > URL: https://issues.apache.org/jira/browse/SLING-7223 > Project: Sling > Issue Type: Bug > Components: Commons >Affects Versions: Commons Metrics RRD4J 1.0.0 >Reporter: Marcel Reutegger > Attachments: SLING-7223.patch > > > Running the reporter for some time and then restarting the process shows > spikes in the collected data. These are caused by counter gauges that are > reset to zero after a restart. RRD interprets them as 32bit or 64bit integer > overflows and calculates incorrect values. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Resolved] (SLING-7224) Switch to standard OSGi annotations
[ https://issues.apache.org/jira/browse/SLING-7224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chetan Mehrotra resolved SLING-7224. Resolution: Fixed Done with [commit|https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-commons-log.git;a=commitdiff;h=d8db32c4f36f61650ab16b2c5bdc2a873b76abdc] > Switch to standard OSGi annotations > --- > > Key: SLING-7224 > URL: https://issues.apache.org/jira/browse/SLING-7224 > Project: Sling > Issue Type: Task > Components: Commons >Reporter: Chetan Mehrotra >Assignee: Chetan Mehrotra >Priority: Minor > Fix For: Commons Log 5.0.4 > > > Switch to official OSGi annotations -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Created] (SLING-7224) Switch to standard OSGi annotations
Chetan Mehrotra created SLING-7224: -- Summary: Switch to standard OSGi annotations Key: SLING-7224 URL: https://issues.apache.org/jira/browse/SLING-7224 Project: Sling Issue Type: Task Components: Commons Reporter: Chetan Mehrotra Assignee: Chetan Mehrotra Priority: Minor Fix For: Commons Log 5.0.4 Switch to official OSGi annotations -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Assigned] (SLING-6482) Commons Log WebConsole: Exception when creating logger with an empty log file
[ https://issues.apache.org/jira/browse/SLING-6482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chetan Mehrotra reassigned SLING-6482: -- Assignee: Chetan Mehrotra > Commons Log WebConsole: Exception when creating logger with an empty log file > - > > Key: SLING-6482 > URL: https://issues.apache.org/jira/browse/SLING-6482 > Project: Sling > Issue Type: Bug > Components: Commons >Affects Versions: Commons Log 5.0.0 >Reporter: Bjoern Weide >Assignee: Chetan Mehrotra >Priority: Minor > Fix For: Commons Log 5.0.4 > > Attachments: SLING-6482-v01.patch > > > When creating a new logger via WebConsole specifying an empty logfile it > causes an StringIndexOutOfBoundsException when (re-)opening the WebConsole. > {noformat} > java.lang.StringIndexOutOfBoundsException: String index out of range: -1 > at java.lang.String.substring(String.java:1931) > at > org.apache.sling.commons.log.logback.internal.SlingLogPanel.getPath(SlingLogPanel.java:791) > ... > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (SLING-7197) Completed Scheduled Jobs are not getting fetched
[ https://issues.apache.org/jira/browse/SLING-7197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16226238#comment-16226238 ] ASF GitHub Bot commented on SLING-7197: --- prafulVaishnav commented on issue #1: SLING-7197 Completed Scheduled Jobs are not getting fetched. URL: https://github.com/apache/sling-org-apache-sling-event/pull/1#issuecomment-340657562 @cziegeler Can you please merge this PR if everything right. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Completed Scheduled Jobs are not getting fetched > > > Key: SLING-7197 > URL: https://issues.apache.org/jira/browse/SLING-7197 > Project: Sling > Issue Type: Bug > Components: API >Affects Versions: Event 4.2.8 >Reporter: Praful Vaishnav > Fix For: Event 4.2.10 > > > Scheuled jobs are created as _slingevent:TimedEvent_ under path > _/var/eventing/scheduled-jobs_. When these jobs execution are complete, they > are moved under path `/var/eventing/jobs/finished`. Prior to completion, we > can get scheduled jobs using [API JobManager.getScheduledJobs| > https://sling.apache.org/apidocs/sling7/org/apache/sling/event/jobs/JobManager.html#getScheduledJobs-java.lang.String-long-java.util.Map...- > ]. But I could not find any API to get scheduled jobs which are completed. > [API JobManager.findJobs| > https://sling.apache.org/apidocs/sling7/org/apache/sling/event/jobs/JobManager.html#findJobs-org.apache.sling.event.jobs.JobManager.QueryType-java.lang.String-long-java.util.Map...-] > returns only jobs of type _slingevent:Job_ -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (SLING-7197) Completed Scheduled Jobs are not getting fetched
[ https://issues.apache.org/jira/browse/SLING-7197?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16226237#comment-16226237 ] ASF GitHub Bot commented on SLING-7197: --- prafulVaishnav commented on issue #1: SLING-7197 Completed Scheduled Jobs are not getting fetched. URL: https://github.com/apache/sling-org-apache-sling-event/pull/1#issuecomment-340657562 @cziegeler Can you plese merge this PR if everything right. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Completed Scheduled Jobs are not getting fetched > > > Key: SLING-7197 > URL: https://issues.apache.org/jira/browse/SLING-7197 > Project: Sling > Issue Type: Bug > Components: API >Affects Versions: Event 4.2.8 >Reporter: Praful Vaishnav > Fix For: Event 4.2.10 > > > Scheuled jobs are created as _slingevent:TimedEvent_ under path > _/var/eventing/scheduled-jobs_. When these jobs execution are complete, they > are moved under path `/var/eventing/jobs/finished`. Prior to completion, we > can get scheduled jobs using [API JobManager.getScheduledJobs| > https://sling.apache.org/apidocs/sling7/org/apache/sling/event/jobs/JobManager.html#getScheduledJobs-java.lang.String-long-java.util.Map...- > ]. But I could not find any API to get scheduled jobs which are completed. > [API JobManager.findJobs| > https://sling.apache.org/apidocs/sling7/org/apache/sling/event/jobs/JobManager.html#findJobs-org.apache.sling.event.jobs.JobManager.QueryType-java.lang.String-long-java.util.Map...-] > returns only jobs of type _slingevent:Job_ -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (SLING-6482) Commons Log WebConsole: Exception when creating logger with an empty log file
[ https://issues.apache.org/jira/browse/SLING-6482?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16226229#comment-16226229 ] Chetan Mehrotra commented on SLING-6482: Thanks [~kwin] for the details. Fixed this with [commit|https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-commons-log.git;a=commitdiff;h=eb3a92d8eb454ff8091e24408d35802006ebba94]. Now an empty fileName is mapped to "console" appender. This works fine post edits also. [~kwin] Can you validate the behaviour once with trunk to check it addresses your concerns. > Commons Log WebConsole: Exception when creating logger with an empty log file > - > > Key: SLING-6482 > URL: https://issues.apache.org/jira/browse/SLING-6482 > Project: Sling > Issue Type: Bug > Components: Commons >Affects Versions: Commons Log 5.0.0 >Reporter: Bjoern Weide >Priority: Minor > Fix For: Commons Log 5.0.4 > > Attachments: SLING-6482-v01.patch > > > When creating a new logger via WebConsole specifying an empty logfile it > causes an StringIndexOutOfBoundsException when (re-)opening the WebConsole. > {noformat} > java.lang.StringIndexOutOfBoundsException: String index out of range: -1 > at java.lang.String.substring(String.java:1931) > at > org.apache.sling.commons.log.logback.internal.SlingLogPanel.getPath(SlingLogPanel.java:791) > ... > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (SLING-3049) Make Logback Stacktrace Packaging data support OSGi aware
[ https://issues.apache.org/jira/browse/SLING-3049?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16225218#comment-16225218 ] Alexander Klimetschek commented on SLING-3049: -- +1 Looks very useful when people report issues and don‘t know what bundles are even involved. Will this be automatically part of any stacktraces in log files? > Make Logback Stacktrace Packaging data support OSGi aware > - > > Key: SLING-3049 > URL: https://issues.apache.org/jira/browse/SLING-3049 > Project: Sling > Issue Type: Improvement > Components: Commons >Reporter: Chetan Mehrotra >Assignee: Chetan Mehrotra > Labels: logback > Attachments: SLING-3049.patch, > buildbot-exceptions-while-stopping-jetty.txt > > > Logback provides a useful feature where it dumps the Class packaging Data > along with the stacktrace [1]. This provides a quick view of the location > from where classes in a given stacktrace are coming. Its default logic does > not work properly in OSGi env. Hence it would be useful to patch its logic to > become OSGi aware > [1] http://logback.qos.ch/reasonsToSwitch.html#packagingData -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (SLING-6932) [javadoc] Document transient nature of ResourceResolver operations
[ https://issues.apache.org/jira/browse/SLING-6932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carsten Ziegeler updated SLING-6932: Fix Version/s: (was: API 2.16.4) > [javadoc] Document transient nature of ResourceResolver operations > -- > > Key: SLING-6932 > URL: https://issues.apache.org/jira/browse/SLING-6932 > Project: Sling > Issue Type: Improvement > Components: API >Reporter: Alexander Klimetschek > > All ResourceResolver resource operations (create, delete, move, copy) are > transient, one always has to call commit() to save the transaction. > This isn't documented in the current [ResourceResolver > javadoc|https://github.com/apache/sling/blob/96c4134f770c83a665170ec9fad1f8d49832e650/bundles/api/src/main/java/org/apache/sling/api/resource/ResourceResolver.java]. > A general paragraph in the class level javadoc on the overall transactional > behavior, plus a sentence on each modifying operation such as "It is > necessary to call commit() to persist these changes." would help. > Furthermore, with changes across multiple resource providers (such as a > move), these are multiple transactions, but there is no two phase commit or > the like - the first failure will stop committing transactions, and already > committed transactions are not rolled back. (Based on reading [this > code|https://github.com/apache/sling/blob/96c4134f770c83a665170ec9fad1f8d49832e650/bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/helper/ResourceResolverControl.java#L419-L423]). > Should be documented as well. > Discussed here: http://sling.markmail.org/thread/vrnjgqgf3djvwscv -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Assigned] (SLING-6501) Incorrect normalization of path of an asset with name beginning with '.'
[ https://issues.apache.org/jira/browse/SLING-6501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carsten Ziegeler reassigned SLING-6501: --- Assignee: Carsten Ziegeler > Incorrect normalization of path of an asset with name beginning with '.' > > > Key: SLING-6501 > URL: https://issues.apache.org/jira/browse/SLING-6501 > Project: Sling > Issue Type: Bug > Components: API >Reporter: Gaurav Gupta >Assignee: Carsten Ziegeler >Priority: Critical > Fix For: API 2.16.4 > > > When a new asset named ".jpg" is being modified in JCR, > [ResourceUtil.normalize()|https://sling.apache.org/apidocs/sling7/org/apache/sling/api/resource/ResourceUtil.html#normalize-java.lang.String-] > method returns an incorrect normalized path which leads to the creation of a > folder named '.jp' under the same parent node. A small test shows this > anomaly. > {code:java} > public class RUNormalizeTest { > public static String toPropertyPath(String paramName, String path) { > if (!paramName.startsWith("/")) { > paramName = ResourceUtil.normalize(path + '/' + paramName); > } > return paramName; > } > > public static void main(String[] args) { > String pName = > "./jpg_folder/.jpg/jcr:content/metadata/dc:title"; > String path = "/content/dam"; > System.out.println(toPropertyPath(pName,path)); > } > } > {code} > Expected output: /content/dam/jpg_folder/.jpg/jcr:content/metadata/dc:title > Output: /content/dam/jpg_folder/.jp/jcr:content/metadata/dc:title > In the above code, the properties of an asset named '.jpg' are being > modified. However, the normalize method returns an incorrect path for the > input path. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Resolved] (SLING-6501) Incorrect normalization of path of an asset with name beginning with '.'
[ https://issues.apache.org/jira/browse/SLING-6501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Carsten Ziegeler resolved SLING-6501. - Resolution: Fixed Thanks for the patch , [~satyadeep]. It's applied > Incorrect normalization of path of an asset with name beginning with '.' > > > Key: SLING-6501 > URL: https://issues.apache.org/jira/browse/SLING-6501 > Project: Sling > Issue Type: Bug > Components: API >Reporter: Gaurav Gupta >Assignee: Carsten Ziegeler >Priority: Critical > Fix For: API 2.16.4 > > > When a new asset named ".jpg" is being modified in JCR, > [ResourceUtil.normalize()|https://sling.apache.org/apidocs/sling7/org/apache/sling/api/resource/ResourceUtil.html#normalize-java.lang.String-] > method returns an incorrect normalized path which leads to the creation of a > folder named '.jp' under the same parent node. A small test shows this > anomaly. > {code:java} > public class RUNormalizeTest { > public static String toPropertyPath(String paramName, String path) { > if (!paramName.startsWith("/")) { > paramName = ResourceUtil.normalize(path + '/' + paramName); > } > return paramName; > } > > public static void main(String[] args) { > String pName = > "./jpg_folder/.jpg/jcr:content/metadata/dc:title"; > String path = "/content/dam"; > System.out.println(toPropertyPath(pName,path)); > } > } > {code} > Expected output: /content/dam/jpg_folder/.jpg/jcr:content/metadata/dc:title > Output: /content/dam/jpg_folder/.jp/jcr:content/metadata/dc:title > In the above code, the properties of an asset named '.jpg' are being > modified. However, the normalize method returns an incorrect path for the > input path. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (SLING-6501) Incorrect normalization of path of an asset with name beginning with '.'
[ https://issues.apache.org/jira/browse/SLING-6501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16225213#comment-16225213 ] ASF GitHub Bot commented on SLING-6501: --- cziegeler closed pull request #1: SLING-6501:Incorrect normalization of path of an asset with name begi… URL: https://github.com/apache/sling-org-apache-sling-api/pull/1 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/src/main/java/org/apache/sling/api/resource/ResourceUtil.java b/src/main/java/org/apache/sling/api/resource/ResourceUtil.java index 134e133..02d4739 100644 --- a/src/main/java/org/apache/sling/api/resource/ResourceUtil.java +++ b/src/main/java/org/apache/sling/api/resource/ResourceUtil.java @@ -82,7 +82,7 @@ lastSlash = bufIdx; numDots = 0; -} else if (c == '.' && numDots < 2) { +} else if (c == '.' && useDot(buf, bufIdx) && numDots < 2) { numDots++; } else { // find the next slash @@ -118,6 +118,21 @@ return resolved; } +// use this dot only if followed by / +// don't use if followed by neither . nor / +// keep checking till a non-dot is found +private static boolean useDot(char[] buf, int bufIdx) { +while(bufIdx < buf.length -1) { +if(buf[bufIdx] == '/') { +return true; +} +else if(buf[bufIdx] != '.') { +return false; +} +bufIdx++; +} +return true; +} /** * Utility method returns the parent path of the given path, * which is normalized by {@link #normalize(String)} before resolving the diff --git a/src/test/java/org/apache/sling/api/resource/ResourceUtilTest.java b/src/test/java/org/apache/sling/api/resource/ResourceUtilTest.java index 3688ac0..3e8ca08 100644 --- a/src/test/java/org/apache/sling/api/resource/ResourceUtilTest.java +++ b/src/test/java/org/apache/sling/api/resource/ResourceUtilTest.java @@ -114,6 +114,12 @@ assertEquals("/az/...", ResourceUtil.normalize("/az/...")); assertEquals("/az/bz/...", ResourceUtil.normalize("/az/bz/...")); + assertEquals("/content/dam/jpg_folder/.jpg/jcr:content/metadata/dc:title", + ResourceUtil.normalize("/content/dam/./jpg_folder/.jpg/jcr:content/metadata/dc:title")); + + assertEquals("/content/dam/jpg_folder/jpg/jcr:content/metadata/dc:title", + ResourceUtil.normalize("/content/dam/./jpg_folder/jpg/jcr:content/metadata/dc:title")); + try { ResourceUtil.normalize(null); fail("Resolving null expects NullPointerException"); This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Incorrect normalization of path of an asset with name beginning with '.' > > > Key: SLING-6501 > URL: https://issues.apache.org/jira/browse/SLING-6501 > Project: Sling > Issue Type: Bug > Components: API >Reporter: Gaurav Gupta >Priority: Critical > Fix For: API 2.16.4 > > > When a new asset named ".jpg" is being modified in JCR, > [ResourceUtil.normalize()|https://sling.apache.org/apidocs/sling7/org/apache/sling/api/resource/ResourceUtil.html#normalize-java.lang.String-] > method returns an incorrect normalized path which leads to the creation of a > folder named '.jp' under the same parent node. A small test shows this > anomaly. > {code:java} > public class RUNormalizeTest { > public static String toPropertyPath(String paramName, String path) { > if (!paramName.startsWith("/")) { > paramName = ResourceUtil.normalize(path + '/' + paramName); > } > return paramName; > } > > public static void main(String[] args) { > String pName = > "./jpg_folder/.jpg/jcr:content/metadata/dc:title"; > String path = "/content/dam"; > System.out.println(toPropertyPath(pName,path)); > } > } > {code} > Expected output: /content/dam/jpg_folder/.jpg/jcr:content/metadata/dc:title > Output: /content/dam/jpg_folder/.jp/jcr:content/metadata/dc:title > In the above code, the properties of an asset named '.jpg' are being > modified. However, the normalize method returns an incorrect path for the > input
[jira] [Commented] (SLING-6501) Incorrect normalization of path of an asset with name beginning with '.'
[ https://issues.apache.org/jira/browse/SLING-6501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16225192#comment-16225192 ] ASF GitHub Bot commented on SLING-6501: --- sdmcraft opened a new pull request #1: SLING-6501:Incorrect normalization of path of an asset with name begi… URL: https://github.com/apache/sling-org-apache-sling-api/pull/1 …nning with '.' This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Incorrect normalization of path of an asset with name beginning with '.' > > > Key: SLING-6501 > URL: https://issues.apache.org/jira/browse/SLING-6501 > Project: Sling > Issue Type: Bug > Components: API >Reporter: Gaurav Gupta >Priority: Critical > Fix For: API 2.16.4 > > > When a new asset named ".jpg" is being modified in JCR, > [ResourceUtil.normalize()|https://sling.apache.org/apidocs/sling7/org/apache/sling/api/resource/ResourceUtil.html#normalize-java.lang.String-] > method returns an incorrect normalized path which leads to the creation of a > folder named '.jp' under the same parent node. A small test shows this > anomaly. > {code:java} > public class RUNormalizeTest { > public static String toPropertyPath(String paramName, String path) { > if (!paramName.startsWith("/")) { > paramName = ResourceUtil.normalize(path + '/' + paramName); > } > return paramName; > } > > public static void main(String[] args) { > String pName = > "./jpg_folder/.jpg/jcr:content/metadata/dc:title"; > String path = "/content/dam"; > System.out.println(toPropertyPath(pName,path)); > } > } > {code} > Expected output: /content/dam/jpg_folder/.jpg/jcr:content/metadata/dc:title > Output: /content/dam/jpg_folder/.jp/jcr:content/metadata/dc:title > In the above code, the properties of an asset named '.jpg' are being > modified. However, the normalize method returns an incorrect path for the > input path. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (SLING-6501) Incorrect normalization of path of an asset with name beginning with '.'
[ https://issues.apache.org/jira/browse/SLING-6501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16225115#comment-16225115 ] Carsten Ziegeler commented on SLING-6501: - Thanks [~satyadeep] The patch looks good to me. Good you maybe please make this a pull request for us to apply? > Incorrect normalization of path of an asset with name beginning with '.' > > > Key: SLING-6501 > URL: https://issues.apache.org/jira/browse/SLING-6501 > Project: Sling > Issue Type: Bug > Components: API >Reporter: Gaurav Gupta >Priority: Critical > Fix For: API 2.16.4 > > > When a new asset named ".jpg" is being modified in JCR, > [ResourceUtil.normalize()|https://sling.apache.org/apidocs/sling7/org/apache/sling/api/resource/ResourceUtil.html#normalize-java.lang.String-] > method returns an incorrect normalized path which leads to the creation of a > folder named '.jp' under the same parent node. A small test shows this > anomaly. > {code:java} > public class RUNormalizeTest { > public static String toPropertyPath(String paramName, String path) { > if (!paramName.startsWith("/")) { > paramName = ResourceUtil.normalize(path + '/' + paramName); > } > return paramName; > } > > public static void main(String[] args) { > String pName = > "./jpg_folder/.jpg/jcr:content/metadata/dc:title"; > String path = "/content/dam"; > System.out.println(toPropertyPath(pName,path)); > } > } > {code} > Expected output: /content/dam/jpg_folder/.jpg/jcr:content/metadata/dc:title > Output: /content/dam/jpg_folder/.jp/jcr:content/metadata/dc:title > In the above code, the properties of an asset named '.jpg' are being > modified. However, the normalize method returns an incorrect path for the > input path. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Resolved] (SLING-6577) StringIndexOutOfBoundsException in Sling Log Web Console when creating new logger with absolute file name
[ https://issues.apache.org/jira/browse/SLING-6577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chetan Mehrotra resolved SLING-6577. Resolution: Fixed Fixed this now with [commit|https://gitbox.apache.org/repos/asf?p=sling-org-apache-sling-commons-log.git;a=commitdiff;h=e87cc833a4a12cd39e7798f98ab5b998374896e5] > StringIndexOutOfBoundsException in Sling Log Web Console when creating new > logger with absolute file name > - > > Key: SLING-6577 > URL: https://issues.apache.org/jira/browse/SLING-6577 > Project: Sling > Issue Type: Bug > Components: Commons >Affects Versions: Commons Log 5.0.0 >Reporter: Konrad Windszus >Assignee: Chetan Mehrotra > Fix For: Commons Log 5.0.4 > > > After adding a new logger via the web console exposed at > {{/system/console/slinglog}} with an absolute filename (one starting with > "/"), the following exception is thrown > {code} > 28.02.2017 16:47:31.300 *ERROR* [qtp455076072-280] > org.apache.felix.http.jetty Exception while processing request to > /system/console/slinglog (java.lang.StringIndexOutOfBoundsException: String > index out of range: -42) > java.lang.StringIndexOutOfBoundsException: String index out of range: -42 > at java.lang.String.substring(String.java:1931) > at > org.apache.sling.commons.log.logback.internal.SlingLogPanel.getPath(SlingLogPanel.java:791) > at > org.apache.sling.commons.log.logback.internal.SlingLogPanel.appendOsgiConfiguredLoggerData(SlingLogPanel.java:221) > at > org.apache.sling.commons.log.logback.internal.SlingLogPanel.render(SlingLogPanel.java:110) > at > org.apache.sling.commons.log.webconsole.internal.LogWebConsolePlugin.renderContent(LogWebConsolePlugin.java:79) > at > org.apache.felix.webconsole.AbstractWebConsolePlugin.doGet(AbstractWebConsolePlugin.java:194) > {code} > This is related to the exception being mentioned in SLING-6482. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Assigned] (SLING-6577) StringIndexOutOfBoundsException in Sling Log Web Console when creating new logger with absolute file name
[ https://issues.apache.org/jira/browse/SLING-6577?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chetan Mehrotra reassigned SLING-6577: -- Assignee: Chetan Mehrotra > StringIndexOutOfBoundsException in Sling Log Web Console when creating new > logger with absolute file name > - > > Key: SLING-6577 > URL: https://issues.apache.org/jira/browse/SLING-6577 > Project: Sling > Issue Type: Bug > Components: Commons >Affects Versions: Commons Log 5.0.0 >Reporter: Konrad Windszus >Assignee: Chetan Mehrotra > Fix For: Commons Log 5.0.4 > > > After adding a new logger via the web console exposed at > {{/system/console/slinglog}} with an absolute filename (one starting with > "/"), the following exception is thrown > {code} > 28.02.2017 16:47:31.300 *ERROR* [qtp455076072-280] > org.apache.felix.http.jetty Exception while processing request to > /system/console/slinglog (java.lang.StringIndexOutOfBoundsException: String > index out of range: -42) > java.lang.StringIndexOutOfBoundsException: String index out of range: -42 > at java.lang.String.substring(String.java:1931) > at > org.apache.sling.commons.log.logback.internal.SlingLogPanel.getPath(SlingLogPanel.java:791) > at > org.apache.sling.commons.log.logback.internal.SlingLogPanel.appendOsgiConfiguredLoggerData(SlingLogPanel.java:221) > at > org.apache.sling.commons.log.logback.internal.SlingLogPanel.render(SlingLogPanel.java:110) > at > org.apache.sling.commons.log.webconsole.internal.LogWebConsolePlugin.renderContent(LogWebConsolePlugin.java:79) > at > org.apache.felix.webconsole.AbstractWebConsolePlugin.doGet(AbstractWebConsolePlugin.java:194) > {code} > This is related to the exception being mentioned in SLING-6482. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (SLING-6044) Conflicting LogManager and LogWriter if using the same logfile
[ https://issues.apache.org/jira/browse/SLING-6044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16225047#comment-16225047 ] Jörg Hoh commented on SLING-6044: - Of course it would be great to have a better error message here; but documenting it in the first place should be sufficient from my point of view. > Conflicting LogManager and LogWriter if using the same logfile > -- > > Key: SLING-6044 > URL: https://issues.apache.org/jira/browse/SLING-6044 > Project: Sling > Issue Type: Improvement > Components: Commons >Affects Versions: Commons Log 4.0.2 >Reporter: Jörg Hoh >Assignee: Chetan Mehrotra > Fix For: Commons Log 5.0.4 > > Attachments: SLING-6044-multiple-loggers-writers.jpg > > > When you have a logmanager and a logwriter pointing to the same file, you get > an exception like this: > {panel} > 07.09.2016 17:33:31.126 *ERROR* [] CM Configuration Updater (Update: > pid=org.apache.sling.commons.log.LogManager) org.apache.felix.configadmin > Service [org.apache.felix.cm.ConfigurationAdmin,9, > [org.osgi.service.cm.ConfigurationAdmin]] > [org.osgi.service.cm.ManagedService, id=10, > bundle=7/slinginstall:c:\java\IBM\LibertyProfile\usr\servers\aem-1\sling\_\launchpad\startup\1\org.apache.sling.commons.log-4.0.0.jar]: > Updating property org.apache.sling.commons.log.file of configuration > org.apache.sling.commons.log.LogManager caused a problem: LogFile > C:\java\IBM\LibertyProfile\usr\servers\aem-1\aemlogs\logs\error.log already > configured by configuration > org.apache.sling.commons.log.LogManager.factory.writer.8402a603-bdef-4404-9ff1-0e0f592578af > (org.osgi.service.cm.ConfigurationException: > org.apache.sling.commons.log.file : LogFile > C:\java\IBM\LibertyProfile\usr\servers\aem-1\aemlogs\logs\error.log already > configured by configuration > org.apache.sling.commons.log.LogManager.factory.writer.8402a603-bdef-4404-9ff1-0e0f592578af) > > org.osgi.service.cm.ConfigurationException: org.apache.sling.commons.log.file > : LogFile C:\java\IBM\LibertyProfile\usr\servers\aem-1\aemlogs\logs\error.log > already configured by configuration > org.apache.sling.commons.log.LogManager.factory.writer.8402a603-bdef-4404-9ff1-0e0f592578af > > at > org.apache.sling.commons.log.logback.internal.config.GlobalConfigurator.updated(GlobalConfigurator.java:32) > at > org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:148) > > at > org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:81) > > at > org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1744) > > at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103) > at java.lang.Thread.run(Thread.java:744) > Caused by: > org.apache.sling.commons.log.logback.internal.config.ConfigurationException: > at > org.apache.sling.commons.log.logback.internal.LogConfigManager.updateLogWriter(LogConfigManager.java:398) > > at > org.apache.sling.commons.log.logback.internal.LogConfigManager.updateGlobalConfiguration(LogConfigManager.java:327) > > at > org.apache.sling.commons.log.logback.internal.config.GlobalConfigurator.updated(GlobalConfigurator.java:30) > > ... 5 common frames omitted > {panel} > Obviously the Logmanager internally provides a Logwriter, so these conflict. > This should be documented. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (SLING-6044) Conflicting LogManager and LogWriter if using the same logfile
[ https://issues.apache.org/jira/browse/SLING-6044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16225046#comment-16225046 ] Chetan Mehrotra commented on SLING-6044: [~jhoh] Understand the issue now ... so requirement is just to document it in Sling docs. No change in current logic required? > Conflicting LogManager and LogWriter if using the same logfile > -- > > Key: SLING-6044 > URL: https://issues.apache.org/jira/browse/SLING-6044 > Project: Sling > Issue Type: Improvement > Components: Commons >Affects Versions: Commons Log 4.0.2 >Reporter: Jörg Hoh >Assignee: Chetan Mehrotra > Fix For: Commons Log 5.0.4 > > Attachments: SLING-6044-multiple-loggers-writers.jpg > > > When you have a logmanager and a logwriter pointing to the same file, you get > an exception like this: > {panel} > 07.09.2016 17:33:31.126 *ERROR* [] CM Configuration Updater (Update: > pid=org.apache.sling.commons.log.LogManager) org.apache.felix.configadmin > Service [org.apache.felix.cm.ConfigurationAdmin,9, > [org.osgi.service.cm.ConfigurationAdmin]] > [org.osgi.service.cm.ManagedService, id=10, > bundle=7/slinginstall:c:\java\IBM\LibertyProfile\usr\servers\aem-1\sling\_\launchpad\startup\1\org.apache.sling.commons.log-4.0.0.jar]: > Updating property org.apache.sling.commons.log.file of configuration > org.apache.sling.commons.log.LogManager caused a problem: LogFile > C:\java\IBM\LibertyProfile\usr\servers\aem-1\aemlogs\logs\error.log already > configured by configuration > org.apache.sling.commons.log.LogManager.factory.writer.8402a603-bdef-4404-9ff1-0e0f592578af > (org.osgi.service.cm.ConfigurationException: > org.apache.sling.commons.log.file : LogFile > C:\java\IBM\LibertyProfile\usr\servers\aem-1\aemlogs\logs\error.log already > configured by configuration > org.apache.sling.commons.log.LogManager.factory.writer.8402a603-bdef-4404-9ff1-0e0f592578af) > > org.osgi.service.cm.ConfigurationException: org.apache.sling.commons.log.file > : LogFile C:\java\IBM\LibertyProfile\usr\servers\aem-1\aemlogs\logs\error.log > already configured by configuration > org.apache.sling.commons.log.LogManager.factory.writer.8402a603-bdef-4404-9ff1-0e0f592578af > > at > org.apache.sling.commons.log.logback.internal.config.GlobalConfigurator.updated(GlobalConfigurator.java:32) > at > org.apache.felix.cm.impl.helper.ManagedServiceTracker.updateService(ManagedServiceTracker.java:148) > > at > org.apache.felix.cm.impl.helper.ManagedServiceTracker.provideConfiguration(ManagedServiceTracker.java:81) > > at > org.apache.felix.cm.impl.ConfigurationManager$UpdateConfiguration.run(ConfigurationManager.java:1744) > > at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:103) > at java.lang.Thread.run(Thread.java:744) > Caused by: > org.apache.sling.commons.log.logback.internal.config.ConfigurationException: > at > org.apache.sling.commons.log.logback.internal.LogConfigManager.updateLogWriter(LogConfigManager.java:398) > > at > org.apache.sling.commons.log.logback.internal.LogConfigManager.updateGlobalConfiguration(LogConfigManager.java:327) > > at > org.apache.sling.commons.log.logback.internal.config.GlobalConfigurator.updated(GlobalConfigurator.java:30) > > ... 5 common frames omitted > {panel} > Obviously the Logmanager internally provides a Logwriter, so these conflict. > This should be documented. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (SLING-7223) Spikes in RRD after restart
[ https://issues.apache.org/jira/browse/SLING-7223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcel Reutegger updated SLING-7223: Attachment: SLING-7223.patch Attached a patch with proposed changes. Please note, this depends on SLING-7222 and likely requires some manual conflict resolution when applied on top of those changes. Whenever the RRD4JReporter is initialized or closed, a sample with unknown values is inserted. This indicates to rrdtool (and RRD4J) that no overflow occurred. > Spikes in RRD after restart > --- > > Key: SLING-7223 > URL: https://issues.apache.org/jira/browse/SLING-7223 > Project: Sling > Issue Type: Bug > Components: Commons >Affects Versions: Commons Metrics RRD4J 1.0.0 >Reporter: Marcel Reutegger > Attachments: SLING-7223.patch > > > Running the reporter for some time and then restarting the process shows > spikes in the collected data. These are caused by counter gauges that are > reset to zero after a restart. RRD interprets them as 32bit or 64bit integer > overflows and calculates incorrect values. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
Re: Contribute Slick?
On Tue, Oct 24, 2017 at 10:55 AM, Nicolas Peltierwrote: > Could we have hosting as well? (dreaming out loud).. I don't think we can offer hosting to third parties, but we can have a VM to run our own instance as a demo, if someone volunteers to maintain that. Big +1 on accepting a Slick Contribution. -Bertrand
[jira] [Commented] (SLING-6501) Incorrect normalization of path of an asset with name beginning with '.'
[ https://issues.apache.org/jira/browse/SLING-6501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16224852#comment-16224852 ] Satya Deep Maheshwari commented on SLING-6501: -- Here's a suggested patch for resolving this problem: https://github.com/apache/sling-org-apache-sling-api/compare/master...sdmcraft:SLING-6501?expand=1 [~cziegeler] , [~ianeboston], could you please review? > Incorrect normalization of path of an asset with name beginning with '.' > > > Key: SLING-6501 > URL: https://issues.apache.org/jira/browse/SLING-6501 > Project: Sling > Issue Type: Bug > Components: API >Reporter: Gaurav Gupta >Priority: Critical > Fix For: API 2.16.4 > > > When a new asset named ".jpg" is being modified in JCR, > [ResourceUtil.normalize()|https://sling.apache.org/apidocs/sling7/org/apache/sling/api/resource/ResourceUtil.html#normalize-java.lang.String-] > method returns an incorrect normalized path which leads to the creation of a > folder named '.jp' under the same parent node. A small test shows this > anomaly. > {code:java} > public class RUNormalizeTest { > public static String toPropertyPath(String paramName, String path) { > if (!paramName.startsWith("/")) { > paramName = ResourceUtil.normalize(path + '/' + paramName); > } > return paramName; > } > > public static void main(String[] args) { > String pName = > "./jpg_folder/.jpg/jcr:content/metadata/dc:title"; > String path = "/content/dam"; > System.out.println(toPropertyPath(pName,path)); > } > } > {code} > Expected output: /content/dam/jpg_folder/.jpg/jcr:content/metadata/dc:title > Output: /content/dam/jpg_folder/.jp/jcr:content/metadata/dc:title > In the above code, the properties of an asset named '.jpg' are being > modified. However, the normalize method returns an incorrect path for the > input path. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
Re: [VOTE] Appoint Robert Munteanu as new Apache Sling PMC Chair
On Tue, Oct 24, 2017 at 10:12 PM, Carsten Ziegelerwrote: > ...please cast your vote for Robert Munteanu as our new PMC chair.. I know the vote is closed but still: +1 ;-) -Bertrand
[jira] [Created] (SLING-7223) Spikes in RRD after restart
Marcel Reutegger created SLING-7223: --- Summary: Spikes in RRD after restart Key: SLING-7223 URL: https://issues.apache.org/jira/browse/SLING-7223 Project: Sling Issue Type: Bug Components: Commons Affects Versions: Commons Metrics RRD4J 1.0.0 Reporter: Marcel Reutegger Running the reporter for some time and then restarting the process shows spikes in the collected data. These are caused by counter gauges that are reset to zero after a restart. RRD interprets them as 32bit or 64bit integer overflows and calculates incorrect values. -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Updated] (SLING-7222) Too frequent samples
[ https://issues.apache.org/jira/browse/SLING-7222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcel Reutegger updated SLING-7222: Attachment: SLING-7222.patch Attached proposed changes with test and fix. > Too frequent samples > > > Key: SLING-7222 > URL: https://issues.apache.org/jira/browse/SLING-7222 > Project: Sling > Issue Type: Bug > Components: Commons >Affects Versions: Commons Metrics RRD4J 1.0.0 >Reporter: Marcel Reutegger >Priority: Minor > Attachments: SLING-7222.patch > > > The metrics reporter sometimes logs error messages telling samples are > reported too frequently (more than once a second): > {noformat} > 29.10.2017 19:01:25.384 *ERROR* [metrics-RRD4JReporter-1-thread-1] > com.codahale.metrics.ScheduledReporter RuntimeException thrown from > RRD4JReporter#report. Exception was suppressed. > java.lang.IllegalArgumentException: Bad sample time: 1509300085. Last update > time was 1509300085, at least one second step is required > at org.rrd4j.core.RrdDb.store(RrdDb.java:517) > at org.rrd4j.core.Sample.update(Sample.java:194) > at > org.apache.sling.commons.metrics.rrd4j.impl.RRD4JReporter.report(RRD4JReporter.java:239) > at > com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:162) > at > com.codahale.metrics.ScheduledReporter$1.run(ScheduledReporter.java:117) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) > at > java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > at java.lang.Thread.run(Thread.java:748) > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Created] (SLING-7222) Too frequent samples
Marcel Reutegger created SLING-7222: --- Summary: Too frequent samples Key: SLING-7222 URL: https://issues.apache.org/jira/browse/SLING-7222 Project: Sling Issue Type: Bug Components: Commons Affects Versions: Commons Metrics RRD4J 1.0.0 Reporter: Marcel Reutegger Priority: Minor The metrics reporter sometimes logs error messages telling samples are reported too frequently (more than once a second): {noformat} 29.10.2017 19:01:25.384 *ERROR* [metrics-RRD4JReporter-1-thread-1] com.codahale.metrics.ScheduledReporter RuntimeException thrown from RRD4JReporter#report. Exception was suppressed. java.lang.IllegalArgumentException: Bad sample time: 1509300085. Last update time was 1509300085, at least one second step is required at org.rrd4j.core.RrdDb.store(RrdDb.java:517) at org.rrd4j.core.Sample.update(Sample.java:194) at org.apache.sling.commons.metrics.rrd4j.impl.RRD4JReporter.report(RRD4JReporter.java:239) at com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:162) at com.codahale.metrics.ScheduledReporter$1.run(ScheduledReporter.java:117) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)