Service Virtualization

 View Only
  • 1.  java.sql.SQLException: Connections could not be acquired from the underlying database!

    Posted Dec 20, 2017 07:50 AM

    Greetings Team,

     

    Hope you are doing great!!!

     

    I have created a Jenkins freestyle project and invoking the DevTest scripts via Invoke Ant build step, it has a JDBC step (Oracle DB)

     

    In ITR execution mode, there is no error encountered what so ever, however when the same test is executed via Jenkins following error is thrown

     

    java.sql.SQLException: Connections could not be acquired from the underlying database!

    Any help would be highly appreciated.

    Thanks in advance.


  • 2.  Re: java.sql.SQLException: Connections could not be acquired from the underlying database!

    Broadcom Employee
    Posted Dec 20, 2017 08:21 AM

    Where is your Jenkins running?  On the same machine you are running the ITR from?  If not make sure you have access to the port the Oracle database is running on from Jenkins.



  • 3.  Re: java.sql.SQLException: Connections could not be acquired from the underlying database!

    Posted Dec 20, 2017 09:03 PM

    Greetings Nancy,

     

    Thanks for your quick response.

     

    Jenkins is installed on the same machine in which DevTest is present.

     

    Thanks in advance.



  • 4.  Re: java.sql.SQLException: Connections could not be acquired from the underlying database!
    Best Answer

    Broadcom Employee
    Posted Dec 21, 2017 07:43 PM

    Hello,

        Thanks for sharing the details. I have noticed similar issue before, when I run test through Jenkins. Can you please try by uncheck the  check boxes "Use Connection poll" and "keep connections open" options are  in JDBC exectuion step, so that when you run through Jenkins, it will establish a new connection and connect to database.

     

     

    Thanks & Regards

    Srikanth Gajawada



  • 5.  Re: java.sql.SQLException: Connections could not be acquired from the underlying database!

    Posted Dec 27, 2017 08:26 AM

    Greetings Srikanth,

     

    Sorry for the delay in response.

     

    I tried the above suggestion, however no luck

     

    Note:-Same error is thrown "java.sql.SQLException: Connections could not be acquired from the underlying database! ", when the Test Cases are staged locally or run against the Registry.

     

    Any help would be much appreciated.

     

    Thanks in advance.