hi,
Can you please help me here ,
In the oracle database one of the cloumn "Token" stored as BLOB I want to read this and update meta data and store back to database.
could you please help me on this?
So far I tried with
import groovy.sql.Sql import java.sql.* sql = Sql.newInstance("jdbc:oracle:thin:@servername.muc:port:sid", "username", "pw") //selct blob java.sql.Blob blob = sql.firstRow("SELECT TOKEN FROM oauth_access_token").blob byte[] bdata = blob.getBytes(1, (int) blob.length()); String text = new String(bdata); log.info text;
saved this code as .groovy and ran it in my local machine , getting
Caught: java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@localhost:1541:tb2vrdeu java.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@localhost:1541:tb2vrdeu at script.run(script.groovy:4)
just an addendum to what Rao has already said.
make sure the jdbc.jar driver file corresponds to the version of Java you have installed
make sure the bit type (dont know the proper word for it) of the Java is the same as your ReadyAPI! installation - i.e. either x86 or 64bit. If Java is running 32bit and ReadyAPI! is 64bit - your db connection wont work
cheers,
rich
richie, nmrao thank you for the great suggestions on this!
@naveenshetty did the advice help you solve your issue?
Subject | Author | Latest Post |
---|---|---|