He's casting what was returned from executeQuery so that he can call
getUnderLyingResultSet.

Filip Hanik wrote:
> 
> getUnderLyingResultSet returns a java.sql.ResultSet, and if you are using
> racle then it returns oracle.jdbc.ResultSet or something like that, you have
> to look up the exact class.
> you get a classcast exception because you think it is a Minerva resultset.
> 
> getUnderLyingResultSet returns the actual driver's result set, not minervas
> 
> filip
> 
> ~
> Namaste - I bow to the divine in you
> ~
> Filip Hanik
> Software Architect
> [EMAIL PROTECTED]
> www.filip.net
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of Jose Ramon
> > Diaz
> > Sent: Thursday, April 19, 2001 10:42 AM
> > To: JBOSS Mail List
> > Subject: [JBoss-user] ResultSet or minerva.ResultSetInPool
> >
> >
> > Hi,
> >
> >     We are trying to obtain a ResultSet from an Oracle database. We find
> > a trouble with Minerva types,
> >     We are using JBoss 2.2, with JDBC 2.0 and Oracle 8.1.7.
> >
> >     We are using MinervaPool driver for the JDBC. In our configuration
> > files,
> >       -  jboss.jcml: We use  'org.jboss.minerva.xa.XADataSourceImpl' in
> > the Pool configuration
> >       -  jboss.properties:
> > #jboss.xa.xidclass=oracle.jdbc.xa.OracleXid
> >
> >   First, is OraclePool (oracle.jdbc.xa.client.OracleXADataSource) better
> > than MinervaPool (org.jboss.minerva.xa.XADataSourceImpl) ?
> >   Second, When we try to execute a ResultSet from the EJB it throws:
> >
> >     [noticiasAccesoBD] Exception in
> > noticiasAccesoBD::obtenerNoticiasBoletin()
> >     [noticiasAccesoBD] java.lang.ClassCastException:
> > org.opentools.minerva.jdbc.ResultSetInPool
> >     [noticiasAccesoBD]      at
> > es.westlaw.noticiasAccesoBDBean.obtenerNoticiasBoletin(Compiled Code)
> >
> >   The code we use:
> >          l_query    = "SELECT noticia FROM noticias";
> >          l_pstmt = l_con.prepareStatement(l_query);
> >          l_rst   = l_pstmt.executeQuery();
> >         // which of the next two lines should be here??
> > //      l_rst2 =
> > ((org.jboss.minerva.jdbc.ResultSetInPool)l_rst).getUnderlyingResultSet()
> > ; // JBOSS
> >         l_rst2 =
> > ((org.opentools.minerva.jdbc.ResultSetInPool)l_rst).getUnderlyingR
> > esultSet()
> > ; // JBOSS
> >         while (l_rst2.next())
> >        {
> >             l_noticiasCLOB  = ((OracleResultSet)l_rst2).getCLOB(1);
> >        }
> >
> >    Any help would be appreciated...
> >
> >     Thanks in advance...
> >
> >           Jose R. & Juan
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
> >
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
Confidential e-mail for addressee only.  Access to this e-mail by anyone else is 
unauthorized.
If you have received this message in error, please notify the sender immediately by 
reply e-mail 
and destroy the original communication.


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to