Re: DatabaseImpl error on DBConnection

"Natalia Shilenkova" <[email protected]> Sun, 11 Mar 2007 21:44:54 -0400
Newsgroups gmane.text.xml.xindice.user
Message-ID <[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
>
>