I have class like this.
class EmployeeTask implements Runnable {
public void run(){
PayDAO payDAO = new payDAO(session);
String newSalary= payDAO.getSalary(empid);
String newTitle= payDAO.getTitle(empid);
EmployeeDAO employeeDAO = new EmployeeDAO(session);
List<Employee> employees = employeeDAO.getEmployees();
employees.parallelStream().foreach(employee-> employeeDAO.add(newSalary, newTitle,employee));
}
}
When I run the above code for one thread, it completes DB operation in 1 second and returns.
When I run it using parallelStream(), it will submit 8 requests, all 8 threads will wait for eight seconds and then return. Which means the server is executing the requests sequentially instead of parallel.
I checked the java jetty logs
Theread-1 Insert …
Theread-2 Insert …
…
Theread-8 Insert …
After eight seconds, that is 1 second per request
Theread-1 Insert … <= update 1
Theread-2 Insert … <= update 1
…
Theread-8 Insert … <= update 1
the same thing continues.
This clearly tells, all the threads are getting blocked on one single resource, either the Datasource from my client java has only one connection so all the eight threads are getting blocked or the server is executing the requests one after the other.
I checked MaxPooledConnections — gives 20, MaxPooledConnections
PerNode - gives 5 default values.
I think the Vertica DB server is fine, maybe client is not having DatasourceConnection pooling, How do I enable Java side DatasourceConnection pooling. Any Code examples?
currently I am using mybatis ORM, with following datasource
<environments default=“XX”>
<environment id=“XX”>
<transactionManager type=“JDBC”/>
<dataSource type="POOLED">
<property name="driver" value="com.vertica.jdbc.Driver"/>
<property name="url" value="jdbc:vertica://host:port/schema”/>
<property name="username" value=“userName”/>
<property name="password" value=“password”/>
<property name="poolMaximumActiveConnections" value=“50”/>
<property name="poolMaximumIdleConnections" value=“10”/>
</dataSource>
</environment>
</environments>
What is the barrier condition all the threads are waiting on, my guess is Datasource connection. Any help is appreciated
Thanks.
So I have a code that gets value from Redis using Jedis Client. But at a time, the Redis was at maximum connection and these exceptions were getting thrown:
org.springframework.data.redis.RedisConnectionFailureException
Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:140)
at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.getConnection(JedisConnectionFactory.java:229)
...
org.springframework.data.redis.RedisConnectionFailureException
java.net.SocketTimeoutException: Read timed out; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: Read timed out
at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:47)
at org.springframework.data.redis.connection.jedis.JedisExceptionConverter.convert(JedisExceptionConverter.java:36)
...
org.springframework.data.redis.RedisConnectionFailureException
Cannot get Jedis connection; nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.fetchJedisConnector(JedisConnectionFactory.java:140)
at org.springframework.data.redis.connection.jedis.JedisConnectionFactory.getConnection(JedisConnectionFactory.java:229)
When I check an AppDynamics analysis of this scenario, I saw some iteration of some calls over a long period of time (1772 seconds). The calls are shown in the snips.
Can anyone explain what's happening here? And why Jedis didn't stop after the Timeout setting (500ms)? Can I prevent this from happening for long?
This is what my Bean definitions for the Jedis look like:
<bean id="jedisConnectionFactory" class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory" p:host-name="100.90.80.70" p:port="6382" p:timeout="500" p:use-pool="true" p:poolConfig-ref="jedisPoolConfig" p:database="3" />
<bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">
<property name="maxTotal" value="1000" />
<property name="maxIdle" value="10" />
<property name="maxWaitMillis" value="500" />
<property name="testOnBorrow" value="true" />
<property name="testOnReturn" value="true" />
<property name="testWhileIdle" value="true" />
<property name="numTestsPerEvictionRun" value="10" />
</bean>
I'm not familiar with the AppDynamics output. I assume that's a cumulative view of Threads and their sleep times. So Threads get reused and so the sleep times add up. In some cases, a Thread gets a connection directly, without any waiting and in another call the Thread has to wait until the connection can be provided. The wait duration depends on when a connection becomes available, or the wait limit is hit.
Let's have a practical example:
Your screenshot shows a Thread, which waited 172ms. Assuming the sleep is only called within the Jedis/Redis invocation path, the Thread waited 172ms in total to get a connection.
Another Thread, which waited 530ms looks to me as if the first attempt to get a connection wasn't successful (which explains the first 500ms) and on a second attempt, it had to wait for 30ms. It could also be that it waited 2x for 265ms.
Sidenote:
1000+ connections could severely limit scalability. Spring Data Redis also supports other drivers which don't require pooling but work with fewer connections (see Spring Data Redis Connectors and here).
I am using Tomcat 8.0.27, OpenJDK 8 update 71 & Oracle 11.2.0.3.0. Driver version is Oracle Database 11g Release 2 (11.2.0.3). I've encountered with OOM error.
I drilled down to the connection pool object, where the biggest object is the idle connections list:
Zooming into idle connection list showed that the memory held by oracle.jdbc.driver.PhysicalConnection$BufferCacheStore:
My assumption is that those buffers were allocated by previous connection holder and since my pool configuration allows to hold up to 30 idle connections they won't release until the idle limit reach.
My DB pool configuration is:
<bean id="dataSourcePoolProperties" class="org.apache.tomcat.jdbc.pool.PoolProperties">
<property name="driverClassName">
<value>${db.driverClass}</value>
</property>
<property name="url">
<value>${db.url_prefix}:#${db.host}:${db.port}:${db.sid}</value>
</property>
<property name="username">
<value>${db.user}</value>
</property>
<property name="password">
<value>${db.password}</value>
</property>
<property name="maxActive">
<value>50</value>
</property>
<property name="maxIdle">
<value>30</value>
</property>
<property name="initialSize">
<value>10</value>
</property>
<property name="testOnBorrow">
<value>true</value>
</property>
<property name="testOnReturn">
<value>true</value>
</property>
<property name="validationQuery">
<value>select 1 from dual</value>
</property>
<property name="name">
<value>Main DataSource</value>
</property>
<property name="jmxEnabled">
<value>true</value>
</property>
<property name="logValidationErrors">
<value>true</value>
</property>
</bean>
I know that Oracle's driver allocates the buffer according to maximum possible query size. Inspecting their content revealed many zeros there.
Edit 1:
The Oracle's driver jar file is in the WEB-INF/lib folder while the tomcat-jdbc.jar under CATALINA_HOME/lib folder. I know that this can be problematic for re deployments but we don't do that.
Can you suggest a way to dismiss the internal driver buffers?
Apparently the OOM caused due to change that we made in driver fetch size, the number of rows to retrieve on each fetch. With the size of each
column and the number of rows, the driver can compute the absolute maximum size of the data returned in a single fetch. This is probably what caused to pre allocated buffers to grow.
Careful reading of Oracle's Driver documentation revealed that
"The 11.2 driver has a more sophisticated buffer cache than 11.1.0.7.0. This buffer cache has
multiple buckets. All buffers in a bucket are of the same size and that size is predetermined..
When a PreparedStatement is executed for the first time the driver gets a buffer from the bucket
holding the smallest size buffers that will hold the result. If there is no buffer in the bucket, the
driver allocates a new buffer of the predefined size corresponding to the bucket. When a
PreparedStatement is closed, the buffers are returned to their appropriate buckets. Since buffers
are used for a range of size requirements, the buffers are usually somewhat larger than the
minimum required."
After rolling back the fetch size argument the OOM error gone away.
<bean id="simpleTrigger" class="org.springframework.scheduling.quartz.SimpleTriggerBean">
<!-- 10 seconds -->
<property name="startDelay" value="10000"/>
<!-- repeat every 50 seconds -->
<property name="repeatInterval" value="50000"/>
</bean>
In this simple trigger the repeatInterval is set for every 50 seconds. However, the startDelay is set for 10 seconds. Does this startDelay get applied every time at the beginning of a job (effectively meaning the job starts every 40 seconds?)
According to documentation
http://docs.spring.io/spring-framework/docs/2.0.x/api/org/springframework/scheduling/quartz/SimpleTriggerBean.html
startDelay is the delay before starting the job for the first time.
So, that means that your job will start after 10 seconds after start, then it will repeat each 50 seconds.
Note: I am running Eclipse ADT Build: v22.2.1-833290
Example: I have the java code:
File: HelloWorld.java
public class HelloWorld
{
public static void main(String[] args)
{
System.out.println("Hello World!");
}
}
Works just fine if a compile and run at the console. However, when I run this file in Eclipse, I get the garbage shown below. I trust computers enough to know that Eclipse is giving me exactly what I am asking it to give me, meaning that I've got some switch set somewhere. The question is, how do I get Eclipse to stop giving me what I asked for and actually give me what I want?
Update
I was using the "Run" button on the toolbar, as per usual, but I found that if I used the context menu Run As --> Java Application, it would run fine, and then run fine after that with just the button. I must have something messed up about the default run configuration. Is there a way to set that properly? Really, just a small annoyance at this point.
<ConnectionProperties>
<PropertyCategory name="Connection/Authentication">
<Property name="user" required="No" default="" sortOrder="-2147483647" since="all versions">
The user to connect as
</Property>
<Property name="password" required="No" default="" sortOrder="-2147483646" since="all versions">
The password to use when connecting
</Property>
<Property name="socketFactory" required="No" default="com.mysql.jdbc.StandardSocketFactory" sortOrder="4" since="3.0.3">
The name of the class that the driver should use for creating socket connections to the server. This class must implement the interface 'com.mysql.jdbc.SocketFactory' and have public no-args constructor.
</Property>
<Property name="connectTimeout" required="No" default="0" sortOrder="9" since="3.0.1">
Timeout for socket connect (in milliseconds), with 0 being no timeout. Only works on JDK-1.4 or newer. Defaults to '0'.
</Property>
<Property name="socketTimeout" required="No" default="0" sortOrder="10" since="3.0.1">
Timeout on network socket operations (0, the default means no timeout).
</Property>
<Property name="connectionLifecycleInterceptors" required="No" default="" sortOrder="2147483647" since="5.1.4">
A comma-delimited list of classes that implement "com.mysql.jdbc.ConnectionLifecycleInterceptor" that should notified of connection lifecycle events (creation, destruction, commit, rollback, setCatalog and setAutoCommit) and potentially alter the execution of these commands. ConnectionLifecycleInterceptors are "stackable", more than one interceptor may be specified via the configuration property as a comma-delimited list, with the interceptors executed in order from left to right.
</Property>
<Property name="useConfigs" required="No" default="" sortOrder="2147483647" since="3.1.5">
Load the comma-delimited list of configuration properties before parsing the URL or applying user-specified properties. These configurations are explained in the 'Configurations' of the documentation.
</Property>
<Property name="authenticationPlugins" required="No" default="" sortOrder="alpha" since="5.1.19">
Comma-delimited list of classes that implement com.mysql.jdbc.AuthenticationPlugin and which will be used for authentication unless disabled by "disabledAuthenticationPlugins" property.
</Property>
<Property name="defaultAuthenticationPlugin" required="No" default="com.mysql.jdbc.authentication.MysqlNativePasswordPlugin" sortOrder="alpha" since="5.1.19">
Name of a class implementing com.mysql.jdbc.AuthenticationPlugin which will be used as the default authentication plugin (see below). It is an error to use a class which is not listed in "authenticationPlugins" nor it is one of the built-in plugins. It is an error to set as default a plugin which was disabled with "disabledAuthenticationPlugins" property. It is an error to set this value to null or the empty string (i.e. there must be at least a valid default authentication plugin specified for the connection, meeting all constraints listed above).
</Property>
<Property name="disabledAuthenticationPlugins" required="No" default="" sortOrder="alpha" since="5.1.19">
Comma-delimited list of classes implementing com.mysql.jdbc.AuthenticationPlugin or mechanisms, i.e. "mysql_native_password". The authentication plugins or mechanisms listed will not be used for authentication which will fail if it requires one of them. It is an error to disable the default authentication plugin (either the one named by "defaultAuthenticationPlugin" property or the hard-coded one if "defaultAuthenticationPlugin" property is not set).
</Property>
<Property name="disconnectOnExpiredPasswords" required="No" default="true" sortOrder="alpha" since="5.1.23">
If "disconnectOnExpiredPasswords" is set to "false" and password is expired then server enters "sandbox" mode and sends ERR(08001, ER_MUST_CHANGE_PASSWORD) for all commands that are not needed to set a new password until a new password is set.
</Property>
<Property name="interactiveClient" required="No" default="false" sortOrder="alpha" since="3.1.0">
Set the CLIENT_INTERACTIVE flag, which tells MySQL to timeout connections based on INTERACTIVE_TIMEOUT instead of WAIT_TIMEOUT
</Property>
<Property name="localSocketAddress" required="No" default="" sortOrder="alpha" since="5.0.5">
Hostname or IP address given to explicitly configure the interface that the driver will bind the client side of the TCP/IP connection to when connecting.
</Property>
<Property name="propertiesTransform" required="No" default="" sortOrder="alpha" since="3.1.4">
An implementation of com.mysql.jdbc.ConnectionPropertiesTransform that the driver will use to modify URL properties passed to the driver before attempting a connection
</Property>
<Property name="useCompression" required="No" default="false" sortOrder="alpha" since="3.0.17">
Use zlib compression when communicating with the server (true/false)? Defaults to 'false'.
</Property>
</PropertyCategory>
<PropertyCategory name="Networking">
<Property name="maxAllowedPacket" required="No" default="-1" sortOrder="alpha" since="5.1.8">
Maximum allowed packet size to send to server. If not set, the value of system variable 'max_allowed_packet' will be used to initialize this upon connecting. This value will not take effect if set larger than the value of 'max_allowed_packet'. Also, due to an internal dependency with the property "blobSendChunkSize", this setting has a minimum value of "8203" if "useServerPrepStmts" is set to "true".
</Property>
<Property name="tcpKeepAlive" required="No" default="true" sortOrder="alpha" since="5.0.7">
If connecting using TCP/IP, should the driver set SO_KEEPALIVE?
</Property>
<Property name="tcpNoDelay" required="No" default="true" sortOrder="alpha" since="5.0.7">
If connecting using TCP/IP, should the driver set SO_TCP_NODELAY (disabling the Nagle Algorithm)?
</Property>
<Property name="tcpRcvBuf" required="No" default="0" sortOrder="alpha" since="5.0.7">
If connecting using TCP/IP, should the driver set SO_RCV_BUF to the given value? The default value of '0', means use the platform default value for this property)
</Property>
<Property name="tcpSndBuf" required="No" default="0" sortOrder="alpha" since="5.0.7">
If connecting using TCP/IP, should the driver set SO_SND_BUF to the given value? The default value of '0', means use the platform default value for this property)
</Property>
<Property name="tcpTrafficClass" required="No" default="0" sortOrder="alpha" since="5.0.7">
If connecting using TCP/IP, should the driver set traffic class or type-of-service fields ?See the documentation for java.net.Socket.setTrafficClass() for more information.
</Property>
</PropertyCategory>
<PropertyCategory name="High Availability and Clustering">
<Property name="autoReconnect" required="No" default="false" sortOrder="0" since="1.1">
Should the driver try to re-establish stale and/or dead connections? If enabled the driver will throw an exception for a queries issued on a stale or dead connection, which belong to the current transaction, but will attempt reconnect before the next query issued on the connection in a new transaction. The use of this feature is not recommended, because it has side effects related to session state and data consistency when applications don't handle SQLExceptions properly, and is only designed to be used when you are unable to configure your application to handle SQLExceptions resulting from dead and stale connections properly. Alternatively, as a last option, investigate setting the MySQL server variable "wait_timeout" to a high value, rather than the default of 8 hours.
</Property>
<Property name="autoReconnectForPools" required="No" default="false" sortOrder="1" since="3.1.3">
Use a reconnection strategy appropriate for connection pools (defaults to 'false')
</Property>
<Property name="failOverReadOnly" required="No" default="true" sortOrder="2" since="3.0.12">
When failing over in autoReconnect mode, should the connection be set to 'read-only'?
</Property>
<Property name="maxReconnects" required="No" default="3" sortOrder="4" since="1.1">
Maximum number of reconnects to attempt if autoReconnect is true, default is '3'.
</Property>
<Property name="reconnectAtTxEnd" required="No" default="false" sortOrder="4" since="3.0.10">
If autoReconnect is set to true, should the driver attempt reconnections at the end of every transaction?
</Property>
<Property name="retriesAllDown" required="No" default="120" sortOrder="4" since="5.1.6">
When using loadbalancing, the number of times the driver should cycle through available hosts, attempting to connect. Between cycles, the driver will pause for 250ms if no servers are available.
</Property>
<Property name="initialTimeout" required="No" default="2" sortOrder="5" since="1.1">
If autoReconnect is enabled, the initial time to wait between re-connect attempts (in seconds, defaults to '2').
</Property>
<Property name="roundRobinLoadBalance" required="No" default="false" sortOrder="5" since="3.1.2">
When autoReconnect is enabled, and failoverReadonly is false, should we pick hosts to connect to on a round-robin basis?
</Property>
<Property name="queriesBeforeRetryMaster" required="No" default="50" sortOrder="7" since="3.0.2">
Number of queries to issue before falling back to master when failed over (when using multi-host failover). Whichever condition is met first, 'queriesBeforeRetryMaster' or 'secondsBeforeRetryMaster' will cause an attempt to be made to reconnect to the master. Defaults to 50.
</Property>
<Property name="secondsBeforeRetryMaster" required="No" default="30" sortOrder="8" since="3.0.2">
How long should the driver wait, when failed over, before attempting
</Property>
<Property name="allowMasterDownConnections" required="No" default="false" sortOrder="2147483647" since="5.1.27">
Should replication-aware driver establish connections to slaves when connection to master servers cannot be established at initial connection? Defaults to 'false', which will cause SQLException when configured master hosts are all unavailable when establishing a new replication-aware Connection.
</Property>
<Property name="replicationEnableJMX" required="No" default="false" sortOrder="2147483647" since="5.1.27">
Enables JMX-based management of load-balanced connection groups, including live addition/removal of hosts from load-balancing pool.
</Property>
<Property name="selfDestructOnPingMaxOperations" required="No" default="0" sortOrder="2147483647" since="5.1.6">
=If set to a non-zero value, the driver will report close the connection and report failure when Connection.ping() or Connection.isValid(int) is called if the connection's count of commands sent to the server exceeds this value.
</Property>
<Property name="selfDestructOnPingSecondsLifetime" required="No" default="0" sortOrder="2147483647" since="5.1.6">
If set to a non-zero value, the driver will report close the connection and report failure when Connection.ping() or Connection.isValid(int) is called if the connection's lifetime exceeds this value.
</Property>
<Property name="resourceId" required="No" default="" sortOrder="alpha" since="5.0.1">
A globally unique name that identifies the resource that this datasource or connection is connected to, used for XAResource.isSameRM() when the driver can't determine this value based on hostnames used in the URL
</Property>
</PropertyCategory>
<PropertyCategory name="Security">
<Property name="allowMultiQueries" required="No" default="false" sortOrder="1" since="3.1.1">
Allow the use of ';' to delimit multiple queries during one statement (true/false), defaults to 'false', and does not affect the addBatch() and executeBatch() methods, which instead rely on rewriteBatchStatements.
</Property>
<Property name="useSSL" required="No" default="false" sortOrder="2" since="3.0.2">
Use SSL when communicating with the server (true/false), defaults to 'false'
</Property>
<Property name="requireSSL" required="No" default="false" sortOrder="3" since="3.1.0">
Require SSL connection if useSSL=true? (defaults to 'false').
</Property>
<Property name="verifyServerCertificate" required="No" default="true" sortOrder="4" since="5.1.6">
If "useSSL" is set to "true", should the driver verify the server's certificate? When using this feature, the keystore parameters should be specified by the "clientCertificateKeyStore*" properties, rather than system properties.
</Property>
<Property name="clientCertificateKeyStoreUrl" required="No" default="" sortOrder="5" since="5.1.0">
URL to the client certificate KeyStore (if not specified, use defaults)
</Property>
<Property name="clientCertificateKeyStoreType" required="No" default="JKS" sortOrder="6" since="5.1.0">
KeyStore type for client certificates (NULL or empty means use the default, which is "JKS". Standard keystore types supported by the JVM are "JKS" and "PKCS12", your environment may have more available depending on what security products are installed and available to the JVM.
</Property>
<Property name="clientCertificateKeyStorePassword" required="No" default="" sortOrder="7" since="5.1.0">
Password for the client certificates KeyStore
</Property>
<Property name="trustCertificateKeyStoreUrl" required="No" default="" sortOrder="8" since="5.1.0">
URL to the trusted root certificate KeyStore (if not specified, use defaults)
</Property>
<Property name="trustCertificateKeyStoreType" required="No" default="JKS" sortOrder="9" since="5.1.0">
KeyStore type for trusted root certificates (NULL or empty means use the default, which is "JKS". Standard keystore types supported by the JVM are "JKS" and "PKCS12", your environment may have more available depending on what security products are installed and available to the JVM.
</Property>
<Property name="trustCertificateKeyStorePassword" required="No" default="" sortOrder="10" since="5.1.0">
Password for the trusted root certificates KeyStore
</Property>
<Property name="allowLoadLocalInfile" required="No" default="true" sortOrder="2147483647" since="3.0.3">
Should the driver allow use of 'LOAD DATA LOCAL INFILE...' (defaults to 'true').
</Property>
<Property name="allowUrlInLocalInfile" required="No" default="false" sortOrder="2147483647" since="3.1.4">
Should the driver allow URLs in 'LOAD DATA LOCAL INFILE' statements?
</Property>
<Property name="paranoid" required="No" default="false" sortOrder="alpha" since="3.0.1">
Take measures to prevent exposure sensitive information in error messages and clear data structures holding sensitive data when possible? (defaults to 'false')
</Property>
<Property name="passwordCharacterEncoding" required="No" default="" sortOrder="alpha" since="5.1.7">
What character encoding is used for passwords? Leaving this set to the default value (null), uses the platform character set, which works for ISO8859_1 (i.e. "latin1") passwords. For passwords in other character encodings, the encoding will have to be specified with this property, as it's not possible for the driver to auto-detect this.
</Property>
</PropertyCategory>
<PropertyCategory name="Performance Extensions">
<Property name="callableStmtCacheSize" required="No" default="100" sortOrder="5" since="3.1.2">
If 'cacheCallableStmts' is enabled, how many callable statements should be cached?
</Property>
<Property name="metadataCacheSize" required="No" default="50" sortOrder="5" since="3.1.1">
The number of queries to cache ResultSetMetadata for if cacheResultSetMetaData is set to 'true' (default 50)
</Property>
<Property name="useLocalSessionState" required="No" default="false" sortOrder="5" since="3.1.7">
Should the driver refer to the internal values of autocommit and transaction isolation that are set by Connection.setAutoCommit() and Connection.setTransactionIsolation() and transaction state as maintained by the protocol, rather than querying the database or blindly sending commands to the database for commit() or rollback() method calls?
</Property>
<Property name="useLocalTransactionState" required="No" default="false" sortOrder="6" since="5.1.7">
Should the driver use the in-transaction state provided by the MySQL protocol to determine if a commit() or rollback() should actually be sent to the database?
</Property>
<Property name="prepStmtCacheSize" required="No" default="25" sortOrder="10" since="3.0.10">
If prepared statement caching is enabled, how many prepared statements should be cached?
</Property>
<Property name="prepStmtCacheSqlLimit" required="No" default="256" sortOrder="11" since="3.0.10">
If prepared statement caching is enabled, what's the largest SQL the driver will cache the parsing for?
</Property>
<Property name="parseInfoCacheFactory" required="No" default="com.mysql.jdbc.PerConnectionLRUFactory" sortOrder="12" since="5.1.1">
Name of a class implementing com.mysql.jdbc.CacheAdapterFactory, which will be used to create caches for the parsed representation of client-side prepared statements.
</Property>
<Property name="serverConfigCacheFactory" required="No" default="com.mysql.jdbc.PerVmServerConfigCacheFactory" sortOrder="12" since="5.1.1">
Name of a class implementing com.mysql.jdbc.CacheAdapterFactory<String, Map<String, String>>, which will be used to create caches for MySQL server configuration values
</Property>
<Property name="alwaysSendSetIsolation" required="No" default="true" sortOrder="2147483647" since="3.1.7">
Should the driver always communicate with the database when Connection.setTransactionIsolation() is called? If set to false, the driver will only communicate with the database when the requested transaction isolation is different than the whichever is newer, the last value that was set via Connection.setTransactionIsolation(), or the value that was read from the server when the connection was established. Note that useLocalSessionState=true will force the same behavior as alwaysSendSetIsolation=false, regardless of how alwaysSendSetIsolation is set.
</Property>
<Property name="maintainTimeStats" required="No" default="true" sortOrder="2147483647" since="3.1.9">
Should the driver maintain various internal timers to enable idle time calculations as well as more verbose error messages when the connection to the server fails? Setting this property to false removes at least two calls to System.getCurrentTimeMillis() per query.
</Property>
<Property name="useCursorFetch" required="No" default="false" sortOrder="2147483647" since="5.0.0">
If connected to MySQL > 5.0.2, and setFetchSize() > 0 on a statement, should that statement use cursor-based fetching to retrieve rows?
</Property>
<Property name="blobSendChunkSize" required="No" default="1048576" sortOrder="alpha" since="3.1.9">
Chunk size to use when sending BLOB/CLOBs via ServerPreparedStatements. Note that this value cannot exceed the value of "maxAllowedPacket" and, if that is the case, then this value will be corrected automatically.
</Property>
<Property name="cacheCallableStmts" required="No" default="false" sortOrder="alpha" since="3.1.2">
Should the driver cache the parsing stage of CallableStatements
</Property>
<Property name="cachePrepStmts" required="No" default="false" sortOrder="alpha" since="3.0.10">
Should the driver cache the parsing stage of PreparedStatements of client-side prepared statements, the "check" for suitability of server-side prepared and server-side prepared statements themselves?
</Property>
<Property name="cacheResultSetMetadata" required="No" default="false" sortOrder="alpha" since="3.1.1">
Should the driver cache ResultSetMetaData for Statements and PreparedStatements? (Req. JDK-1.4+, true/false, default 'false')
</Property>
<Property name="cacheServerConfiguration" required="No" default="false" sortOrder="alpha" since="3.1.5">
Should the driver cache the results of 'SHOW VARIABLES' and 'SHOW COLLATION' on a per-URL basis?
</Property>
<Property name="defaultFetchSize" required="No" default="0" sortOrder="alpha" since="3.1.9">
The driver will call setFetchSize(n) with this value on all newly-created Statements
</Property>
<Property name="dontTrackOpenResources" required="No" default="false" sortOrder="alpha" since="3.1.7">
The JDBC specification requires the driver to automatically track and close resources, however if your application doesn't do a good job of explicitly calling close() on statements or result sets, this can cause memory leakage. Setting this property to true relaxes this constraint, and can be more memory efficient for some applications. Also the automatic closing of the Statement and current ResultSet in Statement.closeOnCompletion() and Statement.getMoreResults ([Statement.CLOSE_CURRENT_RESULT | Statement.CLOSE_ALL_RESULTS]), respectively, ceases to happen. This property automatically sets holdResultsOpenOverStatementClose=true.
</Property>
<Property name="dynamicCalendars" required="No" default="false" sortOrder="alpha" since="3.1.5">
Should the driver retrieve the default calendar when required, or cache it per connection/session?
</Property>
<Property name="elideSetAutoCommits" required="No" default="false" sortOrder="alpha" since="3.1.3">
If using MySQL-4.1 or newer, should the driver only issue 'set autocommit=n' queries when the server's state doesn't match the requested state by Connection.setAutoCommit(boolean)?
</Property>
<Property name="enableQueryTimeouts" required="No" default="true" sortOrder="alpha" since="5.0.6">
When enabled, query timeouts set via Statement.setQueryTimeout() use a shared java.util.Timer instance for scheduling. Even if the timeout doesn't expire before the query is processed, there will be memory used by the TimerTask for the given timeout which won't be reclaimed until the time the timeout would have expired if it hadn't been cancelled by the driver. High-load environments might want to consider disabling this functionality.
</Property>
<Property name="holdResultsOpenOverStatementClose" required="No" default="false" sortOrder="alpha" since="3.1.7">
Should the driver close result sets on Statement.close() as required by the JDBC specification?
</Property>
<Property name="largeRowSizeThreshold" required="No" default="2048" sortOrder="alpha" since="5.1.1">
What size result set row should the JDBC driver consider "large", and thus use a more memory-efficient way of representing the row internally?
</Property>
<Property name="loadBalanceStrategy" required="No" default="random" sortOrder="alpha" since="5.0.6">
If using a load-balanced connection to connect to SQL nodes in a MySQL Cluster/NDB configuration (by using the URL prefix "jdbc:mysql:loadbalance://"), which load balancing algorithm should the driver use: (1) "random" - the driver will pick a random host for each request. This tends to work better than round-robin, as the randomness will somewhat account for spreading loads where requests vary in response time, while round-robin can sometimes lead to overloaded nodes if there are variations in response times across the workload. (2) "bestResponseTime" - the driver will route the request to the host that had the best response time for the previous transaction.
</Property>
<Property name="locatorFetchBufferSize" required="No" default="1048576" sortOrder="alpha" since="3.2.1">
If 'emulateLocators' is configured to 'true', what size buffer should be used when fetching BLOB data for getBinaryInputStream?
</Property>
<Property name="rewriteBatchedStatements" required="No" default="false" sortOrder="alpha" since="3.1.13">
Should the driver use multiqueries (irregardless of the setting of "allowMultiQueries") as well as rewriting of prepared statements for INSERT into multi-value inserts when executeBatch() is called? Notice that this has the potential for SQL injection if using plain java.sql.Statements and your code doesn't sanitize input correctly. Notice that for prepared statements, server-side prepared statements can not currently take advantage of this rewrite option, and that if you don't specify stream lengths when using PreparedStatement.set*Stream(), the driver won't be able to determine the optimum number of parameters per batch and you might receive an error from the driver that the resultant packet is too large. Statement.getGeneratedKeys() for these rewritten statements only works when the entire batch includes INSERT statements. Please be aware using rewriteBatchedStatements=true with INSERT .. ON DUPLICATE KEY UPDATE that for rewritten statement server returns only one value as sum of all affected (or found) rows in batch and it isn't possible to map it correctly to initial statements; in this case driver returns the total result as a result of each batch statement, i.e. the only unambiguous result is 0.
</Property>
<Property name="useDirectRowUnpack" required="No" default="true" sortOrder="alpha" since="5.1.1">
Use newer result set row unpacking code that skips a copy from network buffers to a MySQL packet instance and instead reads directly into the result set row data buffers.
</Property>
<Property name="useDynamicCharsetInfo" required="No" default="true" sortOrder="alpha" since="5.0.6">
Should the driver use a per-connection cache of character set information queried from the server when necessary, or use a built-in static mapping that is more efficient, but isn't aware of custom character sets or character sets implemented after the release of the JDBC driver?
</Property>
<Property name="useFastDateParsing" required="No" default="true" sortOrder="alpha" since="5.0.5">
Use internal String->Date/Time/Timestamp conversion routines to avoid excessive object creation?
</Property>
<Property name="useFastIntParsing" required="No" default="true" sortOrder="alpha" since="3.1.4">
Use internal String->Integer conversion routines to avoid excessive object creation?
</Property>
<Property name="useJvmCharsetConverters" required="No" default="false" sortOrder="alpha" since="5.0.1">
Always use the character encoding routines built into the JVM, rather than using lookup tables for single-byte character sets?
</Property>
<Property name="useReadAheadInput" required="No" default="true" sortOrder="alpha" since="3.1.5">
Use newer, optimized non-blocking, buffered input stream when reading from the server?
</Property>
</PropertyCategory>
<PropertyCategory name="Debugging/Profiling">
<Property name="logger" required="No" default="com.mysql.jdbc.log.StandardLogger" sortOrder="0" since="3.1.1">
The name of a class that implements "com.mysql.jdbc.log.Log" that will be used to log messages to. (default is "com.mysql.jdbc.log.StandardLogger", which logs to STDERR)
</Property>
<Property name="gatherPerfMetrics" required="No" default="false" sortOrder="1" since="3.1.2">
Should the driver gather performance metrics, and report them via the configured logger every 'reportMetricsIntervalMillis' milliseconds?
</Property>
etc. etc. etc.
Expanding on my comment.
Since you have MySQL jars in lib\ext looks like Eclipse is trying to load up these jars .
Try removing these jars and try running your program again. Putting jars in lib\ext is considered a bad practice.
Related thread on MySQL - here