您好我有以下代码
public Object[] callProcedureForChargeAndBillGen(TPCommonParamDTO dto) throws TownPlanningException
{
Object[][] array1 = new Object[dto.getAreaDTOs().size()][7];
Object[][] array2 = new Object[0][];
Object[] arrObj =null;
int i = 0;
UsageAndAreaDTO areaDTO = null;
try {
arrObj = new Object[dto.getAreaDTOs().size()];
connection = new C3P0NativeJdbcExtractorImpl().getNativeConnection(datasourceLoader.getConnection());
structDescriptor = StructDescriptor.createDescriptor(TownPlanningConstant.PROCUDURE.ARRAY.TP_OBJ_BILL_DETAIL_PARAM, connection);
for(i=0;i<dto.getAreaDTOs().size();i++)
{
areaDTO = dto.getAreaDTOs().get(i);
array1[i][0] = areaDTO.getUtp1();
array1[i][1] = areaDTO.getUtp2();
array1[i][2] = areaDTO.getUtp3();
array1[i][3] = areaDTO.getUtp4();
array1[i][4] = areaDTO.getUtp5();
array1[i][5] = areaDTO.getBuildHeight();
array1[i][6] = areaDTO.getCoverArea();
arrObj[i] = new STRUCT(structDescriptor, connection, array1[i]);
}
array1Descriptor = ArrayDescriptor.createDescriptor(TownPlanningConstant.PROCUDURE.ARRAY.TP_BILL_DETAIL_PARAM, connection);
inputArray1 = new ARRAY(array1Descriptor, connection, array1);
/*array2Descriptor = ArrayDescriptor.createDescriptor(TownPlanningConstant.PROCUDURE.ARRAY.TP_TYPE_BILL_DETAIL, connection);
inputArray2 = new ARRAY(array2Descriptor, connection, array2);*/
callableStatement = connection.prepareCall(TownPlanningConstant.PROCUDURE.PR_TP_BILL_GEN);
callableStatement.setLong(1, dto.getOrgId());
callableStatement.setLong(2, dto.getServiceid());
callableStatement.setLong(3, dto.getApplicationId());
callableStatement.setDate(4,new java.sql.Date(dto.getApplicationDate().getTime()));
callableStatement.setString(5, dto.getCalcFlag());
callableStatement.setString(6, dto.getChargeType());
if(dto.getConctrNtr() == null)
{
callableStatement.setString(7, "");
}
else
{
callableStatement.setLong(7, dto.getConctrNtr());
}
if(dto.getPayMode() == null)
{
callableStatement.setString(8, "");
}
else
{
callableStatement.setLong(8, dto.getPayMode());
}
if(dto.getChallanId() == null)
{
callableStatement.setString(9, "");
}
else
{
callableStatement.setLong(9, dto.getChallanId());
}
if(dto.getCbbBankId() == null)
{
callableStatement.setString(10, "");
}
else
{
callableStatement.setLong(10, dto.getCbbBankId());
}
if(dto.getAccountId() == null)
{
callableStatement.setString(11, "");
}
else
{
callableStatement.setLong(11, dto.getAccountId());
}
if(dto.getDrawOn() == null)
{
callableStatement.setString(12, "");
}
else
{
callableStatement.setString(12, dto.getDrawOn());
}
if(dto.getChqDdNo() == null)
{
callableStatement.setString(13, "");
}
else
{
callableStatement.setLong(13, dto.getChqDdNo());
}
if(dto.getChqDdDate() == null)
{
callableStatement.setString(13, "");
}
else
{
callableStatement.setDate(14, new java.sql.Date(dto.getChqDdDate().getTime()));
}
callableStatement.setLong(15, dto.getUserId());
callableStatement.setInt(16, dto.getLangId());
callableStatement.setString(17, Utility.getMacAddress());
callableStatement.setArray(20, inputArray1);
//callableStatement.setNull(21, Types.NULL);
callableStatement.registerOutParameter(18, Types.DOUBLE);
callableStatement.registerOutParameter(19, Types.CHAR);
callableStatement.registerOutParameter(20, Types.STRUCT);
callableStatement.registerOutParameter(21, Types.STRUCT);
callableStatement.executeUpdate();
}
catch(SQLException e)
{
e.printStackTrace();
throw new RuntimeException(e.toString());
}
catch(Exception e)
{
e.printStackTrace();
throw new RuntimeException(e.toString());
}
finally
{
try
{
connection.close();
}
catch (SQLException e)
{
e.printStackTrace();
}
}
return null;
}
我正在获得例外
java.sql.SQLException: ORA-03115: unsupported network datatype or representation
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:204)
at oracle.jdbc.driver.T4CCallableStatement.executeForRows(T4CCallableStatement.java:1007)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1315)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3657)
at oracle.jdbc.driver.OracleCallableStatement.executeUpdate(OracleCallableStatement.java:4739)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:1350)
at com.abm.mainet.tp.dao.TPCommonDAO.callProcedureForChargeAndBillGen(TPCommonDAO.java:358)
at com.abm.mainet.tp.service.TPCommonService.callProcedureForChargeAndBillGen(TPCommonService.java:145)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy239.callProcedureForChargeAndBillGen(Unknown Source)
at com.abm.mainet.tp.ui.model.TPLoiFormModel.calculateLoiChrgesForBP(TPLoiFormModel.java:189)
at com.abm.mainet.tp.ui.model.TPLoiFormModel.viewLoiProcess(TPLoiFormModel.java:120)
at com.abm.mainet.tp.ui.model.TPLoiFormModel.viewLOIForm(TPLoiFormModel.java:102)
at com.abm.mainet.tp.ui.controller.TPLoiFormController.viewLOIForm(TPLoiFormController.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
请同样需要