Examples of HibernateException


Examples of com.dotcms.repackage.net.sf.hibernate.HibernateException

    try {
      _ds = DbConnectionFactory.getDataSource();
    }
    catch (Exception e) {
      throw new HibernateException(e.getMessage());
    }
  }
View Full Code Here

Examples of net.sf.hibernate.HibernateException

  public void configure(Properties props) throws HibernateException {
    this.dataSource = LocalSessionFactoryBean.getConfigTimeDataSource();
    // absolutely needs thread-bound DataSource to initialize
    if (this.dataSource == null) {
      throw new HibernateException("No local DataSource found for configuration - " +
          "dataSource property must be set on LocalSessionFactoryBean");
    }
    this.dataSourceToUse = getDataSourceToUse(this.dataSource);
  }
View Full Code Here

Examples of org.hibernate.HibernateException

    if(dataSource != null)
    try {
      Method mClose = dataSource.getClass().getMethod("close", null);
      mClose.invoke(dataSource, null);
    } catch (Exception e) {
      throw new HibernateException(e);
    }
    dataSource = null;
  }
View Full Code Here

Examples of org.hibernate.HibernateException

        value = StringUtils.replace(value, "{DLOG4J}", Globals.WEBAPP_PATH);
        new_props.setProperty(key.substring(BASE_KEY.length()), value);
      }
    }
    if(dataSourceClass == null)
      throw new HibernateException("Property 'dscp.datasource' no defined.");
    try {
      dataSource = (DataSource)Class.forName(dataSourceClass).newInstance();
      BeanUtils.populate(dataSource, new_props);
    } catch (Exception e) {
      throw new HibernateException(e);
    }
  }
View Full Code Here

Examples of org.hibernate.HibernateException

        IndexWriter iw = new IndexWriter(directory,
            new StandardAnalyzer(), create);
        iw.close();
      }
    } catch (IOException e) {
      throw new HibernateException("Unable to initialize index: "
          + indexFile, e);
    }
    dp = new DynamicFSDirectoryProvider(indexName, localdp.getIndexProps(),
        localdp.getSearchFactoryImplementor());
    ReaderProvider rp = localdp.getSearchFactoryImplementor()
View Full Code Here

Examples of org.hibernate.HibernateException

  public DynamicFSDirectoryProvider(String indexName,Properties indexProps, SearchFactoryImplementor searchFactoryImplementor){
    this.indexName=indexName;
    try {
      directory = FSDirectory.getDirectory( indexName );
    } catch (IOException e) {
      throw new HibernateException( "Unable to initialize index: " + indexName, e );
    }
    configureOptimizerStrategy(searchFactoryImplementor, indexProps, this);
    configureIndexingParameters(searchFactoryImplementor, indexProps, this);
    if ( !searchFactoryImplementor.getLockableDirectoryProviders().containsKey( this ) ) {
      searchFactoryImplementor.getLockableDirectoryProviders().put( this, new ReentrantLock() );
View Full Code Here

Examples of org.hibernate.HibernateException

      }
      indexName = indexDir.getCanonicalPath();
      directory = FSDirectory.getDirectory( indexName );
    }
    catch (IOException e) {
      throw new HibernateException( "Unable to initialize index: " + directoryProviderName, e );
    }

  }
View Full Code Here

Examples of org.hibernate.HibernateException

      }
      Loader loader = getLoader( sess, searchFactoryImplementor );
      return new IteratorImpl( infos, loader );
    }
    catch (IOException e) {
      throw new HibernateException( "Unable to query Lucene index", e );
    }
    finally {
      try {
        searchFactoryImplementor.getReaderProvider().closeReader( searcher.getIndexReader() );
      }
View Full Code Here

Examples of org.hibernate.HibernateException

        searchFactory.getReaderProvider().closeReader( searcher.getIndexReader() );
      }
      catch (SearchException ee) {
        //we have the initial issue already
      }
      throw new HibernateException( "Unable to query Lucene index", e );
    }
  }
View Full Code Here

Examples of org.hibernate.HibernateException

      else {
        return resultTransformer.transformList( list );
      }
    }
    catch (IOException e) {
      throw new HibernateException( "Unable to query Lucene index", e );
    }
    finally {
      try {
        searchFactoryImplementor.getReaderProvider().closeReader( searcher.getIndexReader() );
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.