I try to connect Quip with Tamino database through the Java API with the following code (picked from a previous post):
import java.util.Properties;
import com.softwareag.xtools.quip.xqueryAPI.Connection;
import com.softwareag.xtools.quip.xqueryAPI.DriverManager;
import com.softwareag.xtools.quip.xqueryAPI.QueryResult;
import com.softwareag.xtools.quip.xqueryAPI.XQueryException;
public class Quip {
public static void main(String args) {
Properties prop = new Properties();
try {
String dbLocation =
“http://localhost/tamino/myDB”;
//for memory issues
prop.put(“qmachineoptions”,“+RTS -M200M -RTS”);
prop .put(“quipcmd”, “D:\QuiP\quip.exe”);
String query = “let $x := fromCollection("ino:etc")/myFirstElement/mySecondElement return $x”;
// → Here is the problem ←
Connection connect = DriverManager.getConnection(dbLocation, prop);
QueryResult result = connect.executeQuery(query);
System.out.println(result.getRawString());
} catch (XQueryException XQEx) {
System.out.println("XQueryException: " + XQEx.getMessage());
}
}
}
When I execute this code, an error occured (“NullPointerException”) when the DriverManager try to get the connection.
But when I use a XML file as source, all is OK.
What’s the problem ? Thanks !
#Tamino#API-Management#webMethods