A memory leak occur when undeploying a web application that uses WSS4J.
The org.apache.ws.security.transform.STRTransformProvider is appended to java.security.Security at initialization in org.apache.ws.security.WSSConfig.init() but never removed. WSSConfig.init() is called when WSSConfig instance is created in WSSConfig.getNewInstance().
I've attached a screenshot of Eclipse MAT showing the leak.
Reported at WSS4J: https://issues.apache.org/jira/browse/WSS-614
Workaround created at wss4j-2.2.0 and wss4j-2.1.11, a cleanUp() method that might be called at destruction time: https://github.com/apache/wss4j/commit/ab7ce2f6ec40e865f00efcd86e344f95db733acb