[ 
https://issues.apache.org/jira/browse/TOMEE-41?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13134011#comment-13134011
 ] 

Jozef Hartinger commented on TOMEE-41:
--------------------------------------

No, here is an example:

Having a class which is not available on classpath at runtime:
public class ClassUnavailableAtRuntime {}

and a class which is bundled within a CDI-enabled jar (e.g. seam-faces.jar)
public class OptionalService extends ClassUnavailableAtRuntime {}

it looks that currently the entire deployment is considered invalid while it 
would be natural to skip the OptionalService from being registered as a CDI 
bean and proceed with the deployment.
                
> Overzealous class scanning
> --------------------------
>
>                 Key: TOMEE-41
>                 URL: https://issues.apache.org/jira/browse/TOMEE-41
>             Project: TomEE
>          Issue Type: Bug
>         Environment: 1.0.0-beta-2-20111019.211229-11-plus
>            Reporter: Jozef Hartinger
>             Fix For: 1.0.0-beta-2
>
>         Attachments: faces-shortly.war
>
>
> Having and extension A which provides optional integration with an extension 
> B, the deployment of an application that contains A but does not contain B 
> seems to fail with CNFE even though the optional integration classes are not 
> used by the application.
> What should actually happen is that the ClassNotFoundException should be 
> suppressed by the deployer and the related beans should not be registered as 
> CDI beans, instead of failing the entire deployment.
> INFO - Configuring enterprise application: 
> /home/jharting/jboss/testing/TOMEE/apache-tomee-plus-1.0.0-beta-2-SNAPSHOT/webapps/faces-shortly
> java.lang.NoClassDefFoundError: Lorg/jboss/seam/security/Identity;
>         at java.lang.Class.getDeclaredFields0(Native Method)
>         at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
>         at java.lang.Class.getDeclaredFields(Class.java:1743)
>         at 
> org.apache.xbean.finder.AnnotationFinder.findAnnotatedFields(AnnotationFinder.java:638)
>         at 
> org.apache.openejb.config.rules.CheckInjectionPointUsage.validate(CheckInjectionPointUsage.java:35)
>         at 
> org.apache.openejb.config.rules.ValidationBase.validate(ValidationBase.java:45)
>         at 
> org.apache.openejb.config.AppValidator.validate(AppValidator.java:88)
>         at 
> org.apache.openejb.config.ValidateModules.deploy(ValidateModules.java:29)
>         at 
> org.apache.openejb.config.ConfigurationFactory$Chain.deploy(ConfigurationFactory.java:263)
>         at 
> org.apache.openejb.config.ConfigurationFactory.configureApplication(ConfigurationFactory.java:692)
>         at 
> org.apache.tomee.catalina.TomcatWebAppBuilder.startInternal(TomcatWebAppBuilder.java:448)
>         at 
> org.apache.tomee.catalina.TomcatWebAppBuilder.configureStart(TomcatWebAppBuilder.java:405)
>         at 
> org.apache.tomee.catalina.GlobalListenerSupport.lifecycleEvent(GlobalListenerSupport.java:117)
>         at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>         at 
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>         at 
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5103)
>         at 
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
>         at 
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
>         at 
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
>         at 
> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
>         at 
> org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:932)
>         at 
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:723)
>         at 
> org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
>         at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1329)
>         at 
> org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
>         at 
> org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
>         at 
> org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
>         at 
> org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:389)
>         at 
> org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:334)
>         at 
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1041)
>         at 
> org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
>         at 
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
>         at 
> org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
>         at 
> org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
>         at 
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
>         at 
> org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
>         at 
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
>         at 
> org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
>         at 
> org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:148)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:621)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:322)
>         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
> Caused by: java.lang.ClassNotFoundException: org.jboss.seam.security.Identity
>         at 
> org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:98)
>         at 
> org.apache.openejb.core.TempClassLoader.loadClass(TempClassLoader.java:65)
>         ... 46 more

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

        

Reply via email to