Why is there no error when checkpointing after db log files are removed?

I would like to test a scenario when an application's embedded database is corrupted somehow. The simplest test I could think of was removing the database log files while the application is running. However, I can't seem to get any failure. To demonstrate, below is a code snippet that demonstrates what I am trying to do. (I am using JE 3.3.75 on Mac OS 10.5.6):
public class FileRemovalTest {
public static void main(String[] args) throws Exception
// Setup the DB Environment
EnvironmentConfig ec = new EnvironmentConfig();
ec.setAllowCreate(true);
ec.setTransactional(true);
ec.setConfigParam(EnvironmentConfig.ENV_RUN_CLEANER, "false");
ec.setConfigParam(EnvironmentConfig.ENV_RUN_CHECKPOINTER, "false");
ec.setConfigParam(EnvironmentConfig.CLEANER_EXPUNGE, "true");
ec.setConfigParam("java.util.logging.FileHandler.on", "true");
ec.setConfigParam("java.util.logging.level", "FINEST");
Environment env = new Environment(new File("."), ec);
// Create a database
DatabaseConfig dbConfig = new DatabaseConfig();
dbConfig.setAllowCreate(true);
dbConfig.setTransactional(true);
Database db = env.openDatabase(null, "test", dbConfig);
// Insert an entry and checkpoint the database
db.put(
null,
new DatabaseEntry("key".getBytes()),
new DatabaseEntry("value".getBytes()));
CheckpointConfig checkpointConfig = new CheckpointConfig();
checkpointConfig.setForce(true);
env.checkpoint(checkpointConfig);
// Delete the DB log files
File[] dbFiles = new File(".").listFiles(new DbFilenameFilter());
if (dbFiles != null)
for (File file : dbFiles)
file.delete();
// Add another entry and checkpoint the database again.
db.put(
null,
new DatabaseEntry("key2".getBytes()),
new DatabaseEntry("value2".getBytes())
{color:#ff0000} *// Q: Why does this 'put' succeed?*
{color}
env.checkpoint(checkpointConfig);
{color:#ff0000}*// Q: Why does this checkpoint succeed?*{color}
// Close the database and the environment
db.close();
env.close();
private static class DbFilenameFilter implements FilenameFilter
public boolean accept(File dir, String name) {
return name.endsWith(".jdb");
This is what I see in the logs:
2009-03-05 12:53:30:631:CST CONFIG Recovery w/no files.
2009-03-05 12:53:30:677:CST FINER Ins: bin=2 ln=1 lnLsn=0x0/0xe9 index=0
2009-03-05 12:53:30:678:CST FINER Ins: bin=5 ln=4 lnLsn=0x0/0x193 index=0
2009-03-05 12:53:30:688:CST FINE Commit:id = 1 numWriteLocks=1 numReadLocks = 0
2009-03-05 12:53:30:690:CST FINEST size interval=0 lastCkpt=0x0/0x0 time interval=0 force=true runnable=true
2009-03-05 12:53:30:703:CST FINER Ins: bin=8 ln=7 lnLsn=0x0/0x48b index=0
2009-03-05 12:53:30:704:CST CONFIG Checkpoint 1: source=recovery success=true nFullINFlushThisRun=4 nDeltaINFlushThisRun=0
2009-03-05 12:53:30:705:CST CONFIG Recovery finished: Recovery Infonull> useMinReplicatedNodeId=0 useMaxNodeId=0 useMinReplicatedDbId=0 useMaxDbId=0 useMinReplicatedTxnId=0 useMaxTxnId=0 numMapINs=0 numOtherINs=0 numBinDeltas=0 numDuplicateINs=0 lnFound=0 lnNotFound=0 lnInserted=0 lnReplaced=0 nRepeatIteratorReads=0
2009-03-05 12:53:30:709:CST FINEST Environment.open: name=test dbConfig=allowCreate=true
exclusiveCreate=false
transactional=true
readOnly=false
duplicatesAllowed=false
deferredWrite=false
temporary=false
keyPrefixingEnabled=false
2009-03-05 12:53:30:713:CST FINER Ins: bin=2 ln=10 lnLsn=0x0/0x7be index=1
2009-03-05 12:53:30:714:CST FINER Ins: bin=5 ln=11 lnLsn=0x0/0x820 index=1
2009-03-05 12:53:30:718:CST FINE Commit:id = 2 numWriteLocks=0 numReadLocks = 0
2009-03-05 12:53:30:722:CST FINEST Database.put key=107 101 121 data=118 97 108 117 101
2009-03-05 12:53:30:728:CST FINER Ins: bin=13 ln=12 lnLsn=0x0/0x973 index=0
2009-03-05 12:53:30:729:CST FINE Commit:id = 3 numWriteLocks=1 numReadLocks = 0
2009-03-05 12:53:30:729:CST FINEST size interval=0 lastCkpt=0x0/0x581 time interval=0 force=true runnable=true
2009-03-05 12:53:30:735:CST FINER Mod: bin=5 ln=4 lnIdx=0 oldLnLsn=0x0/0x193 newLnLsn=0x0/0xb61
2009-03-05 12:53:30:736:CST FINER Mod: bin=5 ln=11 lnIdx=1 oldLnLsn=0x0/0x820 newLnLsn=0x0/0xc3a
2009-03-05 12:53:30:737:CST FINER Ins: bin=8 ln=15 lnLsn=0x0/0xd38 index=0
2009-03-05 12:53:30:738:CST CONFIG Checkpoint 2: source=api success=true nFullINFlushThisRun=6 nDeltaINFlushThisRun=0
2009-03-05 12:53:30:741:CST FINEST Database.put key=107 101 121 50 data=118 97 108 117 101 50
2009-03-05 12:53:30:742:CST FINER Ins: bin=13 ln=16 lnLsn=0x0/0xeaf index=1
2009-03-05 12:53:30:743:CST FINE Commit:id = 4 numWriteLocks=1 numReadLocks = 0
2009-03-05 12:53:30:744:CST FINEST size interval=0 lastCkpt=0x0/0xe32 time interval=0 force=true runnable=true
2009-03-05 12:53:30:746:CST FINER Mod: bin=5 ln=4 lnIdx=0 oldLnLsn=0x0/0xb61 newLnLsn=0x0/0x1166
2009-03-05 12:53:30:747:CST FINER Mod: bin=5 ln=11 lnIdx=1 oldLnLsn=0x0/0xc3a newLnLsn=0x0/0x11e9
2009-03-05 12:53:30:748:CST FINER Ins: bin=8 ln=17 lnLsn=0x0/0x126c index=0
2009-03-05 12:53:30:748:CST CONFIG Checkpoint 3: source=api success=true nFullINFlushThisRun=4 nDeltaINFlushThisRun=0
2009-03-05 12:53:30:750:CST FINEST Database.close: name=test
2009-03-05 12:53:30:751:CST FINE Close of environment . started
2009-03-05 12:53:30:751:CST FINEST size interval=0 lastCkpt=0x0/0x1363 time interval=0 force=true runnable=true
2009-03-05 12:53:30:754:CST FINER Mod: bin=5 ln=4 lnIdx=0 oldLnLsn=0x0/0x1166 newLnLsn=0x0/0x14f8
2009-03-05 12:53:30:755:CST FINER Mod: bin=5 ln=11 lnIdx=1 oldLnLsn=0x0/0x11e9 newLnLsn=0x0/0x15a9
2009-03-05 12:53:30:756:CST FINER Ins: bin=8 ln=18 lnLsn=0x0/0x16ab index=0
2009-03-05 12:53:30:757:CST CONFIG Checkpoint 4: source=close success=true nFullINFlushThisRun=4 nDeltaINFlushThisRun=0
2009-03-05 12:53:30:757:CST FINE About to shutdown daemons for Env .

Hi,
OS X, being Unix-like, probably isn't actually deleting file 00000000.jdb since JE still has it open -- the file deletion is deferred until it is closed. JE keeps N files open, where N is configurable.
We do corruption testing ourselves, in the following test by overwriting a file and then attempting to read back the entire database:
test/com/sleepycat/je/util/DbScavengerTest.java
--mark                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • Why is there an error when activating custom wsp's (timer job) via SharePointUI?

    We have created a Timer Job Project.
    Before packaging wsp and deploying via PowerShell:- 
    1. If I set scope to Web and go to site features then I hit on Activate it gives error
    (sayin to enable debug for error msg in web.config).
    2. Similarly, if I set scope to Site, then if I go into site collection features and activate,
    it give same error.
    3. If scope is set to Web Application then the feature is activated by default (under
    web app features), but cannot see the job under job definitions.
    4. If scope is set to farm, then (under farm features) similar to above point no. 3
    There is also error when deactivating features which are already activated when a package
    is deployed. for example: web applicaiton feature. 
    Further, I cannot see the timer job under job defn unless it is scoped to SITE..
    Why is this?
    I donot get the issues when activating the features via PowerShell. Why is this?

    Hi Nachiket Kamat,
    When you are using web scoped or site scoped features to install the timer jobs, the account that does the scheduling must have write permissions to the configuration database of the server farm, usually, the identity of the application pool that is hosting
    the SharePoint site does not have permissions on the configuration database, this is the account that is used when you activate the feature through the browser interface, this may cause the feature activated failed.
    Another scenario that you met when you change the feature scope to web application, job definition cannot be seen, this may be caused by the feature receiver code, like if scope to web application, then get the web application from properties.Feature.Parent
    as SPWebApplication, if you change the feature scope, then this also need to change to get the proper object.
    Thanks,
    Qiao Wei
    TechNet Community Support

  • Why is there an error when I try to use Keychain Access?

    Hi,
    I'm having this error when I reveal a password.
    Any suggestions?

    Try Keychain Access/First Aid. If that doesn't work, reset the Keychain.
    Keychain Reset

  • Error when trying to store iso file in removable disk mod

    I am trying to store a 3 gig + iso file ( video file) on my zen micro and I keep getting a error message. I have already set the removable disk size to 4 G.. Is it the size? the format? (iso) a bad unit's anyone else have any experience with this? Thanks in advance!
    BTW: the file is the Iron Maiden Li've DVD from the Ullevi,Sweden TV broadcast this summerI \m/ ! which is making the rounds on the net if any of y'all are Maiden fans and would like it drop me an email! preferrably those with an answer to my prob!

    What version of ACR do you have installed? Waht type of files are you trying to open (camera model)? -adriana

  • Why is there an error when connecting to the Itunes store?

    When I try to connect to my Itunes, it says there is an error and to try back later? I have never had an issue with this and am unsure what to do to fix it. Also, when I try to download the newest version of Itunes it says it can't find the file with the Itunes "installationpackage.msi"? I have never had any issues connecting to my Itunes store or downloading a newer version..

    Hi gymtrainger55,
    When having iTunes Store connectivity issues, the following articles provide the best solutions:
    Can't connect to the iTunes Store
    http://support.apple.com/kb/TS1368
    iTunes: Advanced iTunes Store troubleshooting
    http://support.apple.com/kb/TS3297
    Thanks,
    Matt M.

  • Why multiple  log files are created while using transaction in berkeley db

    we are using berkeleydb java edition db base api, we have already read/write CDRFile of 9 lack rows with transaction and
    without transaction implementing secondary database concept the issues we are getting are as follows:-
    with transaction----------size of database environment 1.63gb which is due to no. of log files created each of 10 mb.
    without transaction-------size of database environment 588mb and here only one log file is created which is of 10mb. so we want to know how REASON CONCRETE CONCLUSION ..
    how log files are created and what is meant of using transaction and not using transaction in db environment and what are this db files db.001,db.002,_db.003,_db.004,__db.005 and log files like log.0000000001.....plz reply soon

    we are using berkeleydb java edition db base api, If you are seeing __db.NNN files in your environment root directory, these are environment's shared region files. And since you see these you are using Berkeley DB Core (with the Java/JNI Base API), not Berkeley DB Java Edition.
    with transaction ...
    without transaction ...First of all, do you need transactions or not? Review the documentation section called "Why transactions?" in the Berkeley DB Programmer's Reference Guide.
    without transaction-------size of database environment 588mb and here only one log file is created which is of 10mb.There should be no logs created when transactions are not used. That single log file has likely remained there from the previous transactional run.
    how log files are created and what is meant of using transaction and not using transaction in db environment and what are this db files db.001,db.002,_db.003,_db.004,__db.005 and log files like log.0000000001Have you reviewed the basic documentations references for Berkeley DB Core?
    - Berkeley DB Programmer's Reference Guide
    in particular sections: The Berkeley DB products, Shared memory regions, Chapter 11. Berkeley DB Transactional Data Store Applications, Chapter 17. The Logging Subsystem.
    - Getting Started with Berkeley DB (Java API Guide) and Getting Started with Berkeley DB Transaction Processing (Java API Guide).
    If so, you would have had the answers to these questions; the __db.NNN files are the environment shared region files needed by the environment's subsystems (transaction, locking, logging, memory pool buffer, mutexes), and the log.MMMMMMMMMM are the log files needed for recoverability and created when running with transactions.
    --Andrei                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Why am I getting an error when I place two OAM files one after the other in different pages?

    Why am I getting an error when I place two OAM files one after the other in different pages? They do not load or play correctly.  They are both configured to play automatically with a .125 second delay and both have a white rectangle "poster" over for a hidden effect.

    Thanks for the idea, Scott! I initially tried your idea, but my OAM files were still not loading correctly.  I tried other combinations of OAM files, and it seems to work fine.
    Back to my original OAM files: I made sure that my elements in my Edge Animate project had different names. I originally copied parts of some elements from one to another, and I think it was confusing to DPS to read it. 

  • HT201210 why is there an error occurring when trying to do a software update ios6 on iphone 4s

    why is there an error occurring when trying to do a software update ios6 on iphone 4s??

    You might find this article helpful: http://support.apple.com/kb/TS3694
    It has the error range of 3000's which states
    Errors 3000-3999 (3002, 3004, 3013, 3014, 3018, 3164, 3194, and so on): Error codes in the 3000 range generally mean that iTunes cannot contact the gs.apple.com server on ports 80 or 443. This may be because out-of-date or incorrectly configured security or firewall software is interfering, an old version of iTunes is installed, an entry in your hosts file redirecting requests to gs.apple.com (see error 1004 above), or because of your Internet proxy settings. If you are using a proxy, try without using one or with a known-good network. If that does not resolve the issue, follow iTunes for Windows: Troubleshooting security software issues. Error 3014 may indicate that you need to free up more disk space on the computer before trying to restore again. Error 3194 most likely indicates you do not have the latest version of iTunes installed Update to the latest version of iTunes. 

  • Why is there a error appearing in this??

    I have written a program to search if the particular item is present in the file or not.. so why is there any error hope it is right!
    BufferedReader check;
         try{
             check=new BufferedReader(new FileReader(FileName));
        }catch(FileNotFoundException ex){
            System.out.println("Sorry file not found");
            return; 
                                System.out.println("Enter the item to be found");
                                String input_item=in.readLine();
                                String item= input_item.toUpperCase();
                                System.out.println("Searching for "+item);
                                int messenger=0, x=0;
                                 while(x<sType.length) {
                                    sType[x]=check.readLine();
                                    sNum[x]=Integer.parseInt(check.readLine());
                                    sPrice[x]=Float.parseFloat(check.readLine());
                                    if(item.equals(sType[x])) {
                                        System.out.println("Found "+sType[x]);
                                        System.out.println("-------------------------------------------------------");
                                        System.out.print("Stock Name :");
                                        System.out.println("\t"+sType[x]);
                                        System.out.print("Stock Level:");
                                        System.out.println("\t"+sNum[x]);
                                        System.out.print("Stock Price:");   
                                        System.out.println("\t$"+sPrice[x]);
                                        System.out.println("-------------------------------------------------------");
                                        messenger=1;
                                    x++;
                                if(messenger==0) {
                                    System.out.println("Sorry "+item+" not available");
      and the file contains the following in the particular format
    LOGITECH CORDLESS DESKTOP LX300
    200
    50.2
    MONITER
    62
    54.9
    PANASONIC
    54
    32.3
    MOUSE
    95
    21.4pl help why this error is appearing???
    Exception in thread "main" java.lang.NumberFormatException: null
    at java.lang.Integer.parseInt(Integer.java:415)
    at java.lang.Integer.parseInt(Integer.java:497)
    at programname.<init>(NewMain.java:17)
    ??????????????????????????????????????????????????????

    Please do not post the same question more than once!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    http://forum.java.sun.com/thread.jspa?messageID=9919410

  • Error occurred in deployment step 'Install app for SharePoint': There were errors when validating the App manifest.

    Hi everyone,
    I `m getting error message like this  "Error occurred in deployment step 'Install app for SharePoint': There were errors when validating the App manifest.". when i try to debug the application with "Start Action"="Internet Explorer".This
    application  is  an apps for office application with Oauth with Office 365
    Any help in this regard is greatly appreciated 
    Thanks!!
    Santosh Sutar

    Thanks Fei for your time.
    >>>I would suggest that you create a new project and set it start action with 'Internet Explorer'
    to see whether this issue could be reproduced.  If no, we can compare the difference between the two menifest files.
    As per your suggestion above ,With new project,I can debug with with start action "Internet Explorer" and I
    could not see much difference between the manifest files.
    Please find below my manifest file for the reference .
    <?xml version="1.0" encoding="UTF-8"?>
    <!--Created:cb85b80c-f585-40ff-8bfc-12ff4d0e34a9-->
    <OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="TaskPaneApp">
      <Id>084cd6cd-2908-44d1-a5cf-4fa029aec211</Id>
      <Version>1.0.0.0</Version>
      <ProviderName>[Provider name]</ProviderName>
      <DefaultLocale>en-US</DefaultLocale>
      <DisplayName DefaultValue="Office 365 MVC" />
      <Description DefaultValue="Office 365 MVC"/>
      <AppDomains>
        <AppDomain>https://login.microsoftonline.com</AppDomain>
      </AppDomains>
      <Hosts>
        <Host Name="Document" />
        <Host Name="Workbook" />
      </Hosts>
      <DefaultSettings>
        <SourceLocation DefaultValue="~remoteAppUrl/Home/Index/" />
      </DefaultSettings>
      <Permissions>ReadWriteDocument</Permissions>
    </OfficeApp>
    Please suggest on this.
    Thanks !!
    Santosh Sutar

  • 'Install App for SharePoint' There were errors when validating the App Package

    Hello,
    When testing with an app, I tried to add an
    app event receiver before learning that remote event receiver are not allowed with
    Sharepoint-hosted app. So I reseted the Handle app installed and
    Web Project properties of my project and tried to redeploy and this error occurred :
    'Install App for SharePoint' There were errors when validating the App Package
    Something other than the project's properties have been modified but I don't know what.

    I think the best way to figure real reason out is to look at ULS logs.
    This is example, what I had:
    Unexpected        App Packaging: CreatePackage: Unexpected exception: There were errors when validating the App package: There were errors when validating the App Package. Other warnings / errors associated with this
    exception:  The current version of SharePoint is less than the SharePointMinVersion specified in the app manifest. CurrentVersion='15.0.4693.1000', SharePointMinVersion='16.0.0.0'.

  • Ki235 Error When PGI After Ehp6 Upgrade

    Hello
    What would cause KI235 error when PGI after ehp6 upgrade? We are upgrading to ehp6 and are receiving this error when PGIing delivery. It only does this in the upgraded client and not in non-upgraded client. The automatic account assignments match exactly in both clients and are not missing or incorrect.
    Also check OKB9 setting it is perfectly ok.
    Please advise,
    Thanks,
    Themba

    This is a repetitive issue and have you searched the forum before posting?
    G. Lakshmipathi

  • TS3694 why is there an error 9006 and how can i fix it?? please answer for ipad mini

    why is there an error 9006 and how can i fix it?? please answer and btw its an ipad mini

    if you are trying to download and install ios7, it is probably because of the enormous amount of traffic apple's download servers must be experiencing. things should return to normal before too long, just hang tight

  • Why is there no chime when my macbook re-starts?

    why is there no chime when my macbook re-starts?

    Jim Baggins,
    perhaps because it was somehow set to not chime?
    Try opening Terminal, and run the following command in the Terminal window:
    nvram SystemAudioVolume
    What output does this command generate?

  • I keep on getting this error when i try to copy files to my 2T Time Capsule, Please help im running out of space on my MacBook Pro.... The operation can't be completed because an unexpected error occurred (error code -50)

    I keep on getting this error when i try to copy files to my 2T Time Capsule, Please help im running out of space on my MacBook Pro....
    The operation can’t be completed because an unexpected error occurred (error code -50)

    I would get an external drive today and copy all your stuff off the TC.. forget trying to load more onto it. There is a good chance after 3years (A 2TB should be only about 2years tops), the disk or the TC itself is on the way out. Do it immediately. If TM is also failing to backup you need to recognise symtoms of impending doom.
    Unfortunately the error messages are archane and it is hard to discover their meaning.
    You also cannot verify a network drive.. you can verify the TM sparsebundle though so do that.
    A5. http://pondini.org/TM/Troubleshooting.html
    Reboot the whole network from off.. certainly if you run later OS it can simply lose the drive..
    If you still fail to be able to copy to the TC.. then get that external and copy off it. Tell us if you can do that.

Maybe you are looking for

  • Interesting difference between books and tutorials

    I started coding in Java about four years ago. When I started I learned from a book (that I no longer have), I think it was "Sam's Teach Yourself Java in 24 Hours". I was just a kid then and I became fairly proficient in all of the basic requirements

  • Using an external web service  and local element declarations

    I am attempting to use (call) an external web service from workshop 8.1. It seems that if the web service's schema contains local element declarations with the same name then workshop will generate incorrect JCX code because it doesn't scope the gene

  • No customizing request of LBWE gets stored in SE09

    Hi All, I have activated master and transaction data sources in RSA5 and corresponding requests are showing in SE09 but once I activate extract structure using  T-code LBWE, It does not ask to save and also no customizing request gets stored in SE09.

  • Problems printing a converted PDF which was converted to Word after completing the form

    Problems printing a converted PDF which was converted to Word after completing the form.  I have spent the last 3 hours trying to figure out what I am doing incorrectly.  I can't get it to print in either the PDF or Word file.  Please help, I need to

  • Brush size visualization

    Hi all, I don't know if this is new in CC or if there is a setting somewhere ( I am coming from cs3 to cc). How would one get the colored (red) brush sizing when alt-right clicking to change the brush size? Mine just shows the black ellipse outline,