For Programmers: Free Programming Magazines  


Home > Archive > Java Beans > July 2004 > SQLException with CMP in JBoss









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author SQLException with CMP in JBoss
Omid

2004-07-22, 8:56 am

Hi,

I get the following error from JBoss

01:47:09,705 ERROR [LogInterceptor] TransactionRolledbackException in
method: pu
blic abstract java.lang.String
libraryproject.ejb.ManageBooks.getTestDouble() th
rows java.rmi.RemoteException, causedBy:
java.sql.SQLException: Wrong data type: type: VARBINARY (-3) expected:
INTEGER v
alue: [B@5ba50e

The code that causes this error is something like this:

....
Book b = bHome.findByPrimaryKey("1"); //It's OK and no FinderException
occures
String s = b.getAuthor(); //Causes a RemoteException (originally
SQLException)
....

I wonder why this happens because the entity bean, Book, is container
managed and is successfully deployed.

I'm using JBoss's built-in HSQL Server.

I'd be glad if anyone help.

Regards,
Omid
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com