Forum Discussion

electric_Insura's avatar
electric_Insura
Contributor
14 years ago

Datacom DB driver, failed to init connection

We'd like to use SoapUI to test Datacom databases.

With this connection string:

jdbc:datacom://entsrv01.electricinsurance.com:1208/ServerName=A1DSPRIM,SystemID=EMLI,ApplicationID=A1DSPRIM

I'm getting a "failed to init connection" error from both Project Properties and within a JDBC request step.

The Datacom JDBC driver is in my SoapUI/bin/ext folder and SoapUI sees it according to the log.

The connection string syntax is correct according to the Datacom docs; the lead DBA here helped me get it set up.

Any suggestions? thanks.
  • Hi,

    hmm... tricky... do you have any more error information in the error log at the bottom of the main soapUI window? Can you connect to the database using some other tool from your local machine or could it be some firewall issue?

    regards,

    /Ole
    SmartBear Sweden
  • Hi Ole,

    I wound up sending an email to support on the general "failed to init connection" problem, since I was having some issues with jTDS as well that have since been resolved.

    I've found that adding a Groovy step to register the database drivers has allowed me to start using jTDS reliably. I can share more detail if anyone's interested.

    Sadly, that didn't solve my Datacom problems. The ticket number on the Datacom issue is #HTM-822-29506. The email I sent contains some screenshots.
  • Connections and queries to Datacom are now working. I've been communicating with eviware support and with the DBA here as well.

    I'll document the steps here in case anyone else has trouble with Datacom. The steps assume familiarity with SQL, basic Groovy Step scripting, and JDBC request steps.

    These steps worked for me; I hope they will work for you as well.

    1. CA supplies a connection testing tool. On my desktop this tool is: C:\Program Files\CA\CA-DatacomServer\Java\Classes\jcfjre.bat. If you don't have this folder on your desktop, ask your DBA to provide you with the Java portions of the CA-Datacom server install.
    2. Use the tool to get a working connection to your database server and execute at least one sample query that works reliably.
    3. CA supplies a JAR called cadcjdbc.jar. This is the Datacom JDBC driver. On my desktop, this JAR was in C:\Program Files\CA\CA-DatacomServer\Java\Classes. Copy the JAR to %SoapUI%\bin\ext.
    4. Copy C:\Program Files\CA\CA-DatacomServer\Cadcdb32.dll to %SoapUI%\bin. The named DLL may be in a different location on your desktop, but that's the one you want.
    5. Put C:\Program Files\CA\CA-DatacomServer in your Windows PATH environment variable. (Again, your install location may vary, but you should see several files named ca*.dll in the folder that you add to the PATH variable.)
    6. Start SoapUI.
    7. In Preferences => JDBC Drivers Properties, add a driver property for the Datacom server to which you want to connect. Copy the connection string from step 1 to this driver's connection string property. You'll have to type it in manually.
    8. Create a test case and add a Groovy Script step and a JDBC request step.
    9. In the Groovy Script step, enter the following code, which registers the Datacom JDBC driver, and run the script. I've found that I have to register third-party JDBC drivers with a script each time I open SoapUI.


    import groovy.sql.Sql
    com.eviware.soapui.support.GroovyUtils.registerJdbcDriver( "ca.datacom.jdbc.DatacomJdbcDriver" )


    10. In the JDBC request step, choose the Datacom connection you set up in step 6 and test it.
    11. Copy the query you ran in step 1 to the JDBC request step and execute the query. You should see some results.