xml:
<parameterMap id= "invoiceInsertMap " class= "map " >
<parameter property= "invoicestart " jdbcType= "NUMBER " javaType= "java.lang.Long " mode= "IN "/>
<parameter property= "totalnum " jdbcType= "NUMBER " javaType= "java.lang.Integer " mode= "IN "/>
<parameter property= "invoicebookid " jdbcType= "NUMBER " javaType= "java.lang.Integer " mode= "IN "/>
</parameterMap>
<procedure id= "invoiceInsert " parameterMap= "invoiceInsertMap " >
{call invoiceInsert (?,?,?)}
</procedure>
调用:
public int invoiceInsert(InvoiceBook invoicebook) {
HashMap paramMap = new HashMap();
paramMap.put( "invoicestart ", invoicebook.getInvoicestart());
paramMap.put( "totalnum ", invoicebook.getInvoicedicid());
paramMap.put( "invoicebookid ", invoicebook.getInvoicedicid());
return invoiceDao.invoiceInsert(paramMap);
}
ibatis调用存储过程报报java.lang.NullPointerException错
------解决方法--------------------------------------------------------
<parameterMap id= invoiceInsertMap class= map >
把 map写完整 (java.util.map)看看行不行
或者 <alias>
<typeAlias alias= "map " type= "java.util.map " />
</alias>