Forum Discussion

sharathchandra's avatar
sharathchandra
New Member
8 years ago

Cannot connect to Sqlite Database to retrieve orders by writing Groovy Script in SoapUI Pro

Cannot connect to Sqlite Database to retrieve orders by writing Groovy Script in SoapUI Pro.
Scenario - When I execute the below mentioned script, I witness exception:
java.lang.ClassNotFoundException: org.sqlite.JDBC error at line: 6
 

Having said that, I have added path "SQLite-jdbc-3.19.3.jar" in "C:\Program Files (x86)\SmartBear\SoapUI-5.3.0\bin\ext"
Also, I have included "C:\Program Files (x86)\SmartBear\SoapUI-5.3.0\bin\ext\sqlite-jdbc-3.19.3.jar" in PATH under System Variables under Environment Variables.
 

Below mentioned is the script:
import java.sql.*
import org.sqlite.*
import groovy.sql.Sql
def sql = Sql.newInstance("jdbc:sqlite:C:/ngss/Sqlite.orders.db", "org.sqlite.JDBC")
sql.eachRow("select * from [Order]"){
println("name=${it.path}")
}
Can you please help me in resolving the above issue?. Let me know, if you require any further details.