[jboss-jira] [JBoss JIRA] (AS7-2067) The ear file can not deploy under AS 7.0

jaikiran pai (JIRA) jira-events at lists.jboss.org
Mon Feb 6 07:18:48 EST 2012


    [ https://issues.jboss.org/browse/AS7-2067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664418#comment-12664418 ] 

jaikiran pai commented on AS7-2067:
-----------------------------------

I had a look at this issue. The problem is due to the inconsistency with the ServiceName of the subdeployment unit. The SubDeploymentProcessor (correctly) takes into account the relative path of the subdeployment while adding a dependency to the phase context:
{code}
final ResourceRoot parentRoot = deploymentUnit.getAttachment(Attachments.DEPLOYMENT_ROOT);
                final String relativePath = childRoot.getRoot().getPathNameRelativeTo(parentRoot.getRoot());
                final ServiceName serviceName = Services.deploymentUnitName(deploymentUnit.getName(), relativePath);

...
                //we also need a dep on the first phase of the sub deployments
                phaseContext.addToAttachmentList(Attachments.NEXT_PHASE_DEPS, serviceName.append(ServiceName.of(Phase.STRUCTURE.name())));
{code}

However, the AbstractDeploymentUnitService/SubDeploymentUnitService don't take into account the relative path while creating a ServiceName out of the DeploymentUnit. 

The fix doesn't appear to be straightforward since the DeploymentUnit creation would need to know the ResourceRoot if we have to take into account the relative path while creating the ServiceName for that deployment unit. Also given the fact that this requires a change to the very core of deployment unit processing, I don't think it's worth introducing this fix at this stage for 7.1.0.Final. I'm pushing this out for 7.1.1. For now the workaround mentioned in the description (i.e. moving the subdeployment to the root of the .ear) should work fine.


                
> The ear file can not deploy under AS 7.0
> ----------------------------------------
>
>                 Key: AS7-2067
>                 URL: https://issues.jboss.org/browse/AS7-2067
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: EE
>    Affects Versions: 7.0.2.Final
>            Reporter: Candice Chen
>            Assignee: jaikiran pai
>             Fix For: 7.1.0.Final
>
>         Attachments: migrate.ear, migrate.ear
>
>
> I have an ear file names migrate.ear which contains one ejb jar (ejb.jar) and one war file (war.war), if I put the ejb jar to a ejb folder and war file to war folder, the ear can not be depoyed.
> If I move the ejb jar to war file out, it can be deployed. 
> Below  structuer can be deployed:
> ejb.jar
> lib/
> lib/util-1.0-SNAPSHOT.jar
> lib/version.jar
> META-INF/
> META-INF/application.xml
> META-INF/MANIFEST.MF
> war.war
>  
> Below structure can not be deployed:
> ejb/
> ejb/ejb.jar
> lib/
> lib/util-1.0-SNAPSHOT.jar
> lib/version.jar
> META-INF/
> META-INF/application.xml
> META-INF/MANIFEST.MF
> war/
> war/war.war
> Below is the error:
> http://community.jboss.org/message/630869#630869

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list