I have a Java Applet that is using a library I made. The library, used inside another project on Eclipse works perfectly. On the applet, when I call the constructor of the "main" class, I get a PrivilegedActionException. The only thing the constructor does is creating an instance of an object that, ultimately, implements Java's Serializable, which is used to access the internet. You can see the class here: CommonsDataLoader.java. This class implements DataLoader.java that, as you can see, implements Serializable.
I can run a test function inside the applet that simply receives a string from JS and returns a new one. This works perfectly.
So... I don't seem to be doing anything wrong here, nor accessing anything out of the ordinary. So why the exception?
NOTES:
I'm using maven to build the jar. The manifest is created using the <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
tag of the maven-assembly-plugin. I considered that I had to provide the Permissions: all-permissions to the manifest, but if I do this, the test function doesn't even work.
EDIT:
Manifest's header:
Manifest-Version: 1.0
Implementation-Title: myApplet
Implementation-Version: 0.0.1-SNAPSHOT
Archiver-Version: Plexus Archiver
Built-By: pedrocunha
Implementation-Vendor-Id: myProject
Created-By: Apache Maven
Build-Jdk: 1.8.0_25
Line on the manifest concerning DataLoader:
Name: eu/europa/ec/markt/dss/validation102853/loader/DataLoader.class
SHA-256-Digest: Aua3IW0faYfh4Mf3Q08wMxZc/WU0S2DuF6fJoE+pRpM=
Line on the manifest concerning CommonsDataLoader:
Name: eu/europa/ec/markt/dss/validation102853/https/CommonsDataLoader.class
SHA-256-Digest: d4zCM6GVllA0Fy/pm4D6Z8OZf+jHR58VPCUIq786cr0=