Bug with setAllowCreate of the environment

Hello

Maybe I missunderstand something, but setAllowCreate (true) of the Environment class does not work properly. I don't want pre create the folder for my db, so I put allowCreate to true and let sleepycat create it for me if the folder does not exist. But it does not work and I didn't know any mkdirs() to create the folder in the source code:

class EnvironmentImpl line 453:

fileManager = new FileManager (this, envHome, isReadOnly); the exception is thrown here because there is no such thing as "envHome".

If (! envConfig.getAllowCreate () & &! fileManager.filesExist ()) {}
throw new EnvironmentNotFoundException
(this, ' a base directory: "+ envHome");
}

Also, the line "fileManager = new FileManager (this, envHome, isReadOnly);" should be after "If", so if the 'envHome' does not exist, it is enabled the 'if' just after, and if getAllowCreate returns true, it should create the folder, so the 'file manager' could be instatiated correctly. I see him sth like this:

If (envConfig.getAllowCreate () & &! envHome.exists ()) {}
{if (! envHome.Mkdirs ())}
throw new IllegalStateException ("Could not create the folder" + envHome.getAbsolutePath ());
}
}

fileManager = new FileManager (this, envHome, isReadOnly);



My config:

version of I - 5.0.73
Spring 3.1.3


To resolve this problem, our team has expanded the class environment as follows:


SerializableAttribute public class FixEnvironment extends environment {}
public FixEnvironment (file envHome, EnvironmentConfig envConfig,
Boolean openIfNeeded, RepConfigProxy repConfigProxy,
{EnvironmentImpl envImplParam)
Super (envHome, envConfig, openIfNeeded, repConfigProxy, envImplParam);
}

public FixEnvironment (envHome, EnvironmentConfig configuration file,
RepConfigProxy repConfigProxy, EnvironmentImpl envImplParam) {}
Super (envHome, configuration, repConfigProxy, envImplParam);
}

public FixEnvironment (envHome, EnvironmentConfig configuration file)
throws EnvironmentNotFoundException, EnvironmentLockedException,
VersionMismatchException, DatabaseException,
IllegalArgumentException {}
Super (envHome, configuration);
}

protected EnvironmentImpl makeEnvironmentImpl (file envHome,
EnvironmentConfig envConfig, openIfNeeded boolean,
{RepConfigProxy repConfigProxy)

If (envConfig.getAllowCreate () & &! envHome.exists ()) {}
{if (! envHome.Mkdirs ())}
throw new IllegalStateException ("Could not create the folder" + envHome.getAbsolutePath ());
}
}

Return super.makeEnvironmentImpl (envHome, envConfig, openIfNeeded,
repConfigProxy);
}

}


So instead of using the class sleepycat native environment, we use now the FixEnvironment and that did the trick.

Published by: 995285 on March 21, 2013 03:06

Published by: 995285 on March 21, 2013 03:07

The setAllowCreate method is intended to be applied to the files that make up the environment of the BDB I. In all cases, we expect the location of the directory to exist. See http://docs.oracle.com/cd/E17277_02/html/GettingStartedGuide/applicationoverview.html#dbIntro:
"To use a database environment, it must first be created, and then open. To create a database environment, the location of the directory in which it resides must already exist. »

If you want to check if the directory already exists, it would probably work just use java.io.File.exists or createNewFile, depending on the semantics desired.

Tags: Database

Similar Questions

  • Bug with the donation page today

    You have a bug with your fundraising page. I have selected $10 and transferred to Paypal to $3. I tried again and made sure to click twice on a $10. I got the same results. I thought you should know.

    Hi el_nik,
    I filed a bug to prosecute for the page to donate. However can you please confirm that this always happens after that you remove the cookies from the page?

  • My description of bug with examples is greater than the limit of your comments, where can I post it then?

    I was going to send a bug report via but the system rejected it because of its size. The report is the following:

    "
    There is a bug that occurs when I delete the symbols quickly with a virtual keyboard:

    for example, if I start to remove the third line of the

    • a little weird right down here
    • Cat'o 'dog' or ' other '.
    • We will remove this
    • We will remove this
    • I don't like her, not a single bit

    from the end of the line of right in this feedback message field, sometimes I will get (after some pressure from BACKSPACE):

    • a little weird right down here
    • Cat'o 'dog' or ' other '.
    • Let'sthis
    • We will remove this
    • I don't like her, not a single bit

    then the cursor jumped to the Middle, and sometimes the line break is eaten, so I'm

    • a little weird right down here
    • Cat'o 'dog' or ' other '.
    • We're going to delet * doesn't, not a single bit

    (here, I deleted the third line, then started with the fourth).

    The bug depends on the speed of deletion. The pre-installed on Asus eee Asus virtual keyboard slider is used, but such a but only occurs in other applications, I have not noticed that even in beta version of FireFox 11.0.
    "

    Is it OK to post here? Or there is some place better?

    PS the bugs seem to happen the same way in this text box.

    The latest version of Firefox Mobile is 10, but there an Aurora version 11. Allow installation of software from sources non-market and try to install the version in the link I gave you above.

  • Bug with high speaker on the Satellite C650-144 with Window 7

    I have a bug with my high speaker, so I download driver leatest and nothing has changed.
    But when I use the jack slot it works and when I put it and when I go to the speaker icon in the windows taskbar there is 'activity' because the level moves, but there is no probe on my high speakers.

    For windows everythings works fine, so I don't know what I have to do...
    I went on the Internet on the forum, but there is no solution for my problem!

    Please help me!

    My computer references are: Satellite C650-144 and PSC08E-01100DFR
    Please excuse me for my English...

    Thank you very much!
    Friendly
    aldebordeaux

    Hello

    Simply said; You can listen to the sound using headphones, but can not hear the sound on the speakers. Right?

    Have you noticed this early? Have you installed a few 3rd party applications may affect the functionality of speaker? Maybe some Windows updates can affect this?

    Please check the settings in the control panel-> sound-> the Read tab

    As a last resort, I recommend for recovering the device I want to say, it looks a bit because of speaker, but I strongly recommend to test the laptop with the factory settings.

  • bug with the news of the spectrum

    Hello

    I have a problem with the FRF vi, which calculates the frequency response. The cluster 'info of the spectrum', the channel name is not changed when the FRF vi is looped. It seems that this problem is when the vi Polymorph selection is set to "1 stimulus, 1 reply.

    The attached vi shows my problem for a better understanding of the "bug".

    The channelname (and perhaps other properties of the spectrum) are not changed. I want to store the result of the FRF vi to a TDMS with polymorphic VI 'Write in TDMS' file available in the Toolbox for sound & Vibration. The Spectra must be registered with all of the properties and the channelname should change...

    Someone has an idea to fix this? Maybe I do not use the bandwidth as it should be, but it seems that there is a bug in the vi.

    Thanks for your help.

    Mathieu

    Hello

    I found what was wrong in my code.

    In order to have the good 'spectrum info', I put the entry "reboot on average" to true on the frequency response of vi.

    Mathieu

  • a bug with the structure that contains bit fields?

    using CVI 8.5. I tried to set up a structure that contains bit fields. Although the structure compiles, I encounter strange behavior when you access individual fields, while the value of the overall structure seems ok. Here is the structure:

    typedef struct
    {
    Union
    {
    struct
    {
    unsigned int Flag1: 1;
    unsigned int dummy: 3;
    unsigned int Flag2: 4;
    unsigned int Indicateur3: 4;
    unsigned int dummy2: 4;
    };
    unsigned short;
    } flags;
    } flagset;

    When you set the Member 'all' to a value so that one or more indicators, but not all, are false, I still read the individual like real flags, until all flags are set to false.

    I missed something? This definition is really legal?

    Please find attached a file showing the problem.

    The same issue is at stake with or without the ternary operator. It turns out the problem was not specifically with printf, but rather a bug in the compiler that is related to the evaluation of the members of anonymous internal structures. If several internal anonymous struct members are evaluated before the compiler actually do anything with the result - which is the case when passing arguments to a function-, so they will all be evaluates the value that was evaluated last.

    A. Mert

    National Instruments

  • I'm trying to change the ownership of directories/files with a domain network environment (using takeown)

    I'm changing the ownership of files/directories with a domain network environment. Using takeown /f \\server\share/r/a/dy. It works fine but when I check the property is actually on my administrative account as the owner. I'll need for administrators to be owner and not mine administrative account. Can you please help?

    Thank you

    RG

    Hello

    Your question of Windows is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for support on Windows Server. Please post your question in the below link: http://social.technet.microsoft.com/Forums/en/category/windowsserver

  • Problem with 'source file for the environment.

    Hello, I have problems with the supply environment file.

    I just read this post...

    How to "Source in the environment file.

    How to find the file of the environment. But after I Executive the .env file there is nothing set up. I checked "echo $APPL_TOP and there is nothing."


    My environmental record is:

    /D01/Oracle/vis/FS1/EBSapp/appl/APPSVIS_ebs122.env


    Then... I'm source Pentecost environmental record these steps:


    step 1: cd /d01/oracle/VIS/fs1/EBSapp/appl/APPSVIS_ebs122.env

    step 2:./APPSVIS_ebs122.env


    And still nothing.


    Help with this?


    Thank you.

    Send "source /d01/oracle/VIS/fs1/EBSapp/appl/APPSVIS_ebs122.env" followed by "env | ranking"to check.

    Thank you

    Hussein

  • Bug with the embedded font.

    Hello


    I have a strange bug with the font Cooper (Std Black Italic)...

    Here's what looks like a multiline text in the Flash Editor:

    mlVXh7W.png

    Now, here's how it looks when I embed the fonts in a SWF file, and then load and use from the AS3 code:

    hXbpJ3S.png

    [this] is happening?

    Here are the parameters of line values I get from getLineMetrics (0):

    Ascent: 51.2

    descent: 51.2

    height: 102.4

    head: 0


    I tried to reexporting the police, the same problem. I also have the same problem when I export the scene editor and read it with Ctrl + Enter.

    It seems THAT the good in the editor... I don't know what to do. I reinstalled even the police. :/

    Also, I have this problem with all fonts... or at least every 5 different fonts, I tried.


    [moderate]

    I finally fixed it by recreating the Mac fla file.

    Looks like it is a problem with Windows.

  • Bug with the tag source formatting STYLE (DW CC 2015)

    The command 'Apply Source Formatting' formats incorrectly the content of the < style > tag. Instead of putting in the form and content of implementation set back as I specified in the tag library, the content and the closing tag will remain embedded to the left, for example:

    < style >

    {body

    background-color: #00005D;

    do-family: Verdana, Arial, without serif.

    }

    < / style >

    The code must be indented manually, which is having little pain, not to mention what to do so defeats the purpose of the command 'apply Source Formatting '.

    I searched the Forum of discussion here, but did not find any help for this problem.

    Is this a known bug that I'll just have to live with, or is it possible I can fix this in the configuration files?

    I think the reason for this is the default mode that CSS is formatted. When you run apply Source Formatting on an external style sheet, all selectors are flush with the left side, even within the questions from the media. The mode CSS formatting is determined by the Format of Code category in preferences (click the CSS button for advanced formatting). However, there is no option to indent the selectors.

    If you want to file a bug/feature request, use the official form: feature request/Bug Report Form

  • Is it possible to use Dreamweaver with WordPress (has the classes by Joseph Lowery) only uses a test server AWS and not an environment local localhost?

    Is it possible to use Dreamweaver with WordPress (has the classes by Joseph Lowery) only uses a test server AWS and not an environment local localhost?

    Yes, I want to talk and EC2 instance and I am able to do Dreamweaver to easily connect using SFTP which I believe is a SSH protocol. See the image below. This method works.

    I currently have a test instance and will finally have an instance of production when the site is finished.

    Local environment is not installed on my workstation and my thought was that put it on the server would allow transparent operation including scripts on the server side. The testing station is not public.

  • I download the demo version of Lightroom CC for Mac and it bugs with DW021 error code. What should I do?

    I download the demo version of Lightroom CC for Mac and it bugs with DW021 error code. What should I do?

    Hello

    Please visit:-Error 21 or DW021 when installing Photoshop CC 2015

    or

    I need help!

  • Try to use the converter to push a VMX and VMDK existing in the environment file. Have you tried the Converter 4.3 and 5.0, continues to crash or delay. A 5.1 with ESXI 5.1 vCenter server hosts going conversion.

    Try to use the converter to push a VMX and VMDK existing in the environment file. Have you tried the Converter 4.3 and 5.0, continues to crash or delay. A 5.1 with ESXI 5.1 vCenter server hosts going conversion.

    Take a look at this article. You can try Converter standalone 5.0.1 or 5.1 beta.

    http://KB.VMware.com/kb/2033315

  • What is the best feature of image for use with a layer of environment?

    CS6, Win7, HPz820

    I watched several tutorials on the use of the middle layer, and each has a great experience with the imported image.

    When I do, it looks like this without the effect of layer attached environment:

    VW Raw.JPG

    And in this way, then I apply the layer of the environment:

    VW Enviro.JPG

    Is it possible to select the image so it will allow to maximize the image quality when the effect is applied. I tried a picture sewn of several photos done in PS, with a better result, but still a lot of distortion.

    The middle layer is strictly related to the raytracer stuff. We wouldn't use it as a visible layer of 95% of the time. If you need a good Pan effect, card art to the CC or CC cylinder sphere or use plugins like Trapcode Horizon.

    Mylenium

  • Is there a bug with the maintenance of interaction of the Glossary for the entire project?

    Greetings,

    I've seen in other posts (Cp6) that there is a known bug with the maintenance of interaction available in a project glossary.

    Maybe my problem can help further this question - or maybe someone can post tips on how to solve this problem.

    I use a trial version of the Cp7 and followed the advice in this tutorial: http://www.YouTube.com/watch?v=wTEF-56V1Z4

    I found that if I left 'Visible output' box unchecked for the button closure (as in the tutorial), I don't see the glossary at all.

    Similarly for the button I created for the glossary - I couldn't have hidden or I don't see it.

    Another problem: the close button in the glossary (which is grouped in the interaction) in a first time appeared with the glossary, but then decided to appear on following slides without it (but in the same location).

    Everyone has been able to follow the advice on the above tutorial link successfully and is there another tutorial I can watch or read about it? I really want to provide access to the glossary on multiple slides and during quizzes. (And Yes, I'll buy a license - although the number of bugs I encounter creeps upward!)

    Thank you

    Jacqui.

    Hello

    Unchecking 'visible output' means the Group glossary will be invisible in the output until it is made visible by an action. In this case, the action that make visible is assigned to the Glossary button.

    Make sure that:

    • Glossary button, button Exit and the Widget are defined "Rest of project" accordion Timing.
    • EXIT button is set to Place object on top in the accordion of Timing.

    Anthony

Maybe you are looking for

  • Satellite P300 - 18 M; The clean installation of Vista Ultimate failed

    Hello everyone, I recently bought a Toshiba Satellite P300 - 18M. Now, I want to install Vista Ultimate on a totally clean system. The installation runs, but at the final stage (end), which takes about 2 hours, the screen becomes black with just the

  • Read the file

    I want to read all the data in a file line by line. I'll write data to tables and plot the data later. Once all the data is read in I want to wait a minute and read any new information that has been added to the file. I expect only the file to be upd

  • Icons are white or invisible at the start of windows 7.

    We have just upgraded a laptop Sony Vaio running Vista 32-bit Windows 7 Home Premium. There were not problems by installing the software and Windows loads fine but once it does all the icons on the desktop and in the menu start are either a box white

  • replace the keyboard ESC key notebook dv7-1919tx

    Dusting the keyboard of the Pavilion dv7-1019tx notebook, "ESC" on the keyboard is detached.  Can you help to position? Please describe with diagrams if possible.  Thank you:

  • ISE 1.3 - failure of profiling of the iPhone 6 Plus

    Hello Someone had a profiling successful iPhone 6 more device? My phone is emerging as "Workstation". Result of YES is 'unknown '. How can I adjust the policies profiling the right way?