Hi all,
I am trying to insert into a database an ArrayList with some strings and a blob
fields.
I have
public class Atributos implements Serializable
{
private long idOracle_;
private String nombreTabla_;
private ArrayList nombresAtributo_;
private ArrayList valoresAtributo_;
public long getIdOracle_() {return idOracle_;}
public String getNombreTabla_() {return nombreTabla_;}
public ArrayList getNombresAtributo_() {return nombresAtributo_;}
public ArrayList getValoresAtributo_() {return valoresAtributo_;}
public void setIdOracle_(long id) {idOracle_= id;}
public void setNombreTabla_(String nombre) {nombreTabla_= nombre;}
public void setNombresAtributo_(ArrayList nombresAtributo) {nombresAtributo_=
nombresAtributo;}
public void setValoresAtributo_(ArrayList valoresAtributo) {valoresAtributo_=
valoresAtributo;}
}
and the insert is:
select PLM2ERP_seq.nextval as P_ORA_ID from dual
INSERT INTO
$nombreTabla_$
(
P_ORA_ID,
$nombresAtributo_[]$
)
VALUES
(
#idOracle_#,
#valoresAtributo_[]#
)
and when I call the sql function as
pIdOracle = (Integer)sqlMap.insert("setElementos", atribs);
where atribs is an ArrayList which have:
nombresAtributo_={'String0','String1','String2','String3'}
valoresAtributo_={'valueString0','valueString1',BLOB,'valueString3'}
and the String2 is the name of the db table field which is a BLOB field.
But I receive the error:
ERROR [main] (ElementosDAO.java:66) - --- The error occurred while applying a
parameter map.
--- Check the setElementos-InlineParameterMap.
--- Check the parameter mapping for the 'valoresAtributo_[2]' property.
--- Cause:
java.lang.NullPointerExceptioncom.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred while applying a parameter map.
--- Check the setElementos-InlineParameterMap.
--- Check the parameter mapping for the 'valoresAtributo_[2]' property.
--- Cause: java.lang.NullPointerException
Can anybody help me? Thanks a lot
_________________________________________________________________
¡Ya está aquí Windows Live Spaces! Ahora podrás crear fácilmente tu propio
sitio Web.
http://spaces.live.com/signup.aspx