How do I achieve queryaccelearation=all and packageset using Java JDBC?

3783 views java

i am setting the queryaccelearation=all in below code and i am getting the below exception.

//set queryacceleration
String url = "host:60010/DB2:user=xxxx;password=yyyyy;specialRegisters=CURRENT QUERY ACCELERATION=ALL;";

                 con = DriverManager.getConnection(url,props); -? ERROR: [jcc][10214][10050][3.62.56] java.util.Properties object passed to java.sql.Driver.connect() cannot be overridden by URL: jdbc:db2://;password=yyyyy;specialRegisters=CURRENT QUERY ACCELERATION=ALL;. ERRORCODE=-4461, SQLSTATE=42815

Thanks, Rasheed SK

answered question

1 Answer


I am trying to the db2 database packageset into java jdbc application i am getting the below error. please see the below code for me.

              //Declare the packageset
                                     String packageset=”F9DERWSl”;

              // Set user ID for the connection
                 props.put("user", props.getProperty("DB2_USERNAME"));
                 // Set password for the connection
                 props.put("password", props.getProperty("DB2_PASSWORD"));

                 // set securityMechanism
                              new String("" + + ""));
                 props.put("encryptionAlgorithm", "2");

                 // getting the database connection
                 con = DriverManager.getConnection(props.getProperty("DB2_URL")+"packageset", props); 

-? ERROR: [jcc][t4][2030][11211][3.62.56] A communication error occurred during operations on the connection's underlying socket, socket input stream, or socket output stream. Error location: Reply.fill() - (-1). Message: Connection reset. ERRORCODE=-4499, SQLSTATE=08001

posted this

Have an answer?


Please login first before posting an answer.