[
https://issues.jboss.org/browse/FORGE-980?page=com.atlassian.jira.plugin....
]
Lennart Jörelid commented on FORGE-980:
---------------------------------------
Fixed a project to simplify debugging, where the Plugin implementation itself does not use
the abstract superclass from another Maven JAR
(included in the module.xml of the active Plugin). Instead, I delegate to a class which,
in turn, extends the abstract superclass from
another Maven JAR.
It seems that the classloading is completely broken here; the ClassNotFoundException is
generated when trying to find a JBoss core class.
Both the class and the module is definitely present, contrary to what is claimed by the
JBoss ModuleClassLoader in the stacktrace above.
Reproduced the error on a Windows 7 box as well:
{code}
Caused by: java.lang.ClassNotFoundException: org.jboss.forge.maven.plugins.Configuration
from [Module "se.jguru.nazgul.f
orge.factory.impl.aggregate.nazgul-forge-factory-impl-aggregate.dependencies:1.0.0-SNAPSHOT-d4c152bc-963a-4600-a696-dee4
c9c34968" from local module loader @4d865b28 (roots:
C:\Applications\forge-distribution-1.2.3.Final\modules,C:\Users\len
jo\.forge\plugins,C:\Development\nazgul\nazgul_forge\factory\factory-impl-aggregate)]^M
at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)^M
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468)^M
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456)^M
at
org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:423)^M
at
org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398)^M
at
org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120)^M
... 11 more
{code}
The interesting thing is that the ModuleClassLoader seems to use a ResourceLoaderSpec
which rejects the modules packaged with
the Forge Plugin - but not the modules within the JBoss Forge distribution/modules folder.
Attaching two screenshots showing
debug information from the two active classloaders.
Failed retrieving forge modules (ClassNotFoundException:
org.jboss.forge.maven.plugins.Configuration)
-----------------------------------------------------------------------------------------------------
Key: FORGE-980
URL:
https://issues.jboss.org/browse/FORGE-980
Project: Forge
Issue Type: Bug
Reporter: Lennart Jörelid
https://community.jboss.org/message/825612
Following a successful build, including unit tests for the Forge plugin, the installation
(forge source-install . ) fails with a ClassNotFoundException:
org.jboss.forge.maven.plugins.Configuration within the ~/.forge/runtime.log.
This class is located in forge-maven-api, which should be available for all plugins being
installed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira