[forge-dev] Weird error again....

Lincoln Baxter lbaxter at redhat.com
Tue Dec 20 12:44:09 EST 2011


Hey Tom,

(cc'ing dev list)

I'm not exactly sure why this is happening. As long as the plugins are distributed as a single module, all resource-roots in that module should have classloader visibility between one another. They should also prefer their local classes over classes in other classloaders if there is duplication.

Where can I try this out?

~Lincoln

----- Original Message -----
From: "Tom Cunningham" <tcunning at redhat.com>
To: "Lincoln Baxter" <lbaxter at redhat.com>
Sent: Saturday, December 17, 2011 1:24:57 AM
Subject: Weird error again....

Lincoln,

I'm seeing a weird error on SNAPSHOT again that I think I've seen 
before.      We managed to remove the shading and got our plugins to 
work with 1.0.0-Beta3, but when I go to SNAPSHOT I'm seeing the 
exception at the bottom of this email when it tries to find 
"org.switchyard.tools.forge.plugin.SwitchYardFacet".     We've put a 
number of different plugins inside a common module, and SwitchYardFacet 
is in switchyard.forge-plugin-0.4.0-SNAPSHOT.jar.      Can a facet in 
one of the other plugin JARs refer to that one?     Do I need to go back 
to shading?

Example - this Facet is in switchyard-camel-plugin-0.4.0-SNAPSHOT.jar 
but refers to  SwitchYardFacet which is in another resource-root : 
switchyard-forge-plugin-0.4.0-SNAPSHOT.jar.

import org.switchyard.tools.forge.plugin.SwitchYardFacet;

/**
  * Forge facet for Camel bindings and services.
  */
@Alias("switchyard.camel")
@RequiresFacet({ DependencyFacet.class, PackagingFacet.class, 
SwitchYardFacet.class })
@RequiresPackagingType(PackagingType.JAR)
public class CamelFacet extends AbstractFacet {


module.xml :

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<module xmlns="urn:jboss:module:1.0" 
name="org.switchyard.switchyard-forge-plugin" slot="0.4.0-SNAPSHOT">
<resources>
<!-- plugin dependencies that must be local to this module -->
<resource-root path="switchyard-forge-common-0.4.0-SNAPSHOT.jar"/>
<resource-root path="switchyard-component-common-rules-0.4.0-SNAPSHOT.jar"/>
<!-- core and component plugins -->
<resource-root path="switchyard-forge-plugin-0.4.0-SNAPSHOT.jar"/>
<resource-root path="switchyard-forge-bean-plugin-0.4.0-SNAPSHOT.jar"/>
<resource-root path="switchyard-forge-soap-plugin-0.4.0-SNAPSHOT.jar"/>
<resource-root path="switchyard-forge-rules-plugin-0.4.0-SNAPSHOT.jar"/>
<resource-root path="switchyard-forge-bpm-plugin-0.4.0-SNAPSHOT.jar"/>
<resource-root path="switchyard-forge-camel-plugin-0.4.0-SNAPSHOT.jar"/>
</resources>



Error - the missing Type seems to be SwitchYardFacet :

tcunning at localhost:tmp]$ forge
Listening for transport dt_socket at address: 8787
Plugin system disabled due to failure while loading one or more plugins; 
try removing offending plugins with "forge remove-plugin <TAB>".
com.google.common.collect.ComputationException: 
java.lang.ArrayStoreException: 
sun.reflect.annotation.TypeNotPresentExceptionProxy
     at 
com.google.common.collect.ComputingConcurrentHashMap.compute(ComputingConcurrentHashMap.java:218)
     at 
com.google.common.collect.ComputingConcurrentHashMap.apply(ComputingConcurrentHashMap.java:100)
     at 
com.google.common.collect.MapMaker$ComputingMapAdapter.get(MapMaker.java:515)
     at 
org.jboss.weld.resources.ClassTransformer.loadClass(ClassTransformer.java:183)
     at org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:95)
     at 
org.jboss.weld.bootstrap.BeanDeployer.addClasses(BeanDeployer.java:134)
     at 
org.jboss.weld.bootstrap.BeanDeployment.createBeans(BeanDeployment.java:191)
     at 
org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:368)
     at org.jboss.weld.environment.se.Weld.initialize(Weld.java:92)
     at org.jboss.forge.shell.Bootstrap$1.run(Bootstrap.java:87)
     at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.ArrayStoreException: 
sun.reflect.annotation.TypeNotPresentExceptionProxy
     at 
sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:653)
     at 
sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:460)
     at 
sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:286)
     at 
sun.reflect.annotation.AnnotationParser.parseAnnotation(AnnotationParser.java:222)
     at 
sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:69)
     at 
sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:52)
     at java.lang.Class.initAnnotationsIfNecessary(Class.java:3070)
     at java.lang.Class.getAnnotations(Class.java:3050)
     at 
org.jboss.weld.introspector.jlr.WeldClassImpl.of(WeldClassImpl.java:98)
     at 
org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:54)
     at 
org.jboss.weld.resources.ClassTransformer$TransformTypeToWeldClass.apply(ClassTransformer.java:42)
     at 
com.google.common.collect.ComputingConcurrentHashMap.compute(ComputingConcurrentHashMap.java:206)
     ... 10 more
     _____



More information about the forge-dev mailing list