adamj
13 years agoNew Contributor
ClassNotFound javax/sql/DataSource
Hi All,
Possibly this is a bug with my brain rather than the product, but I'm trying to write my first LoadUI groovy plugin and it's mostly going fine (very nice programming on that plugin architecture by the way...very elegant)....but when I import javax.sql.DataSource in my groovy script I get a ClassNotFoundException javax.sql.DataSource. I didn't declare any sql related dependencies as I assumed that this would just be part of the JRE libs?
Thoughts?
Cheers
Adam
ClassNotFoundException: javax.sql.DataSource
Possibly this is a bug with my brain rather than the product, but I'm trying to write my first LoadUI groovy plugin and it's mostly going fine (very nice programming on that plugin architecture by the way...very elegant)....but when I import javax.sql.DataSource in my groovy script I get a ClassNotFoundException javax.sql.DataSource. I didn't declare any sql related dependencies as I assumed that this would just be part of the JRE libs?
Thoughts?
Cheers
Adam
/**
* Looks up a xxxxxxxxx
*
* @name xxxxxxxxx
* @category xxxxxxxxx
* @dependency commons-dbcp:commons-dbcp:1.4
*/
import javax.sql.DataSource
import org.apache.commons.dbcp.BasicDataSource
createInput( "input", "Attach a sampler here" )
createOutput( "output", "Outgoing xxxxxxxxx" )
createProperty( 'type', String, "All" ) {
refreshLayout()
}
messageCount = 0
refreshLayout = {
layout ( layout:'gap 10 5' ) {
box(layout:'gap 10'){
node( widget: 'selectorWidget',
label: "Type",
labels: [ "All", "Validated", "UnValidated" ],
default: type.value,
selected: type,
constraints: "w 150!")
separator( vertical: true)
box( widget: 'display', layout: "wrap 1", constraints: "w 150!") {
node( content: { "Last 5 xxxxxxxxx" }, constraints: "h 10!, pad -20 0")
node( content: { "1/1" }, constraints: "h 10!, pad -10 0")
node( content: { "2/2" }, constraints: "h 10!, pad -10 0")
node( content: { "3/3" }, constraints: "h 10!, pad -10 0")
node( content: { "4/4" }, constraints: "h 10!, pad -10 0")
node( content: { "5/5" }, constraints: "h 10!, pad -10 0")
}
}
separator( vertical: false )
box( widget: 'display', layout: 'ins -5, center', constraints: "w 100!, h 25!, gap 124") {
node( content: messageCount, constraints: 'pad -6 -4' )
}
}
}
onMessage = { outgoing, incoming, message ->
message["myvar"] = "hello world"
message["myothervar"] = "goodbye cruel world"
send(output, message)
messageCount++
refreshLayout()
}
ClassNotFoundException: javax.sql.DataSource