Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exception that only shows up for first visitor

 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We just solved an issue here where a jar file was only readable by root on a unix server and our web application was trying to get to it as "other"

It was hard to solve because upon server restart, the first attempt to access it threw an error that contained:
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)

Caused by: java.security.PrivilegedActionException: java.util.zip.ZipException:
Permission denied
at java.security.AccessController.doPrivileged(Native Method)
... 44 more

subsequent attempts gave a different error that did not show the permission denied or anything else useful, just a noClassDefFound error.

It seems like on the first attempt the inaccessible file gets partially opened or something and the java environment keeps some memory of that. Then, subsequent visits don't see it as a permission error.

my reason for posting is to see if someone can explain this for me.

Environment is weblogic server, but it is using plain sun JVM
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Probably some kind of performance optimization the VM is doing...
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes. it optimized 8 hours away. I wonder how to avoid this in the future. It seems like a bug.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic