RE: ClassCastException

"CORMIER Mario" <[email protected]>
Newsgroups gmane.text.xml.xindice.user
Message-ID <[email protected]>
First, is your Database type below a org.xmldb.api.base.Database?  Hard
to tell without the imports.

Second, we are using Xindice in embedded mode also, but are using
org.apache.xindice.client.xmldb.DatabaseImpl as the driver type.

That's what comes to mind...

Mario

-----Original Message-----
From: Ben McCann [mailto:[email protected]] 
Sent: Wednesday, May 18, 2005 10:49 AM
To: [email protected]
Subject: ClassCastException

Hi,
I am trying to query a Xindice database within a .jsp page through the 
use of a Java Bean.  Within Tomcat I am getting 
"java.lang.ClassCastException: 
org.apache.xindice.client.xmldb.embed.DatabaseImpl".  The following code

is in my Bean:
          String driver = 
"org.apache.xindice.client.xmldb.embed.DatabaseImpl";
          Class c = Class.forName(driver);
          Database database = (Database) c.newInstance();   << Line 
creating the exception
          DatabaseManager.registerDatabase(database);

Any thoughts?

Thanks,
Ben McCann
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.