我現在覺得也是。現在我就感覺到了這一點。因為我現在保存數據有時會出錯,現在正在找原因,郁悶了一下午了。:<
出錯信息如下:
java.lang.ArrayIndexOutOfBoundsException//數組越界?
at java.lang.System.arraycopy(Native Method)
at com.microsoft.jdbc.sqlserver.tds.TDSRPCParameter.write(Unknown Source
)
at $Proxy5.addShipment(Unknown Source)//我在action(control)中調用了DAO中的方法,Unknown Source不知是為會什么?因為在action的類中我用了一個這樣一方法,shipmentDAO.addShipment(this),this代表了本身的對象,用來(獲取)傳送頁面請求的數據到DAO中。不知前輩們是怎么處理這個地方的?
at com.legend.shipment.web.Shipment2Action.saveShipment(Shipment2Action.
java:196)//這個出錯的類的方法出錯的語句, shipmentDAO.addShipment(this);
還有就是:
org.springframework.transaction.TransactionSystemException: Could not roll back
Hibernate transaction; nested exception is org.hibernate.TransactionException: J
DBC rollback failed
org.hibernate.TransactionException: JDBC rollback failed
WARN - DefaultActionInvocation.executeResult(260) | No result defined for action
com.legend.shipment.web.Shipment2Action and result null
下面這個不知會不會有問題出現呢?
at com.legend.shipment.dao.hibernate.ShipmentDAOHibernate.generateShipNu
m(ShipmentDAOHibernate.java:198)
//Query query = session.createQuery(sql);
// query.setLong("jftJsId",jsoId.longValue());它們有可能會出現上面出現的錯誤嗎?
回復 更多評論