Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dali » New NPE when opening Project?
New NPE when opening Project? [message #433966] Tue, 23 May 2006 20:29 Go to next message
Kevin Sutter is currently offline Kevin Sutter
Messages: 104
Registered: July 2009
Senior Member
Hi,
I didn't find this in the forum or bug database... Bug 143301 looks to be
very similar, but the line numbers were different, so I'm not positive
it's the same problem. I'll let the experts decide...

I decided to try to import the Kodo tutorial classes (Animal, Dog, Rabbit,
etc) into my Dali environment. I am getting several NPE's and
IndexOutOfRange errors. To easily reproduce, if I close my Project and
re-open it (while connected to my Derby database), I get the following
NPE. If we can get by this one, then maybe the others will resolve
themselves. If not, I know how to append to this forum... :-)

java.lang.NullPointerException
at
org.eclipse.dali.orm.impl.EntityImpl.setSpecifiedName(Entity Impl.java:244)
at
org.eclipse.dali.orm.adapters.java.JavaEntityModelAdapter$1. setPersValue(JavaEntityModelAdapter.java:100)
at
org.eclipse.dali.orm.adapters.java.AbstractAnnotationElement Adapter.updatePersElement(AbstractAnnotationElementAdapter.j ava:76)
at
org.eclipse.dali.orm.adapters.java.JavaEntityModelAdapter.up datePersSpecifiedName(JavaEntityModelAdapter.java:165)
at
org.eclipse.dali.orm.adapters.java.JavaEntityModelAdapter.up datePersModel(JavaEntityModelAdapter.java:133)
at
org.eclipse.dali.orm.adapters.java.JavaPersistentTypeModelAd apter.updatePersTypeMapping(JavaPersistentTypeModelAdapter.j ava:167)
at
org.eclipse.dali.orm.adapters.java.JavaPersistentTypeModelAd apter.updatePersModel(JavaPersistentTypeModelAdapter.java:11 5)
at
org.eclipse.dali.orm.adapters.java.JavaPersistenceFileModelA dapter.addPersistentType(JavaPersistenceFileModelAdapter.jav a:166)
at
org.eclipse.dali.orm.adapters.java.JavaPersistenceFileModelA dapter.updatePrimaryType(JavaPersistenceFileModelAdapter.jav a:143)
at
org.eclipse.dali.orm.adapters.java.JavaPersistenceFileModelA dapter.updateModel(JavaPersistenceFileModelAdapter.java:71)
at
org.eclipse.dali.orm.adapters.java.JavaPersistenceFileModelA dapter.updatePersModel(JavaPersistenceFileModelAdapter.java: 60)
at
org.eclipse.dali.orm.impl.PersistenceFileImpl.engageModel(Pe rsistenceFileImpl.java:97)
at
org.eclipse.dali.orm.impl.PersistenceContainerImpl.getPersis tenceFile(PersistenceContainerImpl.java:316)
at
org.eclipse.dali.orm.impl.PersistenceContainerImpl$2.visit(P ersistenceContainerImpl.java:212)
at
org.eclipse.core.internal.events.ResourceDelta.accept(Resour ceDelta.java:67)
at
org.eclipse.core.internal.events.ResourceDelta.accept(Resour ceDelta.java:76)
at
org.eclipse.core.internal.events.ResourceDelta.accept(Resour ceDelta.java:48)
at
org.eclipse.dali.orm.impl.PersistenceContainerImpl.synchInte rnalResources(PersistenceContainerImpl.java:244)
at
org.eclipse.dali.orm.impl.PersistenceContainerImpl$2.visit(P ersistenceContainerImpl.java:231)
at
org.eclipse.core.internal.events.ResourceDelta.accept(Resour ceDelta.java:67)
at
org.eclipse.core.internal.events.ResourceDelta.accept(Resour ceDelta.java:76)
at
org.eclipse.core.internal.events.ResourceDelta.accept(Resour ceDelta.java:48)
at
org.eclipse.dali.orm.impl.PersistenceContainerImpl.synchInte rnalResources(PersistenceContainerImpl.java:244)
at
org.eclipse.dali.orm.impl.PersistenceContainerImpl$2.visit(P ersistenceContainerImpl.java:231)
at
org.eclipse.core.internal.events.ResourceDelta.accept(Resour ceDelta.java:67)
at
org.eclipse.core.internal.events.ResourceDelta.accept(Resour ceDelta.java:76)
at
org.eclipse.core.internal.events.ResourceDelta.accept(Resour ceDelta.java:48)
at
org.eclipse.dali.orm.impl.PersistenceContainerImpl.synchInte rnalResources(PersistenceContainerImpl.java:244)
at
org.eclipse.dali.orm.impl.PersistenceContainerImpl$2.visit(P ersistenceContainerImpl.java:231)
at
org.eclipse.core.internal.events.ResourceDelta.accept(Resour ceDelta.java:67)
at
org.eclipse.core.internal.events.ResourceDelta.accept(Resour ceDelta.java:76)
at
org.eclipse.core.internal.events.ResourceDelta.accept(Resour ceDelta.java:48)
at
org.eclipse.dali.orm.impl.PersistenceContainerImpl.synchInte rnalResources(PersistenceContainerImpl.java:244)
at
org.eclipse.dali.orm.impl.PersistenceContainerImpl$2.visit(P ersistenceContainerImpl.java:231)
at
org.eclipse.core.internal.events.ResourceDelta.accept(Resour ceDelta.java:67)
at
org.eclipse.core.internal.events.ResourceDelta.accept(Resour ceDelta.java:76)
at
org.eclipse.core.internal.events.ResourceDelta.accept(Resour ceDelta.java:48)
at
org.eclipse.dali.orm.impl.PersistenceContainerImpl.synchInte rnalResources(PersistenceContainerImpl.java:244)
at
org.eclipse.dali.orm.impl.PersistenceContainerImpl$2.visit(P ersistenceContainerImpl.java:231)
at
org.eclipse.core.internal.events.ResourceDelta.accept(Resour ceDelta.java:67)
at
org.eclipse.core.internal.events.ResourceDelta.accept(Resour ceDelta.java:76)
at
org.eclipse.core.internal.events.ResourceDelta.accept(Resour ceDelta.java:48)
at
org.eclipse.dali.orm.impl.PersistenceContainerImpl.synchInte rnalResources(PersistenceContainerImpl.java:244)
at
org.eclipse.dali.orm.impl.PersistenceModelManager$ResourceCh angeProcessor.checkForPersistenceFilesBeingAddedOrRemoved(Pe rsistenceModelManager.java:244)
at
org.eclipse.dali.orm.impl.PersistenceModelManager$ResourceCh angeProcessor.checkForPersistenceFilesBeingAddedOrRemoved(Pe rsistenceModelManager.java:255)
at
org.eclipse.dali.orm.impl.PersistenceModelManager$ResourceCh angeProcessor.resourceChanged(PersistenceModelManager.java:2 14)
at
org.eclipse.dali.orm.impl.PersistenceModelManager$ResourceCh angeListener.resourceChanged(PersistenceModelManager.java:17 1)
at
org.eclipse.core.internal.events.NotificationManager$2.run(N otificationManager.java:280)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at
org.eclipse.core.internal.events.NotificationManager.notify( NotificationManager.java:274)
at
org.eclipse.core.internal.events.NotificationManager.broadca stChanges(NotificationManager.java:148)
at
org.eclipse.core.internal.resources.Workspace.broadcastPostC hange(Workspace.java:256)
at
org.eclipse.core.internal.resources.Workspace.endOperation(W orkspace.java:958)
at
org.eclipse.core.internal.resources.InternalWorkspaceJob.run (InternalWorkspaceJob.java:45)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Re: New NPE when opening Project? [message #433967 is a reply to message #433966] Tue, 23 May 2006 22:03 Go to previous messageGo to next message
Karen Butzke is currently offline Karen Butzke
Messages: 220
Registered: July 2009
Senior Member
Hey Kevin,

Looks like the same problem, have you tried removing the name annotation
element from each Entity? So change @Entity(name="Animal") to just
@Entity, that's the same as the default setting anyway. I'd say we need
to fix this one for M4, since I think it was broken in M3.

Karen
Re: New NPE when opening Project? [message #433969 is a reply to message #433967] Wed, 24 May 2006 13:53 Go to previous messageGo to next message
Kevin Sutter is currently offline Kevin Sutter
Messages: 104
Registered: July 2009
Senior Member
Karen,
You are impressive. Removing the "name" parameter allowed me to open the
project and actually do some persistence activity. I still have some
bugs, but I will open separate forum entries to track those.

My question to you is how did you know that I had "@Entity(name="Animal")"
in my code? Are you familiar with these samples? Or, did the callstack
just clue you into the fact that I *must* have that to cause the error
reported? Just curious.

Thanks again,
Kevin
Re: New NPE when opening Project? [message #433973 is a reply to message #433969] Wed, 24 May 2006 15:59 Go to previous message
Karen Butzke is currently offline Karen Butzke
Messages: 220
Registered: July 2009
Senior Member
Well, the bug you pointed out was for having the entity name annotation
element set and then I googled for the Kodo tutorial classes. I wasn't
reading your mind or anything :)

Karen
Re: New NPE when opening Project? [message #585552 is a reply to message #433966] Tue, 23 May 2006 22:03 Go to previous message
Karen Butzke is currently offline Karen Butzke
Messages: 220
Registered: July 2009
Senior Member
Hey Kevin,

Looks like the same problem, have you tried removing the name annotation
element from each Entity? So change @Entity(name="Animal") to just
@Entity, that's the same as the default setting anyway. I'd say we need
to fix this one for M4, since I think it was broken in M3.

Karen
Re: New NPE when opening Project? [message #588770 is a reply to message #433967] Wed, 24 May 2006 13:53 Go to previous message
Kevin Sutter is currently offline Kevin Sutter
Messages: 104
Registered: July 2009
Senior Member
Karen,
You are impressive. Removing the "name" parameter allowed me to open the
project and actually do some persistence activity. I still have some
bugs, but I will open separate forum entries to track those.

My question to you is how did you know that I had "@Entity(name="Animal")"
in my code? Are you familiar with these samples? Or, did the callstack
just clue you into the fact that I *must* have that to cause the error
reported? Just curious.

Thanks again,
Kevin
Re: New NPE when opening Project? [message #588817 is a reply to message #433969] Wed, 24 May 2006 15:59 Go to previous message
Karen Butzke is currently offline Karen Butzke
Messages: 220
Registered: July 2009
Senior Member
Well, the bug you pointed out was for having the entity name annotation
element set and then I googled for the Kodo tutorial classes. I wasn't
reading your mind or anything :)

Karen
Previous Topic:@ManyToMany kind of working...
Next Topic:@ManyToMany kind of working...
Goto Forum:
  


Current Time: Sat Sep 20 12:21:36 GMT 2014

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

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