Package org.apache.xindice.util

Examples of org.apache.xindice.util.XindiceException


            }
            try {
                // In case home has been specified as relative path convert it to absolute path
                dbrootDir = new File(home, dbroot).getCanonicalFile();
            } catch (IOException e) {
                throw new XindiceException("Can't get canonical path", e);
            }
        }
        setCollectionRoot(dbrootDir);
        if (log.isInfoEnabled()) {
            log.info("Database points to " + dbrootDir.getAbsolutePath());
        }

        // Put a lock (at least attempt to) on the database
        // FIXME: Use JDK1.4 FileLock
        File lock = new File(getCollectionRoot(), "db.lock");
        try {
            if (lock.exists() && !lock.delete()) {
                throw new IOException("Could not delete lock file.");
            }
            this.lock = new FileOutputStream(lock);
            this.lock.write(new Date().toString().getBytes());
        } catch (IOException e) {
            throw new XindiceException("Unable to open lock file " + lock + ". " +
                                       "Make sure database is not open by another process. " +
                                       "Exception: " + e);
        }

        // Now we are ready to open it up
View Full Code Here


    public DOMParser() throws XindiceException {
        try {
            sp = getSAXParser();
        } catch (Exception e) {
            log.warn("Failed to create SAXParser", e);
            throw new XindiceException("Error creating parser", e);
        }
    }
View Full Code Here

        try {
            DOMParser dp = new DOMParser();
            dp.parse(input);
            return dp.getDocument();
        } catch (Exception e) {
            throw new XindiceException("Error parsing Document", e);
        }
    }
View Full Code Here

        try {
            DOMParser dp = new DOMParser();
            dp.parse(xml);
            return dp.getDocument();
        } catch (Exception e) {
            throw new XindiceException("Error parsing Document", e);
        }
    }
View Full Code Here

        try {
            DOMParser dp = new DOMParser();
            dp.parse(value);
            return dp.getDocument();
        } catch (Exception e) {
            throw new XindiceException("Error parsing Document", e);
        }
    }
View Full Code Here

        try {
            DOMParser dp = new DOMParser();
            dp.parse(source);
            return dp.getDocument();
        } catch (Exception e) {
            throw new XindiceException("Error parsing Document", e);
        }
    }
View Full Code Here

        try {
            DOMParser dp = new DOMParser();
            dp.parse(input);
            return dp.getDocument();
        } catch (Exception e) {
            throw new XindiceException("Error parsing Document", e);
        }
    }
View Full Code Here

        try {
            DOMParser dp = new DOMParser();
            dp.parse(xml);
            return dp.getDocument();
        } catch (Exception e) {
            throw new XindiceException("Error parsing Document", e);
        }
    }
View Full Code Here

            np.printStackTrace(System.out);
         throw new NullPointerException("ERROR : " + np);

      } catch (Exception e) {
            e.printStackTrace(System.out);
            throw new XindiceException("ERROR : " + e);
      }
   }
View Full Code Here

    }

    public void createIndexer(String path, Document indexDoc) throws Exception {
        Collection col = DatabaseManager.getCollection(driver + "/" + path);
        if (col == null) {
            throw new XindiceException("DatabaseManager.getCollection(" + driver + "/" + path + ") returned null");
        }
        CollectionManager service = (CollectionManager) col.getService("CollectionManager", "1.0");

        service.createIndexer(indexDoc);
    }
View Full Code Here

TOP

Related Classes of org.apache.xindice.util.XindiceException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.