You need flush after connection made

On Sunday, April 29, 2012, tariqsht <[email protected]> wrote:
> Dear All
>
> It is very urgent please......
>
> I developed an application of a attendance system in Java and MySQL.
> But I am facing the given problem.
>
> When I get the attendance register of five employees it is working
> fine and report is opened.
>
> But when I send the command for more than five employees then I
> receive the error like this
>
> SQLException: Communications link failure due to underlying exception:
>
> Because there are several queries are using with in while loop in my
> application.
>
> I saw our mysql server Key Efficiency hitrate reaching 100%, is there
> any setting in Mysql to increase key_cache_size setting?
>
> I am using the given
>   * winxp
>   * mysql-connector-java-5.0.3-bin.jar
>   * MySQL 5.0.18-nt-log via TCP/IP
>   * jdk1.7.0
>
> Thanks in advance.
>
> The error is given below.
>
> SQLException: Communications link failure due to underlying exception:
>
> ** BEGIN NESTED EXCEPTION **
>
> java.net.SocketException
> MESSAGE: java.net.BindException: Address already in use: connect
>
> STACKTRACE:
>
> java.net.SocketException: java.net.BindException: Address already in
> use: connect
>        at
> com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:
> 156)
>        at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:276)
>        at com.mysql.jdbc.Connection.createNewIO(Connection.java:2641)
>        at com.mysql.jdbc.Connection.<init>(Connection.java:1531)
>        at
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:
> 266)
>        at java.sql.DriverManager.getConnection(DriverManager.java:
> 579)
>        at java.sql.DriverManager.getConnection(DriverManager.java:
> 243)
>        at biopayroll.jdbcConnection.myStringGet(jdbcConnection.java:
> 258)
>        at
>
biopayroll.rep_emp_attendance_register.get_gh_holiday(rep_emp_attendance_register.java:
> 693)
>        at
>
biopayroll.rep_emp_attendance_register.jButton4ActionPerformed(rep_emp_attendance_register.java:
> 311)
>        at biopayroll.rep_emp_attendance_register.access
> $300(rep_emp_attendance_register.java:33)
>        at biopayroll.rep_emp_attendance_register
> $4.actionPerformed(rep_emp_attendance_register.java:250)
>        at
> javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:
> 2018)
>        at javax.swing.AbstractButton
> $Handler.actionPerformed(AbstractButton.java:2341)
>        at
>
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:
> 402)
>        at
> javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
>        at
>
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:
> 252)
>        at java.awt.Component.processMouseEvent(Component.java:6504)
>        at javax.swing.JComponent.processMouseEvent(JComponent.java:
> 3321)
>        at java.awt.Component.processEvent(Component.java:6269)
>        at java.awt.Container.processEvent(Container.java:2229)
>        at java.awt.Component.dispatchEventImpl(Component.java:4860)
>        at java.awt.Container.dispatchEventImpl(Container.java:2287)
>        at java.awt.Component.dispatchEvent(Component.java:4686)
>        at
> java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832)
>        at
> java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492)
>        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:
> 4422)
>        at java.awt.Container.dispatchEventImpl(Container.java:2273)
>        at java.awt.Window.dispatchEventImpl(Window.java:2713)
>        at java.awt.Component.dispatchEvent(Component.java:4686)
>        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:707)
>        at java.awt.EventQueue.access$000(EventQueue.java:101)
>        at java.awt.EventQueue$3.run(EventQueue.java:666)
>        at java.awt.EventQueue$3.run(EventQueue.java:664)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.security.ProtectionDomain
> $1.doIntersectionPrivilege(ProtectionDomain.java:76)
>        at java.security.ProtectionDomain
> $1.doIntersectionPrivilege(ProtectionDomain.java:87)
>        at java.awt.EventQueue$4.run(EventQueue.java:680)
>        at java.awt.EventQueue$4.run(EventQueue.java:678)
>        at java.security.AccessController.doPrivileged(Native Method)
>        at java.security.ProtectionDomain
> $1.doIntersectionPrivilege(ProtectionDomain.java:76)
>        at java.awt.EventQueue.dispatchEvent(EventQueue.java:677)
>        at
>
java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:
> 211)
>        at
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:
> 128)
>        at
>
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:
> 117)
>        at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
>        at
> java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
>        at java.awt.EventDispatchThread.run(EventDispatchThread.java:
> 90)
>
>
> ** END NESTED EXCEPTION **
>
> --
> You received this message because you are subscribed to the Google Groups
"JPassion.com: Java Programming" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
[email protected].
> For more options, visit this group at
http://groups.google.com/group/jpassion_java?hl=en.
>
>

-- 
Taran

-- 
You received this message because you are subscribed to the Google Groups 
"JPassion.com: Java Programming" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jpassion_java?hl=en.

Reply via email to