Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » [V2] Jar locked during webapplication redeploy
[V2] Jar locked during webapplication redeploy [message #389755] Tue, 30 June 2009 17:52 Go to next message
Xavier Vanderstukken is currently offline Xavier VanderstukkenFriend
Messages: 1
Registered: July 2009
Junior Member
Hello,

I am using the following framework for my application:
- Spring-Flex 1.0.0RELEASE & Spring-Core 3.0.0M3
- JPA2.0 with EclipseLink

All these stuffs are running under a Windows7 machine
with Glassfish V3 nightlybuild25062009 (Other version also caused the same
behavior).
I am using Eclipse 3.4 with Glassfish plugin to deploy/redeploy my
application.

During application redeploiement the jar file containing my entities is
kept locked by one process.


Using the following link
( http://blogs.sun.com/quinn/entry/tool_for_diagnosing_failed_ glassfish)I
was able to track down the locking location:

java.util.jar.JarFile.<init>(java\util\jar\JarFile.java:135)
java.util.jar.JarFile.<init>(java\util\jar\JarFile.java:70)

sun.misc.URLClassPath$JarLoader.getJarFile(sun\misc\URLClass Path.java:643)

sun.misc.URLClassPath$JarLoader.access$600(sun\misc\URLClass Path.java:538)
sun.misc.URLClassPath$JarLoader$1.run(sun\misc\URLClassPath. java:605)

java.security.AccessController.doPrivileged(java\security\Ac cessController.j
ava:-1)

sun.misc.URLClassPath$JarLoader.ensureOpen(sun\misc\URLClass Path.java:597)
sun.misc.URLClassPath$JarLoader.<init>(sun\misc\URLClassPath.java:581)
sun.misc.URLClassPath$3.run(sun\misc\URLClassPath.java:331)

java.security.AccessController.doPrivileged(java\security\Ac cessController.j
ava:-1)
sun.misc.URLClassPath.getLoader(sun\misc\URLClassPath.java:3 20)
sun.misc.URLClassPath.getLoader(sun\misc\URLClassPath.java:2 97)
sun.misc.URLClassPath.findResource(sun\misc\URLClassPath.jav a:144)
java.net.URLClassLoader$2.run(java\net\URLClassLoader.java:3 62)

java.security.AccessController.doPrivileged(java\security\Ac cessController.j
ava:-1)
java.net.URLClassLoader.findResource(java\net\URLClassLoader .java:359)
java.lang.ClassLoader.getResource(java\lang\ClassLoader.java :978)

java.lang.ClassLoader.getResourceAsStream(java\lang\ClassLoa der.java:1168)

org.eclipse.persistence.internal.jpa.metadata.accessors.obje cts.MetadataFact
ory.buildClassMetadata(org\eclipse\persistence\internal\jpa\ metadata\accessors\objects\MetadataFactory.java:351)

org.eclipse.persistence.internal.jpa.metadata.accessors.obje cts.MetadataFact
ory.getClassMetadata(org\eclipse\persistence\internal\jpa\me tadata\accessors\objects\MetadataFactory.java:338)

org.eclipse.persistence.internal.jpa.metadata.MetadataProces sor.initPersiste
nceUnitClasses(org\eclipse\persistence\internal\jpa\metadata \MetadataProcessor.java:259)

org.eclipse.persistence.internal.jpa.metadata.MetadataProces sor.processEntit
yMappings(org\eclipse\persistence\internal\jpa\metadata\Meta dataProcessor.java:437)

org.eclipse.persistence.internal.jpa.deployment.PersistenceU nitProcessor.pro
cessORMetadata(org\eclipse\persistence\internal\jpa\deployme nt\PersistenceUnitProcessor.java:293)

org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl. predeploy(org\ec
lipse\persistence\internal\jpa\EntityManagerSetupImpl.java:8 39)

org.eclipse.persistence.jpa.PersistenceProvider.createContai nerEntityManager
Factory(org\eclipse\persistence\jpa\PersistenceProvider.java :216)

org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(o rg\glassfish\per
sistence\jpa\PersistenceUnitLoader.java:156)

org.glassfish.persistence.jpa.PersistenceUnitLoader.<init> (org\glassfish\persistence\jpa\PersistenceUnitLoader.java:84 )

org.glassfish.persistence.jpa.JPADeployer.prepare(org\glassf ish\persistence\jpa\JPADeployer.java:118)

com.sun.enterprise.v3.server.ApplicationLifecycle.prepareMod ule(com\sun\ente
rprise\v3\server\ApplicationLifecycle.java:588)

com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(com \sun\enterprise\
v3\server\ApplicationLifecycle.java:250)

com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(com \sun\enterprise\
v3\server\ApplicationLifecycle.java:173)

org.glassfish.deployment.admin.DeployCommand.execute(org\gla ssfish\deploymen
t\admin\DeployCommand.java:250)

com.sun.enterprise.v3.admin.CommandRunnerImpl$4.execute(com\ sun\enterprise\v
3\admin\CommandRunnerImpl.java:419)

com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(com\ sun\enterprise\v
3\admin\CommandRunnerImpl.java:434)

com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(com\ sun\enterprise\v
3\admin\CommandRunnerImpl.java:521)

com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(com\ sun\enterprise\v
3\admin\CommandRunnerImpl.java:137)

com.sun.enterprise.v3.admin.AdminAdapter.doCommand(com\sun\e nterprise\v3\adm
in\AdminAdapter.java:313)

com.sun.enterprise.v3.admin.AdminAdapter.service(com\sun\ent erprise\v3\admin
\AdminAdapter.java:180)

com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(com\sun\gr izzly\tcp\http11
\GrizzlyAdapter.java:165)

com.sun.enterprise.v3.server.HK2Dispatcher.dispath(com\sun\e nterprise\v3\ser
ver\HK2Dispatcher.java:100)

com.sun.enterprise.v3.services.impl.ContainerMapper.service( com\sun\enterpri
se\v3\services\impl\ContainerMapper.java:209)

com.sun.grizzly.http.ProcessorTask.invokeAdapter(com\sun\gri zzly\http\Proces
sorTask.java:746)

com.sun.grizzly.http.ProcessorTask.doProcess(com\sun\grizzly \http\ProcessorT
ask.java:655)

com.sun.grizzly.http.ProcessorTask.process(com\sun\grizzly\h ttp\ProcessorTas
k.java:905)

com.sun.grizzly.http.DefaultProtocolFilter.execute(com\sun\g rizzly\http\Defa
ultProtocolFilter.java:161)

com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(c om\sun\grizzly\D
efaultProtocolChain.java:136)

com.sun.grizzly.DefaultProtocolChain.execute(com\sun\grizzly \DefaultProtocol
Chain.java:103)

com.sun.grizzly.DefaultProtocolChain.execute(com\sun\grizzly \DefaultProtocol
Chain.java:89)

com.sun.grizzly.http.HttpProtocolChain.execute(com\sun\grizz ly\http\HttpProt
ocolChain.java:76)

com.sun.grizzly.ProtocolChainContextTask.doCall(com\sun\griz zly\ProtocolChai
nContextTask.java:53)

com.sun.grizzly.SelectionKeyContextTask.call(com\sun\grizzly \SelectionKeyCon
textTask.java:57)
com.sun.grizzly.ContextTask.run(com\sun\grizzly\ContextTask. java:69)

java.util.concurrent.ThreadPoolExecutor$Worker.runTask(java\ util\concurrent\
ThreadPoolExecutor.java:886)

java.util.concurrent.ThreadPoolExecutor$Worker.run(java\util \concurrent\Thre
adPoolExecutor.java:908)
java.lang.Thread.run(java\lang\Thread.java:619)

I also found some related threads:
http://forum.springsource.org/archive/index.php/t-19516.html
http://article.gmane.org/gmane.comp.jakarta.hivemind.user/20 17

Is it a configuration problem or a bug in Eclipselink?
Re: [V2] Jar locked during webapplication redeploy [message #389759 is a reply to message #389755] Thu, 02 July 2009 14:14 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

From the links you included it seems to be a Windows 7 issue. The link
seems to also indicate that using getResourceAsStream was ok, but
openStream could cause the issue, since EclipseLink is using
getResourceAsStream this is odd that you get the issue.

The posts seemed to indicate that setting caching=false in the URL would
avoid the issue, so you could try changing the EclipseLink code to this
and log a bug to have the EclipseLink code updated if it fixes the Windows
7 issue.

---
James
http://www.nabble.com/EclipseLink---Users-f26658.html


James : Wiki : Book : Blog : Twitter
Previous Topic:How to bypass cache for a specific query?
Next Topic:losing the JDBC connection
Goto Forum:
  


Current Time: Wed Nov 26 17:39:35 GMT 2014

Powered by FUDForum. Page generated in 0.03293 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software