[jboss-jira] [JBoss JIRA] (WFLY-1730) Wrong TCCL during ValidatorFactory retrieval
Jozef Hartinger (JIRA)
jira-events at lists.jboss.org
Mon Jul 22 07:55:26 EDT 2013
Jozef Hartinger created WFLY-1730:
-------------------------------------
Summary: Wrong TCCL during ValidatorFactory retrieval
Key: WFLY-1730
URL: https://issues.jboss.org/browse/WFLY-1730
Project: WildFly
Issue Type: Bug
Affects Versions: 8.0.0.Alpha3
Reporter: Jozef Hartinger
Fix For: 8.0.0.Beta1
Here https://github.com/wildfly/wildfly/blob/master/ee/src/main/java/org/jboss/as/ee/beanvalidation/ValidatorJndiInjectable.java#L52
the TCCL is set to the classloader of the ValidatorFactory. If the ValidatorFactory is LazyValidatorFactory which delegates to a client proxy obtained from Weld, this call fails with
{noformat}
Caused by: java.lang.IllegalStateException: JBAS016071: Singleton not set for ModuleClassLoader for Module "org.jboss.as.ee:main" from local module loader @76724357 (finder: local module finder @47a34181 (r$
at org.jboss.as.weld.services.ModuleGroupSingletonProvider$TCCLSingleton.get(ModuleGroupSingletonProvider.java:75) [wildfly-weld-8.0.0.Alpha4-SNAPSHOT.jar:8.0.0.Alpha4-SNAPSHOT]
at org.jboss.weld.Container.instance(Container.java:54) [weld-core-impl-2.0.2.Final.jar:2013-06-27 10:15]
at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:70) [weld-core-impl-2.0.2.Final.jar:2013-06-27 10:15]
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100) [weld-core-impl-2.0.2.Final.jar:2013-06-27 10:15]
at org.jboss.weld.proxies.ValidatorFactory$618047133$Proxy$_$$_WeldClientProxy.getValidator(Unknown Source) [weld-core-impl-2.0.2.Final.jar:]
at org.jboss.as.ee.beanvalidation.LazyValidatorFactory.getValidator(LazyValidatorFactory.java:83)
at org.jboss.as.ee.beanvalidation.ValidatorJndiInjectable.getInstanceSafely(ValidatorJndiInjectable.java:53)
at org.jboss.as.ee.beanvalidation.ValidatorJndiInjectable.getInstanceClassName(ValidatorJndiInjectable.java:61)
at org.jboss.as.naming.ServiceBasedNamingStore.list(ServiceBasedNamingStore.java:176)
at org.jboss.as.naming.NamingContext.list(NamingContext.java:323)
at org.jboss.as.naming.InitialContext.list(InitialContext.java:140)
at org.jboss.as.naming.NamingContext.list(NamingContext.java:339)
at javax.naming.InitialContext.list(InitialContext.java:455) [rt.jar:1.7.0_25]
at org.jboss.as.test.integration.web.injection.SimpleServlet.testAS7_5347(SimpleServlet.java:59) [classes:]
... 29 more
{noformat}
My assumption is that setting the TCCL is not necessary here at all though I may be wrong.
--
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
More information about the jboss-jira
mailing list