Netbeans 5.5.1 and maven-war-plugin 2.1-alpha-2: java.lang.NoClassDefFoundError: org/codehaus/plexus/util/FileUtils$FilterWrapper

View: New views
4 Messages — Rating Filter:   Alert me  

Netbeans 5.5.1 and maven-war-plugin 2.1-alpha-2: java.lang.NoClassDefFoundError: org/codehaus/plexus/util/FileUtils$FilterWrapper

by Andreas Loew :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Milos, hi all,

after the automated upgrade from maven-war-plugin 2.1-alpha-1 to
2.1-alpha-2, building war artefacts from within Netbeans 5.5.1 Maven
integration consistently fails with the exception as cited below.

Using the same 2.1-alpha-2 plugin from Netbeans 6.1 works fine.

Also, reverting to 2.1-alpha-1 still works fine in both 5.5.1 and 6.1.

Is this an issue in the maven-war-plugin or in the Netbeans 5.5.1 Maven
integration?

Many thanks for your help & best regards,

Andreas



[ERROR]FATAL ERROR
[INFO]------------------------------------------------------------------------
[INFO]org/codehaus/plexus/util/FileUtils$FilterWrapper
[INFO]org.codehaus.plexus.util.FileUtils$FilterWrapper
[INFO]------------------------------------------------------------------------
[INFO]Trace
java.lang.NoClassDefFoundError:
org/codehaus/plexus/util/FileUtils$FilterWrapper
         at java.lang.ClassLoader.defineClass1(Native Method)
         at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
         at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
         at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
         at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
         at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at
org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
         at
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
         at
org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         at
org.apache.maven.shared.filtering.DefaultMavenFileFilter.getDefaultFilterWrappers(DefaultMavenFileFilter.java:131)
         at
org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:420)
         at
org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:375)
         at
org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:181)
         at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:143)
         at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:417)
         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:610)
         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:551)
         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:530)
         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:309)
         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:276)
         at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
         at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:393)
         at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:182)
         at
org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:760)
         at
org.codehaus.mevenide.netbeans.execute.MavenJavaExecutor.run(MavenJavaExecutor.java:257)
         at
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:131)
Caused by: java.lang.ClassNotFoundException:
org.codehaus.plexus.util.FileUtils$FilterWrapper
         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
         at
org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
         at
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:266)
         at
org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
         at
org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
         ... 31 more

--
Andreas Loew
Java Architect
Sun Microsystems (Germany)

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Netbeans 5.5.1 and maven-war-plugin 2.1-alpha-2: java.lang.NoClassDefFoundError: org/codehaus/plexus/util/FileUtils$FilterWrapper

by Bugzilla from mkleint@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well, I would say it's caused by the fact that 5.5 support is using
quite old maven embedder.
The way maven plugins work is that it actually defines a dependency on
maven or plexus artifacts, but if such an artifact (in any version) is
part of the maven binaries, the one from maven core is used. That's
also the case for plexus-utils artifact, so basically the war plugin
defines it needs plexus-util 1.5.5 (for example) but the version it
gets is actually 1.1.1) (again for example). I think the plexus-util
dependency is handled specially since maven 2.0.6 (or 8), but the
embedded version in 5.5 is actually 2.0.4. If the  war plugin
correctly defined the <prerequisite><maven> element in the pom, the
build would fail with a more descriptive message.

This sort of problems was the primary reason why I migrated the
embedded used to the latest bits, (which have other problems, but
well...)
A workaround for you is to setup the command line maven to be used
with the project (or globally). Please note that for 6.5 and beyound,
I've converted to having the command line maven as default build tool
used. That shall reduce the likelihood of people crashing against the
embedded maven and getting weird errors.

Milos



On Mon, Aug 18, 2008 at 9:39 PM, Andreas Loew <Andreas.Loew@...> wrote:

> Hi Milos, hi all,
>
> after the automated upgrade from maven-war-plugin 2.1-alpha-1 to
> 2.1-alpha-2, building war artefacts from within Netbeans 5.5.1 Maven
> integration consistently fails with the exception as cited below.
>
> Using the same 2.1-alpha-2 plugin from Netbeans 6.1 works fine.
>
> Also, reverting to 2.1-alpha-1 still works fine in both 5.5.1 and 6.1.
>
> Is this an issue in the maven-war-plugin or in the Netbeans 5.5.1 Maven
> integration?
>
> Many thanks for your help & best regards,
>
> Andreas
>
>
>
> [ERROR]FATAL ERROR
> [INFO]------------------------------------------------------------------------
> [INFO]org/codehaus/plexus/util/FileUtils$FilterWrapper
> [INFO]org.codehaus.plexus.util.FileUtils$FilterWrapper
> [INFO]------------------------------------------------------------------------
> [INFO]Trace
> java.lang.NoClassDefFoundError:
> org/codehaus/plexus/util/FileUtils$FilterWrapper
>        at java.lang.ClassLoader.defineClass1(Native Method)
>        at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
>        at
> java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
>        at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
>        at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>        at
> org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
>        at
> org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
>        at
> org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>        at
> org.apache.maven.shared.filtering.DefaultMavenFileFilter.getDefaultFilterWrappers(DefaultMavenFileFilter.java:131)
>        at
> org.apache.maven.plugin.war.AbstractWarMojo.buildWebapp(AbstractWarMojo.java:420)
>        at
> org.apache.maven.plugin.war.AbstractWarMojo.buildExplodedWebapp(AbstractWarMojo.java:375)
>        at
> org.apache.maven.plugin.war.WarMojo.performPackaging(WarMojo.java:181)
>        at org.apache.maven.plugin.war.WarMojo.execute(WarMojo.java:143)
>        at
> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:417)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:610)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:551)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:530)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:309)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:276)
>        at
> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
>        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:393)
>        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:182)
>        at
> org.apache.maven.embedder.MavenEmbedder.execute(MavenEmbedder.java:760)
>        at
> org.codehaus.mevenide.netbeans.execute.MavenJavaExecutor.run(MavenJavaExecutor.java:257)
>        at
> org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:131)
> Caused by: java.lang.ClassNotFoundException:
> org.codehaus.plexus.util.FileUtils$FilterWrapper
>        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
>        at
> org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
>        at
> org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:266)
>        at
> org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
>        at
> org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
>        at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
>        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
>        ... 31 more
>
> --
> Andreas Loew
> Java Architect
> Sun Microsystems (Germany)
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Netbeans 5.5.1 and maven-war-plugin 2.1-alpha-2: java.lang.NoClassDefFoundError: org/codehaus/plexus/util/FileUtils$FilterWrapper

by Andreas Loew :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Milos,

Milos Kleint schrieb:

> A workaround for you is to setup the command line maven to be used
> with the project (or globally). Please note that for 6.5 and beyound,
> I've converted to having the command line maven as default build tool
> used. That shall reduce the likelihood of people crashing against the
> embedded maven and getting weird errors.

Unfortunately, I think this *cannot* be done using NB 5.5.1: This
version of Mevenide always uses the bundled Maven and the embedder.

Is it possible to patch the Mevenide plugin of NB 5.5.1 to use a more
recent version of the embedder?

Or will we simply have to stick with the maven-war-plugin 2.1-alpha-1?

Thanks again & best regards,

Andreas

--
Andreas Loew
Java Architect
Sun Microsystems (Germany)


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Netbeans 5.5.1 and maven-war-plugin 2.1-alpha-2: java.lang.NoClassDefFoundError: org/codehaus/plexus/util/FileUtils$FilterWrapper

by Bugzilla from mkleint@gmail.com :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, Aug 19, 2008 at 10:22 AM, Andreas Loew <Andreas.Loew@...> wrote:

> Hi Milos,
>
> Milos Kleint schrieb:
>
>> A workaround for you is to setup the command line maven to be used
>> with the project (or globally). Please note that for 6.5 and beyound,
>> I've converted to having the command line maven as default build tool
>> used. That shall reduce the likelihood of people crashing against the
>> embedded maven and getting weird errors.
>
> Unfortunately, I think this *cannot* be done using NB 5.5.1: This version of
> Mevenide always uses the bundled Maven and the embedder.

always for run action or altogether? Sorry, I don't remember, it's
pretty old from my perspective.

>
> Is it possible to patch the Mevenide plugin of NB 5.5.1 to use a more recent
> version of the embedder?

hardly ever to happen, it's not only about replacing the bnary but
code in maven support had to change as well.

>
> Or will we simply have to stick with the maven-war-plugin 2.1-alpha-1?

unless you migrate to a recent version of netbeans, I would say yes.

regards

Milos

>
> Thanks again & best regards,
>
> Andreas
>
> --
> Andreas Loew
> Java Architect
> Sun Microsystems (Germany)
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email