Query container only relative to the Berkeley DB XML Enviroment location.

I have been having a great deal of trouble getting any queries to work using the Berkeley DB XML API. I am using Java 7 as my language and Netbeans 7.0.1 as my platform. After lots of experimentation with the Shell and observing its behavior, I seem to have isolated it to my not being able to specify a full absolute path name for my containers. Apparently to use XmlManager.query() or XmlManager.prepare().execute(), I must root the query with either a collection() or doc() entry at the beginning. The problem seems to be that both collection() and doc() only will take a simple filename+extension form for the name of my container. The XmlManager then resolves this name relative to the location of my XmlManager environment. If I specify anything else, I get "Error 6: Invalid URI format [err:FODC0002]" as an XmlException. I have tried various formats of absolute paths for my containers and none of them will work. For my application, the user needs to be able to put his containers anywhere on a local drive. It appears that the only way that I can operate is to put all my containers in that one Environment directory, or possibly one below it. This is a super-serious problem for me if this is true.
I could find no call in the API to override this behavior. I had hoped that XmlQueryContext.setBaseURI() would do that since it said it was for specifying a URI against which local things would be resolved against. But, any call to it with a directory path also raised the same XmlExpection. Being new with this produce, I am hoping that I am missing something obvious. Can anyone help?
Edward Fairchild
[email protected]

I have more information about this problem. It appears to be caused by spaces in the filename or path of the container in forming the collection() prefix in my xQuery. For the following test, I was using a container named "EEF-PGL10GenAncestors Only.gcdb" in my Environment folder. Here is the code that fails.
XmlQueryContext context = xmlmanGCDB.createQueryContext();
context.setEvaluationType(XmlQueryContext.Lazy);
String sContainerName = xmlcontGCDB.getName();
FileObject foContainer = FileUtil.toFileObject(new File(sContainerName));
sContainerName = foContainer.getNameExt();
sContainerName = Util.convertFilepathToURI(sContainerName);
String sQuery = "collection(\"" + sContainerName + "\")/" + GCDBTAG_INDI;
if(bDebug) DebugOut.println("sQuery: " + sQuery);
XmlQueryExpression xmlquery = xmlmanGCDB.prepare(sQuery, context);
XmlResults xmlresults = xmlquery.execute(context);
XmlDocument xmldoc = xmlmanGCDB.createDocument();
boolean bRet = xmlresults.next(xmldoc);
1. When I run it with the container named above with space and with the Util.convertFilepathToURI() call commented out, I get an XmlException executing the XmlManager.prepare() call. Based on this, I thought that you must be requiring percent encoding of spaces. The exception had Error Code 6: Invalid URI format [err:FODC0002], errcode = QUERY_PARSER_ERROR. The debug line displayed as
sQuery: collection("EEF-PGL10GenAncestors Only.gcdb")/INDI
2. So, if you uncomment that Util.convertFilepathToURI() call line and run it again, the debug line displays
sQuery: collection("EEF-PGL10GenAncestors%20Only.gcdb")/INDI
but that also caused an XmlException with Error Code 17: EEF-PGL10GenAncestors%20Only.gcdb: container file not found, or not a container, errcode = CONTAINER_NOT_FOUND. So, it is not interpreting the space as a %20 correctly.
3. Finally, if I take the space out of the filename and rerun, the debug line displays
sQuery: collection("EEF-PGL10GenAncestorsOnly.gcdb")/INDI
and everything works just fine. Are you using some other way to encode this space in a container name besides what I have tried? I need some help here folks.
Edward Fairchild
[email protected]

Similar Messages

  • The query contains a formula with the operator SUMCT

    I m trying to get query ready for Webi, getting the error as 'The query contains a formula with the operator %RT. Therefore, the query cannot be released for OLE DB for OLAP'
    I have not used any kind of s %GT, %RT, %CT, SUMGT, SUMRT, SUMCT and LEAF, also i have suppressed results / over results from the query, over to it, i have removed the calculate results as 'summation' feature and set to 'not defined' for all of my key figures.
    Still getting the error...
    Please suggest.
    Niraj

    hi,
    Ensure that all Link IDs are visible in the lsdal.ini file  located in the \Windows\system directory of the PAS Server as those are then available to all users. The lsdal.ini file may not be correctly updated if: - You have created the BI Link IDs while using PAS in Client Server Mode - You have enabled multi user access for remote desktop. In this case an additional lsdal.ini file may appear in the user specific Windows directory of someone who may have remotely connected to the system to create the Link ID. That additional lsdal.ini file will only be valid for that specific user.
    Also try adding  "ODBOSECURITY=0" entry to the end of the c:\windows\lsserver.ini file on the server.
    hope it helps
    regards
    laksh

  • Is FileVault necessary if disk contains only the OS?

    I have two disks on my MacBook.
    The first one is an SSD that contains only OS X. The second one is a regular HD which contains my home folder.
    This second HD is an encrypted partition, so it can't be opened without a password — and if you plug it into another computer, it won't be readable without that password.
    My question is: should I use FileVault in the SSD, even if my home folder is already encrypted?
    If someone steals my MacBook, they won't be able to open any of my personal files (since they're in the encrypted home folder).
    Would they be able to get anything useful and harmful from just the SSD that contains OS X?

    Try to change the value from General Settings – Resource Throttling from central administration.
    Here are the steps below to change.
    http://sharepointlk.wordpress.com/2012/04/09/the-query-cannot-be-completed-because-the-number-of-lookup-columns-it-contains-exceeds-the-lookup-column-threshold/
    Bala

  • Query that will run on the items matrix and trigger Approval procedure

    Hello,
    We are trying to design an approval procedure whenever an item code appears in a certain UDT.
    For example, we have many items in OITM.
    We have 50 of those items also in @BIN.
    The approval procedure should be triggered only when the document lists one of the items that appear in @BIN.
    I am using the following query:
    SELECT 'TRUE'   where $ [$38.1.0]  IN (Select code from [@BIN] )
    The problem is that the query would only search on the first row and wouldnu2019t continue to the next rows.
    Do you have any idea how to bypass this limitation?
    Thanks in advance
    Revital
    SELECT 'TRUE'   where $[$38.1.0]  IN (Select code from [@BIN] )

    Hi Revital,
    One way to implement this functionality would be to use a UI API that verifies the values while filling the items in the Matrix. For this you would need a little programming knowledge but no extra license.
    There is a lot of information including Code Samples in the SDK Package delievered with every patch of Business One.
    Kind Regards,
    Friederike Mundt

  • How do I make simplesearch look for the same tag in multiple locations

    Currently i'm trying to write a simplesearch implementation that will only return the result it if contains a specific tag. I would also like to include DAM assets in the search, wherein lies the problem:
    I need to look in both jcr:content and jcr:content/metadata for the tag, and if the tag is found in either location, return that page. Here is the code I am trying to use, but it currently only looks for the tag(s) in one location. Any tips on how to get it to look in multiple locations?
    Code:
                        tagPredicate = new Predicate("tags2", "tagid");
                        tagPredicate.set("property", "jcr:content/cq:tags");
                        for (Cookie cookie : tagsFromCookie) {
                                       if (cookie.getName().contains(CREDENTIALS)) {
                                                      tagPredicate.set("tagid",
                                                                          (cookie.getValue().replaceAll("---", ":")));
                                                      search.addPredicate(tagPredicate);
    Thanks for any help you can give!

    I figured this one out on my own. Kind of a "Doh!" moment.
    What I ended up doing is this: I created a PredicateGroup, and populated this group with the predicates I needed. Then, I set the PredicateGroup allRequired to false. Voila! It works!
    Code:
              PredicateGroup tagPredicateGroup = new PredicateGroup();
                        tagPredicateGroup.setAllRequired(false);
                        Predicate tagPredicate = new Predicate("tags", "tagid");
                        if (slingRequest.getParameter(GROUP1) != null) {
                                       tagPredicate = new Predicate("tags", "tagid");
                                       tagPredicate.set("property", "jcr:content/cq:tags");
                                       tagPredicate.set("tagid", GROUP1);
                                       tagPredicateGroup.add(tagPredicate);
                                       tagPredicate = new Predicate("damTags", "tagid");
                                       tagPredicate.set("property", "jcr:content/metadata/cq:tags");
                                       tagPredicate.set("tagid", GROUP1);
                                       tagPredicateGroup.add(tagPredicate);
                        return tagPredicateGroup;

  • 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

  • [DOCUMENTATION-ISSUE] Location of the trinidad-skins.xml.

    In chapter 18 of the Web User Interface Developer's Guide for Oracle ADF (TP4) I find the following: <quote>You must make sure that your ADF Faces application is aware of the custom skin. You do this by ensuring that the trinidad-skins.xml configuration file is located in the WEB-INF/lib directory.<end qoute>
    Shouldn't the trinidad-skins.xml be located directly under the WEB-INF ?
    This type occurs several times in this chapter, and maybe in others as well.
    Luc Bors

    Hi,
    good catch. I checked with the current internal version and here the issue is fixed
    Frank

  • What is the best way is to create a web app item collection which will contain only the listings where addressstate="ABC".

    What is the best way is to create a web app item collection which will contain only the listings where addressstate="ABC".

    How many systems have you used Robert?
    This is the only system you can not have all item data at least in JSON format and all of it. Big commerce has a lower limit and as I have said in every post related to a limit - I understand the function, but you can still make the requests as just one example (front and back)
    Same with API Robert.
    Firstly - the SOAP API request on say products gets you ALL the products, if you do something through a REST API request you can  make the requests to get all the items to complete your process of what your doing - You have to otherwise the API is pointless.
    Ok if the normal modules can not iterate through if there is a module_data solution, and web apps will get there hopefully sooner then later and you do have the sql query (where) for your filter which is great BUT, if you want to implement a solution across everything you cant do that with the liquid implementation.
    This also flows through to the JSON everywhere in concept which is fundamentally flawed for the same reason... And again referring other like services where a hard API has a limit but the JSON request returns everything.
    How those work varies from the method of request, some will only update every day, xxx time (Depending on cost of the plan) so its a cached version of data, to the ones that limit that request to x number of times per set time/day.
    That is how the actual rest of the world works, varied solutions but they are solutions. BC know they have a few limitations, there clearly is the need for things, there are a varied set of options... It is just a matter of engaging in it and offering up a solution for it, silence just creates frustration.

  • Approval Query for AP Invoices Containing Budget Related GL Account

    Hi Experts,
    I would like to create a approval template for all AP invoices that include a GL account that is related to the budget. Can you please help me with the approval query?
    Thank you!
    Jane

    Hello Gordon Du,
    "B1 approval will only apply to document level. If you want to check line level, only the first line can be subjected to."
    I was thinking to trigger the approval process based on a document (AP invoice) containing relevant cost centres on a line by line basis as entered via one of the enabled dim fields.
    Writing a trigger query for each cost centre effected? This does not appear to be a good solution, what is a better direction. Is there another way? (PO are not yet used via SAPB1)
    Currently my invoices add, but do not trigger the approval process based on my attempts thus far.
    Can the originator manually choose an approval pathway?
    If this is against posting etiquette delete and advise.
    I am a relative newbie to SAP B1, so am happy to be pointed to relevant help files. I arrived via  google searching and arrived here.
    Thankyou.

  • Tables related to the Query Manager

    I have been looking for the table that hold the data on preformatted queries.
    I found the OUQR table which shows the basics of every query in teh Query Manager.
    What other table(s) have data related to the queries in teh Query Manager.

    Great,  is there any other tables.
    When I run a query it states I have 255 charactors but shows no table info.
    Other then the OUQR and OQCN, is there another table(s) that contain more data on the queries?
    Thanks

  • Query relating to the creation of Managed Service Accounts

    Hi Folks
    I am studying for my 70-411 exam and have a query relating to the creation of Managed Service Accounts.
    I have successfully created an MSA account named 'MSATest' on a DC  using:
     new-adserviceaccount -name msatest –dnshostname home-dc-01 -passthru
    and
     add-AdcomputerServiceAccount -identity home-ap-01 -serviceaccount msatest -passthru
    However the guide that I am using now says that I now need to run:  Install-ADServiceAccount on the host computer in the domain to install the MSA in order to make available it available for use by services.
    So on my member server (home-ap-01) I have installed the Active Directory Module for powershell and ran:
    PS C:\Users\administrator.PCECORP> Install-ADServiceAccount -Identity msatest
    Install-ADServiceAccount : Cannot install service account. Error Message: 'An
    unspecified error has occurred'.
    At line:1 char:1
    + Install-ADServiceAccount -Identity msatest
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : WriteError: (msatest:String) [Install-ADServiceA
       ccount], ADException
        + FullyQualifiedErrorId : InstallADServiceAccount:PerformOperation:Install
       ServiceAcccountFailure,Microsoft.ActiveDirectory.Management.Commands.Insta
      llADServiceAccount
    PS C:\Users\administrator.PCECORP>
    However this errors, Have I misunderstood the purpose of the Install-ADServiceAccount ?  or am I doing something wrong?
    Thanks in advance for you help.

    Try using  -RestrictToSingleComputer parameter when creating service account with New-ADServiceAccount.
    Gleb.
    Hi Gleb
    Thank you for your help, it is appreciated.  That did the trick.
    All the best.

  • Please help me. I've just lost my iphone so I related to my backup contacts on icloud to get my contacts back. But my contacts only show at the first time and then they dissappeared, my contacts was empty. How can I see my contacts?

    Please help me. I've just lost my iphone so I related to my backup contacts on icloud to get my contacts back. But my contacts only show at the first time and then they dissappeared, my contacts was empty. How can I see my contacts?

    If they aren't on icloud.com they are no longer in iCloud.  If you don't have another backup, I'm afraid they're gone.

  • Looking for a keyword using like query which could contain multiple occurrence in the same column

    I am facing an issue. A bunch of my frontend JSP code has been stored in few tables of my database (65 rows in a table), which I have identified using few like queries. Now I want to update a Href link which is present in all these queries. But since these column entries are very long (50-60 lines long) and it is possible that a few rows may the link (which is to be replaced), multiple times,  I am not sure that if a simple update query using a single like will work for it or not?
    Any suggestion/ideas are welcome.
    Please let me know if you require any more info.

    Hi,
    e5d4d744-cf66-4fe0-8353-bbd8fd826b21 wrote:
    I am facing an issue. A bunch of my frontend JSP code has been stored in few tables of my database (65 rows in a table), which I have identified using few like queries. Now I want to update a Href link which is present in all these queries. But since these column entries are very long (50-60 lines long) and it is possible that a few rows may the link (which is to be replaced), multiple times,  I am not sure that if a simple update query using a single like will work for it or not?
    Any suggestion/ideas are welcome.
    Please let me know if you require any more info.
    Yes; whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), so that the people who want to help you can re-create the problem and test their ideas.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Simplify the problem as much as possible.  For example, if your strings are sometimes up to 4000 characters long, you don't have to post any data that's nearly that long.  You can probably show what you want with strings that are 80 characters long.
    Always say which version of Oracle you're using (for example, 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002#9362002
    This statement:
    UPDATE table_x
    SET str  = REPLACE ( str
                       , old_link
                       , new_link
    WHERE   str  LIKE  '%' || old_link || '%'
    will change all occurrences of old_link to new_link.  It will only change the rows where old_link occurs, but, aside from that, it doesn't matter how many times old_link occurs in str:  if it appears 2 times in the same str, then both occurrences will be changed to new_link.
    Watch out for the "mother is in chemotherapy" problem.  If old_link is 'bar.com', the statement above will change 'fubar.com'.  You may need REGEXP_REPLACE and/or REGEXP_LIKE if you need to consider what (if anything) comes immediately before 'bar.com' when deciding whether or not to change it.

  • Query  related to the transfer of the control to the other controller.

    Hi all,
    I have a query related to the transfer of the control to the other controller.
    I have components A and B .From a view of component A I neeed to open a window which belong to component B.Problem is that ,if I use create_window_for_cmp_usage( ) and the open( ) method and after that there is some code,then that code is getting executed before the window is opening.
    I want that the control should be back to the these code after the window is poped up and  after clossing the window. 
    Eg
    method ONACTIONOPEN_WINDOW .
    DATA lo_window_manager TYPE REF TO if_wd_window_manager.
      DATA lo_api_component  TYPE REF TO if_wd_component.
      DATA lo_window         TYPE REF TO if_wd_window.
      lo_api_component  = wd_comp_controller->wd_get_api( ).
      lo_window_manager = lo_api_component->get_window_manager( ).
      lo_window         = lo_window_manager->create_window_for_cmp_usage(
                         interface_view_name    = 'ZHELLO_WORLD'
                         component_usage_name   = 'USAGE_HELLO'
                       title                  =
                       close_in_any_case      = abap_true
                         message_display_mode   = if_wd_window=>co_msg_display_mode_selected
      lo_window->open( ).
      data a type i.
      data b type i.
      a = 2.
      b = 3.
      a = a + b.
    endmethod.
    In this case I am calling  ONACTIONOPEN_WINDOW method.But before opening the window the a iscalculated here.I want that after popuping  the window the calculations should be done .
    How will I achieve this.
    Thanks in advance.
    Edited by: vaibhav nirmal on Nov 25, 2008 6:42 AM

    Hi,
    You will have to do your calculation as an event in your new window, or capture the closing of the new window as an event in your currenbt view and do your calculations in the event.
    Regards,
    Shruthi R

  • Installation: hello, I am trying to install my adobe elements twelve. I have a serial number, which contains no letters (only numbers), from the box. I use a mac. When I try to install it, it says it's unable to validate my serial number. I have already c

    Installation: hello, I am trying to install my adobe elements twelve. I have a serial number, which contains no letters (only numbers), from the box. I use a mac. When I try to install it, it says it's unable to validate my serial number. I have already checked the spelling. What should I do?

    Does it begin with 1057? If not, it's a redemption code. In which case, see here:
    Redemption Code Help
    If it is a serial number, go to system preferences>security & privacy>firewall>firewall options and be sure that PSE is allowed to call out.

Maybe you are looking for

  • Error while creating .H header file

    I tried the same example in the JNI Programmer�s Guide and Specification. My working Folder - D:\velu\java\workspace. I wrote and compile the Helloworld.java here and so the class file also resides here. But when I execute javah -jni HelloWorld I am

  • Inserting integers in a Linked list/List in Java

    Please solve the following problem using Java. Problem: Write a program that inserts 25 random integers from 0 to 100 in order in a linked list object. The program should calculate the sum of the elements and the floating-point average of the element

  • UC320W Not connecting to ADSL Using Netgear DM111P

    Hi all, I have a UC320W conencted to a netgear modem that died.  I replaced it with a DM111P and the UC320W will not connect to the WAN.  I have tested the line etc and the modem connects fine when direct connected to a PC.  I have tried also a 2Wire

  • Download to MS Word

    I manage to download to PowerPoint or Excel and to print to PDF or MHTML. How can I download the report to MS Word format?

  • HT204053 what operating system is needed for icloud

    I have an older operating system and wanted to know if Snow Leopard was needed for current versions of ICloud. If so, what would be the best way to get the Snow Leopard Operating System?