Forum Stats

  • 3,839,411 Users
  • 2,262,489 Discussions


CLI property changed from Boolean to String gives ClassCastException.

User_DE80A Member Posts: 1 Green Ribbon
edited Apr 15, 2021 2:57PM in Java Programming

Changed CLI property from boolean to String in current Release.

On upgrading servers from previous ICP to current ICP then getting below exception:-

java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String

This is an intermittent issue . Please let us know why the OSGI container's behavior is abrupt.

Sometimes property is considered as String and no exception is received , while sometimes it is treated as Boolean and exception is thrown.

Requirement is it must always be treated as String.