Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- getting java.io.EOFException when trying to insert data in mysql from spring mvc app
- 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:
- ** BEGIN NESTED EXCEPTION **
- java.io.EOFException
- STACKTRACE:
- java.io.EOFException
- at com.mysql.jdbc.MysqlIO.readFully(MysqlIO.java:1963)
- at com.mysql.jdbc.MysqlIO.reuseAndReadPacket(MysqlIO.java:2375)
- at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2874)
- at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1623)
- at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1715)
- at com.mysql.jdbc.Connection.execSQL(Connection.java:3243)
- at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1343)
- at com.mysql.jdbc.Statement.executeUpdate(Statement.java:1260)
- at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(DelegatingStatement.java:228)
- at org.springframework.jdbc.core.JdbcTemplate$1UpdateStatementCallback.doInStatement(JdbcTemplate.java:508)
- at org.springframework.jdbc.core.JdbcTemplate$1UpdateStatementCallback.doInStatement(JdbcTemplate.java:1)
- at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:395)
- at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:518)
- at com.imomentous.hcanorthtexas.service.DatabaseService.insertNetworkData(DatabaseService.java:58)
- at com.imomentous.hcanorthtexas.controller.NetworkWithUsController.processNetworkWithUSForm(NetworkWithUsController.java:62)
- [... snip ...]
- ** END NESTED EXCEPTION **
- <bean id="dataSource"
- class="org.apache.commons.dbcp.BasicDataSource"
- destroy-method="close">
- <property name="driverClassName">
- <value>${database.driver}</value>
- </property>
- <property name="url">
- <value>${database.url}</value>
- </property>
- <property name="username">
- <value>${database.username}</value>
- </property>
- <property name="password">
- <value>${database.password}</value>
- </property>
- <property name="maxActive" value="5" />
- <property name="initialSize" value="3" />
- <property name="validationQuery" value="SELECT 5 FROM DUAL" />
- <property name="testOnBorrow" value="true" />
- </bean>
- database.driver =com.mysql.jdbc.Driver
- database.url=jdbc:mysql://localhost:3306/XXXmobiledb
- database.username=XXXX
- database.password=XXXX
- <property name="validationQuery">
- <value>Select 1</value>
- </property>
Add Comment
Please, Sign In to add comment