Sunday, 15 March 2015

java.policy settings outside main grant not working for Apache POI jars -



java.policy settings outside main grant not working for Apache POI jars -

i have set jars in jvm/lib/ext folder on domino server utilize in classes in database. works except security.

if place "permission java.security.allpermission;" (no quotes) in main grant of java.policy, works, if seek narrow downwards separate grant database classes , jars in ext folder, receive sorts of security exceptions. example, receive reflection exception because 1 of jars performing reflection.

here 2 separate grants have attempted utilize in file:

grant codebase "file:/c:/path_to_domino_server_program_directory/jvm/lib/ext/-" { permission java.security.allpermission; } grant codebase "xspnsf://server:0/path_to_database/database.nsf/-" { permission java.security.allpermission; };

any help appreciated.

you shouldn't touch permission /lib/ext since in default policy file:

// standard extensions permissions default grant codebase "file:${java.home}/lib/ext/*" { permission java.security.allpermission; };

so libraries have rights already. thimo pointed out: classloader can in way. might need go through source , check problem makers. prime candidates reflection use.

for apache poi quite journey needed. christian outlined the solution in blog (always worth read).

i pack libraries own extension library, can deployed using updatesite.nsf (invest in books).

java jar apache-poi xpages lotus-domino

No comments:

Post a Comment