Bug 1119159 - Inconsistent deployment status / logging when deploy an EJB containing wrong dependencies
Summary: Inconsistent deployment status / logging when deploy an EJB containing wrong ...
Status: CLOSED DUPLICATE of bug 997583
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: Server
Version: 6.2.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: EAP 6.4.0
Assignee: Chao Wang
QA Contact: Martin Svehla
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-14 07:33 UTC by Lyle Wang
Modified: 2018-12-09 18:09 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2014-11-04 08:21:16 UTC
Type: Bug

Attachments (Terms of Use)
Reproducer deployment and log files (9.38 KB, application/zip)
2014-07-14 07:33 UTC, Lyle Wang
no flags Details

System ID Priority Status Summary Last Updated
JBoss Issue Tracker WFLY-3625 Major Resolved Inconsistent deployment status when deploy an EJB containing wrong dependencies 2017-06-15 07:48:38 UTC

Description Lyle Wang 2014-07-14 07:33:58 UTC
Created attachment 917693 [details]
Reproducer deployment and log files

Description of problem:

On deploying an EJB which has wrong "lookup" JNDI names, it gives ERROR log on deployment, but if you restart EAP then, failed deployment becomes "deployed" and there is only INFO  log on startup.
Tested this on both EAP 6.2.0 and 6.2.4.

Version-Release number of selected component (if applicable):

How reproducible:


Steps to Reproduce:

1) Start up vanilla installed EAP first(standalone-full.xml), drop the folder dsc.ear into $JBOSS_HOME/standalone/deployments, then create an empty file "dsc.ear.dodeploy"

2) EAP gives ERROR log (see attachment "LogOnDeployment.log"), and deployment failed ("dsc.ear.dodeploy"==>"dsc.ear.failed"), cannot see this deployment in web console (http://localhost:9990)

3) Now restart EAP, it gives INFO log now(see attachment "LogOnRestart.log"), and deployment succeeded ("dsc.ear.failed"==>"dsc.ear.deployed"), can see this deployment in web console

Actual results:

The deployment statuses are not consistent before/after the restart.
On restart there should be ERROR level logging followed by some stacktrace.

Expected results:

Deployment status should remain "failed" and shouldn't be visible in web console after server restart.
On restart the logging of "JBAS014775:    New missing/unsatisfied dependencies:"
 should be in ERROR level and some stacktrace is preferred.

Additional info:

Comment 1 Lyle Wang 2014-07-14 07:37:30 UTC
Source code see "TestJMX.java" and "TestJMXMBean.java" in the attachment, we use an invalid JNDI name to "lookup" the @Resource

[lookup="java:global:/" +] , which should be [lookup="java:global/" +]

@Resources  //EAP6
        @Resource(name="java:jboss/" +
            lookup="java:global:/" +
            "dsc" + '/' +
            "tpapps-common-testdeploy" + '/' +
            "TestJMX" + '!' +

Comment 2 Lyle Wang 2014-07-15 01:36:48 UTC
Moreover, if using standalone-full-ha.xml to restart, it doesn't even give anything in the log, all the log entries look perfect (and saying the ear is deployed successfully), the only thing indicating an error is the last sentence in the server startup logging:

11:32:30,319 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss EAP 6.2.4.GA (AS 7.3.4.Final-redhat-1) started (with errors) in 4202ms - Started 230 of 365 services (5 services failed or missing dependencies, 129 services are passive or on-demand)

Comment 3 Chao Wang 2014-11-04 08:21:16 UTC
This issue can not be reproduced with EAP-6.4.0.DR8. It is probably same problem as https://bugzilla.redhat.com/show_bug.cgi?id=997583 and is already fixed in EAP-6.4.0.DR1.

*** This bug has been marked as a duplicate of bug 997583 ***

Comment 5 Lyle Wang 2014-11-12 06:59:32 UTC
"java:global:/" - why extra ':' ?  

-- Just a typo. Customer found this issue originally with this typo in their code. And they spent a lot of time troubleshooting this as there is no clear pointer for the actual problem.


- https://issues.jboss.org/browse/WFLY-3623
- https://bugzilla.redhat.com/show_bug.cgi?id=1119531

So I guess its still a duplicate.

-- It's different, bz 1119531 is about "Binding JNDI names incorrectly" rather than bz 1119159's "Not reporting missing/invalid JNDI references"

If we try to use "java:jboss:/ResourceTestEJB" to bind the JNDI name, it will bind "java:jboss:" instead and there will be no error (actually we expect to see an error saying invalid name/namespace etc.)

Please check bz 1119531:

An @Resource annotation with a spurious ":" in the name attribute value results in an incorrect binding but no deployment failure.

//			name="java:jboss/ResourceTestEJB", // ==> this works fine 
			name="java:jboss:/ResourceTestEJB",  // ==> this will not bind the JNDI correctly, and there is no error on deploying EJB


Actual results:

"java:jboss:" is bound as JNDI name and the resource cannot be looked up.

Expected results:

If a proper binding can't be done per the annotation value, there should be an exception thrown triggering deployment rollback.

Comment 6 Chao Wang 2014-11-12 07:28:37 UTC
bz997583 is about "file-scanner deployment that fails on boot will not be undeployed after failure" and incorrectly change deployment statue from .failed marker to .deployed marker after server reboot, so, it's not fix for any specific reason that how make it fails(unlike this "wrong 'lookup' JNDI names" it could be just missing dependency in jboss-deployment-structure.xml or other situation)

Comment 8 JBoss JIRA Server 2015-09-16 21:49:16 UTC
Brian Stansberry <brian.stansberry@redhat.com> updated the status of jira WFLY-3625 to Resolved

Note You need to log in before you can comment on or make changes to this bug.