Issue Type: Bug Bug
Assignee: Jozef Hartinger
Created: 22/Apr/14 8:05 AM
Description:

Following code fails with NPE, because the priority is null in org.jboss.weld.bootstrap.enablement.GlobalEnablementBuilder#getGlobalAlternativeMap

public void afterTypeDiscovery(@Observes AfterTypeDiscovery event) {
        event.getAlternatives().add(IntegerBean.class);
}

Stacktrace:

13:54:10,245 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.unit."4ded9a73-c1a8-48b2-b884-ec631181e7b3.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."4ded9a73-c1a8-48b2-b884-ec631181e7b3.war".WeldStartService: Failed to start service
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
	at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
Caused by: java.lang.NullPointerException: null value in entry: class org.jboss.cdi.tck.tests.definition.bean.custom.IntegerBean=null
	at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:33)
	at com.google.common.collect.SingletonImmutableBiMap.<init>(SingletonImmutableBiMap.java:39)
	at com.google.common.collect.ImmutableBiMap.of(ImmutableBiMap.java:57)
	at com.google.common.collect.ImmutableMap.of(ImmutableMap.java:80)
	at com.google.common.collect.ImmutableMap.copyOf(ImmutableMap.java:292)
	at org.jboss.weld.bootstrap.enablement.GlobalEnablementBuilder.getGlobalAlternativeMap(GlobalEnablementBuilder.java:193)
	at org.jboss.weld.bootstrap.enablement.GlobalEnablementBuilder.createModuleEnablement(GlobalEnablementBuilder.java:236)
	at org.jboss.weld.bootstrap.BeanDeployment.createEnablement(BeanDeployment.java:219)
	at org.jboss.weld.bootstrap.WeldStartup.startInitialization(WeldStartup.java:363)
	at org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:76)
	at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:91)
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
	... 3 more

Project: Weld
Priority: Major Major
Reporter: Tomas Remes
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
weld-issues mailing list
weld-issues@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-issues

Reply via email to