Hello,
I am part of the Switchyard community. We had a set of plugins working for
Forge1.0.0.Alpha4 and we now need to move forward to Forge1.0.0.Beta3.
In Alpha4 we were installing the plugins just copying the jars in the libs
dir. Now, to test the plugins, we need to instruct forge to install them
itself. When I execute the command "forge source-plugin <puglin_src_dir>"
everything works OK: the plugin gets compiled and installed in my .forge dir
inside my home dir.
However, after the installation, when I run forge, it does not start and
throws the following error:
log4j:ERROR A "org.apache.log4j.xml.DOMConfigurator" object is not
assignable to a "org.apache.log4j.spi.Configurator" variable.
log4j:ERROR The class "org.apache.log4j.spi.Configurator" was loaded by
log4j:ERROR [ModuleClassLoader for Module "org.jboss.forge:main" from local
module loader @335856a5 (roots: D:\tools\forge-1.0.0.Beta3\modules,C:\User
s\mario\.forge\plugins)] whereas object of type
log4j:ERROR "org.apache.log4j.xml.DOMConfigurator" was loaded by
[ModuleClassLoader for Module
"org.switchyard.switchyard-forge-plugin.dependencies:0.
3.0-SNAPSHOT-bee75bd4-471b-49c3-9cd2-d1ca8b531098" from local module loader
@335856a5 (roots: D:\tools\forge-1.0.0.Beta3\modules,C:\Users\mario\.forge
\plugins)].
log4j:ERROR Could not instantiate configurator
[org.apache.log4j.xml.DOMConfigurator].
log4j:WARN No appenders could be found for logger (org.jboss.weld.Version).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See
http://logging.apache.org/log4j/1.2/faq.html#noconfig for
more info.
Exception in thread "Thread-2" java.lang.LinkageError: Failed to link
org/switchyard/tools/forge/AbstractFacet (Module
"org.switchyard.switchyard-forg
e-plugin.dependencies:0.3.0-SNAPSHOT-bee75bd4-471b-49c3-9cd2-d1ca8b531098"
from local module loader @335856a5 (roots: D:\tools\forge-1.0.0.Beta3\modul
es,C:\Users\mario\.forge\plugins))
at
org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:401)
at
org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:26
1)
at
org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:
76)
at org.jboss.modules.Module.loadModuleClass(Module.java:590)
at
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentCl
assLoader.java:361)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentCl
assLoader.java:333)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoad
er.java:310)
at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java
:103)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at
org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397)
at
org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:26
1)
at
org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:
76)
at org.jboss.modules.Module.loadModuleClass(Module.java:590)
at
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:183)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentCl
assLoader.java:361)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoad
er.java:310)
at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java
:115)
at
org.jboss.forge.shell.CompositeClassLoader.findClass(CompositeClassLoader.ja
va:72)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentCl
assLoader.java:361)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoad
er.java:310)
at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java
:103)
at
org.jboss.weld.environment.se.discovery.url.WeldSEResourceLoader.classForNam
e(WeldSEResourceLoader.java:44)
at
org.jboss.weld.bootstrap.BeanDeployer.addClass(BeanDeployer.java:82)
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:82)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.NoClassDefFoundError:
org/jboss/forge/project/facets/BaseFacet
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at
org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:397)
... 32 more
Caused by: java.lang.ClassNotFoundException:
org.jboss.forge.project.facets.BaseFacet from [Module
"org.switchyard.switchyard-forge-plugin.dependencie
s:0.3.0-SNAPSHOT-bee75bd4-471b-49c3-9cd2-d1ca8b531098" from local module
loader @335856a5 (roots:
D:\tools\forge-1.0.0.Beta3\modules,C:\Users\mario\.f
orge\plugins)]
at
org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentCl
assLoader.java:361)
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentCl
assLoader.java:333)
My plugin depends on forge-shell.jar:
<dependency>
<groupId>org.jboss.forge</groupId>
<artifactId>forge-shell</artifactId>
<version>1.0.0.Beta3</version>
<scope>provided</scope>
</dependency>
So, I see the problem is that org/jboss/forge/project/facets/BaseFacet is
not being found during Forge startup. But why is that? I can see
forge-shell-api.jar (the jar containing the required class) is in the
<forge-1.0.0.Beta3>\modules\org\jboss\forge\shell-api\main dir
I would appreciate any good tip!
Thanks in advance
Mario