Thanks for the info. I find it odd that the very same web app could be
redeployed many times without issue until I added it into an EAR.
When will Sun App Server 9.1 be released? I will be doing a deployment
within the next month and was hoping to use it instead of 9.0.
In the mean time make some time to run the diagnostic utility and
provide you with the output.
Thanks,
Ryan
Tim Quinn wrote:
> Hello, Ryan.
>
> JAR file locking on Windows has been a recurring problem. The
> messages you see reflect that the app server using a technique to
> unlock JARs that sometimes - but does not always, as in your case -
> work.
>
> Sometimes we've seen that the underlying problem is in third-party or
> application code that opens but does not close streams to JARs.
> Sometimes JARs are locked because the third-party code uses its own
> java.net.URLClassLoader to load classes or resources; a side-effect in
> URLClassLoader will lock JARs.
>
> There are some very nice changes in GlassFish V2 (which will
> correspond to the app server product 9.1) that help avoid issues such
> as this.
>
> If using GlassFish V2 is not an option for you, you might consider
> using the unsupported but usually quite useful tool described in this
> blog entry
> <http://blogs.sun.com/quinn/entry/tool_for_diagnosing_failed_glassfish>to
> identify the code that is locking the JARs. Be sure to follow the
> directions in the blog entry carefully, because doing the steps out of
> order yields results that are not useful.
>
> After using the tool, if you want to you can post the results here and
> we'll see if we can see what's going on.
>
> - Tim
>
> Ryan de Laplante wrote:
>> Hi,
>>
>> I recently moved code out of a web app into a new EJB session bean.
>> In NetBeans both projects were added to a new EAR project. I can
>> deploy the ear and run the application without any issues. When I
>> redeploy my application during development I get tons of these
>> messages from the app server:
>>
>> pt to delete C:\Program
>> Files\Sun\AppServer\domains\domain1\applications\j2ee-apps\MyProject\MyProjectWeb_war\WEB-INF\lib\dataprovider.jar
>> failed after 4 retries
>> UTIL6048: Attempt to delete C:\Program
>> Files\Sun\AppServer\domains\domain1\applications\j2ee-apps\MyProject\MyProjectWeb_war\WEB-INF\lib\dataprovider.jar
>> failed; now marked for delete-on-exit
>> UTIL6040: Error attempting to delete C:\Program
>> Files\Sun\AppServer\domains\domain1\applications\j2ee-apps\MyProject\MyProjectWeb_war\WEB-INF\lib\errorhandler.jar
>>
>> UTIL6041: Performing gc to try to force file closures
>> UTIL6043: Attempt to delete C:\Program
>> Files\Sun\AppServer\domains\domain1\applications\j2ee-apps\MyProject\MyProjectWeb_war\WEB-INF\lib\errorhandler.jar
>> failed after 4 retries
>> UTIL6048: Attempt to delete C:\Program
>> Files\Sun\AppServer\domains\domain1\applications\j2ee-apps\MyProject\MyProjectWeb_war\WEB-INF\lib\errorhandler.jar
>> failed; now marked for delete-on-exit
>> UTIL6040: Error attempting to delete C:\Program
>> Files\Sun\AppServer\domains\domain1\applications\j2ee-apps\MyProject\MyProjectWeb_war\WEB-INF\lib\jsfcl.jar
>>
>> UTIL6041: Performing gc to try to force file closures
>>
>>
>> I have to wait many seconds before it gives up on a file and moves to
>> the next. I've looked in the folders it talks about and the entire
>> project has been removed except for a handful of jars. I have to
>> restart the application server, then deploy the EAR again.
>>
>> This problem doesn't happen if I don't run my app before redeploying.
>> I'm developing using NetBeans 5.5, Sun App Server 9.0 Update 1,
>> Windows XP, JDK 1.6. The web app is a Visual Web Pack project, and
>> the EJB module is EJB 3.0
>>
>>
>> Thanks,
>> Ryan
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>>