Re: org.ozoneDB.ObjectNotFoundException: No such object ID:

Per Nyfelt <[email protected]> Wed, 23 Nov 2005 23:07:20 +0000
Newsgroups gmane.comp.java.ozone.user
Organization New Field Consulting
Message-ID <[email protected]>
Interesting, I have NEVER experienced this kind of problem on any of the ozone 
based applications I have created and which have been running for years.

I hope we could narrow it down though and fix whatever the issue is.

Do you have any idea what the reason is for why some objects are not stored 
properly?

Some parameters of iterest in the investigation are:
1. Filesystem used
2. Load (number of concurrent users and number of transactions per minute)
3. Uptime (days since last server restart)
4. configuration (changes to config.properties compared to the default ones)
5. scenarious that might be triggering the issue
6. JVM used (version and vendor) and JVM settings if different from default 
ones

What about trying the latest cvs snapshot instead of the 1.2 release?

Best regards,
Per

On Tuesday 22 November 2005 19.14, Jimmy Stiefel wrote:
> I've experienced similar problems on multiple occasions with 1.2.  One
> numerous occasions,  the server has lost objects from its index.
>
> First thing I'd recommend is to try rebuilding your object index.
> This is generally a safe operation,  but backup first to be safe!  This
> has fixed the situation most of the time.
>
> Stop Ozone.
> Delete the file "nameTable.wizard" in your database data directory.
> Start ozone.
>
> On start, Ozone will automatically rebuild your object index by walking
> through each cluster.  When it is done,  hopefully your objects will be
> findable again.
>
> If that doesn't work,  you are dealing with corruption of one or more
> cluster files.  During the index rebuild,  you will see messages in your
> log about a corrupt cluster (and which one it is) if that is the case.
> I had that problem yesterday and was able to repair it by restoring the
> bad cluster from a backup.  That worked in my case,  but it may
> introduce inconsistencies, so beware - YMMV.
>
> As a last resort, I'd write a utility to traverse your data looking for
> the bad objects by calling an impl method on each suspect ozone object
> and catching the ozone exception.  When you find a bad one, you don't
> want to delete it from ozone (it's already gone from there - that's the
> problem) - you just want to remove the reference.   In my case I had a
> collection that contained some "lost" objects.  I tested & found the bad
> ones like so (below),  then removed those elements from my collection.
> You will lose data this way,  but at least you'll get your system back.
>
>    try {
>        member.getUserName();
>    } catch(org.ozoneDB.UnexpectedException ex) {
>        logger.warn("Ozone failure: bad proxy? Scheduling errant member
> for removal.", e);
>         corrupt.add(userName);
>     }
>
> I'd strongly advise testing out any repair attempt on a copy of your
> data to validate the effectiveness of your repair before alterring your
> production data.
>
> ~Jimmy
>
> On Thu, 2005-11-17 at 17:12 +0100, Rikard Andersson wrote:
> > Hi.
> >
> > Somehow I seem to have gotten a corrupt ozone database, how I am not
> > sure. But I am looking for a way to fix it without having to delete
> > the entire db. Leads on how the db may have been corrupt is
> > appreciated as well.
> >
> > Scenario:
> > I am able to get the name of the object from:
> > String[] vNames = vLocalDatabase.objectNames(); // vLocalDatabase is
> > org.ozoneDB.LocalDatabase
> >
> > But when I try to access the object with:
> > vLocalDatabase.objectForName(vNames[CORRUPT_NBR]);
> > I get the exception below, obviously same problem when I try to delete
> > it, because I need access the object in order to delete it...
> >
> > And since I am not able to delete it, I cannot (or can I?) rewrite
> > just the corrupt object.
> >
> > Any help, solving the issue is much appreciated.
> >
> > Br
> > Rikard Andersson
> >
> > Exception:
> > org.ozoneDB.ObjectNotFoundException: No such object ID: 119
> >  at org.ozoneDB.core.Transaction.acquireObject(Unknown Source)
> >  at org.ozoneDB.Database.fetch(Unknown Source)
> >  at
> > org.ozoneDB.blob.BLOBPageImpl_Proxy.size(BLOBPageImpl_Proxy.java:69)
> >  at
> > org.ozoneDB.blob.BLOBContainerImpl.available(BLOBContainerImpl.java:80)
> >  at
> > org.ozoneDB.blob.BLOBContainerImpl.read(BLOBContainerImpl.java:174)
> >  at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
> >  at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorI
> >mpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324)
> >  at org.ozoneDB.core.AbstractObjectContainer.invokeTarget(Unknown
> > Source)
> >  at org.ozoneDB.core.Transaction.invokeObject(Unknown Source)
> >  at org.ozoneDB.core.DbRemote.DbInvoke.perform(Unknown Source)
> >  at org.ozoneDB.core.Transaction.performCommand(Unknown Source)
> >  at org.ozoneDB.core.TransactionManager.performCommand(Unknown Source)
> >  at org.ozoneDB.core.TransactionManager.completeTransaction(Unknown
> > Source)
> >  at org.ozoneDB.core.TransactionManager.handleCommand(Unknown Source)
> >  at org.ozoneDB.core.DbRemote.DbLocalClient.send(Unknown Source)
> >  at org.ozoneDB.ExternalDatabase.sendCommand(Unknown Source)
> >  at org.ozoneDB.ExternalDatabase.sendCommand(Unknown Source)
> >  at org.ozoneDB.ExternalDatabase.invoke(Unknown Source)
> >  at
> > org.ozoneDB.blob.BLOBContainerImpl_Proxy.read(BLOBContainerImpl_Proxy.jav
> >a:220) at org.ozoneDB.blob.BLOBInputStream.read(BLOBInputStream.java:62)
> > at java.util.zip.CheckedInputStream.read(CheckedInputStream.java:60) ....
>
> -------------------------------------------------------
> This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
> Register for a JBoss Training Course.  Free Certification Exam
> for All Training Attendees Through End of 2005. For more info visit:
> http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
> _______________________________________________
> Ozone-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/ozone-users


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click