Re: DatabaseImpl error on DBConnection
"Iñaki Salinas Bueno" <[email protected]> Tue, 13 Mar 2007 19:22:44 +0100
| Newsgroups | gmane.text.xml.xindice.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Natalia, I was looking for the exception stack trace but it was not generated. But I found the problem: there were a class needed that I did not import. Yes, org.apache.xindice.client.xmldb.DatabaseImpl. It is a simple error, but the compiler did not alert me and I still do not have enough practice as to find out the type of the failure immediately. Thanks for your time 2007/3/12, Natalia Shilenkova <[email protected]>: > > Hi Iñaki, > > There is one important piece of information missing in your > description - exception stack trace. It would be much easier to find > the problem if you posted the stack trace here. You can try to look > for it in log files or Tomcat console. > > Natalia > > On 3/9/07, Iñaki Salinas Bueno <[email protected]> wrote: > > Hello, > > > > I'm using the current trunk of Xindice because I need to work with Java > > 1.5. > > This piece of code (from addressbook example) give me problems: > > > > > > > public class DBConnection extends HttpServlet { > > > > > > // Collection manager path to instantiate > > > public static final String > > XINDICEURI="xindice://localhost:8080/db/"; > > > public static final String COLLECTIONURI="xmldb:" + XINDICEURI; > > > String colstring = COLLECTIONURI + "Folder5"; > > > > > > > > > > > > > > > protected static DBConnection connection = new DBConnection(); > > > > > > > > protected static Database db = null; > > > protected static Collection collection = null; > > > > > > public Collection getCollectionInstance (HttpServletRequest request, > > HttpServletResponse response ) throws javax.servlet.ServletException, > > java.io.IOException { > > > > > > try { > > > if ( db == null ) { > > > > > > // Register the dbxml database handler > > > db = > > (Database)Class.forName("org.apache.xindice.client.xmldb.DatabaseImpl > ").newInstance(); > > > DatabaseManager.registerDatabase(db); > > > // Get a collection instance > > > collection = DatabaseManager.getCollection( colstring ); > > > } > > > > > > > The error message returned is > > "org.apache.xindice.client.xmldb.DatabaseImpl". When I was > > working with Java 1.4 I did not have this error. Is it working with > current > > trunk of Xindice related? or am I forbidden something? > > > > I tried passing 'user' and 'password' parameters to the 'getCollection' > > function, but this is not the problem. I can not found it. > > > > Thanks for your help > > > > Iñaki > > > > >