Berkeley DB XML crash with multiple readers (dbxml-2.5.16 and db-4.8.26)

I am using Berkeley DB XML (v. 2.5.16 and the bundled underlying Berkeley DB 4.8.26, which I suppose is now fairly old) to manage an XML database which is read by a large number (order 100) of independent worker processes communicating via MPI. These processes only read from the database; a single master process performs writes.
Everything works as expected with one or two worker processes. But with three or more, I am experiencing database panics with the error
pthread lock failed: Invalid argument
PANIC: Invalid argument
From searching with Google I can see that issues arising from incorrectly setting up the environment to support concurrency are are fairly common. But I have not been able to find a match for this problem, and as far as I can make out from the documentation I am using the correct combination of flags; I use DB_REGISTER and DB_RECOVER to handle the fact that multiple processes join the environment independently. Each process uses on a single environment handle, and joins using
DB_ENV* env;
db_env_create(&env, 0);
u_int32_t env_flags = DB_INIT_LOG | DB_INIT_MPOOL | DB_REGISTER | DB_RECOVER | DB_INIT_TXN | DB_CREATE;
env->open(env, path to environment, env_flags, 0);
Although the environment requests DB_INIT_TXN, I am not currently using transactions. There is an intention to implement this later, but my understanding was that concurrent reads would function correctly without the full transaction infrastructure.
All workers seem to join the environment correctly, but then fail when an attempt is made to read from the database. They will all try to access the same XML document in the same container (because it gives them instructions about what work to perform). However, the worker processes open each container setting the read-only flag:
DbXml::XmlContainerConfig models_config;
models_config.setReadOnly(true);
DbXml::XmlContainer models = this->mgr->openContainer(path to container, models_config);
Following the database panic, the stack trace is
[lcd-ds283:27730] [ 0] 2   libsystem_platform.dylib            0x00007fff8eed35aa _sigtramp + 26
[lcd-ds283:27730] [ 1] 3   ???                                 0x0000000000000000 0x0 + 0
[lcd-ds283:27730] [ 2] 4   libsystem_c.dylib                   0x00007fff87890bba abort + 125
[lcd-ds283:27730] [ 3] 5   libc++abi.dylib                     0x00007fff83aff141 __cxa_bad_cast + 0
[lcd-ds283:27730] [ 4] 6   libc++abi.dylib                     0x00007fff83b24aa4 _ZL25default_terminate_handlerv + 240
[lcd-ds283:27730] [ 5] 7   libobjc.A.dylib                     0x00007fff89ac0322 _ZL15_objc_terminatev + 124
[lcd-ds283:27730] [ 6] 8   libc++abi.dylib                     0x00007fff83b223e1 _ZSt11__terminatePFvvE + 8
[lcd-ds283:27730] [ 7] 9   libc++abi.dylib                     0x00007fff83b21e6b _ZN10__cxxabiv1L22exception_cleanup_funcE19_Unwind_Reason_CodeP17_Unwind_Exception + 0
[lcd-ds283:27730] [ 8] 10  libdbxml-2.5.dylib                  0x000000010f30e4de _ZN5DbXml18DictionaryDatabaseC2EP8__db_envPNS_11TransactionERKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEERKNS_15ContainerConfigEb + 1038
[lcd-ds283:27730] [ 9] 11  libdbxml-2.5.dylib                  0x000000010f2f348c _ZN5DbXml9Container12openInternalEPNS_11TransactionERKNS_15ContainerConfigEb + 1068
[lcd-ds283:27730] [10] 12  libdbxml-2.5.dylib                  0x000000010f2f2dec _ZN5DbXml9ContainerC2ERNS_7ManagerERKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS_11TransactionERKNS_15ContainerConfigEb + 492
[lcd-ds283:27730] [11] 13  libdbxml-2.5.dylib                  0x000000010f32a0af _ZN5DbXml7Manager14ContainerStore13findContainerERS0_RKNSt3__112basic_stringIcNS3_11char_traitsIcEENS3_9allocatorIcEEEEPNS_11TransactionERKNS_15ContainerConfigEb + 175
[lcd-ds283:27730] [12] 14  libdbxml-2.5.dylib                  0x000000010f329f75 _ZN5DbXml7Manager13openContainerERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEPNS_11TransactionERKNS_15ContainerConfigEb + 101
[lcd-ds283:27730] [13] 15  libdbxml-2.5.dylib                  0x000000010f34cd46 _ZN5DbXml10XmlManager13openContainerERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_18XmlContainerConfigE + 102
Can I ask if it's clear to anyone what I am doing wrong?

Is it possible that the root problem to this is in the MPI code or usage?  Because if the writer process crashes while holding an active transaction or open database handles, it could leave the environment in an inconsistent state that would result in the readers throwing a PANIC error when they notice the inconsistent environment.
Thanks for looking into this.
It looks like there was a small typo in the code I quoted, and I think it was this which caused the segmentation fault or memory corruption. Although I checked a few times that the code snippet produced expected results before posting it, I must have been unlucky that it just happened not to cause a segfault on those attempts.
This is a corrected version:
#include <iostream>
#include <vector>
#include "dbxml/db.h"
#include "dbxml/dbxml/DbXml.hpp"
#include "boost/mpi.hpp"
static std::string envname = std::string("test");
static std::string pkgname = std::string("packages.dbxml");
static std::string intname = std::string("integrations.dbxml");
int main(int argc, char *argv[])
    boost::mpi::environment  mpi_env;
    boost::mpi::communicator mpi_world;
    if(mpi_world.rank() == 0)
        std::cerr << "-- Writer creating environment" << std::endl;
        DB_ENV *env;
        int dberr = ::db_env_create(&env, 0);
        std::cerr << "**   creation response = " << dberr << std::endl;
        if(dberr > 0) std::cerr << "**   " << ::db_strerror(dberr) << std::endl;
        std::cerr << "-- Writer opening environment" << std::endl;
        u_int32_t env_flags = DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_REGISTER | DB_RECOVER | DB_INIT_TXN | DB_CREATE;
        dberr = env->open(env, envname.c_str(), env_flags, 0);
        std::cerr << "**   opening response = " << dberr << std::endl;
        if(dberr > 0) std::cerr << "**   " << ::db_strerror(dberr) << std::endl;
        // set up XmlManager object
        DbXml::XmlManager *mgr = new DbXml::XmlManager(env, DbXml::DBXML_ADOPT_DBENV | DbXml::DBXML_ALLOW_EXTERNAL_ACCESS);
        // create containers - these will be used by the workers
        DbXml::XmlContainerConfig pkg_config;
        DbXml::XmlContainerConfig int_config;
        pkg_config.setTransactional(true);
        int_config.setTransactional(true);
        std::cerr << "-- Writer creating containers" << std::endl;
        DbXml::XmlContainer packages       = mgr->createContainer(pkgname.c_str(), pkg_config);
        DbXml::XmlContainer integrations   = mgr->createContainer(intname.c_str(), int_config);
        std::cerr << "-- Writer instructing workers" << std::endl;
        std::vector<boost::mpi::request> reqs(mpi_world.size() - 1);
        for(unsigned int                 i = 1; i < mpi_world.size(); i++)
            reqs[i - 1] = mpi_world.isend(i, 0); // instruct workers to open the environment
        // wait for all messages to be received
        boost::mpi::wait_all(reqs.begin(), reqs.end());
        std::cerr << "-- Writer waiting for termination responses" << std::endl;
        // wait for workers to advise successful termination
        unsigned int outstanding_workers = mpi_world.size() - 1;
        while(outstanding_workers > 0)
            boost::mpi::status stat = mpi_world.probe();
            switch(stat.tag())
                case 1:
                    mpi_world.recv(stat.source(), 1);
                    outstanding_workers--;
                    break;
        delete mgr; // exit, closing database and environment
    else
        mpi_world.recv(0, 0);
        std::cerr << "++ Reader " << mpi_world.rank() << " beginning work" << std::endl;
        DB_ENV *env;
        ::db_env_create(&env, 0);
        u_int32_t env_flags = DB_INIT_LOCK | DB_INIT_LOG | DB_INIT_MPOOL | DB_REGISTER | DB_RECOVER | DB_INIT_TXN | DB_CREATE;
        env->open(env, envname.c_str(), env_flags, 0);
        // set up XmlManager object
        DbXml::XmlManager *mgr = new DbXml::XmlManager(env, DbXml::DBXML_ADOPT_DBENV | DbXml::DBXML_ALLOW_EXTERNAL_ACCESS);
        // open containers which were set up by the master
        DbXml::XmlContainerConfig pkg_config;
        DbXml::XmlContainerConfig int_config;
        pkg_config.setTransactional(true);
        pkg_config.setReadOnly(true);
        int_config.setTransactional(true);
        int_config.setReadOnly(true);
        DbXml::XmlContainer packages     = mgr->openContainer(pkgname.c_str(), pkg_config);
        DbXml::XmlContainer integrations = mgr->openContainer(intname.c_str(), int_config);
        mpi_world.isend(0, 1);
        delete mgr; // exit, closing database and environment
    return (EXIT_SUCCESS);
This repeatably causes the crash on OS X Mavericks 10.9.1. Also, I have checked that it repeatably causes the crash on a virtualized OS X Mountain Lion 10.8.5. But I do not see any crashes on a virtualized Ubuntu 13.10. My full code likewise works as expected with a large number of readers under the virtualized Ubuntu. I am compiling with clang and libc++ on OS X, and gcc 4.8.1 and libstdc++ on Ubuntu, but using openmpi in both cases. Edit: I have also compiled with clang and libc++ on Ubuntu, and it works equally well.
Because the virtualized OS X experiences the crash, I hope the fact that it works on Ubuntu is not just an artefact of virtualization. (Unfortunately I don't currently have a physical Linux machine with which to check.) In that case the implication would seem to be that it's an OS X-specific problem. 2nd edit (14 Feb 2014): I have now managed to test on a physical Linux cluster, and it appears to work as expected. Therefore it does appear to be an OS X-specific issue.
In either OS X 10.8 or 10.9, the crash produces this result:
-- Writer creating environment
**   creation response = 0
-- Writer opening environment
**   opening response = 0
-- Writer creating containers
++ Reader 7 beginning work
-- Writer instructing workers
-- Writer waiting for termination responses
++ Reader 1 beginning work
++ Reader 2 beginning work
++ Reader 3 beginning work
++ Reader 4 beginning work
++ Reader 5 beginning work
++ Reader 6 beginning work
pthread lock failed: Invalid argument
PANIC: Invalid argument
PANIC: fatal region error detected; run recovery
PANIC: fatal region error detected; run recovery
PANIC: fatal region error detected; run recovery
PANIC: fatal region error detected; run recovery
PANIC: fatal region error detected; run recovery
PANIC: fatal region error detected; run recovery
PANIC: fatal region error detected; run recovery
libc++abi.dylib: terminate called throwing an exception
[mountainlion-test-rig:00319] *** Process received signal ***
[mountainlion-test-rig:00319] Signal: Abort trap: 6 (6)
[mountainlion-test-rig:00319] Signal code:  (0)
David
Message was edited by: ds283

Similar Messages

  • Loading xml file with multiple rows

    I am loading data from xml files using xsl for transformation. I have created xsl's and loaded some of the data. In an xml file with multiple row, it's only loading one (the first) row. Any idea how I can get it to read and load all the records in the file???

    Could some please help me with the above. I desparately need to move forward.

  • New to Apple products (finally) - can I use my Itunes account with multiple products e.g. Iphone and Ipad?

    New to Apple products (finally) - can I use my Itunes account with multiple products e.g. Iphone and Ipad?

    Oh yes! Apple will be happy for you to buy as many Apple products as you can afford.
    As and when needed, each can be given its own selections of content to sync with.
    tt2

  • Berkeley DB XML crashing on Vista (entry point not found in Xqilla.dll)

    Hello,
    I'm trying to run Berkely DB XML on Windows Vista but it countinues crashing and I cannot find the reason. I downloaded the Berkeley DB XML source project and compiled it in Visual Studio 2005, following the compiling instructions.
    If I compile everything in debug mode all the sample apps and the dbxml.exe work correctly. The problem arises when I compile everything in release mode and I try to run dbxml.exe or any aother sample app.
    Debugging the helloWorld application I get the following error, even before entering the main() function:
    Entry Point not Found - The procedure entry point ?allocateTempVarName@XQDynamicContextImpl@@UAEPB_WXZ could not be located in the dynamic link library xqilla21.dll
    Anyone ever encountered this problem ?
    Thanks
    Regards
    Matteo

    Matteo,
    Have you tried just compiling and running the xqilla.exe command-line program to see if that works?
    Regards,
    George

  • Firefox 21.0 crashes with multiple tabs

    When I open firefox in my Note 2 with multiple tabs already opened it hangs for some time, crashes and requests for restart. Although after restart it works fine with my closed tabs listed in the first page.

    please find the report ids below.
    Submitted Crash Reports
    Report ID Date Submitted
    bp-2062a152-8225-408a-b1ac-5635c2130528 05/28/13 20:43
    bp-7461017c-b545-4eb7-948c-37a112130524 05/24/13 07:20
    bp-0a28877a-d4b4-437b-83fe-3799e2130524 05/24/13 07:20
    bp-566e728e-b3a5-42b6-aeb2-ae7a32130524 05/24/13 07:15
    bp-c92986f0-3cc0-44c7-a8aa-150c02130524 05/24/13 07:07
    bp-00efba8f-9bf9-4c37-bf63-ff8222130523 05/23/13 17:45
    I could'nt possibly find anything. pls check the same.

  • Premiere Elements 9 crashes with multiple NVIDIA graphics cards under Windows 7

    I've just installed Premiere Elements 9 and found that it will not run at all with multiple NVIDIA graphics cards active under Windows 7.  Per all the other discussions, I updated the NVIDIA drivers and Quicktime support to the latest versions.  (NVIDIA version 260.99).  I have both a 9400 GT and an 8400 GS installed, to support multiple monitors.  They both use the same driver.  The PRE 9 organizer will run, but as soon as I create or load a project it quickly crashes.
    On a long shot I disabled the 8400 GS card in the Device Manager and now I can run PRE 9.  Of course this means giving up one of my monitors.  Any other ideas?

    Over in the Premiere Pro area (or maybe it was in the Hardware section... didn't pay a lot of attention 'cause it really didn't matter to me) I read a message about using two nVidia cards with no problems (other than no dual-card SLI support)
    I **think** that was with two SAME model nVidia cards
    And, of course, PPro is completely different code, so PreEl may simply not work with two nVidia cards

  • Obtain Array from an XML file with Multiple Arrays

    Hi,
    So I have been struggling with this program I am making for the last few months but I am almost there. I have a program that creates multiple arrays and place them one after another in an xml file and each array has its own unique name. Now I would like to create a VI that takes this XML file and when the user inputs the specific array name they are looking for it goes into the xml file finds the entire array under that name and displays it in an output indictor to be viewed on the VI. Attached is a sample of my xml file and the VI that creates this xml file.
    Thanks,
    dlovell
    Solved!
    Go to Solution.
    Attachments:
    I_Win.zip ‏20 KB

    Here is a slightly different version. The one above reads from a file. This is how you would read from an already loaded XML string.
    =====================
    LabVIEW 2012
    Attachments:
    Find Array.vi ‏18 KB

  • How to generate xml file with multiple nodes using sqlserver as database in SSIS..

    Hi ,
    I have to generate the xml file using multiple nodes by using ssis and database is sqlserver.
    Can some one guide me on to perform this task using script task?
    sudha

    Why not use T-SQL for generating XML? You can use FOR XML for that
    http://visakhm.blogspot.in/2014/05/t-sql-tips-fun-with-for-xml-path.html
    http://visakhm.blogspot.in/2013/12/generating-nested-xml-structures-with.html
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • XML output with multiple tags in one line

    I have not done much XML exporting with SQL. Previously I had just been ending my SQL queries with
    FOR XML RAW ('Company'), ROOT ('Companies'), ELEMENTS;
    and it formatted my query nicely in an XML output. That put every column name as a tag and the cell data within the tag.
    However, now the criteria has changed on me. I need to create a tag with multiple sub tags in it.
    Example: <Location Floor="10" Suite="512" DoorType="Metal">
    But I'll still need other tags to be normal in the XML output such as
    <Address>123 Fake St</Address>
    <City>Springfield</City>
    <Location Floor="10" Suite="512" DoorType="Metal">
    Is there any way to get this XML mixed in the output like above?
    Thank you for any help. 

    Hi, you can FOR XML PATH for a finer degree of control over your XML.  Use the @ symbol to create attributes.  Here's a simple example:
    DECLARE @t TABLE ( rowId INT IDENTITY PRIMARY KEY, [address] VARCHAR(50), city VARCHAR(30), floor INT, suite INT, doorType VARCHAR(20) )
    INSERT INTO @t VALUES
    ( '123 Fake St', 'Springfield', 10, 512, 'Metal' )
    SELECT
    [address] AS "Address",
    city AS City,
    [floor] AS "Location/@Floor",
    suite AS "Location/@Suite",
    doorType AS "Location/@DoorType"
    FROM @t
    FOR XML PATH ('Company'), ROOT ('Companies'), ELEMENTS;

  • Iphoto/preview crashing with multiple user accounts

    Hi everybody,
    I'm stuck for a while now with my iMac and parental controlled user accounts.
    It's for a few months now iPhoto and Preview keep crashing at starting up in these other accounts.
    All works fine in my own administrator account. I'll copy a the first part of the crash state, maybe that will help.
    I think the problem started with connecting a photocamera (Sony W125) directly to the computer.
    It seems that viewing pictures (PDF/iphoto) is corrupted in this way.
    I'm working on an late 2011 iMac 2,5 Ghz Intel Core i5 /12GB 1333 / OSX 10.7.5
    Allready done:
    removed plists
    repaired permissions
    re-installed Lion
    re-installed iPhoto
    give full permissions too all other accounts (checking out parental control i.o.w.)
    made a new user acount with full permissions except administrator function (also crashes of iPhoto)
    tried some searching in Root-account but where afraid to damage stuff.
    looked around on the web but I couldn't find people with the same problem
    Thanks a lot for your help in advance.
    Michiel
    Process:         iPhoto [1058]
    Path: /Applications/iPhoto.app/Contents/MacOS/iPhoto
    Identifier:      com.apple.iPhoto
    Version:         9.4.2 (9.4.2)
    Build Info:      iPhotoProject-710042000000000~2
    Code Type:       X86 (Native)
    Parent Process:  launchd [807]
    Date/Time:       2012-11-05 10:30:59.667 +0100
    OS Version:      Mac OS X 10.7.5 (11G63)
    Report Version:  9
    Interval Since Last Report:          247 sec
    Crashes Since Last Report:           2
    Per-App Crashes Since Last Report:   1
    Anonymous UUID: 19E6D82E-8DD9-4044-B141-C67D09268E1F
    Crashed Thread:  0 Dispatch queue: com.apple.main-thread
    Exception Type:  EXC_BAD_INSTRUCTION (SIGILL)
    Exception Codes: 0x0000000000000001, 0x0000000000000000
    Application Specific Information:
    dyld: launch, running initializers
    /usr/lib/libSystem.B.dylib
    xpchelper reply message validation: code signature invalid
    The code signature is not valid: The operation couldn’t be completed. (OSStatus error 100005.)
    Application Specific Signatures:
    code signature invalid
    Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
    0 libxpc.dylib                      0x96b2254e runtime_init + 2014
    1 libdispatch.dylib                         0x92d10c27 dispatch_once_f + 50
    2 libxpc.dylib                      0x96b22d92 _xpc_runtime_set_domain + 350
    3 libxpc.dylib                      0x96b1f9af _libxpc_initializer + 578
    4 libSystem.B.dylib                        0x94ba77a7 libSystem_initializer + 199
    5 dyld                                  0x8fef1203 ImageLoaderMachO::doModInitFunctions(ImageLoader::LinkContext const&) + 251
    6 dyld                                  0x8fef0d68 ImageLoaderMachO::doInitialization(ImageLoader::LinkContext const&) + 64
    7 dyld                                  0x8feee2c8 ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 256
    8 dyld                                  0x8feee25e ImageLoader::recursiveInitialization(ImageLoader::LinkContext const&, unsigned int, ImageLoader::InitializerTimingList&) + 150

    After searching the web and the discussion here, here's my minimal impact solution for multiple Macs with multiple users in a household:
    1) Set up Mac1 for myself only
    2) Set up Mac2 for the wife and kid
    3) Set up each Mac to backup to the Airport base station using Time Machine (this would create two separate backups on the Airport base station's drive, which from what I've read has its own problems)
    4) On Mac1 setup "empty user accounts" for the wife and kid. These will not have any files in them - just an access mechanism. If they want to access their files, they can use Time Machine's "The Browse Other Backup Disks Option" to get their file from Mac2, work on it and then drop it in the Shared Folder. Next time they are on Mac2, remember to copy the updated/created file from the Shared Folder into their Mac2 user account. If possible, get Time Machine to not backup the "empty user accounts".
    5) Do the same for me on Mac2.
    Not the most elegant solution, but until Apple get off their backside and make this seamless, I can't think of anything else :-( .
    P.S. iCloud is not a soluton since it costs hundreds of dollars a year, uses up intenet data allowance and is slow.

  • After Effects CS6 crashing with multiple moniters

    I recently upgraded from CS4 to CS6 in after effects.
    CS4 ran smoothly and fine.
    However, when I start CS6 i get the typical loading screen, it then tells me that
    GPUSniffer.exe has stopped working *I click close the program*
    Another window comes up
    After Effects error: Crash in progress. Last logged message was: "<2076><GPUManager><2>Sniffer Result Code: 1
    Then it closes everything. I read online this can happen with multiple moniters. My main screen is connected via SVGA to my graphics card, however my second (and smaller screen) is connected to the mobo and runs on VGA.
    My graphics card is fully updated as is most of my other drivers.
    I can take out the moniter and then AE boots fine, but I don't want to do this everytime just for AE.
    My only solution to this is leaving the error message there and waiting for AE to load, or clicking close and having everything crash.
    Thanks in advance,
    Snow.

    Nobody can say anything without exact system info, but using two different graphics adaptors is not the best of ideas. AE most likely tries to use your crappy intel chip or whatever and then crashes. You will have to disable it and only use your dedicated graphics.
    Mylenium

  • SQL Toolkit crashing with multiple threads

    Hello everyone and Happy New Year!
    I was hoping someone might be able to shed some light on this problem. I am updating an older application to use multiple threads. Actually the thread that is causing a problem right now is created by using an Asynchronous timer.
    I am using CVI 2010, and I think the SQL toolkit is version 2.2.
    If I execute an SQL statement from the main thread, there is no problem.
    stat = DBInit (DB_INIT_MULTITHREADED);
    hdbc = DBConnect( "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=sample.mdb;Mode=ReadWrite|Share Deny None" );
    hstmt = DBActivateSQL( hdbc, "SELECT * FROM SAMPLES" );
    DBDeactivateSQL(hstmt);
    DBDisconnect(hdbc);
    If I add code to do the same functions in a timer callback, it causes a stack overflow error.
    .. start main thread
    stat = DBInit (DB_INIT_MULTITHREADED);
    NewAsyncTimer (5.0, -1, 1, &gfn_quicktest, 0);
     .. end main thread
    .. and then the timer callback
    int CVICALLBACK gfn_quicktest (int reserved, int timerId, int event, void *callbackData, int eventData1, int eventData2)
    int hdbc = DBConnect( "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=params\\sample.mdb;Mode=ReadWrite|Share Deny None" );
    int hstmt = DBActivateSQL( hdbc, "SELECT * FROM SAMPLES" );
    DBDeactivateSQL(hstmt);
    DBDisconnect(hdbc);
    return 0;
    The program crashes with a stack overflow error when the DBActivateSQL statement is called.
    I understand that the ODBC driver for Access may not support multithreading, but I am only connecting to that database from the same thread with those 2 statements only so it should be fine ?
    Any insight would be appreciated,
    Thanks,
    Ed.
    Solved!
    Go to Solution.

    I just tried this using the sample access database that comes with CVI. It uses a DSN instead of mdb. It worked fine though. I don't see any reason multithreading would be a problem here if you are opening and closing the connection in the same code segment. I do notice that you are using params in the asyn callback connection string. Where does this come from? Maybe try using the sample database and see if that works.
    National Instruments
    Product Support Engineer

  • Replication of Berkeley DB Xml Edition with the help of JAVA API

    hi,
    i am trying to replicate berkeley DB to 2 other replicas.with the help of small program which along with its documentation(of chapter 3). And i'm using java API for the same(specifically replication framework program.)
    All necessary files are get created at host side like log files, dll files, db files. But at replica(client) side nothing get created. Host and clients are placed in the same network.
    But unfortunately its not working. don't know the reason. And its not giving any sort of error. And i dont know how to go ahead. Or is there any other way should i proceed with.
    So could you help me out to get rid of this problem.
    Thanks

    What compiler are you running?
    See this message and thread:
    Re: Problem after update to 2.3.8
    It may be necessary to apply the -fno-strict-aliasing flag to the Berkeley DB Java library as well.
    Regards,
    George

  • XML gateway with multiple XML structures??

    Hi,
    I have a requirement to import data using XML gateway with different XML structures. Third party system sometimes will not provide certain tags itself if there is no data for the tag like contacts in below sample xmls. In that case we need to ignore those tags (CONTACTS in below sample). As per my understanding, we must have tag in XML though it may not have any value.
    We have 2 XMLs
    XML1 for supplier with contacts
    <SUPPLIER>
    <NAMES>
    <NAME1>XYZ </NAME1>
    <NAME2>ABC</NAME2>
    </NAMES>
    <SITE>
    <SITE1>XYZ </SITE1>
    <SITE2>ABC</SITE2>
    </SITE>
    <CONTACT>
    <CONTACT1>XYZ </CONTACT1>
    <CONTACT2>ABC</CONTACT2>
    </CONTACT>
    </SUPPLIER>
    XML2 for supplier without contacts
    XML1
    <SUPPLIER>
    <NAMES>
    <NAME1>XYZ1 </NAME1>
    <NAME2>ABC1</NAME2>
    </NAMES>
    <SITE>
    <SITE1>XYZ1 </SITE1>
    <SITE2>ABC1</SITE2>
    </SITE>
    </SUPPLIER>
    Can we upload data in both these xmls using only one generic dtd and xgm using XML gateway which will skip any missing tag.
    Thanks
    Rishi

    Hi, you can FOR XML PATH for a finer degree of control over your XML.  Use the @ symbol to create attributes.  Here's a simple example:
    DECLARE @t TABLE ( rowId INT IDENTITY PRIMARY KEY, [address] VARCHAR(50), city VARCHAR(30), floor INT, suite INT, doorType VARCHAR(20) )
    INSERT INTO @t VALUES
    ( '123 Fake St', 'Springfield', 10, 512, 'Metal' )
    SELECT
    [address] AS "Address",
    city AS City,
    [floor] AS "Location/@Floor",
    suite AS "Location/@Suite",
    doorType AS "Location/@DoorType"
    FROM @t
    FOR XML PATH ('Company'), ROOT ('Companies'), ELEMENTS;

  • How to extract a clob xml string with multiple row of table tag. in 10g

    i have a xml value like:
    <table><c1>0</c1><c2>Mr</c2><c3>abc</c3><c4>Sharma</c4></table>
    <table><c1>0</c1><c2>Mrs</c2><c3>abcd</c3><c4>Sharma</c4></table>
    <table><c1>0</c1><c2>Mr</c2><c3>sabc</c3><c4>Sharma</c4></table>
    <table><c1>0</c1><c2>Mrs</c2><c3>sdabc</c3><c4>Sharma</c4></table>
    <table><c1>0</c1><c2>Mr</c2><c3>dabc</c3><c4>Sharma</c4></table>
    <table><c1>0</c1><c2>Mr</c2><c3>adbc</c3><c4>Sharma</c4></table>
    i want to insert each of <c> value in a table with respective columns according c1,c2,c3,c4
    pls suggest me what to do
    I use extract(xml, '/table) tab but it just read first one line & return error for other

    Can you plz explain to me thisIt is because you did not provide us with a valid xml structure so I used 11g's xmlparse function to create a xmltype even with the xml not being valid (no root tag).
    With a valid xml structure I could use the xmltype constructor instead and go on the same way as before:
    SQL> select *
      from xmltable (
             'table'
             passing xmltype ('
                            <root>
                            <table><c1>0</c1><c2>Mr</c2><c3>abc</c3><c4>Sharma</c4></table>
                            <table><c1>0</c1><c2>Mrs</c2><c3>abcd</c3><c4>Sharma</c4></table>
                            <table><c1>0</c1><c2>Mr</c2><c3>sabc</c3><c4>Sharma</c4></table>
                            <table><c1>0</c1><c2>Mrs</c2><c3>sdabc</c3><c4>Sharma</c4></table>
                            <table><c1>0</c1><c2>Mr</c2><c3>dabc</c3><c4>Sharma</c4></table>
                            <table><c1>0</c1><c2>Mr</c2><c3>adbc</c3><c4>Sharma</c4></table>
                            </root>').extract ('root/table')
             columns c1 number path 'c1', c2 varchar2 (4) path 'c2', c3 varchar2 (6) path 'c3', c4 varchar2 (6) path 'c4')
            C1 C2     C3        C4      
             0 Mr     abc       Sharma  
             0 Mrs    abcd      Sharma  
             0 Mr     sabc      Sharma  
             0 Mrs    sdabc     Sharma  
             0 Mr     dabc      Sharma  
             0 Mr     adbc      Sharma  
    6 rows selected.

Maybe you are looking for

  • Unknown Error: PDF_TEST_00   not returned Responds

    Hi Gurus, I am trying to execute some AIF using the T Code: FMBB, but just before calling the form itself, my testing program got stuck and does not longer respond.  No messages, no outputs, nothing after that. Have been to all of the step in this li

  • Style and encoding in XI SOAP Adapter

    Hello all, when describing a SOAP web service with WSDL using SOAP binding, there are two parameters affecting how SOAP messages are formatted: a.) style (may be 'document' or 'rpc') b.) encoding (may be 'literal' or 'encoded') Is there any informati

  • Photoshop elements 13 in swedish for mac

    I try to contact support for photoshop element 13, to ask if some Swedish version for mac comes out. Swedish version for windows available but not for mac

  • Multilangual issue : labels in forms and reports

    Hi, We are using Portal 9.0.2.6 in English, French and Dutch. Is there any way to have the report column labels or form labels dynamically translated, instead of writing a separate portlet for each language ? I found somewhere in the report package b

  • Can I change the Home Folder of users with Group Policy (or in another centralized way)?

    I know how to change the Home folder of users from AD Users & Computers -> their Properties -> Profile tab. But this is not very practical when one has users spread across many OUs, and with users being added and removed often. So I am wondering whet