Bug 1119531 - [GSS] (6.4.0) Spurious ":" in @Resource annotation 'name' value results in invalid binding but no deployment error
Summary: [GSS] (6.4.0) Spurious ":" in @Resource annotation 'name' value results in in...
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: EE
Version: 6.2.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: baranowb
QA Contact:
Depends On:
Blocks: 1139188
TreeView+ depends on / blocked
Reported: 2014-07-15 02:18 UTC by Lyle Wang
Modified: 2018-12-09 18:09 UTC (History)
6 users (show)

Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1139188 (view as bug list)
Last Closed: 2014-12-16 15:19:04 UTC
Type: Bug

Attachments (Terms of Use)
Reproducer deployment with source code (4.26 KB, application/x-java-archive)
2014-07-15 02:18 UTC, Lyle Wang
no flags Details

System ID Priority Status Summary Last Updated
JBoss Issue Tracker WFLY-3623 Major Resolved Spurious ":" in @Resource annotation 'name' value results in invalid binding but no deployment error 2017-05-30 10:39:30 UTC

Description Lyle Wang 2014-07-15 02:18:49 UTC
Created attachment 918046 [details]
Reproducer deployment with source code

Description of problem:

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

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

How reproducible:


Steps to Reproduce:

1. See attached jar for a reproducer. Just deploy it. The jar includes it's own source.
2. There is no error reported in the log.
3. Any time the jndi-view op is run, the following is logged in the server.log:
10:52:02,985 ERROR [org.jboss.as.naming] (management-handler-thread - 5) WFLYNAM0013: Failed to obtain jndi view value for entry java:jboss:.: javax.naming.NameNotFoundException: jboss: -- service jboss.naming.context.java.jboss.jboss:
	at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:106) [wildfly-naming-9.0.0.Alpha1-SNAPSHOT.jar:9.0.0.Alpha1-SNAPSHOT]

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.

Additional info:

Comment 1 JBoss JIRA Server 2014-07-31 10:12:59 UTC
Bartosz Baranowski <bbaranow@redhat.com> updated the status of jira WFLY-3623 to Coding In Progress

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