Re: ClassCastException
Ben McCann <[email protected]>
| Newsgroups | gmane.text.xml.xindice.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, I simply copied xindice.war into the web-apps directory. I didn't do any other setup. I figured since I'm using Xindice 1.1, the embedded driver would be the correct choice, but I'm not sure about this. I would assume my database is of type org.xmldb.api.base.Database. Here are my imports though: import java.io.Serializable; import org.xmldb.api.base.*; import org.xmldb.api.modules.*; import org.xmldb.api.*; Thanks, Ben CORMIER Mario wrote: >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 > > > >