Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-18056

Problem parsing JDBC URL for DB2 with properties in pax-jdbc-db2

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • fuse-7.11-GA
    • fuse-7.9-GA
    • Fuse Standalone
    • None
    • False
    • False
    • % %
    • +
    • Automated
    • Hide

      The current workaround is not to use the pax-jdbc-db2 feature for connecting to the DB2 with additional connection properties.

      The additional properties can be set in the blueprint.xml as shown in the example link for PostgreSQL Postgre manual connectivity

      In the above example use the Db2 driver instead of Postgre driver.

      Show
      The current workaround is not to use the pax-jdbc-db2 feature for connecting to the DB2 with additional connection properties. The additional properties can be set in the blueprint.xml as shown in the example link for PostgreSQL Postgre manual connectivity In the above example use the Db2 driver instead of Postgre driver.
    • Hide

      Pre-requisite:

      1. Have a db2 server up and running.
      2. Download the supported version for the db2 jcc driver jar

      Step 1: Navigate to the Fuse on Karaf bin directory and start the Fuse server

      $ ./fuse clean 

      Step 2: Install the db2 jcc driver jar

      karaf@root()> bundle:install -s file:<<db2 driver jar location>>/db2jcc.jar  

      Step 3: Install the jdbc feature

      karaf@root()> feature:install jdbc 

      Step 4: Install the pax-jdbc-db2 feature

      karaf@root()> feature:install pax-jdbc-db2 

      Step 4: Create a datasource using the db2 url and pass additional properties as per the syntax mentioned in the db2 connection

      jdbc:ds-create --driverClass "com.ibm.db2.jcc.DB2Driver" --driverName "db2" -url "jdbc:db2://localhost:50001/sample:currentSchema=schema1;" --username "db2inst1" --password "db2inst1" datasource1 

      Step 5: To check if the connection is ok, execute the below command

      karaf@root()> ds-list 

      Output is shown as below

      Name │ Service Id │ Product │ Version │ URL │ Status
      ─────┼────────────┼─────────┼─────────┼─────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
      255  │            │         │         │     │ Error [jcc][t4][2030][11211][3.71.22] A communication error occurred during operations on the connection's underlying socket, socket input stream,
           │            │         │         │     │ or socket output stream.  Error location: Reply.fill() - socketInputStream.read (-1).  Message: Connection reset. ERRORCODE=-4499, SQLSTATE=08001

      Please find the attached Fuse logs.

      Show
      Pre-requisite: Have a db2 server up and running. Download the supported version for the db2 jcc driver jar Step 1: Navigate to the Fuse on Karaf bin directory and start the Fuse server $ ./fuse clean Step 2: Install the db2 jcc driver jar karaf@root()> bundle:install -s file:<<db2 driver jar location>>/db2jcc.jar  Step 3: Install the jdbc feature karaf@root()> feature:install jdbc Step 4: Install the pax-jdbc-db2 feature karaf@root()> feature:install pax-jdbc-db2 Step 4: Create a datasource using the db2 url and pass additional properties as per the syntax mentioned in the db2 connection jdbc:ds-create --driverClass "com.ibm.db2.jcc.DB2Driver" --driverName "db2" -url "jdbc:db2: //localhost:50001/sample:currentSchema=schema1;" --username "db2inst1" --password "db2inst1" datasource1 Step 5: To check if the connection is ok, execute the below command karaf@root()> ds-list Output is shown as below Name │ Service Id │ Product │ Version │ URL │ Status ─────┼────────────┼─────────┼─────────┼─────┼────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── 255  │            │         │         │     │ Error [jcc] [t4] [2030] [11211] [3.71.22] A communication error occurred during operations on the connection's underlying socket, socket input stream,      │            │         │         │     │ or socket output stream.  Error location: Reply.fill() - socketInputStream.read (-1).  Message: Connection reset. ERRORCODE=-4499, SQLSTATE=08001 Please find the attached Fuse logs.

    Description

      When additional properties are passed in the connection url, those are not parsed and an error is thrown while making a connection to the database.

      This happens for pax-jdbc-db2 feature.

      Attachments

        Activity

          People

            ggrzybek Grzegorz Grzybek
            rhn-support-shchavan Shrikant Chavan (Inactive)
            Stefan Veres Stefan Veres
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: