1 Reply Latest reply: Jul 6, 2011 4:17 PM by Mike Mosiewicz RSS

    Unproxyable beans

    Mike Mosiewicz Newbie


      I'm having a hard time with UnproxyableResolutionException. I have a generic class say DAO<X,Y>. Not mine, but want to use it. It's not serializable by default, but I wanted to make it to ConversationScope.

      So because it's not mine, I wanted to override it with MyDAO<X,Y> descendant that is perfectly Serializable. I added also public zero-arg constructor. In theory I can serialize it. Fine... but now it's not proxyable.

      It seems that to make it proxyable all it's ascendants have to be proxyable. And if any of them is not proxyable it's just not proxyable.

      So my question is how to deal with that. How to wrap foreign class with no public no-arg constructor to make it proxyable.

        • 1. Re: Unproxyable beans
          Mike Mosiewicz Newbie

          Just one more thing...

          I thought that I would just use @Typed annotation to help Weld decide what is to be proxied or not. And that's what I get:

          ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] Error installing to Start: name=vfs:///C:/servers/jboss-6.0.0.Final/server/default/deploy/test.war_WeldBootstrapBean state=Create: java.lang.NullPointerException
               at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:144) [:6.0.0.Final]
               at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:162) [:6.0.0.Final]
               at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:377) [:6.0.0.Final]
               at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:363) [:6.0.0.Final]
               at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:388) [:6.0.0.Final]
               at org.jboss.weld.integration.deployer.env.helpers.BootstrapBean.boot(BootstrapBean.java:92) [:6.0.0.Final]