[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [dali-dev] Re: testing deadlock
|
I am contemplating a solution which would remove the Job used to create
the persistence.xml and orm.xml during new JPA project creation. This
was done about a year ago to prevent deadlocks in creating a JPA project
via the JPA project wizard. In
GenericJpaModel.jpaFacetedProjectPostInstall() there is a comment
explaining why this change was made. Given that we have replaced our
ArtifactEdit use with ModelProviders I am now thinking we might not need
the Job anymore. I have removed it in my own workspace and tested JPA
project creation and have not hit a deadlock yet. I can now run
JptAllCoreTests without any problems, they all pass.
I think it is worth trying this as a possible solution. It makes
testing and headless JPA project modification more reliable since you
know the persistence.xml and orm.xml will be created when you ask for a
JpaProject. If there are no objections I will check this change in to
head and we can all try it out and see what happens. It will not be in
the 2.1M2 build, but will make it into a build early next week.
thanks,
Karen
Karen Moore wrote:
A little more information, if I don't get a deadlock running the tests
then I will instead get this exception. I'm wondering if maybe the
peristence.xml is not getting created quickly enough and another test
has already been started before it's been created. The
persistence.xml and orm.xml files are created in a separate Job.
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException:
org.eclipse.core.internal.resources.ResourceException: Resource
'/ContextModelTestProject/src/META-INF/persistence.xml' is not local.
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:315)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274)
at
org.eclipse.jem.internal.util.emf.workbench.ProjectResourceSetImpl.getResource(ProjectResourceSetImpl.java:343)
at
org.eclipse.wst.common.internal.emfworkbench.WorkbenchResourceHelper.getOrCreateResource(WorkbenchResourceHelper.java:384)
at
org.eclipse.jpt.core.resource.AbstractResourceModelProvider.getResource(AbstractResourceModelProvider.java:99)
at
org.eclipse.jpt.core.internal.resource.persistence.PersistenceResourceModelProvider.getResource(PersistenceResourceModelProvider.java:73)
at
org.eclipse.jpt.core.internal.context.GenericRootContextNode.<init>(GenericRootContextNode.java:65)
at
org.eclipse.jpt.core.internal.platform.GenericJpaFactory.buildRootContext(GenericJpaFactory.java:280)
at
org.eclipse.jpt.core.internal.GenericJpaProject.buildRootContextNode(GenericJpaProject.java:201)
at
org.eclipse.jpt.core.internal.GenericJpaProject.<init>(GenericJpaProject.java:163)
at
org.eclipse.jpt.core.internal.platform.GenericJpaFactory.buildJpaProject(GenericJpaFactory.java:233)
at
org.eclipse.jpt.core.internal.GenericJpaModel$DefaultJpaProjectHolder.buildJpaProject(GenericJpaModel.java:445)
at
org.eclipse.jpt.core.internal.GenericJpaModel$DefaultJpaProjectHolder.jpaProject(GenericJpaModel.java:437)
at
org.eclipse.jpt.core.internal.GenericJpaModel.getJpaProject(GenericJpaModel.java:81)
at
org.eclipse.jpt.core.internal.JpaModelManager.getJpaProject(JpaModelManager.java:178)
at
org.eclipse.jpt.core.JptCorePlugin.getJpaProject(JptCorePlugin.java:157)
at
org.eclipse.jpt.core.tests.internal.projects.TestJpaProject.<init>(TestJpaProject.java:58)
at
org.eclipse.jpt.core.tests.internal.projects.TestJpaProject.buildJpaProject(TestJpaProject.java:35)
at
org.eclipse.jpt.core.tests.internal.context.ContextModelTestCase.buildJpaProject(ContextModelTestCase.java:78)
Karen Moore wrote:
Ignore the last thread dump, attaching it again since I was picking
the wrong java process :( This trace actually has our code in it,
just a bit more helpful
Karen
Karen Moore wrote:
So, I'm getting deadlocks most of the time when I run the
JptCoreContextModelTests. I have attached the thread dump from when
it happens. Is anyone else seeing this issue after checking out
Paul's model provider changes? I know Paul isn't getting the
deadlocks, but curious if it is only me and if anyone has clues on
how we can solve it.
Karen
_______________________________________________
dali-dev mailing list
dali-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dali-dev