Cannot change the value of an attribute

I'm having a lot of trouble trying to change the value of an attribute in a document in my database. I get the error message:
Transaction specified for a non-transactional database
Nov 26, 2008 9:35:02 AM com.kitfox.db.BaseLocal processRequest
SEVERE: null
com.sleepycat.dbxml.XmlException: Error: Invalid argument, errcode = DATABASE_ERROR
        at com.sleepycat.dbxml.dbxml_javaJNI.XmlQueryExpression_execute__SWIG_1(Native Method)
        at com.sleepycat.dbxml.XmlQueryExpression.execute(XmlQueryExpression.java:89)
However, the database is configured to perform operations:
        try {
            EnvironmentConfig config = new EnvironmentConfig();
            config.setAllowCreate(createIfAbsent);
            config.setInitializeLocking(true);
            config.setInitializeLogging(true);
            config.setInitializeCache(true);
            config.setTransactional(true);
            config.setRunRecovery(true);
            config.setThreaded(true);
            //config.setLockDetectMode(LockDetectMode.DEFAULT);

            env = new Environment(home, config);

            XmlManagerConfig managerConfig = new XmlManagerConfig();
            managerConfig.setAllowAutoOpen(true);
            managerConfig.setAdoptEnvironment(true);
            managerConfig.setAllowExternalAccess(true);
            manager = new XmlManager(env, managerConfig);

            manager.setDefaultContainerType(XmlContainer.NodeContainer);
            
            manager.registerResolver(resolver);

            if (manager.existsContainer(CONTAINER_NAME) == 0) {
                container = manager.createContainer(CONTAINER_NAME);

                //Add index
                {
                    XmlIndexSpecification is = container.getIndexSpecification();
                    is.addIndex(GAMEBASE_NS, "uid", "node-element-presence-none unique-edge-attribute-equality-decimal");
                    is.addIndex(GAMEBASE_NS, "name", "node-element-presence-none edge-attribute-equality-string");

                    XmlUpdateContext uc = manager.createUpdateContext();
                    container.setIndexSpecification(is, uc);
                    is.delete();
                }
                
                //Initial document
                {
                    InputStream is = null;
                    XmlInputStream xin = null;
                    URL initXml = getClass().getResource("/com/kitfox/db/dbInit.xml");
                    is = initXml.openStream();

                    xin = manager.createInputStream(is);

                    container.putDocument(DOCUMENT_NAME, xin);
                    xin.delete();
                }

            } else {
                container = manager.openContainer(CONTAINER_NAME);
            }
While I am able to update my document by running insert or remove instructions independently, they fail:
    let $dir := $repository//gb:directory[@gb:uid=$cmd/@uid]
    return
        replace value of node $dir/@gb:name with "blorp"

    let $dir := $repository//gb:directory[@gb:uid=$cmd/@uid]
    return
        (delete node $dir/@gb:name,
        insert node (attribute gb:name {"bigbird"}) into $dir)
Any idea what goes wrong? How can I change my attribute value?

Published by: kitfox on November 26, 2008 09:48

The problem is that even if your environment is configured to use transactions, your container is not. Set up for using transactions is a process in two steps, first of all, you must set up the environment that you did, then you must configure each container in the environment, what you can do as follows:

XmlContainerConfig config = new XmlContainerConfig();
config.setTransactional(true);
container = manager.createContainer(CONTAINER_NAME, config);

The same steps are used to open the container.

Lauren Foutz

Tags: Database

Similar Questions

  • Cannot change the value of mousewheel scroll

    After you have reinstalled windows and all I had on my old desktop, I seem to be unable to change my amount of scrolling the mouse on firefox. I looked through all the troubleshooting questions that have already been posted, and all users have responded that I had to access about: config and change the value of mousewheel.withnokey.numlines.

    However, when you access everything: config, I discovered that not only I don't the integer specified, I don't have any integer with a preferably name that contains "withnokey", so I tried to add it in me, but not to use. Currently my parchment done on lines 6 and 7 and I would like to go down to about 3.

    Hello, Skarlath, the scrolling behavior has been overhauled in firefox 17 (see for reference https://wiki.mozilla.org/Gecko:Mouse_Wheel_Scrollingtechnical information) - the old setting longer reverberate.

    It must still be possible to set a different frame rate. You can enter about: config in the firefox address bar (confirm the message information where it appears), search preferences starting with mousewheel.default.delta_multiplier_ ..., you can double-click on these parameters and assign a different value to - then a restart of firefox is required for the changed settings is taken into account.

  • Cannot change the value of the cells during execution of the VI

    Hello

    I'm changing the values in the table while the VI is on, but without success, can anyone show me please how to do this.

    Thank you

    MGarry

    MGarry,

    something like this:

    Please note that this does not reset the contents of the table if you rerun the VI. You can add code to it.

    Norbert

  • Cannot change the value in the report url column in the select statement. Help, please

    Hi all
    I'm moving the value of the column of the report as follows:
    select key, num,
    case when Attachmentcnt(KEY) != 0 then
    'f?p=&APP_ID.:91:&SESSION.:'' '':NO::P91_KEY,P91NUM,P91_PREVPG:'
    And I'm passing the values as follows:

    {noformat}
    "#KEY #, ' NUM # #', 9' ELSE null.
    Fixing of END
    from tableA
    {noformat}

    But I'm not able to understand correct syntax for these column values. Can someone give me help. I appreciate it.
    Rgds,
    Suma.

    Published by: sumak on June 23, 2009 12:11

    Published by: sumak on June 23, 2009 12:22

    Suma,

    If you try to generate a column with a URL, try something like the following:

    Select the key, num,
    -case when Attachmentcnt (KEY). = 0 then
    ' f ? p = & APP_ID.: 91: & SESSION. : "": NO::P91_KEY, P91NUM, P91_PREVPG:'
    || tableA.key | ',' || tableA.num | ',' || : P91_PREVPG
    Another null
    end
    FROM tableA;

    But the best way to spend these would include values of checksum against the values of your parameters (to ensure that a user is not hack them). You will need to check the manual of the Apex for more details - see "Understanding Session State Protection".

    Good luck

    Stew

  • Change the workflow by code attribute

    I want to change the value of many attributes of workflow. He points to a single resource, and I want to change it.

    Is it possible to change the workflow assigns values from code?

    Thank you very much

    D.

    It's what configuration items are for. Create a configuration item, add required attributes, set them and then change your workflow attributes to use the configuration item (many attributes can point to a single configuration element attribute)

    You will then be able to change the attributes of the customer or scripting configuration items.

  • How to change the value of "DenyOnNotProtected" in OAM 11 g

    Hello

    I just wanted to know how we can change the value of the parameter 'DenyOnNotProtected' in OAM 11 g. In literature, it is mentioned that we cannot change the value. When I tried the console, I'm not able to. Is there another way to do this?

    Thank you

    Srikanth

    Hi Srikanth,

    I suppose that for some reason any OAM is not recognizing that this resource is not protected (or rather, protected by the anonymous system) - maybe some dissonance between the host setting preferred in the definition of Agent of the WebGate and the host identifier used in the policy.

    In addition, just to check: you use version OAM 11.1.1.5 or 11.1.2 (server)?

    Kind regards
    Colin

  • How to change the value of a field?

    Hello

    I am a beginner in the report and I try to change the format of a field trigger value
    by the PL/SQL code editor

    is this possible? How can I identify my field (: MONCHAMP: does not work = newvalue)

    @rosagio

    Hello

    You cannot change the value of a column, but the field display values. Do it with the built-in SRW. SET_FIELD...
    Take a look at http://www.oracle.com/webapps/online-help/reports/10.1.2?navId=3&navSetId=_&vtTopicFile=htmlhelp_rwbuild_hs/rwrefex/plsql/builtins/examps/srw_examples.htm
    It is built-ins different depending on the data type. The object_id is 0 every time for the current object.

    concerning
    Rainer

  • change the value of the location attribute in db jca file with the configuration file

    Hello

    How can I change the value of attribute of 'place' in the jca adapter db file by using the configuration level if possible?

    I have the database map file where the first two lines are:

    < name of the adapter-config = "getParty" = 'Database adapter' adapter wsdlLocation = "getParty.wsdl" xmlns =" " http://platform.integration.Oracle/blocks/adapter/FW/metadata ">

    < connection-factory location = ' ist/DB/CRP1"UIConnectionName ="crp1_apps"adapterRef =" "/ >

    ...

    I need to replace the configuration file

    EIS/DB/CRP1

    with

    EIS/DB/DEV

    but this isn't the case. I think that I am not referencing correctly but I don't know how he is correct, that I couldn't find examples for composites and wsdl content, JCA file.

    Please share the idea.

    Thank you

    Anatoliy

    Anatolly salvation,

    You can assign a new value to the property of JCA by using either the Ombudsman as BPEL.

    Pick click entitled value option and add the right attribute to the property JCA jca.db.DataSourceName.

    In BPEL will zoom click the invoke for the DB adapter, go to the Properties tab and add the right attribute to the property JCA jca.db.DataSourceName.

    (edit)

    If you want to use a configuration file to set the value, I suggest a BPEL property, the value can be replaced by using a configuration file and can be assigned to the JCA property using ora: getPreference ("prefName as string");

    When you use a mediator does not have a preference, and you can use a placeholder that you change when you compile the SCA composite. With ANT in combination with hudson, you can easily replace the value (hard) by the environment.

    See you soon,.

    Robert van Molken

    Specialist of the integration of Oracle

    Post edited by: robertvm

  • Cannot change the search values

    Hi friends,
    I'm trying to restrict the values of "Extensible" search lookup_type "CONTACT". But I'm not able to disable certain options. Someone will suggest how it can be done. Not only by disabling but I also plan to add the values of tag for them.

    Advice or suggestions will be useful

    Thanks in advance

    Hello

    We had the same kind of requirement, ideally the system does allow you to disable or end date of the standard values in the CONTACT search. Please follow the steps below to run:

    1. go to the application-> research-> Common developer
    2. the query 'CONTACT '.
    3. click on the level of access 'user' several times
    4. navigate to help-> Diagnostics-> review-> field = CUSTOMIZATION_LEVEL
    5. change the value in "U".
    6 save
    7 re - question research CONTACT
    8 disable the codes you want to disable, and save.

    The only risk you have here is that in the case of a major update HRMS if oracle starts with her do replace your changes and you need to repeat the same thing. It will be useful.

    Thank you
    Sanjay

  • Edit/view (data or Table column) value - cannot change the data, but it can be updated

    Hello

    According to the help of Oracle SQL Developer Center, the dialog ' Change/see value (data or Table column)' should "change the value of data" if we "are allowed to change the data." We strive to use this dialog box to modify/update data without having to write an Update statement, but is not to leave us. Us are not allowed to update the data, we can update via update statements. Even as the owner of the schema.table, it don't will change us the value in the dialog box "Edit/see value (data or Table column).

    Any ideas?

    We are on SQL Developer Version 3.0.0.4 build HAND - 04.34 and Oracle 11 GR 1 material (11.1.0.7) database.

    Thank you

    Alex Larzabal.

    You can still vote on the existing demand for this developer SQL to add Exchange of weight for implementation as soon as possible:
    https://Apex.Oracle.com/pls/Apex/f?p=43135:7:3974986722753169:no:RP, 7:P7_ID:4902

    Kind regards
    K.

  • Cannot change the name of the file in the file properties.

    Original title: Cannot change the file properties

    Some downloaded files have a value in the box "title" under the details (after clicking Properties)
    I can't remove this 'title' and it appears so when I share the file on my network.
    The file is located on a portable hard drive, but I tried to move some files from problem to my office to see if I could solve these problems there, but nothing has worked.

    I already have
    -taking possession of the object
    -allows full control for all users
    -tried to use the "attrib - r + s' function
    -among other...

    I just want to know if there is a way to change the details of the file. On another windows help page it says something along the lines of "some attributes cannot be changed" I hope this isn't the case.

    Any help at all would be great, if no additional information is needed let me know.
    Thank you

    This information is set when the file is created.  Windows has no native ability to change.  You need a third party program.  For example, see link below.  Note that I have no idea if it's any good or works in Windows 7.  Gives you the link just to get an example of what to look for.

    abcAVI Tag Editor
    http://abcAVI.kibi.ru/

  • Can declaratively set the value of some attributes depend on an attribute in a row of VO?

    Hi, experts.

    In jdev 11.1.2.3,.

    Can declaratively set the value of some attributes depend on an attribute in a row of VO?

    For example, there is a VO (id, salt boolean, integer status, entire IsValid), how to set status=-1,IsValid=-1 when salt is checked (selected)?

    I tried:

    Method A:

    1 set the status depends on saltand the default attribute value:

    If (salt is true)

    Returns - 1

    on the other

    {

    If (salt is false)

    Returns 0

    on the other

    Returns a null value

    }

    2. set IsValid dependent statusand attributes by default as: status.

    3. set all of these three attributes can be changed to always.

    If the parameter above may work, then apparently it's much simpler to write Java code.

    Unfortunately, he is unable to work the way you want.

    There is some complex another declaratively to do:

    Method B:

    1. create a selVO (id, booleanValue1 boolean, integer numberValue1, string stringValue1) with static values:

    (1, false, 0, "" false for salt: not selected ' ");

    (2, true,-1, "" the true value of salt: selected ' ");

    2. put selVO as Data Source list for the list of the salt value and return values from the list:

    Salt-> booleanValue1,

    Status-> numberValue1,

    IsValid-> numberValue1.

    But this alternative way has a few weaks a fortiori more complex:

    Advice from the interface user of salt can not defined by default list Type "CheckBox".

    Cannot, therefore, method A feasible?


    Thank you!

    BAO

    Hello Bao,

    You can write THE Expression value of Field2

    #{bindings. Field1.inputValue == 'Y '? 1:-1}

    (Auto submit True on Field1

    Field1 Field2 on partial trigger)

    Also, you can write logic in VORowimpl Set accessor methods.

    Thank you

    Jeet

  • Cannot change the size of the video memory in Satellite L30-113

    I have a Satellite l30-113 which has 1 GB memory and windows Vista.

    The size of memory that has been attributed to the vga is 319 MB.
    How can I decrease the video memory?

    Hello

    do you really mean 319MB? This machine only supports a maximum video memory 256 MB shared memory. So if you might have 32 MB (which is how I imagine rather memory assigned to your VGA) you can increase the video memory of this machine by changing the value of memory assigned in the bios of your machine.

    Do you know how to enter the bios?

    Welcome them

  • Change the value of varying directly?

    Suppose I have a variant from an external source.

    Suppose I know the data type, but I don't know the attributes and their values (if any).

    Is it possible to directly change the value of the variant, "under the hood" so to speak and leave all attributes intact?

    I know that I can read all attributes, generate a new variant with my new data and write them all back, but that seems very inefficient.

    Casting of new data to a variant, and then using the variant of data to convert the Original variants type that seems to work as well. Once again, kludgy.

    Sting autour with «...» VI.lib\Utility\VariantDataType\*.*, but so far, not to find a method 'live '.

    Thank you!

    You can use the structure of the element inplace to set the value of a varying existing.  It retains all the existing attributes.

  • Is it possible to change the values of particular #define of the various controls in CVI.

    In my application, I have different panels to file single .uir. When I save the .uir file, I get the same values of #define for different controls in different panels. For this reason, I am not able to use these #defines block switch. Is it possible to change the values of #define according to my condition.

    Hi, a little more Wolfgang post. It is the combination of the Panel to manage and control the unique ID: as you know, you can load the same panel more than once, so even if you recover the full chain of PANEL_CONTROL you have duplication. items that exactly identifies a particular control in a particular group are the combination control panel manage AND panel_control ID.

    On the one hand which guarantees more flexibility to your application, you can design only a few panels and reuse them whenever you want, even having some of them loded several times in the same instant. On the other hand, as you have discovered, there is the possibility (Finally, almost certain) duplicated in your app ID.

    To resolve the problem of duplicated IDS you can act in two ways:

    1. If you know that no Panel is never loaded several timer in your application, you can retrieve the name of constant of Panel with GetPanelAttribute (panelHandle, ATTR_CONSTANT_NAME, string); and to distinguish between the name of constant, then switch between control ID

    2. If you happen to have duplicate panels you will need to store each panelHandles in the non-volatile variables, switch between them and then switch between the control ID

    An alternative might be to use Panel callbackData attribute and assign a significant value during the loading of the Panel, other callbackData finally from a control ID. Something like this:

    Loading panels:

    panelHandle = LoadPanel (0, "myfile.uir", PANEL1);

    SetPanelAttribute (panelHandle, ATTR_CALLBACK_DATA, (void *) 1);   Assign different callbackData in each instance

    During the failover between controls:

    void * cbkd;

    GetPanelAttribute (panelHandle, ATTR_CALLBACK_DATA, &cbkd);)
    Switch (cbkd (int)) {}
    case 1: / / elements of the PANEL1
    switch (command) {}
    case PANEL1_NUMERIC:

    your code here
    break;
    case PANEL1_STRING:
    your code here
    break;
    }
    break;
    case 2:
    // .....
    break;
    }

    One final note: it seems to me that all this is necessary in a very limited situation, where you have the same callback called on various panels/controls. Whenever the reminder is unique to a specific panel or controls on a single panel you don't need to work that way.

Maybe you are looking for