Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] NPE exporting from CDO
[CDO] NPE exporting from CDO [message #1007323] Tue, 05 February 2013 14:30 Go to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
When calling on the console cdo export repo1 [path to filee name]
After 2.7 Gigabyte of export. (Yes it's a big DB) we get an exception.

The eClass which is null, is from method:
protected EClass getObjectType(CDOID id) in DBStoreAccessor.

Any clues? thanks.

java.lang.NullPointerException
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalMappingStrategy.isMapped(AbstractHorizontalMappingStrategy.java:332)
at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.getClassMapping(AbstractMappingStrategy.java:534)
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalMappingStrategy.getClassMapping(HorizontalMappingStrategy.java:154)
at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.readRevisionByVersion(DBStoreAccessor.java:247)
at org.eclipse.emf.cdo.internal.server.Repository.loadRevisionByVersion(Repository.java:570)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevisionByVersion(CDORevisionManagerImpl.java:252)
at org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevisionByVersion(CDORevisionManagerImpl.java:1)
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.handleRevisions(AbstractHorizontalClassMapping.java:631)
at org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.handleRevisions(AbstractMappingStrategy.java:191)
at org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalMappingStrategy.handleRevisions(HorizontalMappingStrategy.java:210)
Re: [CDO] NPE exporting from CDO [message #1007422 is a reply to message #1007323] Tue, 05 February 2013 19:24 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 05.02.2013 15:30, schrieb Christophe Bouhier:
> When calling on the console cdo export repo1 [path to filee name]
> After 2.7 Gigabyte of export. (Yes it's a big DB) we get an exception.
> The eClass which is null, is from method: protected EClass getObjectType(CDOID id) in DBStoreAccessor.
That should not happen. Can you please check in what table (==EClass) that ID is stored?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


> Any clues? thanks.
> java.lang.NullPointerException
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalMappingStrategy.isMapped(AbstractHorizontalMappingStrategy.java:332)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.getClassMapping(AbstractMappingStrategy.java:534)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalMappingStrategy.getClassMapping(HorizontalMappingStrategy.java:154)
> at org.eclipse.emf.cdo.server.internal.db.DBStoreAccessor.readRevisionByVersion(DBStoreAccessor.java:247)
> at org.eclipse.emf.cdo.internal.server.Repository.loadRevisionByVersion(Repository.java:570)
> at
> org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevisionByVersion(CDORevisionManagerImpl.java:252)
> at
> org.eclipse.emf.cdo.internal.common.revision.CDORevisionManagerImpl.getRevisionByVersion(CDORevisionManagerImpl.java:1)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.AbstractHorizontalClassMapping.handleRevisions(AbstractHorizontalClassMapping.java:631)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.AbstractMappingStrategy.handleRevisions(AbstractMappingStrategy.java:191)
> at
> org.eclipse.emf.cdo.server.internal.db.mapping.horizontal.HorizontalMappingStrategy.handleRevisions(HorizontalMappingStrategy.java:210)
>


Re: [CDO] NPE exporting from CDO [message #1007428 is a reply to message #1007422] Tue, 05 February 2013 19:55 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Eike,

We suspect the DB data corruption again. (See https://bugs.eclipse.org/bugs/show_bug.cgi?id=396743). The ID for this EClass is a valid entry in the cdo_external_refs table.

rgds Christophe
Re: [CDO] NPE exporting from CDO [message #1007479 is a reply to message #1007428] Wed, 06 February 2013 05:04 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 05.02.2013 20:55, schrieb Christophe Bouhier:
> Eike,
> We suspect the DB data corruption again. (See https://bugs.eclipse.org/bugs/show_bug.cgi?id=396743). The ID for this
> EClass is a valid entry in the cdo_external_refs table.
That EClasses are stored as/like external_refs and have a (negative?) ID in that table is more like an implementation
detail of the DBStore. I was asking if you can find out whether the ID parameter value of the getObjectType(CDOID id)
call exists in one of the mapped tables.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] NPE exporting from CDO [message #1007514 is a reply to message #1007479] Wed, 06 February 2013 09:43 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
Eike,

The stack trace, doesn't show the ID. I don't know which object it concerns, unless the last line in the already flushed XML is the failing object? For that object we checked, and indeed exists. The good news however is we looked for the same problem as described in bug 396743, and we indeed found some mismatch in the list count kolom. After correcting this in the DB, the export succeeded.

With this successful export (The XML file is 4.4 Gig), we will start now with a clean repo, with a DB user with proper permissions, and I really hope we won't experience bug 396743 anymore.

Thank you for your help Eike. I really appreciate, you help us through this. The customer has over 1 year of valuable data in the system, and we need to be able to move forward and have full confidence in CDO.

Cheers Christophe

Re: [CDO] NPE exporting from CDO [message #1007558 is a reply to message #1007514] Wed, 06 February 2013 13:11 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 06.02.2013 10:43, schrieb Christophe Bouhier:
> Eike,
> The stack trace, doesn't show the ID.
I know. I expected that the debugger and a breakpoint must be used to examine runtime values.

> I don't know which object it concerns, unless the last line in the already flushed XML is the failing object? For that
> object we checked, and indeed exists. The good news however is we looked for the same problem as described in bug
> 396743, and we indeed found some mismatch in the list count kolom. After correcting this in the DB, the export succeeded.
> With this successful export (The XML file is 4.4 Gig), we will start now with a clean repo, with a DB user with proper
> permissions, and I really hope we won't experience bug 396743 anymore.
That would be great.

> Thank you for your help Eike. I really appreciate, you help us through this. The customer has over 1 year of valuable
> data in the system, and we need to be able to move forward and have full confidence in CDO.
Well, that you have confidence is my minimum hope :P

I can't even remember when the last data corruption was reported. Must be more than 3 years ago.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] NPE exporting from CDO [message #1007563 is a reply to message #1007558] Wed, 06 February 2013 13:44 Go to previous messageGo to next message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
> I can't even remember when the last data corruption was reported. Must be more than 3 years ago.
mmmh there was a recent post which looked very similar to our problem.
http://www.eclipse.org/forums/index.php/m/1002194/


BTW, we experienced another thing running a cdo import.
All existing sessions and views are 'killed' by the import process. Our application keeps a session open already when starting the app. I registered an IListener on the CDOSession, we get notification ABOUT_TO_DEACTIVATE. But how do I close the session from within the IListner? when I try to close the CDOSession. it hangs...
See the code:

// In case we loose our sessions, clear the session. 
		view.getSession().addListener(new IListener() {

			public void notifyEvent(IEvent event) {
				if(event instanceof LifecycleEvent){
					final LifecycleEvent lfEvent = (LifecycleEvent) event;
					if(lfEvent.getKind() == Kind.ABOUT_TO_DEACTIVATE){
						// What do I do to close the session from this listener? 
						ILifecycle source = lfEvent.getSource();
						System.out.println(source);
						
					}
				}
			}
		});
Re: [CDO] NPE exporting from CDO [message #1007596 is a reply to message #1007563] Wed, 06 February 2013 16:40 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 06.02.2013 14:44, schrieb Christophe Bouhier:
>> I can't even remember when the last data corruption was reported. Must be more than 3 years ago.
> mmmh there was a recent post which looked very similar to our problem. http://www.eclipse.org/forums/index.php/m/1002194/
I'll look at that thread again. IIRC there were unanswered question to both the reporter and Stefan Winkler...

> BTW, we experienced another thing running a cdo import. All existing sessions and views are 'killed' by the import
> process.
What do you mean by "existing"? Sessions to what? The repository that is under (import-) creation must not be used by
clients until the import has finished.

> Our application keeps a session open already when starting the app. I registered an IListener on the CDOSession, we
> get notification ABOUT_TO_DEACTIVATE. But how do I close the session from within the IListner? when I try to close the
> CDOSession. it hangs... See the code:
> // In case we loose our sessions, clear the session. view.getSession().addListener(new IListener() {
>
> public void notifyEvent(IEvent event) {
> if(event instanceof LifecycleEvent){
> final LifecycleEvent lfEvent = (LifecycleEvent) event;
> if(lfEvent.getKind() == Kind.ABOUT_TO_DEACTIVATE){
> // What do I do to close the session from this listener? ILifecycle
> source = lfEvent.getSource();
> System.out.println(source);
>
> }
> }
> }
> });
I have absolutely no clue what you're trying to do. If/when this event arrives in the listener the emitting session is
obviously already in the process of deactivation. Why do you want to deactivate it (again) in this listener?

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] NPE exporting from CDO [message #1007598 is a reply to message #1007596] Wed, 06 February 2013 17:00 Go to previous message
Christophe Bouhier is currently offline Christophe BouhierFriend
Messages: 937
Registered: July 2009
Senior Member
> What do you mean by "existing"? Sessions to what? The repository that is under (import-) creation >? > must not be used by
> clients until the import has finished.

Ok, I break that contract in the code, so I will change it.
Thanks.
Christophe
Previous Topic:[CDO] CDO version/history/revision functionality
Next Topic:[CDO] importer Exception
Goto Forum:
  


Current Time: Fri Mar 29 02:04:43 GMT 2024

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

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

Back to the top