Java Web Start: unsigned cglib
I am using hibernate on the server side with a client application launched via Java Web Start. I cannot sign banks (I would like to, but I cannot). I am getting a permission exception when I get a POJO with lazy fields.
Caused by: java.security.AccessControlException: Access denied (java.util.PropertyPermission cglib.debug) at java.security.AccessControlContext.checkPermission (Unknown source) at java.security.AccessController.checkPermission (Unknown source) in javaManager. .checkPermission (Unknown Source) at java.lang.SecurityManager.checkPropertyAccess (Unknown Source) at java.lang.System.getProperty (Unknown Source) at net.sf.cglib.core.DebuggingClassWriter. (DebuggingClassWriter.java:35) ... 44 more
How can I avoid this? I was thinking about setting the collection to null before returning the pojo to the client, but I would like to find a better solution.
source to share
Since you cannot use Hibernate's unresolved lazy fields on the client side anyway (accessing them will cause the client to try to load the fields from the db), I would choose two options:
-
If you need client-side data, you must ensure that lazy fields are resolved by the server before returning the POJO to the client.
-
If you don't need the fields, I would set them to zero.
source to share