How to set password for dbxml in java program

When I calling XmlManager.openContainer() by a XmlContainerConfig object set to XmlContainerConfig.setEncrypted("mypass")
it always says:
BDB XML: Database environment not configured for encryption
but I can not find the way to construct the Environment for the database,
When I use:
envcfg = EnvironmentConfig.DEFAULT;
envcfg.setEncrypted("mypass");
env = new Environment(new java.io.File("/some/path/"), envcfg);
it says:
java.io.FileNotFoundException: No such file or directory
at com.sleepycat.db.internal.db_javaJNI.DbEnv_open(Native Method)
at com.sleepycat.db.internal.DbEnv.open(DbEnv.java:317)
at com.sleepycat.db.EnvironmentConfig.openEnvironment(EnvironmentConfig.java:3886)
at com.sleepycat.db.Environment.<init>(Environment.java:93)
at T.init(T.java:169)
at T.<init>(T.java:35)
at T.main(T.java:204)

Hi,
Please follow Vyacheslav's advice. In addition, make sure that the path to the environment really exists. The Environment() construct will not create the directory structure if it does not exist.
Also, note that containers cannot be converted to an encrypted format after they have been created. You'll need to dump and re-create them.
Another remark; you've configured encryption for the environment:
envcfg.setEncrypted("mypass");Since the container is opened within an XmlManager's underlying environment which is configured for encryption you shouldn't set an encryption password at the container's level:
XmlContainerConfig.setEncrypted("mypass");http://www.oracle.com/technology/documentation/berkeley-db/xml/java/com/sleepycat/db/DatabaseConfig.html#setEncrypted(java.lang.String)
The environment wide encryption password will be used to encrypt data in the databases, containers, opened within that environment. Otherwise, if you want to encrypt stores (databases/containers) individually or encrypt just some of them, you'll need to not specify an encryption password at the environment's level and set it only at store's level.
Regards,
Andrei

Similar Messages

  • How to set  password for BPEL domain

    Hi,
    I am new to SOA.
    I want to setup client-server environment for few developers.
    I installed SOA 10.1.3.3 in the server machine.
    And I created few domains in BPEL, one for each developer.
    It didn't ask me to set the password while creation of the domain.
    Please let me know how to set password for newly created domain so that each developer login to his/her own domain and manage processes.
    Thanks!!!

    Thanks for the prompt response.
    What roles should I give to my developers to allow them to manage their services in ESB control, BPEL control, WSM control.
    And I would like to know how to set the password for a BPEL domain too.
    Message was edited by:
    user644377

  • How to set password for every application

    Hi,
    As a administrator how to set password for every weblication in sharepoint 2013.
    Is there any way to set?
    Thanks,

    Who's password are you trying to set? Please provide more details.

  • How to set password for a zip file and should be checked when reading that

    Hi friends,
    how to set password for a zip file and should be checked when reading that file???
    thanks.
    Praveen Reddy.J

    Heyy man, i think, u did not get my problem.
    all i have to do is:
    i have to create a zip file, and we should secure it with password when creating. and whenever the user wants to open that zip file he should provide correct passowrd otherwise he could not read that file. So, we should check for that also.
    Tanks for reply.

  • How to set password for Local are connection?

    How to set password for Local are connection?

    do you mean the 802.1x authentication?
    check out links below:
    http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2950/software/release/12-1_9_ea1/configuration/guide/scg/Sw8021x.html
    http://technet.microsoft.com/en-us/network/bb545365.aspx
    Every second counts..make use of it. Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
    IT Stuff Quick Bytes

  • How to set password for a zip file?

    I am able to add files to a zip file using java.util.zip.ZipOutputStream. I'd like to set password for the generated zip file, but could not find any relevant API in JDK doc.
    How to do that in Java? Maybe using a third party library?
    Any suggestions are welcome.
    Thanks.

    Thanks bro, I am looking at the Zip4J :) one of its feature is "Read/Write password protected Zip files" :)

  • How to set password for photos from home screen? Please help.

    Hi,
    Can anyone pls help to set password for my Iphone 4s.
    My friends/family often use my phone for gaming purpose. I don't want them to see my photos/gallery/videos.
    How can I protect my personal things from others?
    Thnx.
    Rgds.

    There is no way to set a password for photos. You could upload all of your photos to something like DropBox, then sign out of the app. Or, you could only let people you trust to respect your privacy touch your phone.

  • How to set password for iOS7

    how do I set up the password for iOSi7 which I downloaded to my iPad mini?  It refuses to accept my Apple Password, and my device says "iPad is disabled"

    Follow these instructions to resolve a forgotten passcode:
    http://support.apple.com/kb/HT1212

  • How to set Password for Xellerate user in OIM

    I am using recon API's and creating Xellerate user, unfortunately the recon is not accepting USR_PASSWORD which is the field name defined in OIM
    Can somebody please let me know how to set this password for Xellerate user??
    Thank you in advance for your response. (this is go-live issue you know what that means :-)

    Hi,
    If you are doing reconciliation and trying to reconcile the password as well. Then you must map the Resource Object attribute for the password field to the 'Identity' field of OIM. You can find this field in the 'Reconciliation Field Mappings' section for Xellerate User. Just map the field which you want to be set as OIM user password in the section and you are done.

  • How to set password for IIAS admin

    I have oracle IAS on linux, I would like to
    set a password for IAS admin.
    Thanks

    Log in to DSCC, "Settings" tab, "Directory Service Managers" tab, click on the admin username you want to manage and follow the prompts.

  • How to set path to run a Java program?

    my pc os is win2000 service pack 3.
    cpu is celoron 667mhz
    256 pc133 sdram
    i have done the setting b4 run a java program but no any effect.
    setting as below:
    set path=c:\j2sdk1.4.1_01\bin
    set classpath=c:\j2sdk1.4.1_01\lib
    my java file is store in C:\Java, file name is HelloWorld.java, so when i type:
    C:\>
    C:\>Java\javac HelloWorld.java
    (the screen show me : java\javac not internal or external........")
    and i try again as follow:
    C:>
    C:>\Java>javac HelloWorld.java
    (the screen show : Exception in thread "main" java.lang.NoClassDefFoundError:HelloWorld/java)
    i cant do anymore, who can help me?

    you need to put the CLASSPATH to dir: c:\j2sdk1.4.1_01
    and also to the directory you are working
    For example, you are working in "C:\Myclasses". You need to put:
    set CLASSPATH = C:\j2sk1.4.1_01;C:\Myclasses;
    if you don't put your working directory, java doesn't find your classes
    Try it and luck!

  • How to set password for SCC agent on IQ16 SP8

    Hi,
    Just installed a fresh SAP IQ16 SP08 and wasn't asked for setting sccagent on setup. How to configure sccagent account, to authorize it on SCC?

    Go to Apple Menu > System Preferences > Users & Groups.
    Also you may want to consider FileVault as it provides a lot more protection for the data on your MacBook Air than just having a password. There is more information at OS X: About FileVault 2 - Apple Support

  • How to set password for X509Anchors keychain

    I'm trying to add a certificate, but the X509Anchors keychain is demanding a password. I've never set one - it must be some standard thing; anyone know what it is? If not, I'm thinking I'd just change it to something I know. I hear that you have to be root or system to do it. Can someone tell me how to authenticate as root or system to change the password in the Keychain app, or how to do it in terminal?
    Thanks
    Mike

    Well, let's see... Over at Purdue University, they say to use your administrative account password to unlock the X509Anchors keychain. Try that first.
    I tried it, and it didn't work for me. I tried it from an administrative account, and it still didn't work. Over on MacOSXHints, someone says that it shouldn't be necessary to add the certificate to the X509Anchors keychain in particular -- your login keychain should suffice (if you will only be using it from that account). If you don't need to make it work for all accounts on your Mac, try that.
    Some people say that you can't "unlock" the X509Anchors keychain, but if you double-click on a certificate, you can still add it to the keychain by entering your (presumably administrative) password.
    I haven't found an answer for "unlocking" the X509Anchors keychain in Keychain Access if your admin password doesn't work -- or how to recover from the situation. No clues on Apple's support site.
    A search on the Discussion forums turns up this thread; seems there are a number of people with this problem.
    Powerbook G4 1GHz   Mac OS X (10.3.9)  

  • Internet sharing via dongle, how to set password for wifi network created?

    I am using a USB dongle with my Mac book Pro to share internet through AirPort, so that i can access my mac book's wifi from my iphone. This works great, but it is an open network and I woud like to set up a password.
    If anyone can point me in the direction I would be very grateful!
    Thanks

    If you are using OS X's Internet Sharing feature, then you can configure wireless security on your Mac's internal AirPort Card but are limited by the OS X version that you are using. It was not until Mountain Lion that Apple provided WPA2 security. Prior to this only WEP was available.
    You configure Internet Sharing via System Preferences > Sharing > Internet Sharing. (I don't have 10.6.x on any of my Macs so this may be different for your case.) Once you configure what is shared, you can then add wireless encryption.

  • HT5243 how do I find my password for adobe and Java

    how do I find my password for adobe and Java

    "Java" doesn't have a password, unless you mean your admin password for installing software. That's whatever password you (or the person who set your computer up) used to set up your admin account. That's the same password that you use when you start up the computer if you get asked for one. You cannot retrieve this password if you've forgotten it, but you can reset it and make a new one. See this support article if that's the case:
    http://support.apple.com/kb/PH14325
    "Adobe" is a company and likewise doesn't have a password. However, if you have Adobe cloud-based software you may well have set up a password with them. Adobe also require an account and password for downloading certain products. You'll need to contact Adobe to retrieve any such password if you've lost it.
    Try
    Adobe ID, sign-in, and account help

Maybe you are looking for

  • How to totally close a running LabVIEW Applicatio​n

    Hello NG, I have a little problem closing a running LabVIEW Application. For example I run 2 Applications in parallel. I would like to totally close one of them. If I use the "Exit LabVIEW" VI both Applications will be shut down. If I only stop the A

  • No Video

    Is this a legitimate offer? http://support.apple.com/kb/TS2377 I'm having the no video problem but none of the authorized service providers in my area (Auckland NZ) have heard of the problem and therefor won't fix it for free. Getting frustrated.

  • Missing the reply button in notification center

    In IOS8 there is a feature where you can answer messages by either swiping down to answer, which works, but then there is also the thing where you can slide to the left in the notification center and then there should come a blue reply button. Mine i

  • Syncing iPod Touch With iTunes

    Recently encountered an error message when connecting iPod Touch to my Powerbook. Error says "iTunes cannot sync iPod Touch because syncing has been disabled on this computer." I get this error with two different iPod Touch's, a Gen 1 and a Gen 2. I

  • Moving Pages Between Applications

    When I first began using AE, I created many different applications as request came in. Now, this is getting cumbersome as each application requires the user to login and logout. I want, instead, to create a single application and to move the pages fr