[jboss-jira] [JBoss JIRA] Resolved: (JBDEPLOY-223) isRelevant ignores required string input

Ales Justin (JIRA) jira-events at lists.jboss.org
Fri Nov 13 06:23:05 EST 2009


     [ https://jira.jboss.org/jira/browse/JBDEPLOY-223?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ales Justin resolved JBDEPLOY-223.
----------------------------------

    Resolution: Done


I added a notion of required input in Deployer.
This set of required inputs is then tested against attachments in DeployersImpl::isRelevant,
if one is missing we veto the deployer as not relevant.


> isRelevant ignores required string input
> ----------------------------------------
>
>                 Key: JBDEPLOY-223
>                 URL: https://jira.jboss.org/jira/browse/JBDEPLOY-223
>             Project: JBoss Deployers
>          Issue Type: Bug
>    Affects Versions: JBDEPLOY-2.0.8.GA
>            Reporter: Thomas Diesler
>            Assignee: Ales Justin
>             Fix For:  JBDEPLOY-2.1.0.Alpha1
>
>
> In DeployersImpl we have
>       if (deployer.isAllInputs() == false)
>       {
>          // No attachment for the input type
>          Class<?> input = deployer.getInput();
>          if (input != null && unit.getAttachment(input) == null)
>             return false;
>       }
> This only looks at the single input type, but not the set of String inputs that also might have been added
> ServletContainerInitializerDeployer for example does not set an input type, but multiple string inputs 
>    public ServletContainerInitializerDeployer()
>    {
>       setStage(DeploymentStages.POST_CLASSLOADER);
>       addInput(MergedJBossWebMetaDataDeployer.WEB_ORDER_ATTACHMENT_NAME);
>       addInput(MergedJBossWebMetaDataDeployer.WEB_SCIS_ATTACHMENT_NAME);
>       addOutput(SCI_ATTACHMENT_NAME);
>       addOutput(SCI_HANDLESTYPES_ATTACHMENT_NAME);
>    }
> This deloyer is called even though JBossWebMetaData nor any of the String inputs are attached. This leads to 
> Caused by: java.lang.NullPointerException
> 	at org.jboss.web.deployers.ServletContainerInitializerDeployer.deploy(ServletContainerInitializerDeployer.java:91)
> 	at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
> for OSGi WAR deployments.
> I could not find the documentation that spells out whether the String inputs should be considered for isRelevant() 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list