Forum Discussion
Hi,
That looks ok, at least at first glance...
If you take this example of importing the H2 DB driver:
import groovy.sql.Sql
import org.h2.Driver
com.eviware.soapui.support.GroovyUtils.registerJdbcDriver("org.h2.Driver")
def db = Sql.newInstance("jdbc:h2:mem:test", "org.h2.Driver")
...
If I don't add the h2-1.4.181.jar (for the org.h2.Driver class, groovy.sql.Sql is already in the SoapUI lib folder) then I get the same error as you i.e. unable to resolve class.
If I then add h2-1.4.181.jar to <SoapUI Installation Directory>/java/app/bin/ext/ (Mac) then the code compiles and runs fine.
I can't see your ITDConnection class in the screenshot though?
Cheers,
Rupert
- rupert_anderson10 years agoValued Contributor
Hang on, are you providing your DDD classes just as a folder rather than a jar file? I can't quite remember, but I think the SoapUI ext class loader might only scan for *.jar files to add to the classpath...
Hope this helps.
Cheers,
Rupert
- vikram_966910 years agoOccasional Contributor
Hi Rupert,
There are more than 200 java classes at this location. Not able to get all of them in one screenshet.
But, yes ITDConnection class is present at this location "C:\Program Files (x86)\SmartBear\SoapUI-5.0.0\bin\ext\DDDD"
- rupert_anderson10 years agoValued Contributor
Hi,
No problem about the screen shot.
Is DDDD just a folder rather than a jar file? because I think it might need to be a jar file to get picked up.
Cheers,
Rupert
- rupert_anderson10 years agoValued Contributor
Also do you see the following log message (SoapUI log tab) once SoapUI has started:
Wed May 06 16:05:30 BST 2015:INFO:Adding [/Applications/SoapUI-5.1.3.app/Contents/Resources/app/bin/ext/h2-1.4.181.jar] to extensions classpath
(it should say DDDD.jar rather than h2-1.4.181.jar in your case, assuming its picked your DDDD.jar up)
Having just checked the code in SoapUIExtensionClassLoader I can confirm that your classes need to be in a jar file to get picked up from the /ext folder.
Cheers,
Rupert
Related Content
- 8 years ago
Recent Discussions
- 2 days ago