Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » Problems closing and reopening DALI projects
Problems closing and reopening DALI projects [message #434454] Sat, 09 June 2007 00:23 Go to next message
Brian Fernandes is currently offline Brian Fernandes
Messages: 68
Registered: July 2009
Member
Experienced with DALI RC1.

If you close a JPA project, you see an error dialog saying:
An internal error occurred during: "Resynching JPA model ...". (Stack
trace A)

If you now reopen this project, you get a few errors logged saying "An error
occurred while traversing resources". (Stack trace B). At this time, if you
attempt to open your persistence.xml file, it opens in the XML editor; but
the file is marked dirty and only the XML header is present in the file
(<?xml verison ....), the rest of the file seems to be deleted. If I restart
eclipse without saving the file or check the file on the file system, it
seems to be intact. However, if you subsequently open an Entity and click on
any of the @Column annotations, you will only see the "Map As" combo in the
JPA Details view, with nothing selected and the rest of the view empty. So
it seems like the models are not entirely setup on reopen.

Occasionaly, after reopening the JPA project, you might get a stack overflow
error dialog - the log fills up failed assertions (related to Ranges, I
assume this has something to do with the dorked persistence.xml file) and
also several logs of Stack Trace B.

Any ideas?
Brian.


STACK TRACE A

java.lang.NullPointerException
at org.eclipse.core.runtime.Path.append(Path.java:260)
at
org.eclipse.core.internal.resources.Container.getFile(Contai ner.java:116)
at
org.eclipse.jpt.core.internal.content.persistence.MappingFil eRef.getMappingFile(MappingFileRef.java:204)
at
org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t.xmlRootContentNodeFor(PersistenceUnitContext.java:99)
at
org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t.buildPersistenceUnitMetadatas(PersistenceUnitContext.java: 78)
at
org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t. <init>(PersistenceUnitContext.java:64)
at
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .buildPersistenceUnitContexts(BaseJpaProjectContext.java:131 )
at
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .buildPersistenceUnitContexts(BaseJpaProjectContext.java:123 )
at
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .initialize(BaseJpaProjectContext.java:73)
at
org.eclipse.jpt.core.internal.platform.BaseContext.refreshDe faults(BaseContext.java:50)
at
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:155)
at
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:151)
at
org.eclipse.jpt.core.internal.platform.BaseJpaPlatform.resyn ch(BaseJpaPlatform.java:201)
at org.eclipse.jpt.core.internal.JpaProject$1.run(JpaProject.ja va:176)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

STACK TRACE B

at
org.eclipse.wst.common.internal.emf.resource.IDTranslator.se tMOFValue(IDTranslator.java:45)
at
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOFFeature(EMF2DOMAdapterImpl.java:1399)
at
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOFFeature(EMF2DOMAdapterImpl.java:1755)
at
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOF(EMF2DOMAdapterImpl.java:929)
at
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOF(EMF2DOMAdapterImpl.java:909)
at
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOFMultiFeature(EMF2DOMAdapterImpl.java:457)
at
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOFRootFeature(EMF2DOMAdapterImpl.java:950)
at
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOF(EMF2DOMAdapterImpl.java:925)
at
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOF(EMF2DOMAdapterImpl.java:909)
at
org.eclipse.wst.common.internal.emf.resource.EMF2DOMRenderer .doLoad(EMF2DOMRenderer.java:62)
at
org.eclipse.wst.common.internal.emf.resource.TranslatorResou rceImpl.basicDoLoad(TranslatorResourceImpl.java:142)
at
org.eclipse.wst.common.internal.emf.resource.CompatibilityXM IResourceImpl.doLoad(CompatibilityXMIResourceImpl.java:173)
at
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
at
org.eclipse.wst.common.internal.emf.resource.TranslatorResou rceImpl.load(TranslatorResourceImpl.java:391)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
at
org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.demandLoad(ProjectResourceSetImpl.java:83)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
at
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
at
org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.getResource(ProjectResourceSetImpl.java:262)
at
org.eclipse.jpt.core.internal.content.persistence.Persistenc eXmlJpaFileContentProvider.buildRootContent(PersistenceXmlJp aFileContentProvider.java:43)
at
org.eclipse.jpt.core.internal.JpaFileContentRegistry.buildCo ntent(JpaFileContentRegistry.java:60)
at
org.eclipse.jpt.core.internal.JpaFileContentRegistry.getFile (JpaFileContentRegistry.java:44)
at
org.eclipse.jpt.core.internal.JpaProject.createJpaFile(JpaPr oject.java:613)
at org.eclipse.jpt.core.internal.JpaProject$3.visit(JpaProject. java:480)
at
org.eclipse.core.internal.resources.Resource$1.visitElement( Resource.java:57)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:81)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
at
org.eclipse.core.internal.watson.ElementTreeIterator.iterate (ElementTreeIterator.java:126)
at org.eclipse.core.internal.resources.Resource.accept(Resource .java:67)
at org.eclipse.jpt.core.internal.JpaProject.fill(JpaProject.jav a:487)
at
org.eclipse.jpt.core.internal.JpaModelManager.createFilledJp aProject(JpaModelManager.java:208)
at
org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.checkForProjectsBeingAddedOrRemoved(JpaModelManage r.java:411)
at
org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.checkForProjectsBeingAddedOrRemoved(JpaModelManage r.java:434)
at
org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.resourceChanged(JpaModelManager.java:327)
at
org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Listener.resourceChanged(JpaModelManager.java:284)
at
org.eclipse.core.internal.events.NotificationManager$2.run(N otificationManager.java:282)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at
org.eclipse.core.internal.events.NotificationManager.notify( NotificationManager.java:276)
at
org.eclipse.core.internal.events.NotificationManager.broadca stChanges(NotificationManager.java:148)
at
org.eclipse.core.internal.resources.Workspace.broadcastPostC hange(Workspace.java:311)
at
org.eclipse.core.internal.resources.Workspace.endOperation(W orkspace.java:1018)
at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run (InternalWorkspaceJob.java:45)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Re: Problems closing and reopening DALI projects [message #434458 is a reply to message #434454] Mon, 11 June 2007 22:10 Go to previous messageGo to next message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Brian,

I wonder if this issue has anything to do with the occasionally seen bug
187370 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=187370).

If you could open a bug for this issue and provide steps on reproducing,
that would be very helpful. We have seen resync's cause errors on project
close when resources are left open, but nothing that causes changes in the
persistence.xml or any other file.

There was also this bug that was just recently fixed that has the stack
trace of A, but I'm not sure it describes your situation. In any case,
this NPE may no longer occur in RC3.

Neil


Brian Fernandes wrote:

> Experienced with DALI RC1.

> If you close a JPA project, you see an error dialog saying:
> An internal error occurred during: "Resynching JPA model ...". (Stack
> trace A)

> If you now reopen this project, you get a few errors logged saying "An error
> occurred while traversing resources". (Stack trace B). At this time, if you
> attempt to open your persistence.xml file, it opens in the XML editor; but
> the file is marked dirty and only the XML header is present in the file
> (<?xml verison ....), the rest of the file seems to be deleted. If I restart
> eclipse without saving the file or check the file on the file system, it
> seems to be intact. However, if you subsequently open an Entity and click on
> any of the @Column annotations, you will only see the "Map As" combo in the
> JPA Details view, with nothing selected and the rest of the view empty. So
> it seems like the models are not entirely setup on reopen.

> Occasionaly, after reopening the JPA project, you might get a stack overflow
> error dialog - the log fills up failed assertions (related to Ranges, I
> assume this has something to do with the dorked persistence.xml file) and
> also several logs of Stack Trace B.

> Any ideas?
> Brian.


> STACK TRACE A

> java.lang.NullPointerException
> at org.eclipse.core.runtime.Path.append(Path.java:260)
> at
> org.eclipse.core.internal.resources.Container.getFile(Contai ner.java:116)
> at
>
org.eclipse.jpt.core.internal.content.persistence.MappingFil eRef.getMappingFile(MappingFileRef.java:204)
> at
>
org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t.xmlRootContentNodeFor(PersistenceUnitContext.java:99)
> at
>
org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t.buildPersistenceUnitMetadatas(PersistenceUnitContext.java: 78)
> at
>
org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t. <init>(PersistenceUnitContext.java:64)
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .buildPersistenceUnitContexts(BaseJpaProjectContext.java:131 )
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .buildPersistenceUnitContexts(BaseJpaProjectContext.java:123 )
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .initialize(BaseJpaProjectContext.java:73)
> at
>
org.eclipse.jpt.core.internal.platform.BaseContext.refreshDe faults(BaseContext.java:50)
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:155)
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:151)
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaPlatform.resyn ch(BaseJpaPlatform.java:201)
> at org.eclipse.jpt.core.internal.JpaProject$1.run(JpaProject.ja va:176)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

> STACK TRACE B

> at
>
org.eclipse.wst.common.internal.emf.resource.IDTranslator.se tMOFValue(IDTranslator.java:45)
> at
>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOFFeature(EMF2DOMAdapterImpl.java:1399)
> at
>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOFFeature(EMF2DOMAdapterImpl.java:1755)
> at
>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOF(EMF2DOMAdapterImpl.java:929)
> at
>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOF(EMF2DOMAdapterImpl.java:909)
> at
>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOFMultiFeature(EMF2DOMAdapterImpl.java:457)
> at
>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOFRootFeature(EMF2DOMAdapterImpl.java:950)
> at
>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOF(EMF2DOMAdapterImpl.java:925)
> at
>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOF(EMF2DOMAdapterImpl.java:909)
> at
>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMRenderer .doLoad(EMF2DOMRenderer.java:62)
> at
>
org.eclipse.wst.common.internal.emf.resource.TranslatorResou rceImpl.basicDoLoad(TranslatorResourceImpl.java:142)
> at
>
org.eclipse.wst.common.internal.emf.resource.CompatibilityXM IResourceImpl.doLoad(CompatibilityXMIResourceImpl.java:173)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
> at
>
org.eclipse.wst.common.internal.emf.resource.TranslatorResou rceImpl.load(TranslatorResourceImpl.java:391)
> at
>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
> at
>
org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.demandLoad(ProjectResourceSetImpl.java:83)
> at
>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
> at
>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
> at
>
org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.getResource(ProjectResourceSetImpl.java:262)
> at
>
org.eclipse.jpt.core.internal.content.persistence.Persistenc eXmlJpaFileContentProvider.buildRootContent(PersistenceXmlJp aFileContentProvider.java:43)
> at
>
org.eclipse.jpt.core.internal.JpaFileContentRegistry.buildCo ntent(JpaFileContentRegistry.java:60)
> at
>
org.eclipse.jpt.core.internal.JpaFileContentRegistry.getFile (JpaFileContentRegistry.java:44)
> at
> org.eclipse.jpt.core.internal.JpaProject.createJpaFile(JpaPr oject.java:613)
> at org.eclipse.jpt.core.internal.JpaProject$3.visit(JpaProject. java:480)
> at
> org.eclipse.core.internal.resources.Resource$1.visitElement( Resource.java:57)
> at
>
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:81)
> at
>
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
> at
>
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
> at
>
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
> at
>
org.eclipse.core.internal.watson.ElementTreeIterator.iterate (ElementTreeIterator.java:126)
> at org.eclipse.core.internal.resources.Resource.accept(Resource .java:67)
> at org.eclipse.jpt.core.internal.JpaProject.fill(JpaProject.jav a:487)
> at
>
org.eclipse.jpt.core.internal.JpaModelManager.createFilledJp aProject(JpaModelManager.java:208)
> at
>
org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.checkForProjectsBeingAddedOrRemoved(JpaModelManage r.java:411)
> at
>
org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.checkForProjectsBeingAddedOrRemoved(JpaModelManage r.java:434)
> at
>
org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.resourceChanged(JpaModelManager.java:327)
> at
>
org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Listener.resourceChanged(JpaModelManager.java:284)
> at
>
org.eclipse.core.internal.events.NotificationManager$2.run(N otificationManager.java:282)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at
>
org.eclipse.core.internal.events.NotificationManager.notify( NotificationManager.java:276)
> at
>
org.eclipse.core.internal.events.NotificationManager.broadca stChanges(NotificationManager.java:148)
> at
>
org.eclipse.core.internal.resources.Workspace.broadcastPostC hange(Workspace.java:311)
> at
>
org.eclipse.core.internal.resources.Workspace.endOperation(W orkspace.java:1018)
> at
>
org.eclipse.core.internal.resources.InternalWorkspaceJob.run (InternalWorkspaceJob.java:45)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Re: Problems closing and reopening DALI projects [message #434463 is a reply to message #434458] Tue, 12 June 2007 15:03 Go to previous messageGo to next message
Brian Fernandes is currently offline Brian Fernandes
Messages: 68
Registered: July 2009
Member
Neil,

> I wonder if this issue has anything to do with the occasionally seen bug
> 187370 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=187370).
> If you could open a bug for this issue and provide steps on reproducing,
> that would be very helpful. We have seen resync's cause errors on project
> close when resources are left open, but nothing that causes changes in the
> persistence.xml or any other file.
>

It seems like the errors on open are causing this issue, not the error on
close; I'll test further.

> There was also this bug that was just recently fixed that has the stack
> trace of A, but I'm not sure it describes your situation. In any case,
> this NPE may no longer occur in RC3.

That is good news. I'd like to re-test both the above scenarios in RC3, but
RC3 has not been released yet (any ETA?). Still, if the DALI team already
has versioned off all the DALI plugins for RC3, I'd like to try
retesting against those versions - can you send me the version numbers if
this is the case? (or do I just try the latest versions in each plugin?)

Brian.
Re: Problems closing and reopening DALI projects [message #434464 is a reply to message #434458] Wed, 13 June 2007 00:39 Go to previous messageGo to next message
Brian Fernandes is currently offline Brian Fernandes
Messages: 68
Registered: July 2009
Member
Neil,

These observations were made from a DALI version I checked out on 12th June,
2330 hrs UTC (around an hour ago) - this includes the fix for #192282 (for
your reference).

I'm testing in workspace with only 1 project. This project is a standard JPA
project (no web facet) and has the persistence.xml file in the META-INF
folder under the source folder. There is a single Entity, listed in the
persistence.xml file.

When I close the project I see an error dialog and a log with Stack Trace C,
seems similar to trace A reported earlier. When this project is reopened, I
see two log entries (NPEs) with Stack Trace B. So this issue does not appear
to be fixed yet.

If I open persistence.xml in the XML editor at this time, only the following
line is present in it.
<?xml version="1.0" encoding="UTF-8"?>
The editor opens in a dirty state directly but if I use any external (to
eclipse) editor, the file is actually intact (I assume this is why the
editor is dirty). If I attempt to close the editor, the machine locks up for
a few seconds after which I get a stack overflow error dialog prompting me
to quite eclipse. Once I restart everything works again.

Note: If the project was closed when the workspace was started and later
opened, there are no problems.

Exact steps to reproduce:

1) Open an Entity in the Java editor and click around a bit, observe the
details view to ensure that the JPA models have been setup correctly.
2) Close project (Trace C)
3) Open Project (Trace B x 2)
4) Open persistence.xml file to observe the truncated xml file in the
editor. If you attempt to close the file, you will get the Stack Overflow
error.
5) If you opened an Entity (instead of persistence.xml), the jpa details
view seems to work fine, however JPA validation does not work - old
validation errors remain, new ones fail to show up.

The above series of steps reproduces the issues every time I've tried. The
presence of an active DB connection does not change the outcome.

Do let me know if you can reproduce this issue and whether I should file it.

Thanks again,
Brian.



STACK TRACE C
java.lang.NullPointerException
at
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .isValidPersistenceXmlLocation(BaseJpaProjectContext.java:98 )
at
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .sortPersistenceXmlFiles(BaseJpaProjectContext.java:79)
at
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .initialize(BaseJpaProjectContext.java:73)
at
org.eclipse.jpt.core.internal.platform.BaseContext.refreshDe faults(BaseContext.java:50)
at
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:145)
at
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:141)
at
org.eclipse.jpt.core.internal.platform.BaseJpaPlatform.resyn ch(BaseJpaPlatform.java:201)
at org.eclipse.jpt.core.internal.JpaProject$1.run(JpaProject.ja va:179)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)




"Neil Hauge" <neil.hauge@oracle.com> wrote in message
news:095c77db0006f6d53aea6937a8468624$1@www.eclipse.org...
> Brian,
>
> I wonder if this issue has anything to do with the occasionally seen bug
> 187370 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=187370).
> If you could open a bug for this issue and provide steps on reproducing,
> that would be very helpful. We have seen resync's cause errors on project
> close when resources are left open, but nothing that causes changes in the
> persistence.xml or any other file.
>
> There was also this bug that was just recently fixed that has the stack
> trace of A, but I'm not sure it describes your situation. In any case,
> this NPE may no longer occur in RC3.
>
> Neil
>
>
> Brian Fernandes wrote:
>
>> Experienced with DALI RC1.
>
>> If you close a JPA project, you see an error dialog saying:
>> An internal error occurred during: "Resynching JPA model ...".
>> (Stack trace A)
>
>> If you now reopen this project, you get a few errors logged saying "An
>> error occurred while traversing resources". (Stack trace B). At this
>> time, if you attempt to open your persistence.xml file, it opens in the
>> XML editor; but the file is marked dirty and only the XML header is
>> present in the file (<?xml verison ....), the rest of the file seems to
>> be deleted. If I restart eclipse without saving the file or check the
>> file on the file system, it seems to be intact. However, if you
>> subsequently open an Entity and click on any of the @Column annotations,
>> you will only see the "Map As" combo in the JPA Details view, with
>> nothing selected and the rest of the view empty. So it seems like the
>> models are not entirely setup on reopen.
>
>> Occasionaly, after reopening the JPA project, you might get a stack
>> overflow error dialog - the log fills up failed assertions (related to
>> Ranges, I assume this has something to do with the dorked persistence.xml
>> file) and also several logs of Stack Trace B.
>
>> Any ideas?
>> Brian.
>
>
>> STACK TRACE A
>
>> java.lang.NullPointerException
>> at org.eclipse.core.runtime.Path.append(Path.java:260)
>> at
>> org.eclipse.core.internal.resources.Container.getFile(Contai ner.java:116)
>> at
> org.eclipse.jpt.core.internal.content.persistence.MappingFil eRef.getMappingFile(MappingFileRef.java:204)
>> at
> org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t.xmlRootContentNodeFor(PersistenceUnitContext.java:99)
>> at
> org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t.buildPersistenceUnitMetadatas(PersistenceUnitContext.java: 78)
>> at
> org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t. <init>(PersistenceUnitContext.java:64)
>> at
> org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .buildPersistenceUnitContexts(BaseJpaProjectContext.java:131 )
>> at
> org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .buildPersistenceUnitContexts(BaseJpaProjectContext.java:123 )
>> at
> org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .initialize(BaseJpaProjectContext.java:73)
>> at
> org.eclipse.jpt.core.internal.platform.BaseContext.refreshDe faults(BaseContext.java:50)
>> at
> org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:155)
>> at
> org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:151)
>> at
> org.eclipse.jpt.core.internal.platform.BaseJpaPlatform.resyn ch(BaseJpaPlatform.java:201)
>> at org.eclipse.jpt.core.internal.JpaProject$1.run(JpaProject.ja va:176)
>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>
>> STACK TRACE B
>
>> at
> org.eclipse.wst.common.internal.emf.resource.IDTranslator.se tMOFValue(IDTranslator.java:45)
>> at
> org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOFFeature(EMF2DOMAdapterImpl.java:1399)
>> at
> org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOFFeature(EMF2DOMAdapterImpl.java:1755)
>> at
> org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOF(EMF2DOMAdapterImpl.java:929)
>> at
> org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOF(EMF2DOMAdapterImpl.java:909)
>> at
> org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOFMultiFeature(EMF2DOMAdapterImpl.java:457)
>> at
> org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOFRootFeature(EMF2DOMAdapterImpl.java:950)
>> at
> org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOF(EMF2DOMAdapterImpl.java:925)
>> at
> org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOF(EMF2DOMAdapterImpl.java:909)
>> at
> org.eclipse.wst.common.internal.emf.resource.EMF2DOMRenderer .doLoad(EMF2DOMRenderer.java:62)
>> at
> org.eclipse.wst.common.internal.emf.resource.TranslatorResou rceImpl.basicDoLoad(TranslatorResourceImpl.java:142)
>> at
> org.eclipse.wst.common.internal.emf.resource.CompatibilityXM IResourceImpl.doLoad(CompatibilityXMIResourceImpl.java:173)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>> at
> org.eclipse.wst.common.internal.emf.resource.TranslatorResou rceImpl.load(TranslatorResourceImpl.java:391)
>> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>> at
> org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.demandLoad(ProjectResourceSetImpl.java:83)
>> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>> at
> org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.getResource(ProjectResourceSetImpl.java:262)
>> at
> org.eclipse.jpt.core.internal.content.persistence.Persistenc eXmlJpaFileContentProvider.buildRootContent(PersistenceXmlJp aFileContentProvider.java:43)
>> at
> org.eclipse.jpt.core.internal.JpaFileContentRegistry.buildCo ntent(JpaFileContentRegistry.java:60)
>> at
> org.eclipse.jpt.core.internal.JpaFileContentRegistry.getFile (JpaFileContentRegistry.java:44)
>> at
>> org.eclipse.jpt.core.internal.JpaProject.createJpaFile(JpaPr oject.java:613)
>> at org.eclipse.jpt.core.internal.JpaProject$3.visit(JpaProject. java:480)
>> at
>> org.eclipse.core.internal.resources.Resource$1.visitElement( Resource.java:57)
>> at
> org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:81)
>> at
> org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
>> at
> org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
>> at
> org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
>> at
> org.eclipse.core.internal.watson.ElementTreeIterator.iterate (ElementTreeIterator.java:126)
>> at org.eclipse.core.internal.resources.Resource.accept(Resource .java:67)
>> at org.eclipse.jpt.core.internal.JpaProject.fill(JpaProject.jav a:487)
>> at
> org.eclipse.jpt.core.internal.JpaModelManager.createFilledJp aProject(JpaModelManager.java:208)
>> at
> org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.checkForProjectsBeingAddedOrRemoved(JpaModelManage r.java:411)
>> at
> org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.checkForProjectsBeingAddedOrRemoved(JpaModelManage r.java:434)
>> at
> org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.resourceChanged(JpaModelManager.java:327)
>> at
> org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Listener.resourceChanged(JpaModelManager.java:284)
>> at
> org.eclipse.core.internal.events.NotificationManager$2.run(N otificationManager.java:282)
>> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
>> at
> org.eclipse.core.internal.events.NotificationManager.notify( NotificationManager.java:276)
>> at
> org.eclipse.core.internal.events.NotificationManager.broadca stChanges(NotificationManager.java:148)
>> at
> org.eclipse.core.internal.resources.Workspace.broadcastPostC hange(Workspace.java:311)
>> at
> org.eclipse.core.internal.resources.Workspace.endOperation(W orkspace.java:1018)
>> at
> org.eclipse.core.internal.resources.InternalWorkspaceJob.run (InternalWorkspaceJob.java:45)
>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>
>
Re: Problems closing and reopening DALI projects [message #434470 is a reply to message #434464] Wed, 13 June 2007 15:39 Go to previous messageGo to next message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Brian,

I am able to reproduce this issue fully. Please do enter a bug for this
with the steps to reproduce that you have provided.

Thanks,
Neil

Brian Fernandes wrote:

> Neil,

> These observations were made from a DALI version I checked out on 12th June,
> 2330 hrs UTC (around an hour ago) - this includes the fix for #192282 (for
> your reference).

> I'm testing in workspace with only 1 project. This project is a standard JPA
> project (no web facet) and has the persistence.xml file in the META-INF
> folder under the source folder. There is a single Entity, listed in the
> persistence.xml file.

> When I close the project I see an error dialog and a log with Stack Trace C,
> seems similar to trace A reported earlier. When this project is reopened, I
> see two log entries (NPEs) with Stack Trace B. So this issue does not appear
> to be fixed yet.

> If I open persistence.xml in the XML editor at this time, only the following
> line is present in it.
> <?xml version="1.0" encoding="UTF-8"?>
> The editor opens in a dirty state directly but if I use any external (to
> eclipse) editor, the file is actually intact (I assume this is why the
> editor is dirty). If I attempt to close the editor, the machine locks up for
> a few seconds after which I get a stack overflow error dialog prompting me
> to quite eclipse. Once I restart everything works again.

> Note: If the project was closed when the workspace was started and later
> opened, there are no problems.

> Exact steps to reproduce:

> 1) Open an Entity in the Java editor and click around a bit, observe the
> details view to ensure that the JPA models have been setup correctly.
> 2) Close project (Trace C)
> 3) Open Project (Trace B x 2)
> 4) Open persistence.xml file to observe the truncated xml file in the
> editor. If you attempt to close the file, you will get the Stack Overflow
> error.
> 5) If you opened an Entity (instead of persistence.xml), the jpa details
> view seems to work fine, however JPA validation does not work - old
> validation errors remain, new ones fail to show up.

> The above series of steps reproduces the issues every time I've tried. The
> presence of an active DB connection does not change the outcome.

> Do let me know if you can reproduce this issue and whether I should file it.

> Thanks again,
> Brian.



> STACK TRACE C
> java.lang.NullPointerException
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .isValidPersistenceXmlLocation(BaseJpaProjectContext.java:98 )
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .sortPersistenceXmlFiles(BaseJpaProjectContext.java:79)
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .initialize(BaseJpaProjectContext.java:73)
> at
>
org.eclipse.jpt.core.internal.platform.BaseContext.refreshDe faults(BaseContext.java:50)
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:145)
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:141)
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaPlatform.resyn ch(BaseJpaPlatform.java:201)
> at org.eclipse.jpt.core.internal.JpaProject$1.run(JpaProject.ja va:179)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)




> "Neil Hauge" <neil.hauge@oracle.com> wrote in message
> news:095c77db0006f6d53aea6937a8468624$1@www.eclipse.org...
>> Brian,
>>
>> I wonder if this issue has anything to do with the occasionally seen bug
>> 187370 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=187370).
>> If you could open a bug for this issue and provide steps on reproducing,
>> that would be very helpful. We have seen resync's cause errors on project
>> close when resources are left open, but nothing that causes changes in the
>> persistence.xml or any other file.
>>
>> There was also this bug that was just recently fixed that has the stack
>> trace of A, but I'm not sure it describes your situation. In any case,
>> this NPE may no longer occur in RC3.
>>
>> Neil
>>
>>
>> Brian Fernandes wrote:
>>
>>> Experienced with DALI RC1.
>>
>>> If you close a JPA project, you see an error dialog saying:
>>> An internal error occurred during: "Resynching JPA model ...".
>>> (Stack trace A)
>>
>>> If you now reopen this project, you get a few errors logged saying "An
>>> error occurred while traversing resources". (Stack trace B). At this
>>> time, if you attempt to open your persistence.xml file, it opens in the
>>> XML editor; but the file is marked dirty and only the XML header is
>>> present in the file (<?xml verison ....), the rest of the file seems to
>>> be deleted. If I restart eclipse without saving the file or check the
>>> file on the file system, it seems to be intact. However, if you
>>> subsequently open an Entity and click on any of the @Column annotations,
>>> you will only see the "Map As" combo in the JPA Details view, with
>>> nothing selected and the rest of the view empty. So it seems like the
>>> models are not entirely setup on reopen.
>>
>>> Occasionaly, after reopening the JPA project, you might get a stack
>>> overflow error dialog - the log fills up failed assertions (related to
>>> Ranges, I assume this has something to do with the dorked persistence.xml
>>> file) and also several logs of Stack Trace B.
>>
>>> Any ideas?
>>> Brian.
>>
>>
>>> STACK TRACE A
>>
>>> java.lang.NullPointerException
>>> at org.eclipse.core.runtime.Path.append(Path.java:260)
>>> at
>>> org.eclipse.core.internal.resources.Container.getFile(Contai ner.java:116)
>>> at
>>
org.eclipse.jpt.core.internal.content.persistence.MappingFil eRef.getMappingFile(MappingFileRef.java:204)
>>> at
>>
org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t.xmlRootContentNodeFor(PersistenceUnitContext.java:99)
>>> at
>>
org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t.buildPersistenceUnitMetadatas(PersistenceUnitContext.java: 78)
>>> at
>>
org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t. <init>(PersistenceUnitContext.java:64)
>>> at
>>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .buildPersistenceUnitContexts(BaseJpaProjectContext.java:131 )
>>> at
>>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .buildPersistenceUnitContexts(BaseJpaProjectContext.java:123 )
>>> at
>>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .initialize(BaseJpaProjectContext.java:73)
>>> at
>>
org.eclipse.jpt.core.internal.platform.BaseContext.refreshDe faults(BaseContext.java:50)
>>> at
>>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:155)
>>> at
>>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:151)
>>> at
>>
org.eclipse.jpt.core.internal.platform.BaseJpaPlatform.resyn ch(BaseJpaPlatform.java:201)
>>> at org.eclipse.jpt.core.internal.JpaProject$1.run(JpaProject.ja va:176)
>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>
>>> STACK TRACE B
>>
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.IDTranslator.se tMOFValue(IDTranslator.java:45)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOFFeature(EMF2DOMAdapterImpl.java:1399)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOFFeature(EMF2DOMAdapterImpl.java:1755)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOF(EMF2DOMAdapterImpl.java:929)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOF(EMF2DOMAdapterImpl.java:909)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOFMultiFeature(EMF2DOMAdapterImpl.java:457)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOFRootFeature(EMF2DOMAdapterImpl.java:950)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOF(EMF2DOMAdapterImpl.java:925)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOF(EMF2DOMAdapterImpl.java:909)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMRenderer .doLoad(EMF2DOMRenderer.java:62)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.TranslatorResou rceImpl.basicDoLoad(TranslatorResourceImpl.java:142)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.CompatibilityXM IResourceImpl.doLoad(CompatibilityXMIResourceImpl.java:173)
>>> at
>>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.TranslatorResou rceImpl.load(TranslatorResourceImpl.java:391)
>>> at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>> at
>>
org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.demandLoad(ProjectResourceSetImpl.java:83)
>>> at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>> at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>> at
>>
org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.getResource(ProjectResourceSetImpl.java:262)
>>> at
>>
org.eclipse.jpt.core.internal.content.persistence.Persistenc eXmlJpaFileContentProvider.buildRootContent(PersistenceXmlJp aFileContentProvider.java:43)
>>> at
>>
org.eclipse.jpt.core.internal.JpaFileContentRegistry.buildCo ntent(JpaFileContentRegistry.java:60)
>>> at
>>
org.eclipse.jpt.core.internal.JpaFileContentRegistry.getFile (JpaFileContentRegistry.java:44)
>>> at
>>> org.eclipse.jpt.core.internal.JpaProject.createJpaFile(JpaPr oject.java:613)
>>> at org.eclipse.jpt.core.internal.JpaProject$3.visit(JpaProject. java:480)
>>> at
>>>
org.eclipse.core.internal.resources.Resource$1.visitElement( Resource.java:57)
>>> at
>>
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:81)
>>> at
>>
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
>>> at
>>
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
>>> at
>>
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
>>> at
>>
org.eclipse.core.internal.watson.ElementTreeIterator.iterate (ElementTreeIterator.java:126)
>>> at org.eclipse.core.internal.resources.Resource.accept(Resource .java:67)
>>> at org.eclipse.jpt.core.internal.JpaProject.fill(JpaProject.jav a:487)
>>> at
>>
org.eclipse.jpt.core.internal.JpaModelManager.createFilledJp aProject(JpaModelManager.java:208)
>>> at
>>
org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.checkForProjectsBeingAddedOrRemoved(JpaModelManage r.java:411)
>>> at
>>
org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.checkForProjectsBeingAddedOrRemoved(JpaModelManage r.java:434)
>>> at
>>
org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.resourceChanged(JpaModelManager.java:327)
>>> at
>>
org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Listener.resourceChanged(JpaModelManager.java:284)
>>> at
>>
org.eclipse.core.internal.events.NotificationManager$2.run(N otificationManager.java:282)
>>> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
>>> at
>>
org.eclipse.core.internal.events.NotificationManager.notify( NotificationManager.java:276)
>>> at
>>
org.eclipse.core.internal.events.NotificationManager.broadca stChanges(NotificationManager.java:148)
>>> at
>>
org.eclipse.core.internal.resources.Workspace.broadcastPostC hange(Workspace.java:311)
>>> at
>>
org.eclipse.core.internal.resources.Workspace.endOperation(W orkspace.java:1018)
>>> at
>>
org.eclipse.core.internal.resources.InternalWorkspaceJob.run (InternalWorkspaceJob.java:45)
>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>
>>
Re: Problems closing and reopening DALI projects [message #434474 is a reply to message #434470] Wed, 13 June 2007 17:15 Go to previous messageGo to next message
Brian Fernandes is currently offline Brian Fernandes
Messages: 68
Registered: July 2009
Member
Neil,
Done, here's the entry: https://bugs.eclipse.org/bugs/show_bug.cgi?id=192477

I want to point out that the stack overflow seems to be a problem with the
JPA Validator and invalid persistence.xml files.

1) Open existing persistence.xml file.
2) Delete everything in the file excluding the XML header.
3) Save the file.

You are immediately hit with the stack over flow error dialog - no close /
reopen sequence required to get it to this state.

So there *might* be two separate bugs here:
a) Closing / reopening project corrupts persistence.xml file.
b) Empty persistence.xml file causes stack overflow error in JPA validator.

Thanks,
Brian.

"Neil Hauge" <neil.hauge@oracle.com> wrote in message
news:e82468478ee6117de5ccf45925c8e2be$1@www.eclipse.org...
> Brian,
>
> I am able to reproduce this issue fully. Please do enter a bug for this
> with the steps to reproduce that you have provided.
>
> Thanks,
> Neil
Re: Problems closing and reopening DALI projects [message #434477 is a reply to message #434474] Thu, 14 June 2007 21:01 Go to previous message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Brian,

Thanks for helping to investigate this. I have opened bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=192694 to address issue B.

Neil
Re: Problems closing and reopening DALI projects [message #600024 is a reply to message #434454] Mon, 11 June 2007 22:10 Go to previous message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Brian,

I wonder if this issue has anything to do with the occasionally seen bug
187370 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=187370).

If you could open a bug for this issue and provide steps on reproducing,
that would be very helpful. We have seen resync's cause errors on project
close when resources are left open, but nothing that causes changes in the
persistence.xml or any other file.

There was also this bug that was just recently fixed that has the stack
trace of A, but I'm not sure it describes your situation. In any case,
this NPE may no longer occur in RC3.

Neil


Brian Fernandes wrote:

> Experienced with DALI RC1.

> If you close a JPA project, you see an error dialog saying:
> An internal error occurred during: "Resynching JPA model ...". (Stack
> trace A)

> If you now reopen this project, you get a few errors logged saying "An error
> occurred while traversing resources". (Stack trace B). At this time, if you
> attempt to open your persistence.xml file, it opens in the XML editor; but
> the file is marked dirty and only the XML header is present in the file
> (<?xml verison ....), the rest of the file seems to be deleted. If I restart
> eclipse without saving the file or check the file on the file system, it
> seems to be intact. However, if you subsequently open an Entity and click on
> any of the @Column annotations, you will only see the "Map As" combo in the
> JPA Details view, with nothing selected and the rest of the view empty. So
> it seems like the models are not entirely setup on reopen.

> Occasionaly, after reopening the JPA project, you might get a stack overflow
> error dialog - the log fills up failed assertions (related to Ranges, I
> assume this has something to do with the dorked persistence.xml file) and
> also several logs of Stack Trace B.

> Any ideas?
> Brian.


> STACK TRACE A

> java.lang.NullPointerException
> at org.eclipse.core.runtime.Path.append(Path.java:260)
> at
> org.eclipse.core.internal.resources.Container.getFile(Contai ner.java:116)
> at
>
org.eclipse.jpt.core.internal.content.persistence.MappingFil eRef.getMappingFile(MappingFileRef.java:204)
> at
>
org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t.xmlRootContentNodeFor(PersistenceUnitContext.java:99)
> at
>
org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t.buildPersistenceUnitMetadatas(PersistenceUnitContext.java: 78)
> at
>
org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t. <init>(PersistenceUnitContext.java:64)
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .buildPersistenceUnitContexts(BaseJpaProjectContext.java:131 )
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .buildPersistenceUnitContexts(BaseJpaProjectContext.java:123 )
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .initialize(BaseJpaProjectContext.java:73)
> at
>
org.eclipse.jpt.core.internal.platform.BaseContext.refreshDe faults(BaseContext.java:50)
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:155)
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:151)
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaPlatform.resyn ch(BaseJpaPlatform.java:201)
> at org.eclipse.jpt.core.internal.JpaProject$1.run(JpaProject.ja va:176)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

> STACK TRACE B

> at
>
org.eclipse.wst.common.internal.emf.resource.IDTranslator.se tMOFValue(IDTranslator.java:45)
> at
>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOFFeature(EMF2DOMAdapterImpl.java:1399)
> at
>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOFFeature(EMF2DOMAdapterImpl.java:1755)
> at
>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOF(EMF2DOMAdapterImpl.java:929)
> at
>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOF(EMF2DOMAdapterImpl.java:909)
> at
>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOFMultiFeature(EMF2DOMAdapterImpl.java:457)
> at
>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOFRootFeature(EMF2DOMAdapterImpl.java:950)
> at
>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOF(EMF2DOMAdapterImpl.java:925)
> at
>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOF(EMF2DOMAdapterImpl.java:909)
> at
>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMRenderer .doLoad(EMF2DOMRenderer.java:62)
> at
>
org.eclipse.wst.common.internal.emf.resource.TranslatorResou rceImpl.basicDoLoad(TranslatorResourceImpl.java:142)
> at
>
org.eclipse.wst.common.internal.emf.resource.CompatibilityXM IResourceImpl.doLoad(CompatibilityXMIResourceImpl.java:173)
> at
> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
> at
>
org.eclipse.wst.common.internal.emf.resource.TranslatorResou rceImpl.load(TranslatorResourceImpl.java:391)
> at
>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
> at
>
org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.demandLoad(ProjectResourceSetImpl.java:83)
> at
>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
> at
>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
> at
>
org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.getResource(ProjectResourceSetImpl.java:262)
> at
>
org.eclipse.jpt.core.internal.content.persistence.Persistenc eXmlJpaFileContentProvider.buildRootContent(PersistenceXmlJp aFileContentProvider.java:43)
> at
>
org.eclipse.jpt.core.internal.JpaFileContentRegistry.buildCo ntent(JpaFileContentRegistry.java:60)
> at
>
org.eclipse.jpt.core.internal.JpaFileContentRegistry.getFile (JpaFileContentRegistry.java:44)
> at
> org.eclipse.jpt.core.internal.JpaProject.createJpaFile(JpaPr oject.java:613)
> at org.eclipse.jpt.core.internal.JpaProject$3.visit(JpaProject. java:480)
> at
> org.eclipse.core.internal.resources.Resource$1.visitElement( Resource.java:57)
> at
>
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:81)
> at
>
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
> at
>
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
> at
>
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
> at
>
org.eclipse.core.internal.watson.ElementTreeIterator.iterate (ElementTreeIterator.java:126)
> at org.eclipse.core.internal.resources.Resource.accept(Resource .java:67)
> at org.eclipse.jpt.core.internal.JpaProject.fill(JpaProject.jav a:487)
> at
>
org.eclipse.jpt.core.internal.JpaModelManager.createFilledJp aProject(JpaModelManager.java:208)
> at
>
org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.checkForProjectsBeingAddedOrRemoved(JpaModelManage r.java:411)
> at
>
org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.checkForProjectsBeingAddedOrRemoved(JpaModelManage r.java:434)
> at
>
org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.resourceChanged(JpaModelManager.java:327)
> at
>
org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Listener.resourceChanged(JpaModelManager.java:284)
> at
>
org.eclipse.core.internal.events.NotificationManager$2.run(N otificationManager.java:282)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at
>
org.eclipse.core.internal.events.NotificationManager.notify( NotificationManager.java:276)
> at
>
org.eclipse.core.internal.events.NotificationManager.broadca stChanges(NotificationManager.java:148)
> at
>
org.eclipse.core.internal.resources.Workspace.broadcastPostC hange(Workspace.java:311)
> at
>
org.eclipse.core.internal.resources.Workspace.endOperation(W orkspace.java:1018)
> at
>
org.eclipse.core.internal.resources.InternalWorkspaceJob.run (InternalWorkspaceJob.java:45)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Re: Problems closing and reopening DALI projects [message #600057 is a reply to message #434458] Tue, 12 June 2007 15:03 Go to previous message
Brian Fernandes is currently offline Brian Fernandes
Messages: 68
Registered: July 2009
Member
Neil,

> I wonder if this issue has anything to do with the occasionally seen bug
> 187370 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=187370).
> If you could open a bug for this issue and provide steps on reproducing,
> that would be very helpful. We have seen resync's cause errors on project
> close when resources are left open, but nothing that causes changes in the
> persistence.xml or any other file.
>

It seems like the errors on open are causing this issue, not the error on
close; I'll test further.

> There was also this bug that was just recently fixed that has the stack
> trace of A, but I'm not sure it describes your situation. In any case,
> this NPE may no longer occur in RC3.

That is good news. I'd like to re-test both the above scenarios in RC3, but
RC3 has not been released yet (any ETA?). Still, if the DALI team already
has versioned off all the DALI plugins for RC3, I'd like to try
retesting against those versions - can you send me the version numbers if
this is the case? (or do I just try the latest versions in each plugin?)

Brian.
Re: Problems closing and reopening DALI projects [message #600064 is a reply to message #434458] Wed, 13 June 2007 00:39 Go to previous message
Brian Fernandes is currently offline Brian Fernandes
Messages: 68
Registered: July 2009
Member
Neil,

These observations were made from a DALI version I checked out on 12th June,
2330 hrs UTC (around an hour ago) - this includes the fix for #192282 (for
your reference).

I'm testing in workspace with only 1 project. This project is a standard JPA
project (no web facet) and has the persistence.xml file in the META-INF
folder under the source folder. There is a single Entity, listed in the
persistence.xml file.

When I close the project I see an error dialog and a log with Stack Trace C,
seems similar to trace A reported earlier. When this project is reopened, I
see two log entries (NPEs) with Stack Trace B. So this issue does not appear
to be fixed yet.

If I open persistence.xml in the XML editor at this time, only the following
line is present in it.
<?xml version="1.0" encoding="UTF-8"?>
The editor opens in a dirty state directly but if I use any external (to
eclipse) editor, the file is actually intact (I assume this is why the
editor is dirty). If I attempt to close the editor, the machine locks up for
a few seconds after which I get a stack overflow error dialog prompting me
to quite eclipse. Once I restart everything works again.

Note: If the project was closed when the workspace was started and later
opened, there are no problems.

Exact steps to reproduce:

1) Open an Entity in the Java editor and click around a bit, observe the
details view to ensure that the JPA models have been setup correctly.
2) Close project (Trace C)
3) Open Project (Trace B x 2)
4) Open persistence.xml file to observe the truncated xml file in the
editor. If you attempt to close the file, you will get the Stack Overflow
error.
5) If you opened an Entity (instead of persistence.xml), the jpa details
view seems to work fine, however JPA validation does not work - old
validation errors remain, new ones fail to show up.

The above series of steps reproduces the issues every time I've tried. The
presence of an active DB connection does not change the outcome.

Do let me know if you can reproduce this issue and whether I should file it.

Thanks again,
Brian.



STACK TRACE C
java.lang.NullPointerException
at
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .isValidPersistenceXmlLocation(BaseJpaProjectContext.java:98 )
at
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .sortPersistenceXmlFiles(BaseJpaProjectContext.java:79)
at
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .initialize(BaseJpaProjectContext.java:73)
at
org.eclipse.jpt.core.internal.platform.BaseContext.refreshDe faults(BaseContext.java:50)
at
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:145)
at
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:141)
at
org.eclipse.jpt.core.internal.platform.BaseJpaPlatform.resyn ch(BaseJpaPlatform.java:201)
at org.eclipse.jpt.core.internal.JpaProject$1.run(JpaProject.ja va:179)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)




"Neil Hauge" <neil.hauge@oracle.com> wrote in message
news:095c77db0006f6d53aea6937a8468624$1@www.eclipse.org...
> Brian,
>
> I wonder if this issue has anything to do with the occasionally seen bug
> 187370 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=187370).
> If you could open a bug for this issue and provide steps on reproducing,
> that would be very helpful. We have seen resync's cause errors on project
> close when resources are left open, but nothing that causes changes in the
> persistence.xml or any other file.
>
> There was also this bug that was just recently fixed that has the stack
> trace of A, but I'm not sure it describes your situation. In any case,
> this NPE may no longer occur in RC3.
>
> Neil
>
>
> Brian Fernandes wrote:
>
>> Experienced with DALI RC1.
>
>> If you close a JPA project, you see an error dialog saying:
>> An internal error occurred during: "Resynching JPA model ...".
>> (Stack trace A)
>
>> If you now reopen this project, you get a few errors logged saying "An
>> error occurred while traversing resources". (Stack trace B). At this
>> time, if you attempt to open your persistence.xml file, it opens in the
>> XML editor; but the file is marked dirty and only the XML header is
>> present in the file (<?xml verison ....), the rest of the file seems to
>> be deleted. If I restart eclipse without saving the file or check the
>> file on the file system, it seems to be intact. However, if you
>> subsequently open an Entity and click on any of the @Column annotations,
>> you will only see the "Map As" combo in the JPA Details view, with
>> nothing selected and the rest of the view empty. So it seems like the
>> models are not entirely setup on reopen.
>
>> Occasionaly, after reopening the JPA project, you might get a stack
>> overflow error dialog - the log fills up failed assertions (related to
>> Ranges, I assume this has something to do with the dorked persistence.xml
>> file) and also several logs of Stack Trace B.
>
>> Any ideas?
>> Brian.
>
>
>> STACK TRACE A
>
>> java.lang.NullPointerException
>> at org.eclipse.core.runtime.Path.append(Path.java:260)
>> at
>> org.eclipse.core.internal.resources.Container.getFile(Contai ner.java:116)
>> at
> org.eclipse.jpt.core.internal.content.persistence.MappingFil eRef.getMappingFile(MappingFileRef.java:204)
>> at
> org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t.xmlRootContentNodeFor(PersistenceUnitContext.java:99)
>> at
> org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t.buildPersistenceUnitMetadatas(PersistenceUnitContext.java: 78)
>> at
> org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t. <init>(PersistenceUnitContext.java:64)
>> at
> org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .buildPersistenceUnitContexts(BaseJpaProjectContext.java:131 )
>> at
> org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .buildPersistenceUnitContexts(BaseJpaProjectContext.java:123 )
>> at
> org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .initialize(BaseJpaProjectContext.java:73)
>> at
> org.eclipse.jpt.core.internal.platform.BaseContext.refreshDe faults(BaseContext.java:50)
>> at
> org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:155)
>> at
> org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:151)
>> at
> org.eclipse.jpt.core.internal.platform.BaseJpaPlatform.resyn ch(BaseJpaPlatform.java:201)
>> at org.eclipse.jpt.core.internal.JpaProject$1.run(JpaProject.ja va:176)
>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>
>> STACK TRACE B
>
>> at
> org.eclipse.wst.common.internal.emf.resource.IDTranslator.se tMOFValue(IDTranslator.java:45)
>> at
> org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOFFeature(EMF2DOMAdapterImpl.java:1399)
>> at
> org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOFFeature(EMF2DOMAdapterImpl.java:1755)
>> at
> org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOF(EMF2DOMAdapterImpl.java:929)
>> at
> org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOF(EMF2DOMAdapterImpl.java:909)
>> at
> org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOFMultiFeature(EMF2DOMAdapterImpl.java:457)
>> at
> org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOFRootFeature(EMF2DOMAdapterImpl.java:950)
>> at
> org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOF(EMF2DOMAdapterImpl.java:925)
>> at
> org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOF(EMF2DOMAdapterImpl.java:909)
>> at
> org.eclipse.wst.common.internal.emf.resource.EMF2DOMRenderer .doLoad(EMF2DOMRenderer.java:62)
>> at
> org.eclipse.wst.common.internal.emf.resource.TranslatorResou rceImpl.basicDoLoad(TranslatorResourceImpl.java:142)
>> at
> org.eclipse.wst.common.internal.emf.resource.CompatibilityXM IResourceImpl.doLoad(CompatibilityXMIResourceImpl.java:173)
>> at
>> org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>> at
> org.eclipse.wst.common.internal.emf.resource.TranslatorResou rceImpl.load(TranslatorResourceImpl.java:391)
>> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>> at
> org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.demandLoad(ProjectResourceSetImpl.java:83)
>> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>> at
> org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>> at
> org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.getResource(ProjectResourceSetImpl.java:262)
>> at
> org.eclipse.jpt.core.internal.content.persistence.Persistenc eXmlJpaFileContentProvider.buildRootContent(PersistenceXmlJp aFileContentProvider.java:43)
>> at
> org.eclipse.jpt.core.internal.JpaFileContentRegistry.buildCo ntent(JpaFileContentRegistry.java:60)
>> at
> org.eclipse.jpt.core.internal.JpaFileContentRegistry.getFile (JpaFileContentRegistry.java:44)
>> at
>> org.eclipse.jpt.core.internal.JpaProject.createJpaFile(JpaPr oject.java:613)
>> at org.eclipse.jpt.core.internal.JpaProject$3.visit(JpaProject. java:480)
>> at
>> org.eclipse.core.internal.resources.Resource$1.visitElement( Resource.java:57)
>> at
> org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:81)
>> at
> org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
>> at
> org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
>> at
> org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
>> at
> org.eclipse.core.internal.watson.ElementTreeIterator.iterate (ElementTreeIterator.java:126)
>> at org.eclipse.core.internal.resources.Resource.accept(Resource .java:67)
>> at org.eclipse.jpt.core.internal.JpaProject.fill(JpaProject.jav a:487)
>> at
> org.eclipse.jpt.core.internal.JpaModelManager.createFilledJp aProject(JpaModelManager.java:208)
>> at
> org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.checkForProjectsBeingAddedOrRemoved(JpaModelManage r.java:411)
>> at
> org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.checkForProjectsBeingAddedOrRemoved(JpaModelManage r.java:434)
>> at
> org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.resourceChanged(JpaModelManager.java:327)
>> at
> org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Listener.resourceChanged(JpaModelManager.java:284)
>> at
> org.eclipse.core.internal.events.NotificationManager$2.run(N otificationManager.java:282)
>> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
>> at
> org.eclipse.core.internal.events.NotificationManager.notify( NotificationManager.java:276)
>> at
> org.eclipse.core.internal.events.NotificationManager.broadca stChanges(NotificationManager.java:148)
>> at
> org.eclipse.core.internal.resources.Workspace.broadcastPostC hange(Workspace.java:311)
>> at
> org.eclipse.core.internal.resources.Workspace.endOperation(W orkspace.java:1018)
>> at
> org.eclipse.core.internal.resources.InternalWorkspaceJob.run (InternalWorkspaceJob.java:45)
>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>
>
Re: Problems closing and reopening DALI projects [message #600089 is a reply to message #434464] Wed, 13 June 2007 15:39 Go to previous message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Brian,

I am able to reproduce this issue fully. Please do enter a bug for this
with the steps to reproduce that you have provided.

Thanks,
Neil

Brian Fernandes wrote:

> Neil,

> These observations were made from a DALI version I checked out on 12th June,
> 2330 hrs UTC (around an hour ago) - this includes the fix for #192282 (for
> your reference).

> I'm testing in workspace with only 1 project. This project is a standard JPA
> project (no web facet) and has the persistence.xml file in the META-INF
> folder under the source folder. There is a single Entity, listed in the
> persistence.xml file.

> When I close the project I see an error dialog and a log with Stack Trace C,
> seems similar to trace A reported earlier. When this project is reopened, I
> see two log entries (NPEs) with Stack Trace B. So this issue does not appear
> to be fixed yet.

> If I open persistence.xml in the XML editor at this time, only the following
> line is present in it.
> <?xml version="1.0" encoding="UTF-8"?>
> The editor opens in a dirty state directly but if I use any external (to
> eclipse) editor, the file is actually intact (I assume this is why the
> editor is dirty). If I attempt to close the editor, the machine locks up for
> a few seconds after which I get a stack overflow error dialog prompting me
> to quite eclipse. Once I restart everything works again.

> Note: If the project was closed when the workspace was started and later
> opened, there are no problems.

> Exact steps to reproduce:

> 1) Open an Entity in the Java editor and click around a bit, observe the
> details view to ensure that the JPA models have been setup correctly.
> 2) Close project (Trace C)
> 3) Open Project (Trace B x 2)
> 4) Open persistence.xml file to observe the truncated xml file in the
> editor. If you attempt to close the file, you will get the Stack Overflow
> error.
> 5) If you opened an Entity (instead of persistence.xml), the jpa details
> view seems to work fine, however JPA validation does not work - old
> validation errors remain, new ones fail to show up.

> The above series of steps reproduces the issues every time I've tried. The
> presence of an active DB connection does not change the outcome.

> Do let me know if you can reproduce this issue and whether I should file it.

> Thanks again,
> Brian.



> STACK TRACE C
> java.lang.NullPointerException
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .isValidPersistenceXmlLocation(BaseJpaProjectContext.java:98 )
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .sortPersistenceXmlFiles(BaseJpaProjectContext.java:79)
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .initialize(BaseJpaProjectContext.java:73)
> at
>
org.eclipse.jpt.core.internal.platform.BaseContext.refreshDe faults(BaseContext.java:50)
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:145)
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:141)
> at
>
org.eclipse.jpt.core.internal.platform.BaseJpaPlatform.resyn ch(BaseJpaPlatform.java:201)
> at org.eclipse.jpt.core.internal.JpaProject$1.run(JpaProject.ja va:179)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)




> "Neil Hauge" <neil.hauge@oracle.com> wrote in message
> news:095c77db0006f6d53aea6937a8468624$1@www.eclipse.org...
>> Brian,
>>
>> I wonder if this issue has anything to do with the occasionally seen bug
>> 187370 (https://bugs.eclipse.org/bugs/show_bug.cgi?id=187370).
>> If you could open a bug for this issue and provide steps on reproducing,
>> that would be very helpful. We have seen resync's cause errors on project
>> close when resources are left open, but nothing that causes changes in the
>> persistence.xml or any other file.
>>
>> There was also this bug that was just recently fixed that has the stack
>> trace of A, but I'm not sure it describes your situation. In any case,
>> this NPE may no longer occur in RC3.
>>
>> Neil
>>
>>
>> Brian Fernandes wrote:
>>
>>> Experienced with DALI RC1.
>>
>>> If you close a JPA project, you see an error dialog saying:
>>> An internal error occurred during: "Resynching JPA model ...".
>>> (Stack trace A)
>>
>>> If you now reopen this project, you get a few errors logged saying "An
>>> error occurred while traversing resources". (Stack trace B). At this
>>> time, if you attempt to open your persistence.xml file, it opens in the
>>> XML editor; but the file is marked dirty and only the XML header is
>>> present in the file (<?xml verison ....), the rest of the file seems to
>>> be deleted. If I restart eclipse without saving the file or check the
>>> file on the file system, it seems to be intact. However, if you
>>> subsequently open an Entity and click on any of the @Column annotations,
>>> you will only see the "Map As" combo in the JPA Details view, with
>>> nothing selected and the rest of the view empty. So it seems like the
>>> models are not entirely setup on reopen.
>>
>>> Occasionaly, after reopening the JPA project, you might get a stack
>>> overflow error dialog - the log fills up failed assertions (related to
>>> Ranges, I assume this has something to do with the dorked persistence.xml
>>> file) and also several logs of Stack Trace B.
>>
>>> Any ideas?
>>> Brian.
>>
>>
>>> STACK TRACE A
>>
>>> java.lang.NullPointerException
>>> at org.eclipse.core.runtime.Path.append(Path.java:260)
>>> at
>>> org.eclipse.core.internal.resources.Container.getFile(Contai ner.java:116)
>>> at
>>
org.eclipse.jpt.core.internal.content.persistence.MappingFil eRef.getMappingFile(MappingFileRef.java:204)
>>> at
>>
org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t.xmlRootContentNodeFor(PersistenceUnitContext.java:99)
>>> at
>>
org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t.buildPersistenceUnitMetadatas(PersistenceUnitContext.java: 78)
>>> at
>>
org.eclipse.jpt.core.internal.platform.PersistenceUnitContex t. <init>(PersistenceUnitContext.java:64)
>>> at
>>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .buildPersistenceUnitContexts(BaseJpaProjectContext.java:131 )
>>> at
>>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .buildPersistenceUnitContexts(BaseJpaProjectContext.java:123 )
>>> at
>>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .initialize(BaseJpaProjectContext.java:73)
>>> at
>>
org.eclipse.jpt.core.internal.platform.BaseContext.refreshDe faults(BaseContext.java:50)
>>> at
>>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:155)
>>> at
>>
org.eclipse.jpt.core.internal.platform.BaseJpaProjectContext .refreshDefaults(BaseJpaProjectContext.java:151)
>>> at
>>
org.eclipse.jpt.core.internal.platform.BaseJpaPlatform.resyn ch(BaseJpaPlatform.java:201)
>>> at org.eclipse.jpt.core.internal.JpaProject$1.run(JpaProject.ja va:176)
>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>
>>> STACK TRACE B
>>
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.IDTranslator.se tMOFValue(IDTranslator.java:45)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOFFeature(EMF2DOMAdapterImpl.java:1399)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOFFeature(EMF2DOMAdapterImpl.java:1755)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOF(EMF2DOMAdapterImpl.java:929)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOF(EMF2DOMAdapterImpl.java:909)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOFMultiFeature(EMF2DOMAdapterImpl.java:457)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOFRootFeature(EMF2DOMAdapterImpl.java:950)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.primUpdateMOF(EMF2DOMAdapterImpl.java:925)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMAdapterI mpl.updateMOF(EMF2DOMAdapterImpl.java:909)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.EMF2DOMRenderer .doLoad(EMF2DOMRenderer.java:62)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.TranslatorResou rceImpl.basicDoLoad(TranslatorResourceImpl.java:142)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.CompatibilityXM IResourceImpl.doLoad(CompatibilityXMIResourceImpl.java:173)
>>> at
>>>
org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(Resour ceImpl.java:1354)
>>> at
>>
org.eclipse.wst.common.internal.emf.resource.TranslatorResou rceImpl.load(TranslatorResourceImpl.java:391)
>>> at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo ad(ResourceSetImpl.java:256)
>>> at
>>
org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.demandLoad(ProjectResourceSetImpl.java:83)
>>> at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLo adHelper(ResourceSetImpl.java:271)
>>> at
>>
org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResou rce(ResourceSetImpl.java:398)
>>> at
>>
org.eclipse.jem.internal.util.emf.workbench.ProjectResourceS etImpl.getResource(ProjectResourceSetImpl.java:262)
>>> at
>>
org.eclipse.jpt.core.internal.content.persistence.Persistenc eXmlJpaFileContentProvider.buildRootContent(PersistenceXmlJp aFileContentProvider.java:43)
>>> at
>>
org.eclipse.jpt.core.internal.JpaFileContentRegistry.buildCo ntent(JpaFileContentRegistry.java:60)
>>> at
>>
org.eclipse.jpt.core.internal.JpaFileContentRegistry.getFile (JpaFileContentRegistry.java:44)
>>> at
>>> org.eclipse.jpt.core.internal.JpaProject.createJpaFile(JpaPr oject.java:613)
>>> at org.eclipse.jpt.core.internal.JpaProject$3.visit(JpaProject. java:480)
>>> at
>>>
org.eclipse.core.internal.resources.Resource$1.visitElement( Resource.java:57)
>>> at
>>
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:81)
>>> at
>>
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
>>> at
>>
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
>>> at
>>
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
>>> at
>>
org.eclipse.core.internal.watson.ElementTreeIterator.iterate (ElementTreeIterator.java:126)
>>> at org.eclipse.core.internal.resources.Resource.accept(Resource .java:67)
>>> at org.eclipse.jpt.core.internal.JpaProject.fill(JpaProject.jav a:487)
>>> at
>>
org.eclipse.jpt.core.internal.JpaModelManager.createFilledJp aProject(JpaModelManager.java:208)
>>> at
>>
org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.checkForProjectsBeingAddedOrRemoved(JpaModelManage r.java:411)
>>> at
>>
org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.checkForProjectsBeingAddedOrRemoved(JpaModelManage r.java:434)
>>> at
>>
org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Processor.resourceChanged(JpaModelManager.java:327)
>>> at
>>
org.eclipse.jpt.core.internal.JpaModelManager$ResourceChange Listener.resourceChanged(JpaModelManager.java:284)
>>> at
>>
org.eclipse.core.internal.events.NotificationManager$2.run(N otificationManager.java:282)
>>> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
>>> at
>>
org.eclipse.core.internal.events.NotificationManager.notify( NotificationManager.java:276)
>>> at
>>
org.eclipse.core.internal.events.NotificationManager.broadca stChanges(NotificationManager.java:148)
>>> at
>>
org.eclipse.core.internal.resources.Workspace.broadcastPostC hange(Workspace.java:311)
>>> at
>>
org.eclipse.core.internal.resources.Workspace.endOperation(W orkspace.java:1018)
>>> at
>>
org.eclipse.core.internal.resources.InternalWorkspaceJob.run (InternalWorkspaceJob.java:45)
>>> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
>>
>>
Re: Problems closing and reopening DALI projects [message #600102 is a reply to message #434470] Wed, 13 June 2007 17:15 Go to previous message
Brian Fernandes is currently offline Brian Fernandes
Messages: 68
Registered: July 2009
Member
Neil,
Done, here's the entry: https://bugs.eclipse.org/bugs/show_bug.cgi?id=192477

I want to point out that the stack overflow seems to be a problem with the
JPA Validator and invalid persistence.xml files.

1) Open existing persistence.xml file.
2) Delete everything in the file excluding the XML header.
3) Save the file.

You are immediately hit with the stack over flow error dialog - no close /
reopen sequence required to get it to this state.

So there *might* be two separate bugs here:
a) Closing / reopening project corrupts persistence.xml file.
b) Empty persistence.xml file causes stack overflow error in JPA validator.

Thanks,
Brian.

"Neil Hauge" <neil.hauge@oracle.com> wrote in message
news:e82468478ee6117de5ccf45925c8e2be$1@www.eclipse.org...
> Brian,
>
> I am able to reproduce this issue fully. Please do enter a bug for this
> with the steps to reproduce that you have provided.
>
> Thanks,
> Neil
Re: Problems closing and reopening DALI projects [message #600114 is a reply to message #434474] Thu, 14 June 2007 21:01 Go to previous message
Neil Hauge is currently offline Neil Hauge
Messages: 469
Registered: July 2009
Senior Member
Brian,

Thanks for helping to investigate this. I have opened bug
https://bugs.eclipse.org/bugs/show_bug.cgi?id=192694 to address issue B.

Neil
Previous Topic:Dali: Not correctly mapping column name 'class'
Next Topic:Support for PostgreSQL?
Goto Forum:
  


Current Time: Thu Oct 23 16:31:14 GMT 2014

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

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