You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jimbog <ja...@lvs.co.uk> on 2007/11/15 16:51:40 UTC

Maven 2 tomcat plugin fatal error java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64

Hi,
I am trying to use the tomcat plugin to do a mvn tomcat:deploy, and get the
below stack trace..

I notice this was rased a bug against version 1.0-20061203.210544-5. 

http://jira.codehaus.org/browse/MOJO-812

But has been marked as fixed in  1.0-alpha-1, I am using  1.0-alpha-1, and
still get it.

Does anyone have a work around for this? 

[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] org/apache/commons/codec/binary/Base64
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64
        at
org.codehaus.mojo.tomcat.TomcatManager.toAuthorization(TomcatManager.
java:699)
        at
org.codehaus.mojo.tomcat.TomcatManager.invoke(TomcatManager.java:610)

        at
org.codehaus.mojo.tomcat.TomcatManager.deployImpl(TomcatManager.java:
680)
        at
org.codehaus.mojo.tomcat.TomcatManager.deploy(TomcatManager.java:302)

        at org.codehaus.mojo.tomcat.DeployMojo.deployWar(DeployMojo.java:84)
        at
org.codehaus.mojo.tomcat.AbstractDeployMojo.invokeManager(AbstractDep
loyMojo.java:83)
        at
org.codehaus.mojo.tomcat.AbstractCatalinaMojo.execute(AbstractCatalin
aMojo.java:132)
        at
org.codehaus.mojo.tomcat.AbstractWarCatalinaMojo.execute(AbstractWarC
atalinaMojo.java:59)

-- 
View this message in context: http://www.nabble.com/Maven-2-tomcat-plugin-fatal-error-java.lang.NoClassDefFoundError%3A-org-apache-commons-codec-binary-Base64-tf4814577s177.html#a13773524
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven 2 tomcat plugin fatal error java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64

Posted by Wayne Fay <wa...@gmail.com>.
That is very odd, considering the plugin declares a dependency on
commons-codec v1.3.

Can you show us the rest of your pom? Are you using commons-codec
yourself, perhaps a different version?

Wayne

On 11/15/07, Jimbog <ja...@lvs.co.uk> wrote:
>
> Hi,
> I am trying to use the tomcat plugin to do a mvn tomcat:deploy, and get the
> below stack trace..
>
> I notice this was rased a bug against version 1.0-20061203.210544-5.
>
> http://jira.codehaus.org/browse/MOJO-812
>
> But has been marked as fixed in  1.0-alpha-1, I am using  1.0-alpha-1, and
> still get it.
>
> Does anyone have a work around for this?
>
> [ERROR] FATAL ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] org/apache/commons/codec/binary/Base64
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Trace
> java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64
>        at
> org.codehaus.mojo.tomcat.TomcatManager.toAuthorization(TomcatManager.
> java:699)
>        at
> org.codehaus.mojo.tomcat.TomcatManager.invoke(TomcatManager.java:610)
>
>        at
> org.codehaus.mojo.tomcat.TomcatManager.deployImpl(TomcatManager.java:
> 680)
>        at
> org.codehaus.mojo.tomcat.TomcatManager.deploy(TomcatManager.java:302)
>
>        at org.codehaus.mojo.tomcat.DeployMojo.deployWar(DeployMojo.java:84)
>        at
> org.codehaus.mojo.tomcat.AbstractDeployMojo.invokeManager(AbstractDep
> loyMojo.java:83)
>        at
> org.codehaus.mojo.tomcat.AbstractCatalinaMojo.execute(AbstractCatalin
> aMojo.java:132)
>        at
> org.codehaus.mojo.tomcat.AbstractWarCatalinaMojo.execute(AbstractWarC
> atalinaMojo.java:59)
>
> --
> View this message in context: http://www.nabble.com/Maven-2-tomcat-plugin-fatal-error-java.lang.NoClassDefFoundError%3A-org-apache-commons-codec-binary-Base64-tf4814577s177.html#a13773524
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Maven 2 tomcat plugin fatal error java.lang.NoClassDefFoundError: org/apache/commons/codec/binary/Base64

Posted by Jimbog <ja...@lvs.co.uk>.
I extracted pom.xml from the jar file and renamed it to
tomcat-maven-plugin-1.0-alpha-1.pom
and put this file in
.m2\repository\org\codehaus\mojo\tomcat-maven-plugin\1.0-alpha-1. That fixed
that problem.

I now get [INFO]
------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Java heap space
[INFO]
------------------------------------------------------------------------
[INFO] Trace
java.lang.OutOfMemoryError: Java heap space
        at
java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:95)
        at
sun.net.www.http.PosterOutputStream.write(PosterOutputStream.java:61)

        at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65
)

Ive given more memory to tomcat and maven. It deploys the tomcat samle.war
fine, but the webapp im trying to deploy is 20MB because maven adds add the
dependency jars despite them having provided scope.

Can Maven run the Tomcat manager tasks? Hot deploying wars using ant takes a
few mins to set up.


-- 
View this message in context: http://www.nabble.com/Maven-2-tomcat-plugin-fatal-error-java.lang.NoClassDefFoundError%3A-org-apache-commons-codec-binary-Base64-tf4814577s177.html#a13778444
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org