Hi All,
Stuart Lewis [sdl] wrote:
> The other alternative is that you might be using Sun's latest JDK version,
> 1.6 which James Rutherford recently discovered does not include the Base64
> encoding classes.
>
> What we need to do in the project is to replace this dependency with
> something else, probably org.apache.commons.codec.binary.Base64 (it should
> be a relatively minor patch).
I thought I'd follow up on this, and say that the class isn't actually
missing, but unless you switch to the commons library, you'll get
compiler warnings (something about depending on a proprietary
implementation that is specific to Sun's jdk). The code changes required
to eliminate this warning (and presumably to eliminate the error caused
by using a non-sun jdk) are pretty minor (this is untested, however, and
may cause inconsistent output from the crosswalk -- someone who actually
uses it should check):
in org.dspace.app.oai.DIDLCrosswalk (near line 238) change
BASE64Encoder encoder=(BASE64Encoder)
Class.forName("sun.misc.BASE64Encoder").newInstance();
String encoding = encoder.encodeBuffer(buffer);
to
Base64 encoder = new Base64()
String encoding = new String(encoder.encodeBase64(buffer));
and don't forget to import org.apache.commons.codec.binary.Base64 and
put the actual library in the [dspace]/lib directory.
Jim.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier.
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech