88fantasy opened a new issue, #4492:
URL: https://github.com/apache/streampark/issues/4492

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/streampark/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues referencing `SparkAppStateEnum`.
   
   ### Java Version
   
   Temurin 21.0.11 (console), built with Microsoft OpenJDK 11.0.28
   
   ### Scala Version
   
   2.12.x
   
   ### StreamPark Version
   
   3.0.0-SNAPSHOT (`dev` branch, commit `9ddda84c9`)
   
   ### Flink Version
   
   N/A (Spark)
   
   ### Deploy mode
   
   N/A (any — the list endpoint itself fails)
   
   ### What happened
   
   The Spark application list page returns HTTP 500 for every user, so the page 
cannot render at all.
   
   `SparkAppStateEnum.of(Integer state)` compares with `appState.value == 
state`, which unboxes `state`. `SparkAppListQueryRequest` declares a scalar 
`state` field, which is `null` whenever the list is not filtered by status — 
the normal case. `BeanUtils.copyProperties` then leaves 
`SparkApplication.state` null, and `shouldTracking()` -> `getStateEnum()` -> 
`of(null)` throws.
   
   For contrast, `FlinkAppListQueryRequest` exposes only `stateArray` 
(`Integer[]`) and no scalar `state`, so the Flink list never reaches this path 
— although `FlinkAppStateEnum.getState(Integer)` is written the same way and 
would behave identically if a null ever reached it.
   
   ### Error Exception
   
   ```log
   java.lang.NullPointerException
        at 
org.apache.streampark.console.core.enums.SparkAppStateEnum.of(SparkAppStateEnum.java:82)
        at 
org.apache.streampark.console.core.entity.SparkApplication.getStateEnum(...)
        at 
org.apache.streampark.console.core.entity.SparkApplication.shouldTracking(...)
   ```
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to