-
Type:
Bug
-
Status: Open (View Workflow)
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 4.9
-
Fix Version/s: None
-
Component/s: Management
-
Labels:None
-
Forum Reference:
The ESB plugin is dumping exception stack traces to stdout. All JON plugins should never write to stdout or stderr - they should always log messages via something like log4j. In other words, never use "System.out.print" or its derivatives and never use Throwable.printStackTrace.
As an example where the ESB plugin code is doing this, see ESBMessageEventPoller class [1] where it is doing a throwable.printStackTrace(), specifically line 138.
JON plugins should never write to stdout/stderr for a couple reasons - 1) if the user is running the agent in "console" mode (where the agent prompt allows a user to enter prompt commands), if a plugin prints to stdout, it mixes in with the true console output and confuses the user and corrupts the console output expected by the user. 2) as the forum thread [2] shows, if running using the wrapper script, the captured stdout grows unbounded.
Therefore, to fix this issue, simply go through the ESB plugin code and remove or modify all code writing to stdout/stderr, which usually just entails changing it from printing to stdout to logging to a log file via log4j.
[1] http://fisheye.jboss.org/browse/JBossESB/branches/JBESB_4_9_CP/product/tools/jonplugin/src/main/java/org/jbosson/plugins/jbossesb/ESBMessageEventPoller.java?r=34609
[2] http://community.jboss.org/message/583204#583204