There are various discussions that talk about classloader isolation. I feel like this would be the most ideal solution, but I haven't investigated it.

https://issues.apache.org/jira/browse/STORM-129