Here's the steps to reproduce (there's quite a few, sorry for that, we
should have this down to two in the next release) :
Download
http://downloads.jboss.org/switchyard/releases/v0.3/switchyard-installer-...
unzip switchyard-installer-0.3.0.Final.zip
cd switchyard-installer-0.3
unzip a jboss-as-7.0.2 somewhere to install into, give that location to
the installer
Answer (y) that you would like to install the SwitchYard Forge plugin
If you have FORGE_HOME set to forge-1.0.0.Beta4 or SNAPSHOT, it may
error out on trying to write to the ~/.forge/plugins/installed.xml
because JARs have moved around - in this case add the following line to
installed.xml :
<installed>
<plugin name="org.switchyard.switchyard-forge-plugin"
slot="0.3.0.Final"/>
</installed>
Change FORGE_HOME to forge-1.0.0.Beta4 or SNAPSHOT
Edit
~/.forge/plugins/org/switchyard/switchyard-forge-plugin/0.3.0.Final/module.xml
Change <module name="javax.enterprise.cdi-api"/>
to <module name="javax.enterprise.api"/>
Change <module name="org.jboss.forge.shell-api"/>
to <module name="org.jboss.forge.shell.api"/>
forge
On 12/20/2011 12:44 PM, Lincoln Baxter wrote:
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(a)redhat.com>
To: "Lincoln Baxter"<lbaxter(a)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@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
_____