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