I see sometimes something like classloaders  'Race Condition' - when I
can't get in one moment DB due to "No suitable driver", and in next
Connection create I got it just fine.
Maybe you should call Connection.create (which can fail), and add some
init-delay for a few secs, and then second one could be OK.


2014-03-17 12:03 GMT+02:00 Manthosh Kumar T <[email protected]>:

> Hi Tran,
>           I had deployed the JDBC Drivers properly. As I had said before,
> it works fine if the connection is created in the execute() method. So
> doesn't that mean Drivers are properly deployed?. Please correct me if I'm
> wrong.
>
>
> On 17 March 2014 15:25, An Tran <[email protected]> wrote:
>
>> Make sure that the JDBC drivers are deployed on all the system that Storm
>> is running.  I am not sure if this is correct or not but what i did is i
>> copy all my dependencies into storm/lib folder
>>
>>
>> On Mon, Mar 17, 2014 at 5:41 AM, Manthosh Kumar T <[email protected]>wrote:
>>
>>> Hi All,
>>>          I'm trying add data to DB using JDBC in bolt. When I create
>>> Connection in the execute() method and close it at the end of execute()
>>> method, it works fine. Since it was slower, I created the Connection in
>>> prepare() method. But this time I'm getting SQLException saying No Suitable
>>> Driver was found. I'm sure that the necessary dependencies are in the
>>> classpath since it works when creating connection in execute() method. Has
>>> anyone had the same issue?. Any suggestions?
>>>
>>>
>>> --
>>> Cheers,
>>> Manthosh Kumar. T
>>>
>>>
>>
>
>
> --
> Cheers,
> Manthosh Kumar. T
>
>


-- 
Regards,
Alexander Yerenkow

Reply via email to