users@glassfish.java.net

Re: Using apache codec library

From: Jacques <whshub_at_gmail.com>
Date: Thu, 8 Jul 2010 22:14:06 -0700

Funny, I had this same question yesterday. I also didn't understand the
activation thread. I deleted the repackaged library and replaced it with
the 1.4 module. The next gf boot threw an error about a missing package. I
haven't seen any more complaints/problems since. Of course, it has only
been 24 hours...

I saw a page about enabling felix management through an additional module
but wasn't sure if that is what that thread was referring too, or if it was
something else. I found instructions to install osgi modules. I just
couldn't find any instructions to remove or replace modules.

So, I'm just saying I'd also like an answer to this. What is the right way
to do this?

Jacques

On Thu, Jul 8, 2010 at 7:29 PM, <glassfish_at_javadesktop.org> wrote:

> I would like to use the org.apache.commons.codec.base64 within a session
> bean in my glassfish project. When I run the program, I get an error of the
> form:
>
> java.lang.NoSuchMethodError:
> org.apache.commons.codec.binary.Hex.encodeHexString([B)Ljava/lang/String;
>
> because for some reason glassfish is using the Base64 class from the
> repackaged commons codec library in the modules directory
>
> A similar post at
> http://forums.java.net/jive/message.jspa?messageID=388706 had the same
> problem.
>
> Does anyone know how to avoid this problem. I have tried using a fully
> qualified org.apache.commons.codec.base64 in my object declaration but the
> error still happens. The only way I can get it to go away is to delete the
> repackaged library in the modules directory. I don't know how to do the
> solution in the other forum. He says he "added a bundle and activated it".
> To a glassfish newbie, can someone explain that, or another solution a
> little more clearly?
> [Message sent by forum member 'rexcardan']
>
> http://forums.java.net/jive/thread.jspa?messageID=477163
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>