[jboss-jira] [JBoss JIRA] Created: (JBAS-8310) Optional dependencies that are not present for classes in a bean archive can cause the deployment to fail

Stuart Douglas (JIRA) jira-events at lists.jboss.org
Thu Aug 5 06:48:49 EDT 2010


Optional dependencies that are not present for classes in a bean archive can cause the deployment to fail
---------------------------------------------------------------------------------------------------------

                 Key: JBAS-8310
                 URL: https://jira.jboss.org/browse/JBAS-8310
             Project: JBoss Application Server
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: Weld/CDI
    Affects Versions: 6.0.0.M4
            Reporter: Stuart Douglas
            Assignee: Marius Bogoevici


If you have a class with optional dependencies that are not present in a bean archive it can cause the deployment to fail if these they are part of the classes external schema (i.e. method parameters or return values, field types). 

This is because the NoClassDefFoundError will not be thrown when the class is loaded, but at the first call to getMethods() or getFields(). This causes introspection to fail and the deployment will abort. 

The best solution would probably be to call getDeclaredMethods/Fields on the class and all parent classes early, so the NoClassDefFoundError can be caught and handled.  

If the optional dependency is used by the class but not part of the schema the deployment will work as expected.

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

        


More information about the jboss-jira mailing list