I get exactly the same problem in some code I am
writing.

There is some caching going on somewhere and when you
ask to open the jar again, you get back a cached and
shagged object.

If you alter the name of the URL slightly, you get
back a fresh working object.

Dirty hack - but ....

I'd be interested in hearing if anyone checks in a fix
- but I figure it's the JDK, not JBoss as fault here.

Jules

 --- "Jung , Dr. Christoph" <[EMAIL PROTECTED]>
wrote: > Hello,
> 
> I just tried to get jboss.net in-sync with the
> latest RH changes and now I
> am catching a strange 
> 
> java.lang.IllegalStateException: zip file closed 
> 
> when trying to access resources that have been
> placed in my jboss-net.sar! 
> 
> In my mbean, I´m doing a
>
getClass().getClassLoader().getResource(<relative_filename>)
> which returns
> as expected a non-null URL. But doing an 
> openStream() on that URL will provoque the above
> Exception ... which I guess
> is due to the fact that the JarFile-Cache (shudder)
> of JarURLConnection is
> returning 
> an already closed file. 
> 
> But who has closed that file? Why is it that
> classloading works, but
> resource loading does not? 
> 
> Has there been some change to deployer/system or
> other code that could hint
> to the reason of above bevaviour?
> 
> I remember Marc and Rickard discussing things
> related to "closing and
> reopening of urlconnections" one or two day ago, but
> could not find any
> related updated to the codebase.
> 
> Puzzled, 
> CGJ ("Dr. Schorsch")
> Currently spinnin´ all-time soul classic: Larry
> Heard, "Another night"
> 
> 
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
>
https://lists.sourceforge.net/lists/listinfo/jboss-development 

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page from News and Sport to Email and Music 
Charts
http://uk.my.yahoo.com

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to