[JBoss JIRA] (WELD-1074) Using `new Weld()` fails with java.lang.IncompatibleClassChangeError when Guava on classpath?
by Aled Sage (JIRA)
Aled Sage created WELD-1074:
-------------------------------
Summary: Using `new Weld()` fails with java.lang.IncompatibleClassChangeError when Guava on classpath?
Key: WELD-1074
URL: https://issues.jboss.org/browse/WELD-1074
Project: Weld
Issue Type: Bug
Components: Bootstrap and Metamodel API
Reporter: Aled Sage
I am running Weld in a vanilla JVM using `new Weld()` (having been blocked in AS 7 by https://community.jboss.org/thread/154405).
I am getting the error shown below. I presume Weld is doing some special classloading that causes it to pick up Guava from somewhere other than the head of the classpath? My question/bug is:
* is the classloading behaviour documented; are there things that a user must not do?
* is this error caused by me having Guava ahead of the weld jar on the classpath, and if so can such errors be avoided in weld? Or is it just always necessary to avoid having Weld dependencies ahead of
---
I have built Weld myself from master (1.1.6-SNAPSHOT, git commit 282f830) so have the version with guava dependency 11.0.2.
(Thanks Ales for fixing that one!)
---
(note I also put in an extra catch block into BeanDeployer so that it would tell me which class it was trying to load when it got this error).
org.jboss.weld.resources.spi.ResourceLoadingException: Error loading class com.google.common.collect.StandardTable$ColumnMap
at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:167)
at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:88)
at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:118)
at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:171)
at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:336)
at org.jboss.weld.environment.se.Weld.initialize(Weld.java:86)
at net.ezbrokerage.launcher.EzBrokerageLauncher.<init>(EzBrokerageLauncher.java:31)
at net.ezbrokerage.launcher.MontereyVenueLauncher.<init>(MontereyVenueLauncher.java:45)
at net.ezbrokerage.launcher.MontereyVenueLauncher.main(MontereyVenueLauncher.java:86)
Caused by: java.lang.reflect.GenericSignatureFormatError
at sun.reflect.generics.parser.SignatureParser.error(SignatureParser.java:103)
at sun.reflect.generics.parser.SignatureParser.parseSimpleClassTypeSignature(SignatureParser.java:262)
at sun.reflect.generics.parser.SignatureParser.parseClassTypeSignatureSuffix(SignatureParser.java:270)
at sun.reflect.generics.parser.SignatureParser.parseClassTypeSignature(SignatureParser.java:244)
at sun.reflect.generics.parser.SignatureParser.parseFieldTypeSignature(SignatureParser.java:228)
at sun.reflect.generics.parser.SignatureParser.parseTypeSignature(SignatureParser.java:359)
at sun.reflect.generics.parser.SignatureParser.parseTypeSig(SignatureParser.java:157)
at sun.reflect.generics.repository.FieldRepository.parse(FieldRepository.java:34)
at sun.reflect.generics.repository.FieldRepository.parse(FieldRepository.java:24)
at sun.reflect.generics.repository.AbstractRepository.<init>(AbstractRepository.java:56)
at sun.reflect.generics.repository.FieldRepository.<init>(FieldRepository.java:30)
at sun.reflect.generics.repository.FieldRepository.make(FieldRepository.java:48)
at java.lang.reflect.Field.getGenericInfo(Field.java:85)
at java.lang.reflect.Field.getGenericType(Field.java:223)
at org.jboss.weld.introspector.jlr.WeldFieldImpl.of(WeldFieldImpl.java:52)
at org.jboss.weld.introspector.jlr.WeldClassImpl.<init>(WeldClassImpl.java:155)
at org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:119)
at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:59)
at org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:50)
at com.google.common.collect.ComputingConcurrentHashMap$ComputingValueReference.compute(ComputingConcurrentHashMap.java:355)
at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.compute(ComputingConcurrentHashMap.java:184)
at com.google.common.collect.ComputingConcurrentHashMap$ComputingSegment.getOrCompute(ComputingConcurrentHashMap.java:153)
at com.google.common.collect.ComputingConcurrentHashMap.getOrCompute(ComputingConcurrentHashMap.java:69)
at com.google.common.collect.ComputingConcurrentHashMap$ComputingMapAdapter.get(ComputingConcurrentHashMap.java:393)
at org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:163)
... 8 more
Exception in thread "main" java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at org.jboss.weld.environment.se.discovery.url.WeldSEResourceLoader.classForName(WeldSEResourceLoader.java:40)
at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:78)
at org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:118)
at org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:171)
at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:336)
at org.jboss.weld.environment.se.Weld.initialize(Weld.java:86)
at net.ezbrokerage.launcher.EzBrokerageLauncher.<init>(EzBrokerageLauncher.java:31)
at net.ezbrokerage.launcher.MontereyVenueLauncher.<init>(MontereyVenueLauncher.java:45)
at net.ezbrokerage.launcher.MontereyVenueLauncher.main(MontereyVenueLauncher.java:86)
--
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
12 years, 8 months
[JBoss JIRA] (WELD-1068) Weld conversation crash when used in portlet
by John Doyle (JIRA)
John Doyle created WELD-1068:
--------------------------------
Summary: Weld conversation crash when used in portlet
Key: WELD-1068
URL: https://issues.jboss.org/browse/WELD-1068
Project: Weld
Issue Type: Bug
Components: Conversations
Affects Versions: 1.1.5.Final
Environment: Windows XP, Tomcat 7.0.23, Liferay 6.1.0 Community Edition GA1, Mojarra 2.1.6, portletfaces-bridge 2.0.0
Reporter: John Doyle
When attempting to view a JSF2/Weld based portlet in a portal the following exception is thrown:
14:11:54,917 ERROR [render_portlet_jsp:154] java.lang.IllegalStateException: Must call associate() before calling activate()
at org.jboss.weld.context.AbstractConversationContext.activate(AbstractConversationContext.java:200)
at org.jboss.weld.jsf.WeldPhaseListener.activateConversations(WeldPhaseListener.java:108)
at org.jboss.weld.jsf.WeldPhaseListener.beforePhase(WeldPhaseListener.java:85)
at com.sun.faces.lifecycle.Phase.handleBeforePhase(Phase.java:228)
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:99)
at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:116)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
at org.portletfaces.bridge.BridgeImpl.doFacesRequest(BridgeImpl.java:391)
at org.portletfaces.bridge.GenericFacesPortlet.doView(GenericFacesPortlet.java:181)
at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:328)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:233)
at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:100)
at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:64)
at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:93)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:70)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
This happens on viewing a page which starts a conversation. I'll try and attach a little example app to aid reproducing the problem.
--
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
12 years, 8 months
[JBoss JIRA] (WELD-1055) Exception when deploying EJB with duplicated Interceptors-annontation is not informative enough
by Ales Justin (JIRA)
[ https://issues.jboss.org/browse/WELD-1055?page=com.atlassian.jira.plugin.... ]
Ales Justin resolved WELD-1055.
-------------------------------
Resolution: Done
> Exception when deploying EJB with duplicated Interceptors-annontation is not informative enough
> -----------------------------------------------------------------------------------------------
>
> Key: WELD-1055
> URL: https://issues.jboss.org/browse/WELD-1055
> Project: Weld
> Issue Type: Enhancement
> Affects Versions: 1.1.5.Final
> Reporter: Simon Walter
> Assignee: Marko Lukša
> Priority: Minor
> Fix For: 1.2.0.Beta1
>
>
> {noformat}
> 13:11:12,017 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-6) MSC00001:
> Failed to start service jboss.deployment.unit."xxx.ear".WeldService:
> org.jboss.msc.service.StartException in service jboss.deployment.unit."xxx.ear".WeldService:
> org.jboss.interceptor.proxy.InterceptorException:
> Duplicate interceptor class definition when bindingorg.jboss.interceptor.reader.SimpleInterceptorMetadata@1db7445 on AROUND_INVOKE
> {noformat}
> The exception should contains information regarding the interceptor or the annotated class:
> org.jboss.interceptor.builder.InterceptionModelImpl Line 162: {code}throw new InterceptorException("Duplicate interceptor class definition when binding" + interceptor + " on " + interceptionType.name());{code} should at least be
> {code}throw new InterceptorException("Duplicate interceptor class definition when binding" + interceptor.getInterceptorClass().getClassName() + " on " + interceptionType.name());{code}
--
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
12 years, 8 months