Thorsten,

no, it's no problem of the driver: EJBWizard (tool for bean creation, mentioned on 
JOnAS site) asks the driver for the type
and creates code for beans. This tool tells me, it's an SMALLINT. For this tools does 
this check by means of JDBC, the driver
seems to work correct.

So it IS a matter of GenIC.

Markus


> I think it is not a matter of jonas or genic but of your database driver. It
> obviously returns integer although the type of the database field is
> smallint or whatever. To my opinion, all  you can do (which is pretty
> simple) is to declare the return type of your bean method the same as the
> database driver returns, that is, integer instead of short...
>
>
> Torsten
>
>
> I have a table with a field of type SMALLINT that may contain NULL. For I
> need to know if the field is NULL, I have a field
> of class java.lang.Short but not of type short to store that information.
> GenIC 2.2.6 does a
> ...(java.lang.Short)rs.getObject("MyColumn"); out of this. At run time, this
> throws a cast >exception, because (why ever, I
> don't know) the resultset delivers an instance of java.lang.Integer, what
> cannot be casted to java.lang.Short.
>
> There is no error in my bean. SMALLINT has to be converted to
> java.lang.Short, this is quite clear, and I used
> java.lang.Short at every place.
>
> What can I do?
> ----
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body of the message "unsubscribe jonas-users".
> For general help, send email to [EMAIL PROTECTED] and
> include in the body of the message "help".
>
> To: [EMAIL PROTECTED]

Reply via email to