Forum Stats

  • 3,752,074 Users
  • 2,250,455 Discussions
  • 7,867,708 Comments

Discussions

CLI property changed from Boolean to String gives ClassCastException.

User_DE80A
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.

Tagged: