Good afternoon,
In our setup, we use an FPL function FileEncodeBase64 which resides in our customfunctions folder.
%ufs%webapp\WEB-INF\classes\com\ebasetech\ufs\customfunctions
But since 5.6 we can seem to get it to function. Whenever we upload a document in our application, user gets an error about sun/misc/BASE64Encoder
And the log shows :java.lang.NoClassDefFoundError: sun/misc/BASE64Encoder
I've tried to find an appriopriate jarfile and place it in all lib folders I could find, but it seems that our jdk (12 that came with ebase 5.6) doesn't want anything to do with it.
Googling it learned me that this library is deprecated and should not be used, e.g.
https://stackoverflow.com/questions/554 ... in-eclipse
Is there an alternative to encode our files?
alternative for FileEncodeBase64
Moderators: Jon, Steve, Ian, Dave
-
- Moderator
- Posts: 1342
- Joined: Wed Sep 12, 2007 12:49 pm
Re: alternative for FileEncodeBase64
Could you change the script to use Javascript instead of FPL? Then you can use:
Unfortunately you can't invoke Javascript directly from FPL so you would need to convert the entire script to Javascript, or possibly split the script.
The alternative is to change the source of the custom function to use a currently supported class, but this sounds harder to me.
Code: Select all
var fileString = services.file.base64EncodeFile("filename");
The alternative is to change the source of the custom function to use a currently supported class, but this sounds harder to me.
0 x
-
- Ebase User
- Posts: 32
- Joined: Wed Jun 19, 2019 9:46 am
Re: alternative for FileEncodeBase64
Hi Jon,
Thanks for your reply!
The second option is actually what I've done. I created a new class based on the current, using java.util.Base64 instead of sun.misc.Base64
But your option seems more reliable in the long run. I'll discuss this with our developers.
Thanks for your reply!
The second option is actually what I've done. I created a new class based on the current, using java.util.Base64 instead of sun.misc.Base64
But your option seems more reliable in the long run. I'll discuss this with our developers.
0 x
Who is online
Users browsing this forum: Google [Bot] and 6 guests