7 Replies Latest reply on Jan 26, 2018 2:42 AM by Andrew Waters

    Sybase Secure JDBC driver not working after 11.2 upgrade

    Rajat Jain
      Share:|

      Hello Everyone,

       

       

      We have upgraded to 11.2 in recent from 11.1. After upgrade the JDBC driver "Sybase SQL Driver (jConnect 7.0)" id not able to make a connection for most of our Sybase DB servers.

       

      With same credentials and configuration from our end, it was working fine before upgrade and also working fine at present from one of our ADDM server with 11.2 Beta version.

       

      We have same driver properties file on both beta version and prod version, still we have observed that in credentials we are getting below difference:

       

      At 11.2 Beta (where driver is working):

       

      At 11.2 Production (where driver is not working):

      I am not sure whether difference coming automatically in URL is the cause, just highlighting as I observed it.

       

      Error is:

      Failure - Connect to "jdbc:sybase:Tds:10.*.*.*:1630/******?JCE_PROVIDER_CLASS=org.bouncycastle.jce.provider.BouncyCastleProvider&ENCRYPT_PASSWORD=true" at today at 12:43:17 requested by xrjain8   Remove   Retest   Manage JDBC drivers

      SQL Provider: Unable to open a connection to the database: JZ028: Illegal value set for JCE_PROVIDER_CLASS connection property. The property value must be a fully qualified provider class name passed as a String or an instance of java.security.Provider.

       

       

      Request you to please suggest as we are not able to fetch the Database Table details without it.

       

      P.S - We are able to communicate with Database with default Sybase driver - Sybase (jTDS Driver 1.3.1).

       

       

      Thanks and Regards,

      Rajat Jain

        • 1. Re: Sybase Secure JDBC driver not working after 11.2 upgrade
          Andrew Waters

          This is not standard. I am sorry but I think you must be mistaken in believing you have the same properties files on both machines. The URL comes directly from the properties file. So somebody either modified /usr/tideway/data/installed/jdbcdrivers/sybase-7.0.properties or wrote their own properties file in (hopefully in /usr/tideway/data/custom/jdbcdrivers) to add the JCD_PROVIDER_CLASS value. I suggest you need to find the person who made the change and find out why they made the change.

          4 of 4 people found this helpful
          • 2. Re: Sybase Secure JDBC driver not working after 11.2 upgrade
            Rajat Jain

            Hello Andrew Waters

             

            Please find the properties file content below.

             

             

            Moreover, this  issue is quite weird. There are 2-3 Databases, which we can still access via using JDBC driver Secure 7.0, whereas we are not able to access all the rest (But since Sybase server is accessible, only issue is coming with DB tables, I am excluding the Port issue). Before upgrade we are able to access all the Sybase DB with same credential. Secondly, we are able to access all the DB tables from our Sandpit (11.2 beta version).

             

            Also, to highlight the same DB table is accessible from one server and not from another, though there is/cannot be a firewall at DB table level. Moreover, everything is accessible with default JBDC driver of BMC.

             

            Below screenshot shows the we are able to access 1 DB but not able to access another (most of the Sybase are not accessible now).

             

             

             

             

             

            [tideway@PROD_NotWorking jdbcdrivers]$ cat sybase-secure-7.0.properties

             

            #Saved by Atrium Discovery

             

            #Thu Mar 17 15:43:53 GMT 2016

             

            translation.database=Database Name

             

            translation.endpoint=Database IP Address

             

            validationregex.port=[0-9]+

             

            driver.supports_ipv6=true

             

            driver.timeout.unit=seconds

             

            download.notes=

             

            driver.enabled=true

             

            driver.name=Sybase SQL Driver (jConnect Secure 7.0)

             

            driver.url=jdbc\:sybase\:Tds\:%endpoint%[\:%port%][/%database%]?JCE_PROVIDER_CLASS=org.bouncycastle.jce.provider.BouncyCastleProvider&ENCRYPT_PASSWORD=true

             

            download.label=Driver download page at sybase.com

             

            driver.info=

             

            download.url=http\://www.sybase.com/products/allproductsa-z/softwaredeveloperkit/jconnect

             

            driver.class=com.sybase.jdbc4.jdbc.SybDriver

             

            driver.timeout.identifier=loginTimeout

             

              

             

              

             

              

             

            [tideway@SAND_Working jdbcdrivers]$ cat sybase-secure-7.0.properties

             

            #Saved by Atrium Discovery

             

            #Thu  Jul 06 13:24:53 AEST 2017

             

            translation.database=Database Name

             

            translation.endpoint=Database IP Address

             

            validationregex.port=[0-9]+

             

            driver.supports_ipv6=true

             

            driver.timeout.unit=seconds

             

            download.notes=

             

            driver.enabled=true

             

            driver.name=Sybase SQL Driver (jConnect Secure 7.0)

             

            driver.url=jdbc\:sybase\:Tds\:%endpoint%[\:%port%][/%database%]?JCE_PROVIDER_CLASS=org.bouncycastle.jce.provider.BouncyCastleProvider&ENCRYPT_PASSWORD=true

             

            download.label=Driver download page at sybase.com

             

            driver.info=

             

            download.url=http\://www.sybase.com/products/allproductsa-z/softwaredeveloperkit/jconnect

             

            driver.class=com.sybase.jdbc4.jdbc.SybDriver

             

            driver.timeout.identifier=loginTimeout

             

              

             

              

             

              

             

              

             

            [tideway@PROD_NonWorking jdbcdrivers]$ cat sybase-7.0.properties

             

            driver.supports_ipv6=true

             

            validationregex.port=[0-9]+

             

            translation.database=Database\ Name

             

            driver.class=com.sybase.jdbc4.jdbc.SybDriver

             

            driver.name=Sybase\ SQL\ Driver\ (jConnect\ 7.0)

             

            download.label=Driver\ download\ page\ at\ store.sap.com

             

            download.url=http://scn.sap.com/community/developer-center/oltp-db

             

            driver.url=jdbc:sybase:Tds:%endpoint%[:%port%]

             

            driver.enabled=true

             

            driver.timeout.unit=seconds

             

            translation.endpoint=Database\ IP\ Address

             

            download.notes=Included\ in\ the\ SCN\ -\ SDK\ for\ SAP\ Adaptive\ Server\ Enter

             

            driver.timeout.identifier=loginTimeout

             

            driver.info=

             

              

             

              

             

              

             

            [tideway@SAND_Working jdbcdrivers]$ cat sybase-7.0.properties

             

            driver.supports_ipv6=true

             

            validationregex.port=[0-9]+

             

            translation.database=Database\ Name

             

            driver.class=com.sybase.jdbc4.jdbc.SybDriver

             

            driver.name=Sybase\ SQL\ Driver\ (jConnect\ 7.0)

             

            download.label=Driver\ download\ page\ at\ store.sap.com

             

            download.url=http://scn.sap.com/community/developer-center/oltp-db

             

            driver.url=jdbc:sybase:Tds:%endpoint%[:%port%]

             

            driver.enabled=true

             

            driver.timeout.unit=seconds

             

            translation.endpoint=Database\ IP\ Address

             

            download.notes=Included\ in\ the\ SCN\ -\ SDK\ for\ SAP\ Adaptive\ Server\ Enterprise.\ SAP\ Store\ credential\ required

             

            driver.timeout.identifier=loginTimeout

             

            driver.info=

             

             

             

             

            Moreover, this  issue is quite weird.

             

              

             

              

             

            • 3. Re: Sybase Secure JDBC driver not working after 11.2 upgrade
              Andrew Waters

              These credentials are not using the same provider. If they were then they would show the same URL. Not only that but you do not even need to provide the same parameters. They cannot be the same.

               

              Perhaps you have different drivers selected in for the credentials.

              • 4. Re: Sybase Secure JDBC driver not working after 11.2 upgrade
                Vaibhav Singh

                Hi Rajat,

                 

                Regarding prod scanner issue, i.e. error "Illegal value set for JCE_PROVIDER_CLASS connection property. The property value must be a fully qualified provider class name passed as a String or an instance of java.security.Provider."

                 

                Check > SyBooks Online (Setting up the Java Cryptography Extension (JCE) provider)

                 

                "You can use the JCE_PROVIDER_CLASS connection property to specify the JCE provider. There are a number of commercial and open source JCE providers that you can choose from. For example, the “Bouncy Castle Crypto APIs for Java” is a popular open source Java JCE provider. If you choose not to specify the JCE_PROVIDER_CLASS property, jConnect attempts to use any bundled JCE."

                 

                • Configure the JCE provider before using it. This can be done by one of two ways:
                  • Copy the JCE provider jar file into the JRE standard extension directory:
                    • For UNIX / Mac OS X platforms: ${JAVA_HOME}/jre/lib/ext
                    • For Windows: %JAVA_HOME%\jre\lib\ext
                  • If you cannot copy the JCE jar file to the appropriate directory, refer to the Sun JCE Reference Guide for instructions on setting up an external JCE provider.

                If jConnect cannot use the specified JCE provider, it attempts to use the JCE providers configured in the JRE security profile. If no other JCE providers are configured, or if configured providers do not support the required transformation and password encryption is enabled, the connection fails.

                 

                Vaibhav

                • 5. Re: Sybase Secure JDBC driver not working after 11.2 upgrade
                  Andrew Waters

                  It is not a great idea to be copying jars into the runtime environment. You will find that it is replaced when OSUs have updated JDKs. It would mean you would need to make sure you checked it after any OSU has been applied.

                  1 of 1 people found this helpful
                  • 6. Re: Sybase Secure JDBC driver not working after 11.2 upgrade
                    Vaibhav Singh

                    Thanks Andrew,

                     

                    We have support case on this.

                     

                    That explains why jar file (copied during discovery implementation) was deleted from Rajat Setup. What will happen to driver /usr/tideway/data/installed/jdbcdrivers/properties* files after upgrade? will they be replaced too ?

                     

                    Credential test with Sybase SQL Driver (jConnect 7.0) reports following error:

                     

                    Failure - Connect to "jdbc:sybase:Tds:<Server_IP>:<port>/<DB_Name>?JCE_PROVIDER_CLASS=org.bouncycastle.jce.provider.BouncyCastleProvider&ENCRYPT_PASSWORD=true" at today at 12:43:17 requested by <User>

                     

                    SQL Provider: Unable to open a connection to the database: JZ028: Illegal value set for JCE_PROVIDER_CLASS connection property. The property value must be a fully qualified provider class name passed as a String or an instance of java.security.Provider.

                     

                    No custom properties file for this driver in /usr/tideway/data/custom/jdbcdrivers, only OOTB one which has :

                     

                    driver.url=jdbc\:sybase\:Tds\:%endpoint%[\:%port%][/%database%]?JCE_PROVIDER_CLASS=org.bouncycastle.jce.provider.BouncyCastleProvider&ENCRYPT_PASSWORD=true

                     

                    As mentioned, discovery works fine with Sybase (jTDS Driver 1.3.1) .

                     

                    Vaibhav

                    • 7. Re: Sybase Secure JDBC driver not working after 11.2 upgrade
                      Andrew Waters

                      Property files will be deleted from /usr/tideway/data/installed/jdbcdrivers if they are not referenced. The will not be removed from /usr/tideway/data/custom/jdbcdrivers which is where you should be putting custom files.

                       

                      That is not an OOTB properties file.

                      3 of 3 people found this helpful