IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Bogus chunk size exceptions with my query

    Posted Sun March 21, 2004 01:03 PM

    Who Knows this proplem?

    If I try to query my Database in this form: /articles[node()~=“web”]//node()[.~=“web”] everything is OK and I can iterate through my TJDOMElementIterator.

    But as soon as my query looks like this: /articles[node()~="web" or node()~=“internet”]//node()[.~=“web” or .~=“internet”], my Database only throws exceptions (Bogus chunk size…)
    Who can help my! What have i made wrong! What must i do to avoid these kind of exception.

    Java code example:

    import com.softwareag.tamino.db.api.accessor.TAccessLocation;
    import com.softwareag.tamino.db.api.accessor.TQuery;
    import com.softwareag.tamino.db.api.accessor.TQueryException;
    import com.softwareag.tamino.db.api.accessor.TXMLObjectAccessor;
    import com.softwareag.tamino.db.api.connection.TConnection;
    import com.softwareag.tamino.db.api.connection.TConnectionFactory;
    import com.softwareag.tamino.db.api.connection.TServerNotAvailableException;
    import com.softwareag.tamino.db.api.objectModel.TIteratorException;
    import com.softwareag.tamino.db.api.objectModel.TNoSuchXMLObjectException;
    import com.softwareag.tamino.db.api.objectModel.jdom.TJDOMElementIterator;
    import com.softwareag.tamino.db.api.objectModel.jdom.TJDOMObjectModel;
    
    public class example {
    
    public static void main(String[] args) {
    TConnectionFactory connectionFactory = TConnectionFactory.getInstance();
    TConnection connection = null;
    try {
    connection =
    connectionFactory.newConnection(
    "http://localhost/tamino/mydatabase/");
    } catch (TServerNotAvailableException e) {
    e.printStackTrace();
    }
    TXMLObjectAccessor dataAccessor =
    connection.newXMLObjectAccessor(
    TAccessLocation.newInstance("articles"),
    TJDOMObjectModel.getInstance());
    String query =
    "/*[node()~=\"web\" or node()~=\"internet\"]//node()[.~=\"web\" or .~=\"internet\"]";
    try {
    TJDOMElementIterator idt = queryIDT(dataAccessor, query);
    
    while (idt.hasNext()) {
    try {
    System.out.println(idt.next().getName());
    } catch (TNoSuchXMLObjectException e2) {
    
    e2.printStackTrace();
    } catch (TIteratorException e2) {
    
    e2.printStackTrace();
    }
    }
    } catch (TServerNotAvailableException e1) {
    
    e1.printStackTrace();
    } catch (TQueryException e1) {
    
    e1.printStackTrace();
    }
    }
    public synchronized static TJDOMElementIterator queryIDT(
    TXMLObjectAccessor dataAccessor,
    String query)
    throws TServerNotAvailableException, TQueryException {
    TQuery querya = TQuery.newInstance(query);
    TJDOMElementIterator result =
    new TJDOMElementIterator(
    dataAccessor.query(querya).getXMLObjectIterator());
    return result;
    }
    
    }



    [This message was edited by keppus on 21 March 2004 at 12:40.]


    #webMethods
    #webMethods-Tamino-XML-Server-APIs
    #API-Management


  • 2.  RE: Bogus chunk size exceptions with my query

    Posted Tue March 23, 2004 02:38 PM

    Which version of Tamino are you running? I just tried something similar using HTTP against Tamino 4.1.1.2 without a problem.

    Also, what was the full error message from Tamino. I couldn’t find anything related to “bogus chunk size”.


    #webMethods-Tamino-XML-Server-APIs
    #webMethods
    #API-Management


  • 3.  RE: Bogus chunk size exceptions with my query

    Posted Wed March 24, 2004 02:08 PM

    I think I know my problem!
    My collection seems to be too big to handle the whole result! Im trying to evaluate Tamino 4.1.4.1 with INEX 03! My Database contains 12107 articles!

    But Thanx for answering


    #API-Management
    #webMethods
    #webMethods-Tamino-XML-Server-APIs