[jboss-user] [Datasource Configuration] - Oracle User Type Mappings

Bob Frapples do-not-reply at jboss.com
Tue Jul 13 13:39:25 EDT 2010

Bob Frapples [http://community.jboss.org/people/ThisRegistrationSucks] created the discussion

"Oracle User Type Mappings"

To view the discussion, visit: http://community.jboss.org/message/552379#552379

I have inherited an application system where all of the business logic takes place in the database.  All of the application calls to the database interface with Functions and Stored Procedures and use Oracle User Data Types as both IN and OUT parameters.  I'm working on converting the front end to use Spring w/ Hibernate and I am extending the org.springframework.jdbc.object.StoredProcedure class to interact with the database. 

If I define the datasource in the Spring configuration file I am able to call getConnection().setTypeMap(Map<String, Class<?>> on the datasource and everything works fine. 

However I would like to configure the datasource in JBoss and use a JNDI lookup to get a connection from the pool.  When I do this, the .setTypeMap(Map<String, Class<?>> method no longer seems to work.  I keep getting the exception:

java.lang.ClassCastException: oracle.sql.STRUCT cannot be cast to ............

I tried editing the standardjbosscmp-jdbc.xml file and adding the mappings there but that did not work.

So how can I set the Type Map for the JBoss DataSource?

JBoss 5.1
Spring 3.0
Hibernate 3.3



Reply to this message by going to Community

Start a new discussion in Datasource Configuration at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100713/b8ef7766/attachment.html 

More information about the jboss-user mailing list