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
