[jboss-user] [Beginners Corner] - Re: Jboss and Oracle DB Question
jaikiran
do-not-reply at jboss.com
Wed Apr 15 12:48:06 EDT 2009
anonymous wrote : com.vitechinc.core.model.BlobType.nullSafeSet(BlobType.java:94)
Looking at this line in the code, i guess this belongs to your application and this piece of code is passing the connection to the oracle driver method which probably excepts it to be of a different type.
In your com.vitechinc.core.model.BlobType.nullSafeSet you might want to do something like:
| DataSource ds = ctx.lookup("dsname");
| Connection conn = ds.getConnection();
| // JBoss returns a "JBoss specific" wrapped connection, so let's give it a try
| if (conn instanceof org.jboss.resource.adapter.jdbc.WrappedConnection)
| {
| Connection underlyingConnection = ((WrappedConnection) conn).getUnderlyingConnection();
| // pass it on to the oracle driver
|
| }
| else {
| // pass the connection as-is to the driver
| }
All this is a guess, based on the stacktrace. Not sure whether this is going to work.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4225697#4225697
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4225697
More information about the jboss-user
mailing list