[Issue 1203] New - Maven2 classpath is leaking into hudson

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Issue 1203] New - Maven2 classpath is leaking into hudson

magnayn-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=1203
                 Issue #|1203
                 Summary|Maven2 classpath is leaking into hudson
               Component|hudson
                 Version|current
                Platform|All
              OS/Version|All
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P1
            Subcomponent|maven2
             Assigned to|issues@hudson
             Reported by|magnayn






------- Additional comments from [hidden email] Tue Jan 22 10:02:05 +0000 2008 -------
A previously working (1.154) m2 build is now failing.

The module builds successfully, but a post-build action is generating an exception :

[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO]
org.apache.tools.ant.types.FileSet.getDirectoryScanner()Lorg/apache/tools/ant/DirectoryScanner;
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NoSuchMethodError:
org.apache.tools.ant.types.FileSet.getDirectoryScanner()Lorg/apache/tools/ant/DirectoryScanner;
        at hudson.maven.reporters.SurefireArchiver.postExecute(SurefireArchiver.java:64)
        at
hudson.maven.MavenModuleSetBuild$Builder.postExecute(MavenModuleSetBuild.java:501)
        at hudson.maven.MavenBuilder$Adapter.postExecute(MavenBuilder.java:250)
        at
hudson.maven.agent.PluginManagerInterceptor$1MojoConfig.callPost(PluginManagerInterceptor.java:104)
        at
hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:136)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
        at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
        at
org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:42)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:280)
        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 org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at hudson.maven.agent.Main.launch(Main.java:97)
        at hudson.maven.MavenBuilder.call(MavenBuilder.java:129)
        at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:440)
        at hudson.maven.MavenModuleSetBuild$Builder.call(MavenModuleSetBuild.java:386)
        at hudson.remoting.UserRequest.perform(UserRequest.java:69)
        at hudson.remoting.UserRequest.perform(UserRequest.java:23)
        at hudson.remoting.Request$2.run(Request.java:200)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
        at java.util.concurrent.FutureTask.run(FutureTask.java:123)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)


 getDirectoryScanner() is an ant 1.7ism, which is the version shipped with
hudson; so a CNF exception looks like the version of ant that is being found
isn't the hudson one. This is probably some classworlds magic that when the
build ends needs to be unstacked.

Either way, any M2 module that hits ant in the build/plugin/test cycle will fail.

I'm not sure how to fix it - but I'm guessing that it's some kind of classloader
magic..

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 1203] Maven2 classpath is leaking into hudson

magnayn-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=1203






------- Additional comments from [hidden email] Tue Sep 30 15:30:18 +0000 2008 -------
This is still present in 1.254, using the winstone server.

I think I had a patch to allow the build to not fail even if the post-build
scanner failed (which seems a reasonable thing to do - the build is actually
successful, it's hudson that's failed...)


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Issue 1203] Maven2 classpath is leaking into hudson

Kohsuke Kawaguchi
Administrator
In reply to this post by magnayn-2
https://hudson.dev.java.net/issues/show_bug.cgi?id=1203



User kohsuke changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|NEW                       |RESOLVED
--------------------------------------------------------------------------------
                Priority|P1                        |P3
--------------------------------------------------------------------------------
              Resolution|                          |REMIND
--------------------------------------------------------------------------------




------- Additional comments from [hidden email] Thu Jul  9 18:06:23 +0000 2009 -------
Because a partof Hudson that's running in Maven has to see some Maven classes,
as a general problem this isn't really fixable. So we basically have to hide
classes from the parent classloader in case-by-case basis.

I cannot reproduce this problem any more. If anyone faces this problem, please
reopen this issue with a POM and Maven version to reproduce the problem.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]