[
https://issues.jboss.org/browse/WELD-842?page=com.atlassian.jira.plugin.s...
]
Ales Justin commented on WELD-842:
----------------------------------
I already get this:
org.jboss.weld.exceptions.UnproxyableResolutionException: WELD-001435 Normal scoped bean
class org.jboss.weld.tests.observers.validation.HelloWorldService is not proxyable because
it has no no-args constructor.
at org.jboss.weld.util.Proxies.getUnproxyableClassException(Proxies.java:179)
at org.jboss.weld.util.Proxies.getUnproxyableTypeException(Proxies.java:137)
at org.jboss.weld.util.Proxies.getUnproxyableTypesException(Proxies.java:162)
at org.jboss.weld.bootstrap.Validator.validateBean(Validator.java:109)
at org.jboss.weld.bootstrap.Validator.validateRIBean(Validator.java:125)
at org.jboss.weld.bootstrap.Validator.validateBeans(Validator.java:324)
at org.jboss.weld.bootstrap.Validator.validateDeployment(Validator.java:309)
at org.jboss.weld.bootstrap.WeldBootstrap.validateBeans(WeldBootstrap.java:361)
at
org.jboss.arquillian.container.weld.ee.embedded_1_1.mock.TestContainer.startContainer(TestContainer.java:257)
at
org.jboss.arquillian.container.weld.ee.embedded_1_1.WeldEEMockContainer.deploy(WeldEEMockContainer.java:98)
Hence closing the issue.
Event injection via constructor injection results in stacktrace.
-----------------------------------------------------------------
Key: WELD-842
URL:
https://issues.jboss.org/browse/WELD-842
Project: Weld
Issue Type: Bug
Affects Versions: 1.1.0.Final
Reporter: Mike Brock
Assignee: Ales Justin
{code}
/**
* @author Mike Brock .
*/
@ApplicationScoped
public class HelloWorldService {
private Event<ResponseEvent> responseEvent;
@Inject
public HelloWorldService(Event<ResponseEvent> responseEvent) {
this.responseEvent = responseEvent;
}
public void handleMessage(@Observes MessageEvent event) {
System.out.println("Received Message: " + event.getMessage());
responseEvent.fire(new ResponseEvent(event.getMessage()));
}
}
{code}
Results in stacktrace:
{code}
com.google.common.collect.ComputationException:
org.jboss.weld.exceptions.DefinitionException:
org.jboss.errai.demos.cdi.helloworld.server.org$jboss$weld$bean-flat-ManagedBean-class_org$jboss$errai$demos$cdi$helloworld$server$HelloWorldService_$$_WeldClientProxy
at com.google.common.collect.MapMaker$StrategyImpl.compute(MapMaker.java:602)
at com.google.common.collect.MapMaker$StrategyImpl.compute(MapMaker.java:462)
at
com.google.common.collect.CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2045)
at
org.jboss.weld.bean.proxy.ClientProxyProvider.getClientProxy(ClientProxyProvider.java:112)
at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:660)
at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:252)
at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:222)
at org.jboss.weld.manager.BeanManagerImpl.notifyObservers(BeanManagerImpl.java:614)
at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:607)
at org.jboss.weld.manager.BeanManagerImpl.fireEvent(BeanManagerImpl.java:601)
at org.jboss.errai.cdi.server.EventDispatcher.callback(EventDispatcher.java:60)
{code}
Thought it was a problem in our integration at first, but then I realized the problem
does not happen when field injection is used for the Event.
--
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