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.


#TechXchangePresenter
 View Only
  • 1.  Error using API JAVA

    Posted Sun June 16, 2002 05:10 AM

    I am trying run the following Query using the API Java for Quip and gave to error in the method “executeQuery”.

    error Message:
    java.lang.NullPointerException.

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

    public class testeQuip {
    public static void main(String args){
    Properties obj = new Properties();
    StringBuffer stringbuffer1 = new StringBuffer();


    try {
    stringbuffer1.append( “c:/Quip/examples/data/” );
    //stringbuffer1.append( “file://.” );

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

    Connection Conexao = DriverManager.getConnection( stringbuffer1.toString(), (Properties)obj );
    QueryResult Resultado =
    Conexao.executeQuery(“let $b := document("xmp-data.xml")/bib/book return { $b/title }”);
    System.out.println(Resultado.getRawString());
    }
    catch (XQueryException XQEx) {
    System.out.println("XQueryException: " + XQEx.getMessage());
    }
    }
    }


    #webMethods
    #API-Management
    #Tamino