You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Willie Milnor (JIRA)" <ji...@codehaus.org> on 2005/03/04 21:22:50 UTC
[jira] Created: (MAVEN-1576) expecects ForeheadClassLoader, finds sun.misc.Launcher$AppClassLoader
expecects ForeheadClassLoader, finds sun.misc.Launcher$AppClassLoader
---------------------------------------------------------------------
Key: MAVEN-1576
URL: http://jira.codehaus.org/browse/MAVEN-1576
Project: maven
Type: Bug
Components: core
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(PluginManager.java:437)
at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:642)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at MyApp.myDoMain(MyApp.java:80)
at MyApp.main(MyApp.java:575)
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 1.0.2...is 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:
http://jira.codehaus.org/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Updated: (MAVEN-1576) expecects ForeheadClassLoader, finds sun.misc.Launcher$AppClassLoader
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MAVEN-1576?page=all ]
Brett Porter updated MAVEN-1576:
--------------------------------
Fix Version: (was: 1.1-beta-1)
1.1-beta-2
> expecects ForeheadClassLoader, finds sun.misc.Launcher$AppClassLoader
> ---------------------------------------------------------------------
>
> Key: MAVEN-1576
> URL: http://jira.codehaus.org/browse/MAVEN-1576
> Project: maven
> Type: Bug
> Components: core
> Versions: 1.0.2
> Environment: Linux
> Reporter: Willie Milnor
> Fix For: 1.1-beta-2
>
>
> 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(PluginManager.java:437)
> at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:642)
> at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
> at MyApp.myDoMain(MyApp.java:80)
> at MyApp.main(MyApp.java:575)
> 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 1.0.2...is 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:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
[jira] Updated: (MAVEN-1576) expecects ForeheadClassLoader, finds sun.misc.Launcher$AppClassLoader
Posted by "Brett Porter (JIRA)" <ji...@codehaus.org>.
[ http://jira.codehaus.org/browse/MAVEN-1576?page=all ]
Brett Porter updated MAVEN-1576:
--------------------------------
Fix Version: 1.1-beta-1
try and decouple specific use of forehead internally, otherwise will be won't fix.
> expecects ForeheadClassLoader, finds sun.misc.Launcher$AppClassLoader
> ---------------------------------------------------------------------
>
> Key: MAVEN-1576
> URL: http://jira.codehaus.org/browse/MAVEN-1576
> Project: maven
> Type: Bug
> Components: core
> Versions: 1.0.2
> Environment: Linux
> Reporter: Willie Milnor
> Fix For: 1.1-beta-1
>
>
> 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(PluginManager.java:437)
> at org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:642)
> at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
> at MyApp.myDoMain(MyApp.java:80)
> at MyApp.main(MyApp.java:575)
> 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 1.0.2...is 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:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org