Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 900407 (JBPAPP6-942)

Summary: Messages not support JBoss Logging
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Petr Kremensky <pkremens>
Component: unspecifiedAssignee: James Perkins <jperkins>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: jperkins, pkremens, twells
Target Milestone: ---   
Target Release: EAP 6.0.1   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBPAPP6-942
Whiteboard: eap601candidate
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-23 18:34:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Kremensky 2012-05-10 10:50:10 UTC
Affects: Documentation (Ref Guide, User Guide, etc.), Release Notes
project_key: JBPAPP6

WARN, ERROR and FATAL log messages should support JBoss Logging. Should use this pattern https://docspace.corp.redhat.com/docs/DOC-33554.
So far found wrong log examples:

*IIRC Arquillian was okay to not be converted*

-jboss-as/arquillian/common-domain/src/main/java/org/jboss/as/arquillian/container/domain/ArchiveDeployer.java:-
    -69:log.warnf(e, "Failed to close resource %s", input);-
    -85:log.warn("Cannot undeploy: " + runtimeName + ":" + ex.getMessage());-

-jboss-as/arquillian/common-domain/src/main/java/org/jboss/as/arquillian/container/domain/CommonDomainDeployableContainer.java:-
    -214:log.log(Level.WARNING, "Caught exception closing ModelControllerClient", e);-

-jboss-as/arquillian/common/src/main/java/org/jboss/as/arquillian/container/ArchiveDeployer.java:-
    -57:log.warnf(ex, "Cannot undeploy: %s", runtimeName);-
    -70:log.warnf(e, "Failed to close resource %s", input);-

-jboss-as/arquillian/common/src/main/java/org/jboss/as/arquillian/container/CommonDeployableContainer.java:-
    -168:log.log(Level.WARNING, "Caught exception closing ModelControllerClient", e);-

-jboss-as/arquillian/container-managed/src/main/java/org/jboss/as/arquillian/container/managed/ManagedDeployableContainer.java:-
    -214:log.warning("Waiting on port " + port + " to become available for "-

-jboss-as/arquillian/protocol-jmx/src/main/java/org/jboss/as/arquillian/protocol/jmx/ArquillianServiceDeployer.java:-
    -77:log.error("Cannot deploy arquillian service", th);-
    -92:log.error("Cannot undeploy arquillian service", th);-

-jboss-as/arquillian/protocol-jmx/src/main/java/org/jboss/as/arquillian/service/ArquillianConfigBuilder.java:-
    -117:log.warnf("Cannot find composite annotation index in: %s", deploymentUnit);-

-jboss-as/arquillian/protocol-jmx/src/main/java/org/jboss/as/arquillian/service/ArquillianService.java:-
    -149:log.errorf(ex, "Cannot stop Arquillian Test Runner");-

*These are okay, they come from JGroups*
-jboss-as/clustering/jgroups/src/main/java/org/jboss/as/clustering/jgroups/JChannelFactory.java:-
    -104:ROOT_LOGGER.warn(e.getMessage(), e);-
    -272:ROOT_LOGGER.warn(e.getMessage(), e);-

*These are okay util* JGRP-1475 *is fixed*
-jboss-as/clustering/jgroups/src/main/java/org/jboss/as/clustering/jgroups/LogFactory.java:-
    -84:this.logger.fatal(msg);-
    -89:this.logger.fatal(msg, throwable);-
    -94:this.logger.error(msg);-
    -99:this.logger.error(msg, throwable);-
    -104:this.logger.warn(msg);-
    -109:this.logger.warn(msg, throwable);-

*These are okay. This is how operation success is reported*
-jboss-as/controller-client/src/main/java/org/jboss/as/controller/client/OperationMessageHandler.java:-
    -49:ROOT_LOGGER.error(message);-
    -52:ROOT_LOGGER.warn(message);-

*This is okay, it comes from the @MessageBundle*
-jboss-as/controller/src/main/java/org/jboss/as/controller/operations/validation/OperationValidator.java:-
    -518:ControllerLogger.ROOT_LOGGER.warn(message);-

*This is okay. Pulls the description from the failure of an operation*
-jboss-as/controller/src/main/java/org/jboss/as/controller/ParallelBootOperationStepHandler.java:-
    -186:MGMT_OP_LOGGER.error(failureDesc);-

*This is okay*
-jboss-as/controller/src/main/java/org/jboss/as/controller/persistence/ConfigurationFilePersistenceResource.java:-
    -68:MGMT_OP_LOGGER.errorf(e, e.toString());-

*These are okay*
-jboss-as/deployment-scanner/src/main/java/org/jboss/as/server/deployment/scanner/FileSystemDeploymentService.java:-
    -767:ROOT_LOGGER.error(msg);-
    -812:ROOT_LOGGER.error(msg);-
    -1053:ROOT_LOGGER.error(result.get(FAILURE_DESCRIPTION).asString());-

*These are okay*
-jboss-as/ee-deployment/src/main/java/org/jboss/as/ee/deployment/spi/DeploymentManagerImpl.java:-
    -316:ROOT_LOGGER.errorf(message);-
    -373:ROOT_LOGGER.errorf(e, message);-

*This is okay*
-jboss-as/ee-deployment/src/main/java/org/jboss/as/ee/deployment/spi/DeploymentWorker.java:-
    -77:ROOT_LOGGER.errorf(e, message);-

jboss-as/ee/src/main/java/org/jboss/as/ee/structure/EJBClietnDescriptorParsingProcessor.java:
    99:logger.warnf("%s in subdeployment ignored. jboss-ejb-client.xml is only parsed for top level deployments.", descriptorFile.getPathName());

*This is okay*
-jboss-as/ejb3/src/main/java/org/jboss/as/ejb3/cache/spi/impl/AbstractBackingCache.java:-
    67:log.warn(e.getMessage(), e);-

*This is okay*
-jboss-as/ejb3/src/main/java/org/jboss/as/ejb3/cache/spi/impl/RemoveTask.java:-
    -53:log.warn(e.getMessage(), e);-

jboss-as/ejb3/src/main/java/org/jboss/as/ejb3/deployment/DeploymentRepository.java:
    59:logger.error("Exception calling deployment added listener", t);
    81:logger.error("Exception calling deployment removal listener", t);

jboss-as/ejb3/src/main/java/org/jboss/as/ejb3/deployment/processors/EjbJarParsingDeploymentUnitProcessor.java:
    256:logger.warn("Ignoring exception while closing the InputStream ", ioe);
    288:logger.warn("Ignoring exception while closing the InputStream ", ioe);

jboss-as/ejb3/src/main/java/org/jboss/as/ejb3/deployment/processors/EjbManagementDeploymentUnitProcessor.java:
    98:log.error(String.format("Failed to remove management resources for %s-- %s", configuration, e));

jboss-as/ejb3/src/main/java/org/jboss/as/ejb3/deployment/processors/SessionBeanComponentDescriptionFactory.java:
    121:logger.warn(sessionBeanAnnotation.name() + " annotation is expected to be applied on class level. " + target + " is not a class");

jboss-as/ejb3/src/main/java/org/jboss/as/ejb3/iiop/EjbIIOPService.java:
    410:logger.error("Cannot unregister EJBHome from CORBA naming service", invalidName);
    412:logger.error("Cannot unregister EJBHome from CORBA naming service", notFound);
    414:logger.error("Cannot unregister EJBHome from CORBA naming service", cannotProceed);
    421:logger.error("Cannot deactivate home servant", e);
    426:logger.error("Cannot deactivate bean servant", e);

jboss-as/ejb3/src/main/java/org/jboss/as/ejb3/remote/EJBRemoteConnectorService.java:
    290:log.errorf(e, "Exception on channel %s from message %s", channel, messageInputStream);

jboss-as/ejb3/src/main/java/org/jboss/as/ejb3/remote/protocol/versionone/MethodInvocationMessageHandler.java:
    213:logger.error("Error invoking method " + invokedMethod + " on bean named " + beanName
    216:logger.error("Could not write method invocation failure for method " + invokedMethod + " on bean named " + beanName
    245:logger.error("Could not write method invocation result for method " + invokedMethod + " on bean named " + beanName

jboss-as/ejb3/src/main/java/org/jboss/as/ejb3/remote/protocol/versionone/SessionOpenRequestHandler.java:
    157:logger.error("IOException while generating session id for invocation id: " + invocationId + " on channel " + channelAssociation.getChannel(), ioe);

jboss-as/ejb3/src/main/java/org/jboss/as/ejb3/remote/protocol/versionone/UserTransactionManagementTask.java:
    70:logger.error("Could not write out message to channel due to", e);
    81:logger.error("Could not write out invocation success message to channel due to", e);

jboss-as/ejb3/src/main/java/org/jboss/as/ejb3/remote/protocol/versionone/VersionOneProtocolChannelReceiver.java:
    182:logger.warn("Received unsupported message header 0x" + Integer.toHexString(header) + " on channel " + channel);
    192:logger.errorf(e, "Exception on channel %s from message %s", channel, messageInputStream);
    209:logger.warn("Could not send initial module availability report to channel " + this.channelAssociation.getChannel(), e);

jboss-as/ejb3/src/main/java/org/jboss/as/ejb3/remote/protocol/versionone/XidTransactionManagementTask.java:
    68:logger.error("Error during transaction management of transaction id " + this.xidTransactionID, t);
    73:logger.error("Could not write out message to channel due to", e);
    84:logger.error("Could not write out invocation success message to channel due to", e);

jboss-as/ejb3/src/main/java/org/jboss/as/ejb3/remote/protocol/versionone/XidTransactionPrepareTask.java:
    67:logger.error("Could not write out message to channel due to", e);
    83:logger.error("Could not write out invocation success message to channel due to", e);

jboss-as/ejb3/src/main/java/org/jboss/as/ejb3/tx/CMTTxInterceptor.java:
    145:log.error(t);
    239:log.warn(deadlock.getMessage() + " retrying " + (i + 1));

jboss-as/ejb3/src/main/java/org/jboss/as/ejb3/tx/EjbBMTInterceptor.java:
    66:log.error("Failed to get status", sex);
    78:log.error("Failed to rollback", sex);
    84:log.error(msg);

jboss-as/ejb3/src/main/java/org/jboss/as/ejb3/tx/StatefulBMTInterceptor.java:
    66:log.error("Failed to get status", ex);
    77:log.error("Failed to rollback", ex);
    81:log.error(msg);

*This is okay, this is only in a comment*
-jboss-as/mail/src/main/java/org/jboss/as/mail/extension/MailSessionService.java:-
    -146:log.error("could not send mail", e);-

*This is okay*
-jboss-as/osgi/integration/src/main/java/org/jboss/as/osgi/httpservice/HttpServiceImpl.java:-
    -130:WEB_LOGGER.errorf(error);-

*This is okay*
-jboss-as/osgi/service/src/main/java/org/jboss/as/osgi/service/JAXPServiceProvider.java:-
    -95:LOGGER.warn(e);-

*This doesn't appear to be in the EAP branch yet, will file a JIRA on the AS side when I can assess it*
-jboss-as/system-jmx/src/main/java/org/jboss/system/ServiceMBeanSupport.java:-
    -165:log.warn("Error in stop " + jbossInternalDescription(), t);-
    -173:log.warn("Error in destroy " + jbossInternalDescription(), t);-
    -220:log.warn("Initialization failed " + jbossInternalDescription(), e);-
    -253:log.warn("Starting failed " + jbossInternalDescription(), e);-
    -286:log.warn("Stopping failed " + jbossInternalDescription(), e);-
    -317:log.warn("Destroying failed " + jbossInternalDescription(), t);-
    -366:log.error(e);-

Comment 1 Pavel Slavicek 2012-05-10 15:50:30 UTC
Labels: Added: eap6_need_triage


Comment 3 Anne-Louise Tangring 2012-05-11 15:15:02 UTC
Affects: Added: Documentation (Ref Guide, User Guide, etc.)


Comment 4 James Perkins 2012-05-11 23:38:13 UTC
I think the {{Logger.xxxx(e.getMessage())}} invocations are okay. The message id really wouldn't be of any use here at all. I will not it is probably better to use {{Exception.getLocalizedMessage()}} though.

Comment 5 Petr Kremensky 2012-06-11 13:37:01 UTC
I did some update in description. James, are you sure, that Logger.xxxx(e.getMessage()) invocations are not against Logging requirements? Shall I ignore them then?

Comment 6 Rajesh Rajasekaran 2012-07-11 19:57:30 UTC
Labels: Removed: eap6_need_triage Added: eap601candidate


Comment 7 James Perkins 2012-08-07 20:09:37 UTC
Do we want to leave this open? These should be cleaned up by now. 

Comment 8 Petr Kremensky 2012-08-14 10:45:38 UTC
I updated the description. There are still some invocations, which I think should be fixed (logger.error("Exception calling deployment removal listener", t), ...)

Comment 9 James Perkins 2012-08-15 00:51:37 UTC
Some of these are okay the way they are. A pull request will be submitted for the ones that need to be changed.

Comment 10 James Perkins 2012-08-17 17:45:43 UTC
Pull request for 7.1.x https://github.com/jbossas/jboss-as/pull/2909
Pull request for 7.2.x https://github.com/jbossas/jboss-as/pull/2910

Comment 11 James Perkins 2012-08-17 17:46:25 UTC
Pull requests have been merged.

Comment 12 Tom WELLS 2012-10-04 11:43:59 UTC
Release Notes Docs Status: Added: Not Yet Documented
Affects: Removed: Documentation (Ref Guide, User Guide, etc.) Added: Documentation (Ref Guide, User Guide, etc.),Release Notes


Comment 13 Tom WELLS 2012-10-04 11:44:14 UTC
Updated the release notes fields.

Comment 14 Dana Mison 2012-10-17 22:28:21 UTC
reopening to update release note info

Comment 15 Dana Mison 2012-10-17 22:30:08 UTC
Writer: Added: Darrin


Comment 16 Dana Mison 2012-10-22 02:38:10 UTC
Release Notes Docs Status: Removed: Not Yet Documented Added: Documented as Resolved Issue
Release Notes Text: Added: Some log messages produced by different components were not localisable.  This was because they did not support JBoss Logging.  These components have been updated to support JBoss Logging.  These log messages are now localisable.


Comment 17 Anne-Louise Tangring 2012-11-13 20:07:52 UTC
Release Notes Docs Status: Removed: Documented as Resolved Issue 
Writer: Removed: Darrin 
Release Notes Text: Removed: Some log messages produced by different components were not localisable.  This was because they did not support JBoss Logging.  These components have been updated to support JBoss Logging.  These log messages are now localisable. 
Docs QE Status: Removed: NEW