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.  DB connection through Quip with JAVA...

    Posted Tue January 15, 2002 06:33 PM

    Hello,

    I need to connect to a Tamino Database and to query it with Quip using the Quip API for JAVA

    my parameters are:
    - server: lithpc3.epfl,ch
    - DBname: XianDB
    - collection: ino:etc

    This is what I’m doing for the moment:

    public class Quip {
    public static void main(String args){

    Properties obj = new Properties();

    try {

    String url = “lithpc3.epfl.ch/tamino/XianDB”;

    obj.put(“home”,“F:/Quip/” );
    obj.put(“quipcmd”,“F:/quip.exe” );

    Connection Conexao = DriverManager.getConnection(url, (Properties)obj );

    QueryResult Resultado = Conexao.executeQuery(“let $x := fromCollection("ino:etc")/News/Subject return $x”);

    System.out.println(Resultado.getRawString());
    }
    catch (XQueryException XQEx) {
    System.out.println("XQueryException: " + XQEx.getMessage());
    }
    }
    }

    and I the error message is :

    XQueryException: javax/xml/parsers/DocumentBuilderFactory


    Please help meeeeeeeeeeeeeeeeeee…


    #API-Management
    #Tamino
    #webMethods


  • 2.  RE: DB connection through Quip with JAVA...

    Posted Wed January 16, 2002 03:36 PM

    this looks as if you are missing out something
    on your classpath. check if crimson.jar is on
    your classpath, when you execute your java class.

    Sven Eric


    #API-Management
    #Tamino
    #webMethods


  • 3.  RE: DB connection through Quip with JAVA...

    Posted Wed January 16, 2002 04:19 PM

    XQueryException: The executor was not found!


    #Tamino
    #webMethods
    #API-Management


  • 4.  RE: DB connection through Quip with JAVA...

    Posted Wed January 16, 2002 04:37 PM

    it means that the specified quip.exe was not found
    in the file system. In Your example above you
    spcified f:/quip.exe. Is this surely were your
    quip.exe is?

    I suspect that it should be: f:/QuiP/quip.exe

    Sven Eric


    #Tamino
    #webMethods
    #API-Management


  • 5.  RE: DB connection through Quip with JAVA...

    Posted Wed January 16, 2002 05:06 PM

    I tried your own solution (the one you gave in a previous topic), which executes a query on a file dcument:

    my parameters:

    - filename:
    - file location: F:/Xian/Diplome/Xqueries/XML/
    - quip.exe location: F:/Software AG/Quip/quip.exe

    and this is my code:

    import java.util.;
    import com.softwareag.xtools.quip.xqueryAPI.
    ;

    public class x {

    public static void main(String args){

    Properties obj = new Properties();
    StringBuffer stringbuffer1 = new StringBuffer();

    try {
    stringbuffer1.append( “file:XianDBfile1.xml” );

    obj.put(“home”,“F:/Xian/Diplome/Xqueries/XML/” );
    obj.put(“quipcmd”,“F:/Software AG/Quip/quip.exe” );

    String query = “let $x := document(”+obj.getProperty(“home”)+“)/News/Subject return $x”;

    Connection connect = DriverManager.getConnection( stringbuffer1.toString(), (Properties)obj );
    QueryResult result = connect.executeQuery(query);

    System.out.println(result.getRawString());

    } catch (XQueryException XQEx) {
    System.out.println("XQueryException: " + XQEx.getMessage());
    }
    }
    }

    and always the same error message:

    XQueryException: The executor was not found!


    I checked every single letter of the quip.exe location (in fact it is a copy-paste…)

    I also have another question,

    what does the “file:” in stringbuffer1.append( “file:XianDBfile1.xml” ); ??
    ehat shoul we put if we would like to give a database url ??


    #API-Management
    #webMethods
    #Tamino


  • 6.  RE: DB connection through Quip with JAVA...

    Posted Wed January 16, 2002 05:40 PM

    I had to put the quip.exe element directly in the F:/ !! If I put it in any folder and then try to access this folder, it won’t work…


    #webMethods
    #API-Management
    #Tamino


  • 7.  RE: DB connection through Quip with JAVA...

    Posted Wed January 16, 2002 06:55 PM

    everything is ok now…
    with time and patience you can do anything !!

    Thank you very much Sven


    #API-Management
    #webMethods
    #Tamino