xml-xindice-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Melhuish <j.melhu...@signal.qinetiq.com>
Subject Null Pointer Exception
Date Wed, 21 Apr 2004 17:29:12 GMT
In the following line in my Java program, col returns null:

XPathQueryService service = (XPathQueryService) 

*  This error is equivalent to the database not being present.
*  I have tried several known-good versions of the code and database; 
all fail with the same error.
*  I receive the same error with Xindice 1.0 and 1.1.
*  I have tested it under Windows and Linux (both with Tomcat 4.1.27), 
both produce the same error.
*  The xindice "UglyBrowser" allows me to successfully view my database 
through Tomcat.
*  The database table is currently in the default location of 
*  I have tried db.setProperty("db-home") using relative and absolute 
paths, to no avail

I'm starting to run out of ideas now!  :-(  Niggling questions include:

*  What broke?  I haven't changed Tomcat or Xindice 1.0 on my Linux box 
since it was working, whilst the Windows box is a "fresh" installation.
*  How come the UglyBrowser works, but my code doesn't?  My code used to 

Any help or pointers would be very much appreciated!



PS:  Here's the code I'm using to connect to the database:
  public void connect() throws RepositoryException {
    try {
        Class driver = 

        // initialize a new database, then register it globally
        Database db = (Database) driver.newInstance();
        col = 
        if (col==null) {
            throw new RepositoryException("Col is null!");

View raw message