commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julius Davies <juliusdav...@gmail.com>
Subject Re: [codec] NoSuchMethodError
Date Tue, 15 Jun 2010 16:08:18 GMT
On Tue, Jun 15, 2010 at 3:59 AM, Ralph Goers <ralph.goers@dslextreme.com> wrote:
> We have an application trying to use a method from commons codec 1.4 and are getting
a NoSuchMethodError. We are using JBoss and have located 5 copies in the classpath that appear
to be pre-1.4. In searching for other hits on the problem I noticed a commit in drools where
they inlined the code from codec into their project, presumably to avoid this problem.  Is
there any way around this?


Ugh.  Which version of JBoss?  And what are you deploying in JBoss?
An EAR or a WAR or something else?

There is one technique that always works, but it's a pain.  You can
move your version of codec into a different namespace by editing all
the source files.  For example, instead of:

package org.apache.commons.codec.binary;

Rename them to:

package xyz.org.apache.commons.codec.binary;


But this approach makes it hard to upgrade the codec.jar in the future
since you have to rename everything again!



-- 
yours,

Julius Davies
250-592-2284 (Home)
250-893-4579 (Mobile)

$ sudo apt-get install cowsay
$ echo "Moo." | cowsay | cowsay -n | cowsay -n
http://juliusdavies.ca/cowsay/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message