Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Wiki Markup
I'm trying to write a plugin into a framework application (Joget). My plugin source looks something like this:

    public class MyPlugin extends ExtDefaultPlugin implements ApplicationPlugin, ParticipantPlugin { 


        public void execute(){


        SecurityContextImpl secContext = (SecurityContextImpl) WorkflowUtil.getHttpServletRequest().getSession().getAttribute("SPRING_SECURITY_CONTEXT");




When I run the plugin, I get the following exception.

    java.lang.ClassCastException: cannot be cast to

I'm using Maven. Now since both have the same package name, I'm assuming I'm accidentally using the wrong package version in my plugin JAR (that contains the SecurityContextImpl class) than the one in the framework. But I've double-checked and it looks like I'm including the correct one in my plugin package. 

Is there a recommended way to get the SecurityContextImpl?