[jboss-jira] [JBoss JIRA] (AS7-2077) WARs that deploy on JBoss AS 6 and GlassFish 3.1 fail on AS 7 because of classpath scanning changes

Richard Kennard (Created) (JIRA) jira-events at lists.jboss.org
Tue Oct 11 18:26:16 EDT 2011


WARs that deploy on JBoss AS 6 and GlassFish 3.1 fail on AS 7 because of classpath scanning changes
---------------------------------------------------------------------------------------------------

                 Key: AS7-2077
                 URL: https://issues.jboss.org/browse/AS7-2077
             Project: Application Server 7
          Issue Type: Bug
          Components: EE
    Affects Versions: 7.0.0.Final
         Environment: jboss-as-web-7.0.0.Final
            Reporter: Richard Kennard
            Assignee: David Lloyd
         Attachments: as7-2077.war

To reproduce:

1. Download attached minimal WAR (as7-708.war)
2. Deploy WAR to a fresh install of JBoss AS 6.0.0.Final. Hit http://localhost:8080/as7-708. Should say 'success'
3. Deploy WAR to a fresh install of GlassFish 3.1. Hit http://localhost:8080/as7-708. Should say 'success'
4. Deploy WAR to a fresh install of JBoss AS 7.0.0.Final. Deployment will fail

The deployment error is:

---

09:07:34,991 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."as7-708.war".INSTALL
: org.jboss.msc.service.StartException in service jboss.deployment.unit."as7-708.war".INSTALL: Failed to process phase INSTALL of deployment "as7-708.
war"
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:121)
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1765)
        at org.jboss.msc.service.ServiceControllerImpl$ClearTCCLTask.run(ServiceControllerImpl.java:2291)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_25]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_25]
        at java.lang.Thread.run(Thread.java:662) [:1.6.0_25]
Caused by: java.lang.RuntimeException: Error getting reflective information for class org.metawidget.jsp.tagext.html.spring.SpringMetawidgetTag
        at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:70)
        at org.jboss.as.ee.component.EEModuleClassDescription$DefaultConfigurator.configure(EEModuleClassDescription.java:144)
        at org.jboss.as.ee.component.EEClassConfigurationProcessor.deploy(EEClassConfigurationProcessor.java:100)
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:115)
        ... 5 more
Caused by: java.lang.NoClassDefFoundError: org/springframework/context/MessageSource
        at java.lang.Class.getDeclaredFields0(Native Method) [:1.6.0_25]
        at java.lang.Class.privateGetDeclaredFields(Class.java:2291) [:1.6.0_25]
        at java.lang.Class.getDeclaredFields(Class.java:1743) [:1.6.0_25]
        at org.jboss.as.server.deployment.reflect.ClassReflectionIndex.<init>(ClassReflectionIndex.java:57)
        at org.jboss.as.server.deployment.reflect.DeploymentReflectionIndex.getClassIndex(DeploymentReflectionIndex.java:66)
        ... 8 more
Caused by: java.lang.ClassNotFoundException: org.springframework.context.MessageSource from [Module "deployment.as7-708.war:main" from Service Module
Loader]
        at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
        at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
        at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
        ... 13 more

---

We understand the error. The new JBoss AS 7 classpath scanning code is looking for EE annotations (such as @Stateless) inside the WAR, but some of the JARs in the WAR have optional dependencies (ie. an optional dependency on Spring). 

However we don't believe this should fail the deployment. It didn't fail on JBoss AS 6 and it doesn't fail on GlassFish 3.1.

This issue is affecting other projects, such as Vaadin, not just Metawidget. For further discussion, see AS7-708.

--
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