maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arnaud Heritier (JIRA)" <>
Subject [jira] Closed: (MAVEN-1576) expecects ForeheadClassLoader, finds sun.misc.Launcher$AppClassLoader
Date Thu, 03 Aug 2006 12:34:01 GMT
     [ ]

Arnaud Heritier closed MAVEN-1576.

    Resolution: Won't Fix

Not enough important to fix it.

> expecects ForeheadClassLoader, finds sun.misc.Launcher$AppClassLoader
> ---------------------------------------------------------------------
>                 Key: MAVEN-1576
>                 URL:
>             Project: Maven
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.0.2
>         Environment: Linux
>            Reporter: Willie Milnor
> I am trying to get around using com.werken.forehead.Forehead to run Maven, and instead
use my own class that extends org.apache.maven.cli.App.  However, I get the following error
no matter what I try:
> java.lang.ClassCastException: sun.misc.Launcher$AppClassLoader
>         at org.apache.maven.plugin.PluginManager.processDependencies(
>         at org.apache.maven.plugin.PluginManager.attainGoals(
>         at org.apache.maven.MavenSession.attainGoals(
>         at MyApp.myDoMain(
>         at MyApp.main(
> I know that this is caused by the following line:
> ForeheadClassLoader projectClassLoader = (ForeheadClassLoader)project.getContext().getClassLoader();
> I assume that when com.werken.forehead.Forehead is called, it somehow sets the class
loader (for the context) to an instance of ForeheadClassLoader; but by calling my class directly,
the context uses an instance of sun.misc.Launcher$AppClassLoader.
> I am able to run my own class calling com.werken.forehead.Forehead first (I edited the
forehead.conf file), and it works as it should.  I tried setting the class loader for the
context using a ForeheadClassLoader, but that loader is changed somewhere along the way to
processing the dependencies.
> Is there a way around this problem?  I am using maven there a newer beta version
of maven that expects simply a ClassLoader rather than a ForeheadClassLoader?

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message