Helloworld example throwing "java.lang.LinkageError: loader constraint
violation" when deployed into JBossAS 6
--------------------------------------------------------------------------------------------------------------
Key: SEAMVALIDATE-4
URL:
https://issues.jboss.org/browse/SEAMVALIDATE-4
Project: Seam Validation
Issue Type: Bug
Affects Versions: 3.0.0.CR1
Reporter: Martin Gencur
Assignee: Martin Gencur
Fix For: 3.0.0.Final
The problem is including of slf4j libraries into the resulting war. I used the
"jee" maven profile.
The solution here is to mark the slf4j dependency as "provided" in the jee
profile:
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
The Error Stack Trace:
13:21:15,211 ERROR
[org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/validation-helloworld].[Seam
Validation Example Servlet]] Servlet.service() for servlet Seam Validation Example Servlet
threw exception: java.lang.LinkageError: loader constraint violation: when resolving
method
"org.slf4j.impl.StaticLoggerBinder.getLoggerFactory()Lorg/slf4j/ILoggerFactory;"
the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the
current class, org/slf4j/LoggerFactory, and the class loader (instance of
org/jboss/classloader/spi/base/BaseClassLoader) for resolved class,
org/slf4j/impl/StaticLoggerBinder, have different Class objects for the type
org/slf4j/ILoggerFactory used in the signature
at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:280) [:1.5.6]
at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:248) [:1.5.6]
at org.hibernate.validator.util.LoggerFactory.make(LoggerFactory.java:29) [:4.1.0.Final]
at org.hibernate.validator.util.Version.<clinit>(Version.java:24) [:4.1.0.Final]
at
org.hibernate.validator.engine.ConfigurationImpl.<clinit>(ConfigurationImpl.java:58)
[:4.1.0.Final]
at
org.hibernate.validator.HibernateValidator.createGenericConfiguration(HibernateValidator.java:42)
[:4.0.2.GA]
at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:269)
[:6.0.0.Final]
at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:111)
[:6.0.0.Final]
at org.jboss.seam.validation.ValidationExtension$1.create(ValidationExtension.java:170)
[:]
at org.jboss.seam.validation.ValidationExtension$1.create(ValidationExtension.java:86)
[:]
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:121) [:6.0.0.Final]
at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:99)
[:6.0.0.Final]
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:124)
[:6.0.0.Final]
at
org.jboss.weld.proxies.org$jboss$weld$serialization$ContextualStoreImpl2_$$_WeldClientProxy.getValidator(org$jboss$weld$serialization$ContextualStoreImpl2_$$_WeldClientProxy.java)
at org.jboss.seam.validation.ValidationExtension$2.create(ValidationExtension.java:285)
[:]
at org.jboss.seam.validation.ValidationExtension$2.create(ValidationExtension.java:198)
[:]
at org.jboss.weld.context.AbstractContext.get(AbstractContext.java:121) [:6.0.0.Final]
at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:99)
[:6.0.0.Final]
at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:124)
[:6.0.0.Final]
at
org.jboss.weld.proxies.org$jboss$weld$serialization$ContextualStoreImpl1_$$_WeldClientProxy.unwrap(org$jboss$weld$serialization$ContextualStoreImpl1_$$_WeldClientProxy.java)
at
org.jboss.seam.validation.ValidationInterceptor.validateMethodInvocation(ValidationInterceptor.java:48)
[:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_21]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[:1.6.0_21]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[:1.6.0_21]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_21]
at
org.jboss.interceptor.proxy.InterceptorInvocation$InterceptorMethodInvocation.invoke(InterceptorInvocation.java:72)
[:2.0.0.CR1]
at
org.jboss.interceptor.proxy.SimpleInterceptionChain.invokeNextInterceptor(SimpleInterceptionChain.java:82)
[:2.0.0.CR1]
at
org.jboss.interceptor.proxy.InterceptorMethodHandler.executeInterception(InterceptorMethodHandler.java:133)
[:2.0.0.CR1]
at
org.jboss.interceptor.proxy.InterceptorMethodHandler.invoke(InterceptorMethodHandler.java:112)
[:2.0.0.CR1]
at
org.jboss.weld.bean.proxy.CombinedInterceptorAndDecoratorStackMethodHandler.invoke(CombinedInterceptorAndDecoratorStackMethodHandler.java:66)
[:6.0.0.Final]
at
org.jboss.seam.validation.org$jboss$weld$bean-jboss$classloader:id="vfs:$$$home$mgencur$Java$jboss6$jboss6final$jboss-6$0$0$Final$server$default$deploy$validation-helloworld$war"-ManagedBean-class_org$jboss$seam$validation$HelloWorldService_$$_WeldSubclass.sayHello(org$jboss$weld$bean-jboss$classloader:id="vfs:$$$home$mgencur$Java$jboss6$jboss6final$jboss-6$0$0$Final$server$default$deploy$validation-helloworld$war"-ManagedBean-class_org$jboss$seam$validation$HelloWorldService_$$_WeldSubclass.java)
at
org.jboss.seam.validation.org$jboss$weld$bean-jboss$classloader:id="vfs:$$$home$mgencur$Java$jboss6$jboss6final$jboss-6$0$0$Final$server$default$deploy$validation-helloworld$war"-ManagedBean-class_org$jboss$seam$validation$HelloWorldService_$$_WeldClientProxy.sayHello(org$jboss$weld$bean-jboss$classloader:id="vfs:$$$home$mgencur$Java$jboss6$jboss6final$jboss-6$0$0$Final$server$default$deploy$validation-helloworld$war"-ManagedBean-class_org$jboss$seam$validation$HelloWorldService_$$_WeldClientProxy.java)
at org.jboss.seam.validation.HelloWorldServlet.doGet(HelloWorldServlet.java:47) [:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) [:1.0.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Final]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)
[:6.0.0.Final]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
[:6.0.0.Final]
at
org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)
[:6.0.0.Final]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
[:6.0.0.Final]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
[:6.0.0.Final]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
[:6.0.0.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
[:6.0.0.Final]
at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)
[:6.0.0.Final]
at
org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)
[:1.1.0.Final]
at
org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)
[:1.1.0.Final]
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)
[:6.0.0.Final]
at
org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)
[:6.0.0.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
[:6.0.0.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[:6.0.0.Final]
at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
[:6.0.0.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[:6.0.0.Final]
at
org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)
[:6.0.0.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
[:6.0.0.Final]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
[:6.0.0.Final]
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)
[:6.0.0.Final]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
[:6.0.0.Final]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_21]
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira