You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by ji...@codehaus.org on 2005/03/02 02:52:03 UTC

[jira] Created: (MAVEN-1574) java.lang.ClassCastException: sun.misc.Launcher$AppClassLoader

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://jira.codehaus.org/browse/MAVEN-1574

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: MAVEN-1574
    Summary: java.lang.ClassCastException: sun.misc.Launcher$AppClassLoader
       Type: Bug

     Status: Unassigned
   Priority: Major

 Original Estimate: Unknown
 Time Spent: Unknown
  Remaining: Unknown

    Project: maven

   Assignee: 
   Reporter: Willie Milnor

    Created: Tue, 1 Mar 2005 8:50 PM
    Updated: Tue, 1 Mar 2005 8:50 PM

Description:
I have written my own class that extends org.maven.cli.App.  When I try to run it I get the following error:

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:67)
        at MyApp.main(MyApp.java:544)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at com.werken.forehead.Forehead.run(Forehead.java:551)
        at com.werken.forehead.Forehead.main(Forehead.java:581)

I know (from a previous issue) that this is caused in PluginManager.processDependencies becuase the ClassLoader of the context is not a ForeheadClassLoader.  I tried to create a new ForeheadClassLoader passing it the ClassLoader of the MavenJellyContext (this is done when intializeing the MavenSession), and then set the MavenJellyContext classloader to the ForeheadClassLoader that I created.  However, this did not solve the problem.

How can I handle this?  Or is there a later version of Maven that fixes this?


---------------------------------------------------------------------
JIRA INFORMATION:
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