Subject Type Convertion Exception
Author Francisco Souza
Could anybody tell me what happens when this exception occurs?

org.firebirdsql.jdbc.field.TypeConvertionException: Error converting to
object.

following is the my code:
String titulo = campoTitulo.getText();
String suporte = campoSuporte.getText();
java.sql.Date data_emissao = T.setDate(campoDataEmissao.getText());
String id_cliente =
(String)htCliente.get(cbCliente.getSelectedItem());
String contato = campoContato.getText();
int prazo_entrega =
Integer.parseInt(campoDiasEntrega.getText());
int prazo_pagamento =
Integer.parseInt(campoDiasPagamento.getText());
int quantas_parcelas =
Integer.parseInt((String)cbParcela.getSelectedItem());
BigDecimal folhas_hora =
(BigDecimal)campoQuantidadeMaquina.getValue();
int reserva = cbReserva.getSelectedIndex();
int acerto = cbAcerto.getSelectedIndex();
int quantos_acertos = Integer.parseInt(campoAcertos.getText());
if(textoObservacao.getText().length()<1)
textoObservacao.setText("");
byte[] texto = textoObservacao.getText().getBytes();
java.io.InputStream bf = new java.io.ByteArrayInputStream(texto);
int tamanho = texto.length;

int codigo_servico =
Integer.parseInt((String)htServico.get((String)cbServico.getSelectedItem()))
;

try
{
PreparedStatement stm =
c.prepareCall("{call CAD_ORCAMENTO(?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?)}");
stm.setString(1, titulo);
stm.setString(2, suporte);
stm.setDate(3, data_emissao);
stm.setString(4, id_cliente);
stm.setString(5, contato);
stm.setInt(6, prazo_entrega);
stm.setInt(7, prazo_pagamento);
stm.setInt(8, quantas_parcelas);
stm.setBigDecimal(9, folhas_hora);
stm.setInt(10, reserva);
stm.setInt(11, acerto);
stm.setInt(12, quantos_acertos);
stm.setBinaryStream(13, bf,tamanho);
stm.setInt(14, codigo_servico);
stm.setString(15, T.getIP());
stm.execute();
stm.close();
}
catch(SQLException e)
{
T.Mess("Cadastrando
Orçamento",T.getStackTrace(e.fillInStackTrace()));
}

and follwing is the Tracktrace:
org.firebirdsql.jdbc.field.TypeConvertionException: Error converting to
object.
at br.com.modulos.modOrcamento.setSalvar(modOrcamento.java:1774)
at br.com.modulos.modOrcamento.access$3200(modOrcamento.java:27)
at
br.com.modulos.modOrcamento$OuvirOrcamento.actionPerformed(modOrcamento.java
:1962)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764)
at
javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButto
n.java:1817)
at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:4
19)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257)
at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener
.java:245)
at java.awt.Component.processMouseEvent(Component.java:5134)
at java.awt.Component.processEvent(Component.java:4931)
at java.awt.Container.processEvent(Container.java:1566)
at java.awt.Component.dispatchEventImpl(Component.java:3639)
at java.awt.Container.dispatchEventImpl(Container.java:1623)
at java.awt.Component.dispatchEvent(Component.java:3480)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
at java.awt.Container.dispatchEventImpl(Container.java:1609)
at java.awt.Window.dispatchEventImpl(Window.java:1590)
at java.awt.Component.dispatchEvent(Component.java:3480)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.ja
va:197)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java
:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

Thanks - Francisco
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.706 / Virus Database: 462 - Release Date: 14/06/2004