mleger created STORM-4025:
-----------------------------

             Summary: ClassCastException when changing log level in Storm UI
                 Key: STORM-4025
                 URL: https://issues.apache.org/jira/browse/STORM-4025
             Project: Apache Storm
          Issue Type: Bug
          Components: storm-webapp
    Affects Versions: 2.6.0
            Reporter: mleger
         Attachments: NimbusUI_error.png, error_stack.json

A ClassCastException is raised in Storm UI when trying to change the log level 
for a topology (cf. attached screenshot and full error stack).
 * POST request payload sent to the logconfig web service:

 
{code:java}
{"namedLoggerLevels":{"com.example":{"target_level":"DEBUG","reset_level":"INFO","timeout":30}}}{code}
 
 * Error message received:

 
{noformat}
"error": "500 Server Error",
"errorMessage": "java.lang.ClassCastException: java.lang.Integer incompatible 
with java.lang.Long\n\tat 
org.apache.storm.daemon.ui.UIHelpers.putTopologyLogLevel(UIHelpers.java:2422)\n\tat
 
org.apache.storm.daemon.ui.resources.StormApiResource.putTopologyLogconfig(StormApiResource.java:469)\n\tat
[...]
{noformat}
 

The timeout parameter seems to be parsed as an Integer whereas it is cast into 
a Long in the code, then raising a ClassCastException:

cf. 
[https://github.com/apache/storm/blob/ae3a96e762095553311d9e335f7505c0b351d810/storm-webapp/src/main/java/org/apache/storm/daemon/ui/UIHelpers.java#L2422C13-L2422C67]

This issue could be related to the recent change of the JSON parser having a 
different behavior when parsing numbers:

cf. 
[https://github.com/apache/storm/commit/1406f680c8d65de591c997066d2ca2cd80e56c4f#diff-67de3adeec3548f570568d351b76a4b3a936ee9ed0f3f59445ff3def0505f247]

 
 
 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to