Quantcast
Channel: MySQL Forums - Connector/J, JDBC and Java
Viewing all 884 articles
Browse latest View live

hanging at "at com.mysql.jdbc.Driver.(Driver.java:63)" (no replies)

$
0
0
We use mysql-connector-java-commercial-5.1.16-bin.jar,
Our code like below
public static void init (String className, String connString) {
// This is a recommended hack to prevent JVM errors. No attempt
// has been made to see if this is needed.
try {
Class.forName(className).newInstance();
} catch (Exception e) {
e.printStackTrace();
System.exit(0);
}


className = org.gjt.mm.mysql.Driver,

After kill -9 appid for many times, the app will start by opensaf automatically, the code hanging at Class.forName(className).newInstance();

Below is the jstack log. Please help to have a look.
-------------------------------------

2015-09-17 07:28:29
Full thread dump Java HotSpot(TM) 64-Bit Server VM (24.80-b11 mixed mode):

"Attach Listener" daemon prio=10 tid=0x0000000000e83000 nid=0x2e74 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

Locked ownable synchronizers:
- None

"GMS-GrizzlyControllerThreadPool-Group-JAVACAF_CCB(12)" daemon prio=10 tid=0x0000000000a58800 nid=0x1ad7 in Object.wait() [0x00007fe455247000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e5927470> (a java.lang.Object)
at com.sun.grizzly.util.SyncThreadPool$SyncThreadWorker.getTask(SyncThreadPool.java:374)
- locked <0x00000000e5927470> (a java.lang.Object)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:524)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS-GrizzlyControllerThreadPool-Group-JAVACAF_CCB(10)" daemon prio=10 tid=0x0000000000f8d000 nid=0x1a9e in Object.wait() [0x00007fe455348000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e5927470> (a java.lang.Object)
at com.sun.grizzly.util.SyncThreadPool$SyncThreadWorker.getTask(SyncThreadPool.java:374)
- locked <0x00000000e5927470> (a java.lang.Object)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:524)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS-GrizzlyControllerThreadPool-Group-JAVACAF_CCB(8)" daemon prio=10 tid=0x0000000000f91000 nid=0x1918 in Object.wait() [0x00007fe455449000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e5927470> (a java.lang.Object)
at com.sun.grizzly.util.SyncThreadPool$SyncThreadWorker.getTask(SyncThreadPool.java:374)
- locked <0x00000000e5927470> (a java.lang.Object)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:524)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS-GrizzlyControllerThreadPool-Group-JAVACAF_CCB(6)" daemon prio=10 tid=0x0000000000945000 nid=0x1915 in Object.wait() [0x00007fe45554a000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e5927470> (a java.lang.Object)
at com.sun.grizzly.util.SyncThreadPool$SyncThreadWorker.getTask(SyncThreadPool.java:374)
- locked <0x00000000e5927470> (a java.lang.Object)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:524)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"pool-4-thread-1" prio=10 tid=0x0000000000ef8000 nid=0x1912 in Object.wait() [0x00007fe45564a000]
java.lang.Thread.State: RUNNABLE
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at java.util.ServiceLoader$LazyIterator.next(Unknown Source)
at java.util.ServiceLoader$1.next(Unknown Source)
at java.sql.DriverManager$2.run(Unknown Source)
at java.sql.DriverManager$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.sql.DriverManager.loadInitialDrivers(Unknown Source)
at java.sql.DriverManager.<clinit>(Unknown Source)
at ericsson.ipworks.storage.server.cba.fm.StorageServerDbConnMonitor$1.call(StorageServerDbConnMonitor.java:291)
at ericsson.ipworks.storage.server.cba.fm.StorageServerDbConnMonitor$1.call(StorageServerDbConnMonitor.java:286)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- <0x00000000e5baddb0> (a java.util.concurrent.ThreadPoolExecutor$Worker)

"Timer-4" prio=10 tid=0x0000000000760800 nid=0x190f in Object.wait() [0x00007fe45574c000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e5bade50> (a java.util.TaskQueue)
at java.util.TimerThread.mainLoop(Unknown Source)
- locked <0x00000000e5bade50> (a java.util.TaskQueue)
at java.util.TimerThread.run(Unknown Source)

Locked ownable synchronizers:
- None

"Timer-3" prio=10 tid=0x000000000075e000 nid=0x190e in Object.wait() [0x00007fe45584d000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e5badf50> (a java.util.TaskQueue)
at java.util.TimerThread.mainLoop(Unknown Source)
- locked <0x00000000e5badf50> (a java.util.TaskQueue)
at java.util.TimerThread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS-GrizzlyControllerThreadPool-Group-JAVACAF_CCB(4)" daemon prio=10 tid=0x0000000000eb0000 nid=0x190a in Object.wait() [0x00007fe45594e000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e5927470> (a java.lang.Object)
at com.sun.grizzly.util.SyncThreadPool$SyncThreadWorker.getTask(SyncThreadPool.java:374)
- locked <0x00000000e5927470> (a java.lang.Object)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:524)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS-DistributedStateCache-Group-JAVACAF_CCB-thread-1" daemon prio=10 tid=0x0000000000eac800 nid=0x1908 waiting on condition [0x00007fe455a4f000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e59275b8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"NTB0" prio=10 tid=0x0000000000eac000 nid=0x1904 in Object.wait() [0x00007fe455b50000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e5bae1b0> (a java.util.LinkedList)
at java.lang.Object.wait(Object.java:503)
at ericsson.ipworks.net.thread.NetThreadBoss.run(NetThreadBoss.java:359)
- locked <0x00000000e5bae1b0> (a java.util.LinkedList)

Locked ownable synchronizers:
- None

"GMS-GrizzlyControllerThreadPool-Group-JAVACAF_CCB(2)" daemon prio=10 tid=0x0000000000a3a800 nid=0x1900 in Object.wait() [0x00007fe455c51000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e5927470> (a java.lang.Object)
at com.sun.grizzly.util.SyncThreadPool$SyncThreadWorker.getTask(SyncThreadPool.java:374)
- locked <0x00000000e5927470> (a java.lang.Object)
at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:524)
at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"process reaper" daemon prio=10 tid=0x0000000000838800 nid=0x18fe waiting on condition [0x00007fe455c8a000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e5bae2e8> (a java.util.concurrent.SynchronousQueue$TransferStack)
at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
at java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill(Unknown Source)
at java.util.concurrent.SynchronousQueue$TransferStack.transfer(Unknown Source)
at java.util.concurrent.SynchronousQueue.poll(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"Timer-2" prio=10 tid=0x0000000000e5f000 nid=0x18f7 in Object.wait() [0x00007fe456fee000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e5bae400> (a java.util.TaskQueue)
at java.util.TimerThread.mainLoop(Unknown Source)
- locked <0x00000000e5bae400> (a java.util.TaskQueue)
at java.util.TimerThread.run(Unknown Source)

Locked ownable synchronizers:
- None

"Thread-24" prio=10 tid=0x0000000000e4f000 nid=0x18f3 waiting on condition [0x00007fe455db4000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e5bae4b8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
at com.ericsson.javaoam.pmcmw.mgr.PmCmwMeasHandler$ResultChecker.run(PmCmwMeasHandler.java:173)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS-McastMsgProcessor-Group-JAVACAF_CCB-thread-10" daemon prio=10 tid=0x0000000000f13800 nid=0x18c1 waiting on condition [0x00007fe456694000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e5927680> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
at java.util.concurrent.ArrayBlockingQueue.take(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS-McastMsgProcessor-Group-JAVACAF_CCB-thread-9" daemon prio=10 tid=0x0000000000f37800 nid=0x18bb waiting on condition [0x00007fe456795000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e5927680> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
at java.util.concurrent.ArrayBlockingQueue.take(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS-McastMsgProcessor-Group-JAVACAF_CCB-thread-8" daemon prio=10 tid=0x0000000000f48000 nid=0x18af waiting on condition [0x00007fe456896000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e5927680> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
at java.util.concurrent.ArrayBlockingQueue.take(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"NotificationQueueHandler" prio=10 tid=0x0000000000f17000 nid=0x18ad waiting on condition [0x00007fe456dec000]
java.lang.Thread.State: TIMED_WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e5927838> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source)
at java.util.concurrent.LinkedBlockingQueue.poll(Unknown Source)
at com.ericsson.saf.ntf.handler.NotificationQueueHandler.run(NotificationQueueHandler.java:71)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS-McastMsgProcessor-Group-JAVACAF_CCB-thread-7" daemon prio=10 tid=0x0000000000e6f000 nid=0x18ab waiting on condition [0x00007fe456eed000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e5927680> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
at java.util.concurrent.ArrayBlockingQueue.take(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS-processNotify-Group-JAVACAF_CCB-thread-2" daemon prio=10 tid=0x0000000000df1800 nid=0x188e waiting on condition [0x00007fe4570ef000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e59279e0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS-processNotify-Group-JAVACAF_CCB-thread-1" daemon prio=10 tid=0x0000000000df0000 nid=0x188c waiting on condition [0x00007fe4571f0000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e59279e0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS-validateMasterChangeEvents-Group-JAVACAF_CCB-thread-1" daemon prio=10 tid=0x00007fe4580bb800 nid=0x1889 waiting on condition [0x00007fe4572f1000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e5927c00> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
at java.util.concurrent.LinkedBlockingQueue.take(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS-McastMsgProcessor-Group-JAVACAF_CCB-thread-6" daemon prio=10 tid=0x0000000000de1000 nid=0x1887 waiting on condition [0x00007fe4573f2000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e5927680> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
at java.util.concurrent.ArrayBlockingQueue.take(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS-McastMsgProcessor-Group-JAVACAF_CCB-thread-5" daemon prio=10 tid=0x0000000000ed3800 nid=0x1884 waiting on condition [0x00007fe457bfa000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e5927680> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
at java.util.concurrent.ArrayBlockingQueue.take(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS-McastMsgProcessor-Group-JAVACAF_CCB-thread-4" daemon prio=10 tid=0x0000000000ddf000 nid=0x1882 waiting on condition [0x00007fe4574f3000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e5927680> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
at java.util.concurrent.ArrayBlockingQueue.take(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS-McastMsgProcessor-Group-JAVACAF_CCB-thread-3" daemon prio=10 tid=0x0000000000dc0800 nid=0x1879 waiting on condition [0x00007fe4575f4000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e5927680> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
at java.util.concurrent.ArrayBlockingQueue.take(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS-McastMsgProcessor-Group-JAVACAF_CCB-thread-2" daemon prio=10 tid=0x0000000000dbf000 nid=0x1878 waiting on condition [0x00007fe4576f5000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e5927680> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
at java.util.concurrent.ArrayBlockingQueue.take(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS-McastMsgProcessor-Group-JAVACAF_CCB-thread-1" daemon prio=10 tid=0x0000000000dbd800 nid=0x1877 waiting on condition [0x00007fe4577f6000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e5927680> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
at java.util.concurrent.ArrayBlockingQueue.take(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS FailureVerifier Thread for Group-JAVACAF_CCB" daemon prio=10 tid=0x0000000000daf000 nid=0x1872 in Object.wait() [0x00007fe4578f7000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e59280d8> (a java.lang.Object)
at java.lang.Object.wait(Object.java:503)
at com.sun.enterprise.mgmt.HealthMonitor$FailureVerifier.run(HealthMonitor.java:1446)
- locked <0x00000000e59280d8> (a java.lang.Object)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS InDoubtPeerDetector Thread for Group-JAVACAF_CCB" daemon prio=10 tid=0x0000000000ed9000 nid=0x1871 in Object.wait() [0x00007fe4579f8000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e5928168> (a java.lang.Object)
at com.sun.enterprise.mgmt.HealthMonitor$InDoubtPeerDetector.run(HealthMonitor.java:1306)
- locked <0x00000000e5928168> (a java.lang.Object)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS HealthMonitor for Group-JAVACAF_CCB" daemon prio=10 tid=0x0000000000ed5800 nid=0x1870 in Object.wait() [0x00007fe457af9000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e59281f8> (a java.lang.Object)
at com.sun.enterprise.mgmt.HealthMonitor.run(HealthMonitor.java:823)
- locked <0x00000000e59281f8> (a java.lang.Object)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS MasterNode processOutstandingChangeEvents Group-JAVACAF_CCB" daemon prio=10 tid=0x0000000000ee0000 nid=0x186e in Object.wait() [0x00007fe457cfb000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e5928300> (a java.util.TreeSet)
at java.lang.Object.wait(Object.java:503)
at com.sun.enterprise.mgmt.MasterNode$ProcessOutstandingMessagesTask.run(MasterNode.java:1875)
- locked <0x00000000e5928300> (a java.util.TreeSet)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"Timer-0" daemon prio=10 tid=0x0000000000d28800 nid=0x186c in Object.wait() [0x00007fe457dfc000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e5928390> (a java.util.TaskQueue)
at java.lang.Object.wait(Object.java:503)
at java.util.TimerThread.mainLoop(Unknown Source)
- locked <0x00000000e5928390> (a java.util.TaskQueue)
at java.util.TimerThread.run(Unknown Source)

Locked ownable synchronizers:
- None

"IP Multicast Listener for /224.0.0.1:15663" daemon prio=10 tid=0x0000000000f77000 nid=0x186a runnable [0x00007fe457efd000]
java.lang.Thread.State: RUNNABLE
at java.net.PlainDatagramSocketImpl.receive0(Native Method)
- locked <0x00000000e59dd650> (a java.net.PlainDatagramSocketImpl)
at java.net.AbstractPlainDatagramSocketImpl.receive(Unknown Source)
- locked <0x00000000e59dd650> (a java.net.PlainDatagramSocketImpl)
at java.net.DatagramSocket.receive(Unknown Source)
- locked <0x00000000dbe71270> (a java.net.DatagramPacket)
- locked <0x00000000e597a120> (a java.net.MulticastSocket)
at com.sun.enterprise.mgmt.transport.BlockingIOMulticastSender.run(BlockingIOMulticastSender.java:288)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"Grizzly-kernel-thread(2)" daemon prio=10 tid=0x0000000000e93800 nid=0x1866 runnable [0x00007fe457ffe000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
at sun.nio.ch.EPollArrayWrapper.poll(Unknown Source)
at sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
- locked <0x00000000e5928590> (a sun.nio.ch.Util$2)
- locked <0x00000000e59285a0> (a java.util.Collections$UnmodifiableSet)
- locked <0x00000000e5928548> (a sun.nio.ch.EPollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(Unknown Source)
at com.sun.grizzly.TCPSelectorHandler.select(TCPSelectorHandler.java:513)
at com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.java:190)
at com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:132)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- <0x00000000e5928748> (a java.util.concurrent.ThreadPoolExecutor$Worker)

"Grizzly-kernel-thread(1)" daemon prio=10 tid=0x0000000000e9c800 nid=0x1865 runnable [0x00007fe45c18a000]
java.lang.Thread.State: RUNNABLE
at sun.nio.ch.EPollArrayWrapper.epollWait(Native Method)
at sun.nio.ch.EPollArrayWrapper.poll(Unknown Source)
at sun.nio.ch.EPollSelectorImpl.doSelect(Unknown Source)
at sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)
- locked <0x00000000e5928898> (a sun.nio.ch.Util$2)
- locked <0x00000000e59288a8> (a java.util.Collections$UnmodifiableSet)
- locked <0x00000000e5928850> (a sun.nio.ch.EPollSelectorImpl)
at sun.nio.ch.SelectorImpl.select(Unknown Source)
at com.sun.grizzly.TCPSelectorHandler.select(TCPSelectorHandler.java:513)
at com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.java:190)
at com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:132)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- <0x00000000e59289e0> (a java.util.concurrent.ThreadPoolExecutor$Worker)

"Thread-2" prio=10 tid=0x0000000000f64800 nid=0x185f in Object.wait() [0x00007fe45c28b000]
java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e5928a78> (a java.util.concurrent.atomic.AtomicInteger)
at com.sun.grizzly.Controller.waitUntilSelectorHandlersStop(Controller.java:1105)
- locked <0x00000000e5928a78> (a java.util.concurrent.atomic.AtomicInteger)
at com.sun.grizzly.Controller.start(Controller.java:855)
at com.sun.grizzly.Controller.run(Controller.java:695)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS ViewWindowThread Group-JAVACAF_CCB" daemon prio=10 tid=0x0000000000fb2000 nid=0x1837 waiting on condition [0x00007fe45c38c000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e5928b50> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
at java.util.concurrent.ArrayBlockingQueue.take(Unknown Source)
at com.sun.enterprise.ee.cms.impl.base.ViewWindowImpl.run(ViewWindowImpl.java:189)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS MessageWindowThread Group-JAVACAF_CCB" daemon prio=10 tid=0x0000000000a41000 nid=0x1835 waiting on condition [0x00007fe45c48d000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e5928c58> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
at java.util.concurrent.ArrayBlockingQueue.take(Unknown Source)
at com.sun.enterprise.ee.cms.impl.base.MessageWindow.run(MessageWindow.java:108)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"GMS SignalHandler for Group-JAVACAF_CCB thread" daemon prio=10 tid=0x0000000000a02800 nid=0x1830 waiting on condition [0x00007fe45c58e000]
java.lang.Thread.State: WAITING (parking)
at sun.misc.Unsafe.park(Native Method)
- parking to wait for <0x00000000e5928d38> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
at java.util.concurrent.locks.LockSupport.park(Unknown Source)
at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(Unknown Source)
at java.util.concurrent.ArrayBlockingQueue.take(Unknown Source)
at com.sun.enterprise.ee.cms.impl.common.SignalHandler.run(SignalHandler.java:90)
at java.lang.Thread.run(Unknown Source)

Locked ownable synchronizers:
- None

"Service Thread" daemon prio=10 tid=0x000000000069c000 nid=0x17b2 runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

Locked ownable synchronizers:
- None

"C2 CompilerThread1" daemon prio=10 tid=0x0000000000690800 nid=0x17b0 waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

Locked ownable synchronizers:
- None

"C2 CompilerThread0" daemon prio=10 tid=0x000000000068e000 nid=0x17ae waiting on condition [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

Locked ownable synchronizers:
- None

"Signal Dispatcher" daemon prio=10 tid=0x000000000068c000 nid=0x17ac runnable [0x0000000000000000]
java.lang.Thread.State: RUNNABLE

Locked ownable synchronizers:
- None

"Finalizer" daemon prio=10 tid=0x0000000000668000 nid=0x179c in Object.wait() [0x00007fe45e203000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e5928fd8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
- locked <0x00000000e5928fd8> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(Unknown Source)
at java.lang.ref.Finalizer$FinalizerThread.run(Unknown Source)

Locked ownable synchronizers:
- None

"Reference Handler" daemon prio=10 tid=0x0000000000666000 nid=0x179a in Object.wait() [0x00007fe45e304000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x00000000e5929080> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:503)
at java.lang.ref.Reference$ReferenceHandler.run(Unknown Source)
- locked <0x00000000e5929080> (a java.lang.ref.Reference$Lock)

Locked ownable synchronizers:
- None

"main" prio=10 tid=0x000000000060b800 nid=0x1791 in Object.wait() [0x00007fe463e2b000]
java.lang.Thread.State: RUNNABLE
at com.mysql.jdbc.Driver.<clinit>(Driver.java:63)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at ericsson.ipworks.lib.sql.ConnectionManager.init(ConnectionManager.java:110)
at ericsson.ipworks.storage.backend.sql.SqlBackend.init(SqlBackend.java:185)
at ericsson.ipworks.storage.server.modules.ModuleCoordinator.loadModule(ModuleCoordinator.java:185)
at ericsson.ipworks.storage.server.modules.ModuleCoordinator.init(ModuleCoordinator.java:205)
at ericsson.ipworks.storage.server.StorageServer.run(StorageServer.java:288)
at ericsson.ipworks.storage.server.StorageServer.main(StorageServer.java:198)

Locked ownable synchronizers:
- None

"VM Thread" prio=10 tid=0x0000000000661800 nid=0x1798 runnable

"VM Periodic Task Thread" prio=10 tid=0x00000000006a7000 nid=0x17b4 waiting on condition

JNI global references: 336

Where to write a file in Tomcat 8 and Servlet /JSP on my Hard Disk ? (no replies)

$
0
0
Hi all,
I want to write my.properties file. My query is that “In which path it should be created”. I have installed glassfish on my Linux 14.04 machine on this path: /opt/glassfish4 and created the file my.properties at: /opt/glassfish4/glassfish/domains/swManzana/config/my.properties
This is my Java Code:

Boolean wflag = false;
String wnomfile="my.properties"
Properties prop = new Properties();
OutputStream output = null;
System.out.println("Inicio Archivo Properties.. " + wnomfile);
try {
// output = new FileOutputStream("config.properties");
output = new FileOutputStream(wnomfile);
System.out.println("Archivo Creado Properties..");
// set the properties value
prop.setProperty("database", "localhost");
prop.setProperty("dbuser","mkyong");
prop.setProperty("dbpassword","password");
// save properties to project root folder
prop.store(output,null);
System.out.println("Archivo Creado/Grabado Properties..");
wflag=true;
}catch(IOExceptionio){
System.out.println("Error Archivo Properties Exception..");
io.printStackTrace();
}finally{
System.out.println("Archivo Properties inicio Finally..");
if(output!=null){
try{
System.out.println("Archivo Properties Antes de CLOSE Finally..");
output.close();
System.out.println("Archivo Properties Grabado Finally..");
}catch(IOExceptione){
System.out.println("Archivo Properties Exception-Finally..");
e.printStackTrace();
}
}
}
return wflag;

While executing the above code my.properties file not created. Why Tomcat is not creating this file. I have properly checked my tomcat installation and found no issues in access web Pages and ports.
Can anyone suggest me some knowledgeable tutorials URL Links on Java questions and answers forum, so that I can get my query resolved faster.
Thanks

Flush Hosts Didn't Work (4 replies)

$
0
0
I am a complete MySQL newbie. I've taken two training course but have very little in the way of hands-on experience but have been given responsibility for a MySQL installation that was configured for PCI.
It is part of a tokenization system that creates secure tokens in place of credit cards.
Recently the following error was seen from JDBC:
'Testing failed: invalid connection properties setting.
'null, message from server "Host '...' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts"'
The suggested solution was tried to no avail, it did not seem to do anything. Why would this be?
I would appreciate any help.
MySQL v5.5.45 (GPL)

oooBase Multi User Base Reports not Locking / Staying with user "ThisDatabaseDocument" (no replies)

$
0
0
I have upgraded an OpenOffice Base to serve to Multi Users from MYSQL on my Local but Remote Server to a number of terminals set up to connect a Open Office Base front-end via JDBC

The server is a Ubuntu 14.04 asterisk box serving serving MYSQL to the asterisk that works well and I have only recently added the OpenOffice Base Database to serve the ooo Base mysql which it does using the java JDBC

The server has MySQL version 14.14 distribution 5.6.19

On the Client side (Ubuntu)I have installed the lastest Oracle 1.8.0_60 java and I have pointed the class path to :/usr/share/java/mysql-connector-java-5.1.32.jar

Each client user can build their form document without any issues.

The MySQL is a standard installation in that I have NOT installed any Locks

However,

It seems as if all sessions are merged when delivering reports, as in whoever has latest Current-User / lock , that's the report MYSQL serves, in other words user "A" gets user "B" reports if user "B" was the last to do something.

"SHOW PROCESSLIST;" indicates different thread-Id's for each user

The MYSQL started off as MyISAM then I converted to InnoDB

All users have their own copy of the Base .odb on their terminal with their own user name. it is Not a Share Base .odb installed on the server

I have tried on a number of Macro's with the same results

I created another test server, with the same results

here are the macro I have used :

First Macro

Sub EVA_Report(event)
oButton = event.source.Model
sReportname = oButton.tag
oReport = ThisDatabaseDocument.ReportDocuments.GetByName(sReportName)
oReport.Open
end sub

Second Macro

Sub CreateReportCalledfromButton(oEvent as object)

dim oCreateButton,oForm
dim oConnection,oReportsDocuments

oCreateButton=oEvent.source.model
oForm=oCreateButton.parent
oConnection=oForm.Activeconnection
oReportsDocuments=oConnection.parent.DatabaseDocument.ReportDocuments
openReport(oConnection, oReportsDocuments, oCreateButton.tag , oForm.Filter)

End Sub

Function openReport(oConnection, oReportsDocuments,aReportName,sFilter) as object

Dim mPrintopts1()


dim aProp(3) as new com.sun.star.beans.PropertyValue
dim aProp2
dim oReportDesign
aProp(1).Name = "ActiveConnection"
aProp(1).Value = oConnection
aProp(0).Name = "Hidden"
aProp(0).Value = true
aProp(2).Name = "OpenMode"
aProp(2).Value = "openDesign"
let aProp2=aProp
oReportDesign=oReportsDocuments.loadComponentFromURL(aReportName ,"",0,aProp())

aProp2(0).Value = TRUE
aProp2(2).Value = "open"

oReportsDocuments.loadComponentFromURL(aReportName ,_blank,0,aProp2()).Print(mPrintopts1())

End Function

DriverManager.getConnection is too slow in linux (1 reply)

$
0
0
Hello, I'm Jack and using MySQL for my study.

i'd like to ask a question i found today.

before get started,

my environment like this.


MySQL server
version : 5.2.8-MariaDB
os: Windows ??

Java Application Server
os : linux 2.6.32-504.e16.x86_64
connector version : 5.1.36
jdk ver : 1.7.72


so the problem is,

it takes more than 4seconds on this statement to get connection.

DriverManager.getConnection(url,id,pass);

but the strange thing is, if i run this at windows machine,

it takes only 200ms.

while this hanging, i capture thead dump and found out that socket read is holding.

i'd like to reduce this 'making connection time' and understand why this happens.


java.lang.Thread.State: RUNNABLE
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at com.mysql.jdbc.util.ReadAheadInputStream.fill(ReadAheadInputStream.java:100)
at com.mysql.jdbc.util.ReadAheadInputStream.readFromUnderlyingStreamIfNecessary(ReadAheadInputStream.java:143)
at com.mysql.jdbc.util.ReadAheadInputStream.read(ReadAheadInputStream.java:173)
- locked <0x000000058203d870> (a com.mysql.jdbc.util.ReadAheadInputStream)
at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:2923)
at com.mysql.jdbc.MysqlIO.readPacket(MysqlIO.java:560)
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1014)
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2249)
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2280)
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2079)
- locked <0x0000000581da3a68> (a com.mysql.jdbc.JDBC4Connection)
at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:794)
at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:44)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:400)
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:399)
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:325)
at java.sql.DriverManager.getConnection(DriverManager.java:571)
at java.sql.DriverManager.getConnection(DriverManager.java:215)
at jTest.MySQLDBConnector.initializeDataBase(MySQLDBConnector.java:48)
at jTest.JavaTest.main(JavaTest.java:15)





Thanks for your help in advance.
-Jack

java tutorial (no replies)

$
0
0
javaTpoint provides easy and point to point learning of various tutorials such as Java Tutorial, Core Java Tutorial, Android, Design Pattern, JavaScript, AJAX, SQL, Cloud Computing, Python etc. Javatpoint is growing day by day with lot of new contents on various software technologies. We provide tutorials, training, interview questions, forum, seo services etc

php points (no replies)

$
0
0
PHP is a server scripting language, and a powerful tool for making dynamic and interactive Web pages.

PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.

character set encoding bug in connector 5.1.36/5.1.37? (no replies)

$
0
0
I have a java app that puts tweets into mysql.
On 5.1.36/5.1.37 when i try to insert something with an emoji, e.g. U+1F603, it throws an exception, namely:

Incorrect string value: '\xF0\x9F\x98\x83' for column 'text' at row 1

Works ok on 5.1.35 and 5.1.33.

Any help is appreciated.

Versions:
OS: CentOS 6.5
Tomcat: 8.0.26
Java: 1.7.0_79-b15
MySQL Cluster: 5.6.25-ndb-7.4.7-log

my.cnf
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
default-character-set = utf8mb4

mysql> SHOW VARIABLES WHERE Variable_name LIKE 'character\_set\_%' OR Variable_name LIKE 'collation%';
+--------------------------+--------------------+
| Variable_name | Value |
+--------------------------+--------------------+
| character_set_client | utf8mb4 |
| character_set_connection | utf8mb4 |
| character_set_database | utf8mb4 |
| character_set_filesystem | binary |
| character_set_results | utf8mb4 |
| character_set_server | utf8mb4 |
| character_set_system | utf8 |
| collation_connection | utf8mb4_general_ci |
| collation_database | utf8mb4_general_ci |
| collation_server | utf8mb4_unicode_ci |
+--------------------------+--------------------+

mysql> select table_collation from tables where table_name = 'tweet';
+--------------------+
| table_collation |
+--------------------+
| utf8mb4_general_ci |
+--------------------+

mysql> select character_set_name,collation_name from columns where table_name = 'tweet' and column_name = 'text';
+--------------------+--------------------+
| character_set_name | collation_name |
+--------------------+--------------------+
| utf8mb4 | utf8mb4_general_ci |
+--------------------+--------------------+

JDBC:
url="jdbc:mysql:loadbalance://
host1,host2/db?
connectTimeout=1000
&amp;
loadBalancePingTimeout=100
&amp;
loadBalanceBlacklistTimeout=10000
&amp;
retriesAllDown=2
&amp;
failOverReadOnly=false
&amp;
loadBalanceStrategy=bestResponseTime
&amp;
loadBalanceValidateConnectionOnSwapServer=true
&amp;
allowMasterDownConnections=true
&amp;
noAccessToProcedureBodies=true
&amp;
cacheServerConfiguration=true
&amp;
dontTrackOpenResources=true
&amp;
elideSetAutoCommits=true
&amp;
enableQueryTimeouts=false
&amp;
maintainTimeStats=false
&amp;
useLocalSessionState=true"

MySQL/JDBC connectivity issue (1 reply)

$
0
0
I have three RHL (2) and CentOS (1) environments, at disperse locations with MySQL 5.5.42 or higher installed.
I am able to make MySQL DB connection using SSH via MySQL workbench and putty both.
But using java client app I am able to connect only 1, others are giving jdbc error -

com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct orAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC onstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)

I tried most of solutions suggest on different forums. Can someone guide me please…

Detect datetime precision (1 reply)

$
0
0
I am looking for someway to tell the difference between datetime and datetime(3) using the JDBC DatabaseMetaData. I tried the following

rs = connection.getMetaData().getColumns(null, null, tableName, null);
while (rs.next()) { ... }

and looking at all the info but I didn't see any difference between two columns with different precision.

Rules of thumb for field sizes? (no replies)

$
0
0
When designing tables, are there rules of thumb for field sizes? At the moment, while I am designing my Java application I defined my (for example) address table as:

CREATE TABLE address 
	(add_id int primary key auto_increment, 
	 perident varchar(64), 
	 street varchar(64), 
	 number varchar(64), 
	 postcode varchar(6), 
	 city varchar(64), 
	 telephone varchar(64), 
	 email varchar(64) );

That might be a bit excessive (why?)

PS. the field 'perident' stands for personnel identifier, consisting of first initial and family name

NOLOCK for multiple tables (3 replies)

$
0
0
Hi,

I am trying to apply NOLOCK syntax for my extraction query why because i am trying to load millions of records using one of the ETL tool called as PDI.

in this case i am trying to retrieve data from staging area and need to join with data mart table and should write into same data mart table. Is applying NOLOCK to my select query is good practice ??


Select * from course nolock

OR below is good practise ?

SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
go
Select * from course
go
SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ

Thank you

Is jdbc replication driver slower than normal jdbc driver ? (4 replies)

$
0
0
Hi,

I configured jdbc replication driver for mysql replication.
But, It was slower than normal jdbc driver.

Is it right? jdbc replication driver is slower than normal jdbc driver?

Is there any options for jdbc replication driver which is faster?
Any tips for jdbc replication driver performance ?

Please help me

Thanks

class not found error (no replies)

$
0
0
I have installed the newest jdbc driver for mySQL. It appears in my .classpath <classpathentry kind="lib" path="src/lib/mysql-connector-java-5.1.38-bin.jar"/>
I can establish a connection to my mysql-server with Eclipse Database Connections. But when I run:
Class.forName("com.mysql.jdbc.Driver").newInstance();
in a java application using the same parameters, I get a 'class not found' error.
Any advice?

JDBC: Can't access DB that I can get with MySQL Workbench (5 replies)

$
0
0
I am having trouble connecting to my datasource using JDBC. I have a database server running on a bluehost machine, and I am giving myself remote IP access via my IP address.

On my client machine, I have MySQL Workbench, and some Java code. MySQL workbench is getting the connection, using the database that I would like it to. With the driver manager connection, I cannot specify my database, such as with a forward slash after the port # in the URL, or it will give a connect error.

I can get the connection with the same userid and password using Workbench or the driver manager, but with JDBC it doesn't want to give me access to the same database, I think.

When I try to execute this: "use database", I get:
Access denied for user 'userid'@'184.11.22.%' to database 'database'

Datetimes after a server timezone move (2 replies)

$
0
0
We have a legacy database containing many DATETIME columns, and is configured in the PST timezone. We intend to migrate this database to UTC (Amazon RDS).

Using the 5.1.38 connector, a test database in UTC, and the default useLegacyDatetimeCode=true, datetime fields are fetched exactly as they had been when the database was PST. When useLegacyDatetimeCode=false, the datetimes are shifted by the 8 hour offset. I've reviewed the code and I understand why this is happening - the datetimes inserted/fetched are formatted using the server's timezone instead of the connection's timezone.

I have two questions concerning this -
1) is there connection property that would allow us to use useLegacyDatetimeCode=false but still use the local connection timezone for inserts/updates/selects?
2) what is the risk of continuing to use and rely on useLegacyDatetimeCode=true? I understand the default has been changed to false in the trunk, so how long will this option be maintained in the future?

Insert if exists (4 replies)

$
0
0
I'm trying to test my Java application. To accomplish this I run a script that should insert a test account in the database, if it not exists. If it exists, I want it to update fields (to the first values).

I tried it with:
INSERT INTO address 
 (perident, street, number, pcode, city, telephone, email, eori, iban )
(!) VALUES 
 ('jdoe', 'Fill in your own address information', NULL, NULL, NULL, NULL, NULL, NULL, NULL)
 ON DUPLICATE KEY UPDATE 
 	perident = 'jdoe', street = 'Fill in your own address information', number = NULL, pcode = NULL, city = NULL, 
 	telephone = NULL, email = NULL, eori = NULL, iban = NULL);

I get the error
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 2 (at the '(!) ')

JDBC neglects SET GLOBAL sql_mode = '' settings (2 replies)

$
0
0
I have a query that used to work at older MySQL versions but stops functioning on version 5.7 due to the "sql_mode=only_full_group_by".

I bypassed this error by writing sql_mode = '' in my.cnf.
Now this query works:
- from within MySQL commandline client
- Heidi SQL

But when i put this code into a PHP script that runs on glassfish i still get the error "which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by".

i tried several JDBC clients and am using version 5.1.38 at the moment without any luck.

Connector/J query JSON Type as String using character-set iso-8859-1? (no replies)

$
0
0
The mysql json data type after 5.7.8 is great, but when I select the json column from java, it's not utf8mb4 what I want, it's always iso-8859-1.I must convert it to utf8 by
new String(origin.getBytes("iso-8859-1"), UTF8);
But the data from terminal not using connector/J is right.

How to write java code to get the version info of Mysql connector/J (2 replies)

$
0
0
There is some bug for some version of MySQL connectors/J.

And we want to write some code to protect it or avoid to use this version of MySQL connector/J.

Is there any java code example that we can get this info from MySQL connectors/J.

Thanks,
Nannan
Viewing all 884 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>