Finding Code Generating Log Messages By Ids In WSIT WS-Policy Framework

Recently I got an e-mail containing following log message id: SEVERE: WSP001002:
Message was generated by our class in com.sun.xml.ws.policy.jaxws package.
In the first place I was wondering where in the code the message had been logged:

$ grep -n WSP001002 wsit/rt/src/\*\*/\*.java

It returned empty result, even if I was sure such an id was used in the code.

And the reason?

In policy code we used a convention that log messages starting with WSP<id number> were generated with message with keys starting with WSP_<id number>. We place an underscore between WSP and the number of the message.

And indeed, after trying:

$ grep -n WSP_001002 wsit/rt/src/\*\*/\*.java

I got
wsit/rt/src/com/sun/xml/ws/policy/jaxws/PolicyConfigParser.java:278:            LOGGER.severe("parseModel", LocalizationMessages.WSP_001002_WSDL_IMPORT_FAILED(), ex);
wsit/rt/src/com/sun/xml/ws/policy/jaxws/PolicyConfigParser.java:279: throw new PolicyException(LocalizationMessages.WSP_001002_WSDL_IMPORT_FAILED(), ex);
wsit/rt/src/com/sun/xml/ws/policy/jaxws/PolicyConfigParser.java:281: LOGGER.severe("parseModel", LocalizationMessages.WSP_001002_WSDL_IMPORT_FAILED(), ex);
wsit/rt/src/com/sun/xml/ws/policy/jaxws/PolicyConfigParser.java:282: throw new PolicyException(LocalizationMessages.WSP_001002_WSDL_IMPORT_FAILED(), ex);
wsit/rt/src/com/sun/xml/ws/policy/jaxws/PolicyConfigParser.java:284: LOGGER.severe("parseModel", LocalizationMessages.WSP_001002_WSDL_IMPORT_FAILED(), ex);
wsit/rt/src/com/sun/xml/ws/policy/jaxws/PolicyConfigParser.java:285: throw new PolicyException(LocalizationMessages.WSP_001002_WSDL_IMPORT_FAILED(), ex);

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha