[
https://issues.apache.org/jira/browse/OLINGO-761?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14999607#comment-14999607
]
Hans Schuell commented on OLINGO-761:
-------------------------------------
I have the same issue under JBoss WildFly Full 9.0.1.Final
When I simply add the following dependency to my pom.xml
<dependency>
<groupId>org.apache.olingo</groupId>
<artifactId>olingo-odata2-core</artifactId>
<version>2.0.5</version>
</dependency>
and compile it, my project doesn't start anymore and the exception is:
Caused by: org.jboss.weld.exceptions.UnproxyableResolutionException:
WELD-001437: Normal scoped bean class
org.apache.olingo.odata2.core.rest.app.ODataApplication$MyProvider is not
proxyable because the type is final or it contains a final method class
org.apache.olingo.odata2.core.rest.app.ODataApplication$MyProvider - <unknown
javax.enterprise.inject.spi.Bean instance>.
at
org.jboss.weld.util.Proxies.getUnproxyableClassException(Proxies.java:214)
at
org.jboss.weld.util.Proxies.getUnproxyableTypeException(Proxies.java:178)
at
org.jboss.weld.util.Proxies.getUnproxyableTypeException(Proxies.java:140)
at
org.jboss.weld.bean.proxy.ClientProxyProvider.getClientProxy(ClientProxyProvider.java:231)
at
org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:755)
at
org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:784)
at
org.jboss.weld.util.ForwardingBeanManager.getReference(ForwardingBeanManager.java:61)
at
org.jboss.weld.bean.builtin.BeanManagerProxy.getReference(BeanManagerProxy.java:85)
at
org.jboss.resteasy.cdi.CdiConstructorInjector.construct(CdiConstructorInjector.java:64)
at
org.jboss.resteasy.spi.ResteasyProviderFactory.createProviderInstance(ResteasyProviderFactory.java:2211)
at
org.jboss.resteasy.spi.ResteasyProviderFactory.addMessageBodyWriter(ResteasyProviderFactory.java:873)
at
org.jboss.resteasy.spi.ResteasyProviderFactory.registerProvider(ResteasyProviderFactory.java:1414)
... 21 more
I have downloaded the sources now, simply removed the "final" keyword from
public static final class MyProvider implements MessageBodyWriter<String> {
and used "mvn deploy" and THE ERROR IS GONE and when I used it, it is working.
My best guess is that this is an issue with JBoss's implementation, because I
have used olingo-odata2-core before within IBM WebSphere and it worked there.
But the question is "Why must the class be final"?
> ODataApplication$MyProvider is not proxyable
> --------------------------------------------
>
> Key: OLINGO-761
> URL: https://issues.apache.org/jira/browse/OLINGO-761
> Project: Olingo
> Issue Type: Bug
> Components: odata2-core
> Affects Versions: V2 2.0.2, V2 2.0.4
> Reporter: Eugenio Lentini
> Assignee: Christian Amend
> Attachments: OlingoIssue.zip, wildflyScenarioDeployStackTrace1.txt
>
>
> I am trying to deploy a web application into WildFly 8.2.0 along with a
> service REST written with JAX-RS,there are just a couple of resources and a
> class extending Application annotated with @ApplicationScoped.
> The application has even a module OData based on Olingo OData 2, version
> 2.0.2.
> During the deployment I get this exception
> {code:borderStyle=solid}
> Caused by: org.jboss.weld.exceptions.UnproxyableResolutionException:
> WELD-001437: Normal scoped bean class
> org.apache.olingo.odata2.core.rest.app.ODataApplication$MyProvider is not
> proxyable because the type is final or it contains a final method class
> org.apache.olingo.odata2.core.rest.app.ODataApplication$MyProvider - <unknown
> javax.enterprise.inject.spi.Bean instance>.
> at
> org.jboss.weld.util.Proxies.getUnproxyableClassException(Proxies.java:229)
> at
> org.jboss.weld.util.Proxies.getUnproxyableTypeException(Proxies.java:178)
> {code}
> According to the documentation more or less all the injected beans are
> proxies, the final modifier prevent the subclass to be created.
> Have you already got experience like that?
> Thanks for the attention.
> Eugenio
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)