Issue Details (XML | Word | Printable)

Key: GLASSFISH-19021
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: naman_mehta
Reporter: dapeng_hu
Votes: 0
Watchers: 1

If you were logged in you would be able to see more operations.

Fail to validate component-level resource definitions with same JNDI in different component scope

Created: 20/Aug/12 08:56 AM   Updated: 24/Aug/12 08:37 AM   Resolved: 24/Aug/12 08:37 AM
Component/s: deployment
Affects Version/s: future release
Fix Version/s: 4.0

Time Tracking:
Not Specified

File Attachments: 1. Java Source File (7 kB) 20/Aug/12 08:56 AM - dapeng_hu
2. Java Source File (7 kB) 20/Aug/12 08:56 AM - dapeng_hu
3. Text File server.log (81 kB) 20/Aug/12 08:56 AM - dapeng_hu

Tags: validation deployment resource-definition
Participants: dapeng_hu and naman_mehta

 Description  « Hide

I found a problem when running the devtest connector/v3/datasource-definition/. I add one data source (as below) in each of the EJB class and respectively. Although these two component-level data sources share the same JNDI name, they do not conflict because they are in different EJB scope.

@DataSourceDefinition(name = "java:comp/env/Test_DataSource",
minPoolSize = 0,
initialPoolSize = 0,
className = "org.apache.derby.jdbc.ClientXADataSource",
portNumber = 1527,
serverName = "localhost",
user = "APP",
password = "APP",
databaseName = "hello-stateful-ejb-comp",
properties = {"connectionAttributes=;create=true"}

But the application deployment fails when validate resource descriptors, and throws out the following exception. Could you take a look?

[#|2012-08-19T20:39:21.708-0700|SEVERE|44.0||_ThreadID=12;_ThreadName=Thread-2;|Application validation fails for given application [datasource-definitionApp] for jndi-name [java:comp/env/Test_DataSource]
java.lang.IllegalStateException: Application validation fails for given application [datasource-definitionApp] for jndi-name [java:comp/env/Test_DataSource]
at com.sun.enterprise.deployment.util.ApplicationValidator.accept(
at com.sun.enterprise.deployment.BundleDescriptor.visit(
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.validate(
at com.sun.enterprise.deployment.archivist.ApplicationArchivist.openWith(
at com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(
at org.glassfish.javaee.core.deployment.DolProvider.processDOL(
at org.glassfish.javaee.core.deployment.DolProvider.load(
at org.glassfish.javaee.core.deployment.DolProvider.load(
at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(
at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(
at org.glassfish.deployment.admin.DeployCommand.execute(

For your convenience, the, and the server's log file are attached.

naman_mehta added a comment - 24/Aug/12 08:37 AM

Fixed the issue.

Sending dol/src/main/java/com/sun/enterprise/deployment/util/
Transmitting file data .
Committed revision 55618.