Guest User

Untitled

a guest
Aug 23rd, 2018
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.71 KB | None | 0 0
  1. getting java.io.EOFException when trying to insert data in mysql from spring mvc app
  2. org.springframework.dao.DataAccessResourceFailureException: StatementCallback; SQL [insert into networkwithusdb(company,firstname,lastname,email,address1,address2,city,state,zipcode,currentemployer,currentjobtitle,primarycareerarea,secondarycareerarea) values('HCA North Texas','dd','af','bhanukiran@imomentous.info','','','','KS','','','','Facilities','Facilities')]; Communications link failure due to underlying exception:
  3.  
  4. ** BEGIN NESTED EXCEPTION **
  5.  
  6. java.io.EOFException
  7.  
  8. STACKTRACE:
  9.  
  10. java.io.EOFException
  11. at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1963)
  12. at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2375)
  13. at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2874)
  14. at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)
  15. at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
  16. at com.mysql.jdbc.Connection.execSQL(Connection.java:3243)
  17. at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1343)
  18. at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1260)
  19. at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
  20. at org.springframework.jdbc.core.JdbcTemplate$1UpdateStatementCallback.doInStatement(JdbcTemplate.java:508)
  21. at org.springframework.jdbc.core.JdbcTemplate$1UpdateStatementCallback.doInStatement(JdbcTemplate.java:1)
  22. at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:395)
  23. at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:518)
  24. at com.imomentous.hcanorthtexas.service.DatabaseService.insertNetworkData(DatabaseService.java:58)
  25. at com.imomentous.hcanorthtexas.controller.NetworkWithUsController.processNetworkWithUSForm(NetworkWithUsController.java:62)
  26. [... snip ...]
  27.  
  28. ** END NESTED EXCEPTION **
  29.  
  30. <bean id="dataSource"
  31. class="org.apache.commons.dbcp.BasicDataSource"
  32. destroy-method="close">
  33. <property name="driverClassName">
  34. <value>${database.driver}</value>
  35. </property>
  36. <property name="url">
  37. <value>${database.url}</value>
  38. </property>
  39. <property name="username">
  40. <value>${database.username}</value>
  41. </property>
  42. <property name="password">
  43. <value>${database.password}</value>
  44. </property>
  45. <property name="maxActive" value="5" />
  46. <property name="initialSize" value="3" />
  47. <property name="validationQuery" value="SELECT 5 FROM DUAL" />
  48. <property name="testOnBorrow" value="true" />
  49.  
  50. </bean>
  51.  
  52. database.driver =com.mysql.jdbc.Driver
  53. database.url=jdbc:mysql://localhost:3306/XXXmobiledb
  54. database.username=XXXX
  55. database.password=XXXX
  56.  
  57. <property name="validationQuery">
  58. <value>Select 1</value>
  59. </property>
Add Comment
Please, Sign In to add comment