Re: [JBoss-user] JBoss 3.2.4 and Oracle9i: SQLException: Invalid conversion requested

2004-01-05 Thread Frank Langelage
shubhu mutta wrote:

The exception is thrown when setting the value for a

EJB-Field of type Short.

The default typemapping for Oracle9i is choosen

(NUMERIC/NUMBER(5) ( specified in 
standarjaws.xml,standardjbosscmp-jdbc.xml).

Has anybody encountered this problem ?

Is it a bug with Oracle Client 9.2.0.4 ?

Don't know if this is a bug, but the problem was recently solved in 
Branch_3_2 (3.2.4RC1) by changing the Oracle9i typemapping for 
java.lang.Short from NUMERIC/NUMBER(5) to SMALLINT/NUMBER(5). Thanks to 
Adrian Brock.
With this change the problem went away for me and all works like before.

Regards
Frank
---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


RE: [JBoss-user] JBoss 3.2.4 and Oracle9i: SQLException: Invalid conversion requested

2003-12-23 Thread Alexey Loubyansky
So it means ps.setObject(index, value, jdbcType) does not work with this
driver. It is definitely not JBoss' fault. To be sure, you could try the
previous JBoss with the new Oracle.

> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Frank Langelage
> Sent: Tuesday, December 23, 2003 11:52 PM
> To: [EMAIL PROTECTED]
> Subject: [JBoss-user] JBoss 3.2.4 and Oracle9i: SQLException: 
> Invalid conversion requested
> 
> I recently update my software components:
> - Oracle from 9.2.0.1 to 9.2.0.4
> - JBoss to current Branch 3.2 (3.2.4RC1)
> - XDoclet from 1.2b3 to 1.2
> 
> After that I tried to execute my ejb test-app and got this in 
> server.log:
> ERROR [org.jboss.ejb.plugins.LogInterceptor.handleException]
> TransactionRolledbackLocalException in method:
> public abstract ejb.common.entity.interfaces.CountryLocal
> ejb.common.entity.interfaces.CountryHomeLocal.create(java.lang
> .Short,java.
> lang.String,java.lang.String,java.lang.String) throws 
> javax.ejb.CreateException, causedBy:
> java.sql.SQLException: Invalid conversion requested
> at 
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
> at 
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
> at 
> oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
> at
> oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePre
> paredStatement.java:2901)
> at
> org.jboss.resource.adapter.jdbc.CachedPreparedStatement.setObj
> ect(CachedPreparedStatement.java:158)
> at
> org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.setOb
> ject(WrappedPreparedStatement.java:604)
> at
> org.jboss.ejb.plugins.cmp.jdbc.JDBCUtil.setParameter(JDBCUtil.
> java:1267)
> at
> org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBrid
> ge.setArgumentParameters(JDBCAbstractCMPFieldBridge.java:35
> 4)
> at
> org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCAbstractCMPFieldBrid
> ge.setInstanceParameters(JDBCAbstractCMPFieldBridge.java:33
> 6)
> at
> org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.perfo
> rmInsert(JDBCAbstractCreateCommand.java:283)
> at
> org.jboss.ejb.plugins.cmp.jdbc.JDBCAbstractCreateCommand.execu
> te(JDBCAbstractCreateCommand.java:138)
> at
> org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.createEntity(J
> DBCStoreManager.java:554)
> at
> org.jboss.ejb.plugins.CMPPersistenceManager.createEntity(CMPPe
> rsistenceManager.java:208)
> at
> org.jboss.resource.connectionmanager.CachedConnectionIntercept
> or.createEntity(CachedConnectionInterceptor.java:269)
> at
> org.jboss.ejb.EntityContainer.createLocalHome(EntityContainer.
> java:581)
> 
> All worked fine before the software updates.
> The exception is thrown when setting the value for a 
> EJB-Field of type Short.
> There is no jdbc- or sql-type in jbosscmp-jdbc.xml for this 
> field, so the dafault typemapping for Oracle9i is choosen 
> (NUMERIC/NUMBER(5)).
> 
> Adding this
> 1258a1259,1262
>  > else if(value instanceof Short)
>  > {
>  >ps.setShort(index, ((Short)value).shortValue());
>  > }
> to 
> server/src/main/org/jboss/ejb/plugins/cmp/jdbc/JDBCUtil.java 
> solved the problem.
> 
> Has anybody else seen this problem ?
> Do you approve that this is probably a oracle-jdbc bug ?
> 
> My datasource definition is like this
> 
>   
> OracleDS
> jdbc:oracle:thin:@sb150:1521:PROD
> oracle.jdbc.OracleDriver
> xxx
> xxx
> 
> org.jboss.resource.adapter.jdbc.v
endor.OracleExceptionSorter
> 
> 1000
>   
> 
> 
> and I use ojdbc14.jar.
> 
> Regards
> Frank
> 
> 
> ---
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills.  Sign 
> up for IBM's Free Linux Tutorials.  Learn everything from the 
> bash shell to sys admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> ___
> JBoss-user mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-user
> 




---
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user