Forum Discussion

Usha_Kodali's avatar
Usha_Kodali
Frequent Contributor
16 years ago

oracle thin database connection at project level

Hi Ole,
I am trying to connect to database using JDBC Connections at project level.
My Database Driver: Oracle Thin Drivername:oracle.jdbc.driver.OracleDriver
I get error saying "Can't get the Connection for specified properties; java.sql.SQLException: Io exception: Invalid number format for port number"
seems the connection string is not proper.

Attaching the error file and snap shots

9 Replies

  • Hi Usha,

    There's been a little error in connection string template, the ":" was missing between host and port.
    Sorry for the inconvenience.
    The new 3.0 version is about to be released during the day, so please download it, and reload default driver settings.

    In the meantime you can add the ":" between host and port in configured connection string manually
    (by just editing it's value, not by reconfiguring).

    Regards,

    /Dragica
    Eviware.com
  • Usha_Kodali's avatar
    Usha_Kodali
    Frequent Contributor
    Hi,
    I tried entering manually..but it did not help me...same error occured...
  • Hi,

    Ok...the changed connection string on Project/JDBC connections tab should be:
    jdbc:oracle:thin:osdc_cat/PASS_VALUE@dva3:1521:osdcxyma .

    You can either change the template in SoapUI Preferences / JDBC drivers settings
    and create a new JDBC connection on project level (delete the old one since it's wrongly configured due to the error we had)
    or download the new 3.0 release from
    http://www.eviware.com/index.php?option ... &Itemid=58 ,
    in preferences reload default drivers settings and again create new jdbc connection.

    Please also check if you have the right driver jar in bin/ext and if you haven't changed the default port.
    Let us know if this works.

    Regards,

    /Dragica
    eviware.com
  • Usha_Kodali's avatar
    Usha_Kodali
    Frequent Contributor
    Hi Dragica
    I changed the JDBC template in SOAPUI preferences...it worked now....thank you for the help!!
  • Usha_Kodali's avatar
    Usha_Kodali
    Frequent Contributor
    I tested the connection and it worked fine...
    I created Groovy Script Teststep in a test case.
    I added the following script in Groovy Script teststep.

    groovy.sql.Sql sql = new com.eviware.soapui.support.GroovyUtilsPro( context ).getGroovySql("dbConn");
    sql.eachRow("select VEHICLE_IDENTIFIER_VALUE,SUBMITTER,SUBMITTAL_DATA from SBMT_SUBMITTALS WHERE SUBMITTAL_DATA like 'Usha%'")
    {
        println "SUBMITTAL: ${it.VEHICLE_IDENTIFIER_VALUE}, ${it.SUBMITTER}, ${it.SUBMITTAL_DATA}"
    }

    when I executed the above script i got java.lang.exeception: Connection String has no user and/ or password defined.

    At the project level I gave the username and password and tested the connection. It said Connection Successful.

    Error:

    2009-07-09 11:22:07,649 ERROR [errorlog] java.lang.Exception: Connection String has no user and/or password defined
    java.lang.Exception: Connection String has no user and/or password defined
    at com.eviware.soapui.support.GroovyUtilsPro.getGroovySql(SourceFile:53)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoCachedMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:229)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:52)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:40)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:117)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
    at Script14.run(Script14.groovy:2)
    at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:59)
    at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SourceFile:50)
    at com.eviware.soapui.impl.wsdl.teststeps.WsdlGroovyScriptTestStep.run(WsdlGroovyScriptTestStep.java:148)
    at com.eviware.soapui.impl.wsdl.panels.teststeps.GroovyScriptStepDesktopPanel$RunAction.actionPerformed(GroovyScriptStepDesktopPanel.java:268)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEvent(Unknown Source)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
  • Hi,

    That happens because currently Groovy method GroovyUtilsPro(...).getGroovySql(...) expects user and password to be specified in connectionString like ...user=something and ...password=something, but oracle specifies them diferently.
    This is changed in nightly-build (check it out at http://www.eviware.com/nightly-builds/ ).
    Please let us know if it works OK.

    Regards,

    /Dragica
    eviware.com
  • Usha_Kodali's avatar
    Usha_Kodali
    Frequent Contributor
    Hi Dragica,
    I installed 10th july nightly build....but same error persists...
    it still says  java.lang.exeception: Connection String has no user and/ or password defined.
  • Hi Usha,

    I think this fix came first in the nightly-build of the 11:th, can you give it another go to see if this was the case or if the error still persists?

    Thanks for your help and patience..


    regards!

    /Ole
    eviware.com