ServerException: No query results returned

Hi,
When i am creating a record in Hierarchical table using MDM java api
i get the error
ServerException: No query results returned    and this is not consistent.
Code below
Record[] record=new Record[1];
               record[0]=RecordFactory.createEmptyRecord(repoSchemaCmd.getRepositorySchema().getTableId("New_Code"));
               StringValue fldVal1= new StringValue(enterpriseID);
               System.err.println("enterpriseID--"+enterpriseID);
               try {
                    record[0].setFieldValue(fldId, fldVal1);
               }catch(MdmValueTypeException ve)
                    ve.printStackTrace();
                    throw ve;
               System.err.println("record---"+record[0]);
               CreateRecordCommand cr=new CreateRecordCommand(conAccessor);
               cr.setParentRecordId(id);
               cr.setSession(userSessionID);
               cr.setPosition(0);
               cr.setRecord(record[0]);
               System.err.println("create----"+cr.getPosition()+"cr---"+cr.getParentRecordId()+cr.getSession()+cr.getRecord());
               try {
                    cr.execute();
               } catch (CommandException e2) {
                    // TODO Auto-generated catch block
                    e2.printStackTrace();
                    throw e2;
Thanks,
Padmaja

Hi Roman,
I assume you import the images to a catalog, dont you?
Which catalog do you use? MDM or CCM?
Daniel

Similar Messages

  • Image Import Error "No query results returned"

    Hi All,
    I have the problem while importing images, several image have not been imported with this error.
    Log:
    Importing [German [DE]] '205865_logo.jpg'...failed.
    Import complete
    Error:
    E:\images\205865\h-jpeg\205865_logo.jpg: No query results returned
    Altogether I have imported 17000 Images. 16998 have been successful and 2 throw this error. Anybody an idea what this means and how to avoid it?
    Best Regards
    Roman
    Edited by: Roman Becker on Mar 8, 2009 1:14 PM

    Hi Roman,
    I assume you import the images to a catalog, dont you?
    Which catalog do you use? MDM or CCM?
    Daniel

  • Query results returns document when getDocuments does not

    When we run an xquery, we get results that we can't be found in the getDocuments results.
    We run an xquery to get a key to an xml document.
    Then we attempt to retrieve that document and get a DOCUMENT_NOT_FOUND error.
    I can run the same xquery in dbxml and variations of that xquery and see the xml I expect to.
    getDocuments <keyvalue> does not work.
    Additionally, I run "getDocuments docs.txt"
    and search docs.txt for the xml I saw in the query results, and no luck.
    The document I'm looking for does not show up in the getDocumentNames names.txt
    either.
    I'm still using BDB XML 2.2.13 no patches on Solaris and W2k3.
    We can easily get the database into a state like this by running lengthy queries, putting, getting, removing documents on a multi-thread, concurrent basis.
    What's going on here, is there a work around?
    Thanks in Advanced,
    Douglas Moore

    Douglas,
    Hopefully you can upgrade to 2.3.10 and get past this. If you are not using any 2.2.13 patches, that could be the problem -- this may be a patched issue in 2.2.13. It could also be a subtle bug in your application.
    Either way, once you get into this state, you should be able to get out of it by reindexing the container (XmlManager::reindexContainer() or using the dbxml shell). If you choose to reindex, be very sure that not other threads or processes are in the environment and that you are backed up. Reindexing will remove all index databases and walk the container, re-creating them.
    Regards,
    George

  • Optimize query results(timing) returned from custom search query

    Casey can you send the following to Oracle Support as soon as you can, we need their input on optimizing returning search results.
    To Oracle:
    We have noticed in the IdocScript reference guide that there is a way to optimize the query results returning to the user.
    Here is the scenario: We have created a custom web query where we send a query to the UCM and return a result using a custom template via url like so
    http://dnrucm.dnr.state.la.us/ucm/idcplg?IdcService=GET_SEARCH_RESULTS&QueryText=dDocTitle <matches> `AGREEMENT` <AND> xStateLeaseNum<matches>`00340`&ResultCount=30&SortOrder=Desc&SortField=dInDate&urlTemplate=/ucm/groups/public/documents/oos/hcst-search.hcst
    This works fine. The problem is that when a query is broader like
    http://dnrucm.dnr.state.la.us/ucm/idcplg?IdcService=GET_SEARCH_RESULTS&QueryText= xStateLeaseNum<matches>`00340`&ResultCount=30&SortOrder=Desc&SortField=dInDate&urlTemplate=/ucm/groups/public/documents/oos/hcst-search.hcst
    The query takes an extremely long time to execute and the results template sometimes never comes back, which seems like a timeout.
    Is there something else that we can do to optimize the query results?

    Hi John,
    What version of xMII are you using?
    Some things I would try:
    1. Clear the Java Web Start Cache - see if that makes any difference.
    2. If not, what happens if you save the query under a different name, and then try using it in a new transaction?
    3. Please feel free to enter you case into xMII Support via the SAP Support Portal if you are unable to make this work.
    Kind Regards,
    Diana Hoppe

  • Returning query results in XML format

    Besides using custom tag library, does anyone know any methods or techniques that i can retrive the query results from database in XML format. for example, i have a table named student in database like this:
    StudentNo  Name   Gender  Degree
    123       Tony    male    B.Comp.Sci.
    456       Tom     male    B.Fiance
    343       Mary    female  B.Accountingso, if i have query select * from table student, i would get someting like the following:
    <row>
    <studentNo>123</studentNo>
    <name>Tony</name>
    <Gender>male</Gender>
    <Degree>B.Comp.Sci</Degree>
    </row>
    <row>
    <studentNo>456</studentNo>
    <name>Tom</name>
    <Gender>male</Gender>
    <Degree>B.Finace</Degree>
    </row>
    The reason i am asking for this is i need query results returned in XML format, so i can wrap XSLT tag around, and apply for HTML, WML, and XHTML template resprectively so i can display them on different terminals. any help is appreciated.

    I have this method in a ResultSetMapper class:
         * Return result sets as an XML stream, with root tag named
         * "results", one "result" tag per row, and "result" child tag
         * names equal to the column name
         * @param query result set
         * @param list of column names to include in the result map
         * @throws SQLException if the query fails
         * @throws JDOMException if the XML stream creation fails
        public static final Document toJDOM(ResultSet rs, List wantedColumnNames)
            throws SQLException, JDOMException
            Element rows         = new Element("results");
            int numWantedColumns = wantedColumnNames.size();
            while (rs.next())
                Element row = new Element("result");
                for (int i = 0; i < numWantedColumns; ++i)
                    String columnName   = (String)wantedColumnNames.get(i);
                    Object value = rs.getObject(columnName);
                    row.addContent(new Element(columnName).setText(value.toString()));
                rows.addContent(row);
            return new Document(rows);
        }It uses JDOM from www.jdom.org. - MOD

  • How to generate XML file from oracle database query result

    Hi dudes,
    as stated on the subject, can anyone suggests me how can i achieve the task stated above??
    Here is a brief description of my problem:
    I need to create a XML file once i query from the oracle database, and the query result returned from the database will be stored in XML file.
    I'd searched around the JAXB, DOM, SAXP and the like basic concepts, but i still don't know how to start??
    Any suggestions ???

    Read this:
    http://www.cafeconleche.org/books/xmljava/chapters/ch08s05.html
    You might have to read more of the book to understand that chapter.

  • How can I get Numbers to return the first row in a group of VLOOKUP query results instead of last one?

    I'm trying to query from one table (call it Table1) a batch of rows in another table (Table2) using VLOOKUP on a date specified in the first table (Table1). My problem is it's returning the last incident in Table2 of the requested date instead of the first incident. This really breaks the OFFSET scheme I'd like to use to collect the rest of the items for that date. Is there some way to compel VLOOKUP to return the first row of query results, not the last?
    NOTE: I see I've asked this before, but forgot to go back and look at responses given. It's been a while and I've limped along until now with the way things were. I'm actually trying to delete this questions, so if you see it, ignore it. I suppose if someone can tell me real quick how to delete a stupid question, that might be helpful.

    you cannot delete a post yourself.  You can flag the post an request a moderator remove.

  • How can I show all the results returned by a sql query?

    Hi guys,
    I need your help.
    Let's say I have one table: TableA. Fields of TableA are aleg, anon, apes. The following sentence can return, in general, several rows: select anon from TableA where aleg = somevalue. I'd like to show the result of column anon but no luck. If I try to show the results in a TextArea and the origin is an sql query only shows the first row value. I tried Show as: show as text (based in PLSQL) and coding an anonymous plsql block as
    DECLARE
    v_anon TableA.anon%TYPE;
    CURSOR v_cur IS
         select anon from TableA where aleg = somevalue;
    BEGIN
    OPEN v_cur;
    LOOP
    FETCH v_cur INTO v_anon;
    EXIT WHEN v_cur%NOTFOUND;
    :FIELD_IN_FORM := v_anon;
    END LOOP;
    CLOSE v_cur;
    END;
    but in this case it's not shown any result.
    So the first question is what kind of field should I use to show the result. And the second one is what can I do to being able to show all the results returned by the query (provided that is more than one single row).
    regards

    Hi Denes,
    Just starting with apex. I think I know how to show the results in a report region. I've simplified the posted question.
    A more detailed question would be: Suppose you have a region where you have put several text areas to accommodate the result of a multi-column query (lets say for TableA) that only returns one row, each column value returned put in a different text area. Also you want to show the values of other fields in TableB that depends on some value just retrieved from TableA and that you want all values retrieved (from TableA and the linked TableB) to be show in the same region. Is that possible? If yes, how?
    Thank you in advance

  • Create SP that returns value and at the same time displays query result in output window

    I would like create an SP which will return the records from the table and also return value to my c# client application.
    For Example:
    Select * from employee returns all the query results in output window.
    Now I want to create an SP
    Create procedure Test
    As
    Declare @ret int,
    Select * from employee
    set @ret = Select count(*) from employee
    if @ret > 0
    return 1
    else
    return 0
    The above algo should return 1 0r 0 to c# client application and at the same time display all employees in sql query output window.
    Can u pls help in this regard.

    The above algo should return 1 0r 0 to c# client application and at the same time display all employees in sql query output window.
    Why?  and No!
    Why?  Your procedure generates a resultset of some number of rows.  You check the resultset for the presence of rows to determine if "anything is there".  You don't need a separate value to tell you this.  Note that it helps
    to post tsql that is syntactically correct.   While we're at it, if you just need to know that rows exist there is no need to count them since that does more work than required.  Simply test for existence using the appropriately-named function
    "exists".  E.g., if exists (select * from dbo.employee). 
    No!  A stored procedure does not display anything anywhere.  The application which executes the procedures is responsible for the consumption of the resultset; it chooses what to do and what to display. 
    Lastly, do not get into the lazy habit of using the asterisk in your tsql code.  That is not best practice.  Along with that, you should also get into the following best practice habits:
    schema-qualify your objects (i.e., dbo.employee)
    terminate every statement - it will eventually be required.

  • IPTObjectManager.Query not returning correct result (Java)

    Hi,
    I am having a problem with the IPTObjectManager.Query method. The code is given below. The issue I am having is, that when I search for a community in a specific folder not results are returned. However if I search in all folders (using -1 as the second parameter to the method) it returns multiple communities including the one I need. Anyone else had the same issue with this??
    // THIS CODE WORKS AND RETURN MULTIPLE COMMUNITIES
    // THE hotelCode VARIABLE IS A STRING VARIABLE CONTAINING A VALUE
    // WHICH IS THE COMMUNITY NAME.
    // Create a ObjectManager object
    IPTObjectManager objectManager = session.GetObjectManagers(ObjectClass.Community.toInteger());
    // define the query based on the passed string
    Object[][] vQueryFilter = {
         new Object[]{new Integer(PT_PROPIDS.PT_PROPID_NAME)},
         new Object[]{new Integer(PT_FILTEROPS.PT_FILTEROP_CONTAINS)},
         new Object[]{hotelCode}};
    // Run the query and return results
    IPTQueryResult ptQueryResult = objectManager.Query(
         PT_PROPIDS.PT_PROPID_ALL, -1, PT_PROPIDS.PT_PROPID_NAME, 0, -1, vQueryFilter);
    // THIS CODE DOES NOT WORK. I AM PASSING IS THE FOLDER ID OF THE
    // FOLDER WHICH CONTAINS THE COMMUNITY
    // Create a ObjectManager object
    IPTObjectManager objectManager = session.GetObjectManagers(ObjectClass.Community.toInteger());
    // define the query based on the passed string
    Object[][] vQueryFilter = {
         new Object[]{new Integer(PT_PROPIDS.PT_PROPID_NAME)},
         new Object[]{new Integer(PT_FILTEROPS.PT_FILTEROP_CONTAINS)},
         new Object[]{hotelCode}};
    // Run the query and return results
    IPTQueryResult ptQueryResult = objectManager.Query(
         PT_PROPIDS.PT_PROPID_ALL, 303, PT_PROPIDS.PT_PROPID_NAME, 0, -1, vQueryFilter);

    I don't know about G6, however in version 5 there does not appear an easy way of doing it. I guess the "easiest" way would be to query sub-folders first, build and array of their ids, and then query for communities in those folders. This is using server API. Something like this (.NET):
    publicvoidGetFolderCommunities(intfolderId){    IPTAdminFolder folder =this.session.GetAdminCatalog().OpenAdminFolder(folderId, false);    IPTQueryResult qr =folder.QuerySubfolders(PT_PROPIDS.PT_PROPID_ALL, [b]1, null, 0, -1, newobject[][] {             newobject[] { PT_PROPIDS.PT_PROPID_FOLDER_FOLDERTYPE }, newobject[] { PT_FILTEROPS.PT_FILTEROP_EQ } , newobject[] { PT_ADMIN_FOLDER_TYPES.PT_ADMIN_FOLDER_TYPE_COMMUNITYFOLDER } } ); int[] folderIds =newint[qr.RowCount()]; Console.WriteLine("------ sub-folders for communities -------"); for(inti =0; i <qr.RowCount(); i++) {        intobjectId =qr.ItemAsInt(i, PT_PROPIDS.PT_PROPID_OBJECTID);        stringobjectName =qr.ItemAsString(i, PT_PROPIDS.PT_PROPID_NAME);        intparentFolderId =qr.ItemAsInt(i, PT_PROPIDS.PT_PROPID_FOLDER_PARENTFOLDERID);        folderIds[i] =objectId; Console.WriteLine("{0}: {1}; parent: {2}", objectId, objectName, parentFolderId); } qr =this.session.GetCommunities().Query( PT_PROPIDS.PT_PROPID_ALL, -1, (object) null, 0, -1, newobject[][] {            newobject[] { PT_PROPIDS.PT_PROPID_FOLDERID }, newobject[] { PT_FILTEROPS.PT_FILTEROP_IN } , newobject[] { folderIds } } ); Console.WriteLine("------ communities from sub-folders -------"); for(inti =0; i <qr.RowCount(); i++) {        intobjectId =qr.ItemAsInt(i, PT_PROPIDS.PT_PROPID_OBJECTID);        stringobjectName =qr.ItemAsString(i, PT_PROPIDS.PT_PROPID_NAME);        int parentFolderId =qr.ItemAsInt(i, PT_PROPIDS.PT_PROPID_FOLDERID);        Console.WriteLine("{0}: {1}; folder: {2}", objectId, objectName, parentFolderId); }}
    Or you could use EDK RPC search. Again, in .NET:
    publicvoidSearchForCommunities(intfolderId){ IPortalSearchRequest searchRequest =this.ptSession.GetSearchFactory().CreatePortalSearchRequest(); searchRequest.SetObjectTypesToSearch(newObjectClass[] { ObjectClass.Community }); searchRequest.SetDocFoldersToSearch(newint[] {}, true); searchRequest.SetAdminFoldersToSearch(newint[] { folderId}, true); searchRequest.SetResultsCount(0, 100); searchRequest.SetResultsOrderBy(PortalField.OBJECT_ID); searchRequest.SetFieldsToReturn(newPlumtreeField[] {}); searchRequest.SetQuery("*"); ISearchResponse searchResponse =searchRequest.Execute(); intreturnedMatches =searchResponse.GetReturnedCount(); ISearchResultSet resultSet =searchResponse.GetResultSet(); IEnumerator enumerator =resultSet.GetResults(); while(enumerator.MoveNext()) { ISearchResult result =(ISearchResult) enumerator.Current; Console.WriteLine( result.GetFieldAsInt(PortalField.OBJECT_ID) +": "+ result.GetFieldAsString(PlumtreeField.NAME) ); }}
    Ruslan.

  • No result returned or XML returned contains error in test query

    Hello,
    I have a problem with Visual Composer 7.0. When I try to execute a test query it shows the following error:
    'No result returned or XML returned in the result contains error'. What could it be?
    Thanks,
    Belen

    Either your query doesn't return results or you don't have the MSXML Parser installed on your client.

  • 0 result returned for query "collection ('exampledata.dbxml')/article

    I  using  BDB XML I create a container called Exampledata.dbxml using java API. using a separate program I put my sigmodRecord.xml  file into the container. I then wrote another program (see the program below) to test my Query
    where Query =  "collection ('Exampledata.dbxml')/article"  but dont know why i always have
                                                      0 result returned for query "collection ('exampledata.dbxml')/article  if  the program is run. Pls can anybody help me?
    package xmldbdemo;
    import com.sleepycat.db.Environment;
    import com.sleepycat.dbxml.*;
    import dbxml.gettingStarted.myDbEnv;
    import java.io.File;
    public class simpleQuery3 {
        public static void main (String[] args) throws Throwable  {
         String theContainer = "Exampledata.dbxml";
          File path2DbEnv = new File("c:/myJavaProgs/examplesEnvironment");
         if (path2DbEnv == null || ! path2DbEnv.isDirectory()) {
               System.out.println("Bad file name");
          System.exit( -1 );
      myDbEnv env = null;
      XmlContainer openedContainer = null;
         env = new myDbEnv(path2DbEnv);
                Environment enviro = env.getEnvironment();
         // create xmlmanager
           XmlManagerConfig myManagerConf = new  XmlManagerConfig();
           myManagerConf.setAdoptEnvironment(true);
           myManagerConf.setAllowExternalAccess(true);
           XmlManager myManager = new XmlManager  (enviro, myManagerConf);
       // XmlManager myManager = new XmlManager();
        XmlContainerConfig myContainerConf = new  XmlContainerConfig();
        XmlContainer myContainer = myManager.openContainer( theContainer, myContainerConf);
        XmlQueryContext myContext =  myManager.createQueryContext();
        String myQuery = "collection('Exampledata.dbxml')/article";
        XmlResults myResults = myManager.query(myQuery, myContext, null);
        XmlValue myValue = myResults.next();
        while (myValue != null){
         XmlDocument myDocument = myValue.asDocument();
         String name  = myDocument.getName();
         System.out.println(name);

    Hi,
    The BDB forum is located here : Berkeley DB Family

  • Query sometimes returns no results

    In our project, we have some EJB2.1 CMP beans with a redirect finder. The Redirect finder uses Toplink expression to build a ReadAllQuery. The expression provides a kind of findByExample implementation which toplink does not support for Entity beans. During testing the method the query results are most of the time as expected, however sometimes no objects are returned.
    I did some debugging and comparison of log file in case of the correct case and the case where it goes wrong. The difference is in the result of method expression.doesConform(). In the correct case, the following exception is thrown (the text is translated from dutch, so it will differ from original english message):
    [TOPLINK-6092] (TopLink (Oracle OC4J CMP) - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.QueryException
    Description exception: A non instantiated ValueHolder has been detected. Instantiate the Valueholders before execute this query in memory.
    In the case where it goes wrong (no results), the doesConform method simply returns false.
    I assume it has to do with in-memory querying, and I have tried to change some of the setting available (caching, conform result in unit of work,..). all of those did not solve the problem.
    Hope somebody can help me out here.

    We found a workaround for this problem.
    Our expression contained a LIKE "%%%:%%" or something similar, but the important thing here that if subsequent % are the cause of the problem. when we remove the subsequent % (so we have "%:%") then the result of the query is always the same.
    Although I don't understand what the cause of the problem is, we have a solution for this issue.

  • Return Status Message Query results in PowerShell

    Hi everyone,
    I'd like to know if there's a way to run a Status message query from PowerShell and have the results return as an array of objects. In other words, I'd like to be able to view the results from the Status Message Viewer in  PowerShell so I can monitor
    the deployment of a task sequence.
    Is this at all possible? It's basically a WMI query so I should be able to do someting like this:
    $Site = Get-CMSite
    $SiteCode = $Site.SiteCode
    $SiteServer = $Site.ServerName
    $Namespace = "root\sms\site_$SiteCode"
    $DeviceName = 'SRV-DEV-01'
    $Time = Get-date -UFormat '%Y/%m/%d %T.000'
    $Query = "select stat.*, ins.*, att1.*, stat.Time from SMS_StatusMessage as stat left join SMS_StatMsgInsStrings as ins on stat.RecordID = ins.RecordID left join SMS_StatMsgAttributes as att1 on stat.RecordID = att1.RecordID where stat.MachineName = `"$DeviceName`" and stat.Time >= '$Time' order by stat.Time desc"
    Get-WMIObject -Computername $SiteServer -Class SMS_StatusMessage -Namespace $NameSpace -Filter $Query
    This code however throws a 'Generic failure' (not very helpful). Does anyone know if this is the correct approach and how to fix it?
    Thanks in advance,
    MicaH
    http://itmicah.wordpress.com

    To get description info use the SMS_StatMsgWithInsStrings instead of SMS_StatusMessage:
    $SiteCode = 'ABC'
    $SiteServer = 'my-site-server'
    $ComputerName = 'my-device-name'
    Get-WmiObject -Namespace "root\SMS\site_$($SiteCode)" -Class SMS_StatMsgWithInsStrings -ComputerName $SiteServer -Filter "(Component like 'Task Sequence Engine') AND (MachineName like '$($ComputerName)')"
    You will need to parse out your desired properties. I am using InsString3 and 2. It's not perfect but it's at least more informative.

  • How to return query result in procedure

    Hi all,
    Can anyone tell me how to return query result in pl/slq procedure using out .
    thank you
    regards
    P Prakash

    Procedure for sys_refcursor:
    create or replace procedure ptest(c out sys_refcursor) is
    begin
      open c for select * from dual;
    end;Procedure for collections(although sys.ODCIVarchar2List is varray, same example you can use with "table of")
    create or replace procedure ptest2(c out sys.odcivarchar2list) is
    begin
      select dummy
      bulk collect into c
      from dual;
    end;Example:
    declare
      c sys_refcursor;
      v varchar2(100);
      vt sys.odcivarchar2list;
    begin
      ptest(c);
      fetch c into v;
      dbms_output.put_line('1.Cursor data: '||v);
      ptest2(vt);
      dbms_output.put_line('2.Collection data: '||vt(1));
    end;Regards,
    Sayan M.

Maybe you are looking for

  • Physical Memory limitation

    I have an HP dv6448se that originally came with Vista x86 I have recently upgraded the OS to Win7 x64 The listed memory limitation of the laptop is 2048 (2GB) What is it that limits the ram to 2GB?  Is it a hardware thing, or was it an OS thing?  Wou

  • Error when editing Portal User Profiles

    Hi there, I got this error message when editing Portal User Profiles Error: The specified user does not exist. (WWC-41406). I can select users from OID, but can't edit them. Note: these users are imported from AD and placed in a different OU other th

  • I don't have indesign cs5.5 available for download in my creative cloud.

    I can find it in the adobe site but it prompts me for a serial number even though i am logged in to creative cloud. How can i get 5.5 installed within the terms of our leasing agreement?

  • Preview images do not open in Photoshop

    After upgrade to Mtn Lion I am no longer able to open images or Save As images in Preview. Current issue was my screen-saving a graphic. I can open it in Preview but cannot open it in PS. I am told the file cannot be read. I used to be able to Save A

  • Delete phone numbers permantently even off of icloud

    How can I delete phone numbers off of iCloud?  I wish not to have a backup!