[
https://issues.apache.org/jira/browse/OWB-616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13106520#comment-13106520
]
Mark Struberg commented on OWB-616:
-----------------------------------
seems you've hit a spec issue.
According to
> 5.4.1. Unproxyable bean types
> Certain legal bean types cannot be proxied by the container:
> • classes which don't have a non-private constructor with no parameters,
> • classes which are declared final or have final methods,
the behaviour of OWB is perfectly fine. But of course since we do not proxy
private methods anyway (only 'outside' calls get proxied), it just makes no
sense. I'll open a spec issue and fix it in the spec.
> javax.el.ExpressionFactory has final methods! CDI doesn't allow that. - Test
> on final **PRIVATE** methods too?
> --------------------------------------------------------------------------------------------------------------
>
> Key: OWB-616
> URL: https://issues.apache.org/jira/browse/OWB-616
> Project: OpenWebBeans
> Issue Type: Bug
> Components: Java EE Integration
> Affects Versions: 1.0.0
> Environment: IBM WebSphere Application Server 8.0.0
> Reporter: Heiko Kopp
> Assignee: Gurkan Erdogdu
> Priority: Critical
> Labels: features
>
> When implementing seam-solder on WAS 8.0 one gets the following exception:
> javax.el.ExpressionFactory has final methods! CDI doesn't allow that.
> at
> org.apache.webbeans.util.InjectionExceptionUtils.throwUnproxyableResolutionException(InjectionExceptionUtils.java:39)
> at
> org.apache.webbeans.util.WebBeansUtil.checkUnproxiableApiType(WebBeansUtil.java:2084)
> at
> org.apache.webbeans.config.DefinitionUtil.createProducerComponent(DefinitionUtil.java:688)
> at
> org.apache.webbeans.config.DefinitionUtil.createProducerComponents(DefinitionUtil.java:652)
> at
> org.apache.webbeans.config.DefinitionUtil.defineProducerMethods(DefinitionUtil.java:625)
> at
> org.apache.webbeans.component.creation.AbstractInjectedTargetBeanCreator.defineProducerMethods(AbstractInjectedTargetBeanCreator.java:142)
> at
> org.apache.webbeans.util.WebBeansUtil.defineManagedBean(WebBeansUtil.java:3050)
> at
> org.apache.webbeans.config.BeansDeployer.defineManagedBean(BeansDeployer.java:881)
> at
> org.apache.webbeans.config.BeansDeployer.deploySingleAnnotatedType(BeansDeployer.java:536)
> at
> org.apache.webbeans.config.BeansDeployer.deployFromClassPath(BeansDeployer.java:482)
> at
> org.apache.webbeans.config.BeansDeployer.deploy(BeansDeployer.java:171)
> at
> org.apache.webbeans.lifecycle.AbstractLifeCycle.startApplication(AbstractLifeCycle.java:124)
> at
> org.apache.webbeans.web.lifecycle.WebContainerLifecycle.startApplication(WebContainerLifecycle.java:78)
> at
> com.ibm.ws.webbeans.common.CommonLifeCycle.startApplication(CommonLifeCycle.java:106)
> at
> com.ibm.ws.webbeans.services.JCDIServletContainerInitializer.onStartup(JCDIServletContainerInitializer.java:85)
> at
> com.ibm.ws.webcontainer.webapp.WebAppImpl.initializeServletContainerInitializers(WebAppImpl.java:609)
> at
> com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:405)
> at
> com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
> at
> com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
> It turns out, that the class javax.el.ExpressionFactory shipped with the IBM
> Application Server contains a private final method called
> 'getClassNameSysProp'. This is the method
> org.apache.webbeans.util.WebBeansUtil.checkUnproxiableApiType() respectively
> ClassUtil.isFinal() complains about.
> Question here is: Is CD really preventing you to define private final methods
> or should this be reduced to public methods only?
> Thanks for clarification.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira