Hibernate ORM HibernateException - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Hibernate ORM HibernateException class.

This code example shows how to use the following methods:
	public Session currentSession() throws HibernateException {
		try { 
			return (org.hibernate.classic.Session) SessionFactoryUtils.doGetSession(this.sessionFactory, false);
		} 
		catch (IllegalStateException ex) {
			throw new HibernateException(ex.getMessage());
		} 
	} 
 
} 
Full Snippet Info
10
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getMessage
	 * Create a new HibernateSystemException, 
	 * wrapping an arbitrary HibernateException. 
	 * @param cause the HibernateException thrown 
	 */ 
	public HibernateSystemException(HibernateException cause) {
		super(cause != null ? cause.getMessage() : null, cause);
	} 
 
} 
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getCause, getMessage
import org.hibernate.StaleObjectStateException;
import org.hibernate.StaleStateException;
import org.hibernate.TransientObjectException;
import org.hibernate.UnresolvableObjectException;
import org.hibernate.WrongClassException;
import org.hibernate.dialect.lock.OptimisticEntityLockException;
import org.hibernate.dialect.lock.PessimisticEntityLockException;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.exception.ConstraintViolationException;
import org.hibernate.exception.DataException;
import org.hibernate.exception.JDBCConnectionException;
import org.hibernate.exception.LockAcquisitionException;
import org.hibernate.exception.SQLGrammarException;
import org.hibernate.service.spi.Wrapped;
 
import org.springframework.dao.CannotAcquireLockException; 
import org.springframework.dao.DataAccessException; 
import org.springframework.dao.DataAccessResourceFailureException; 
import org.springframework.dao.DataIntegrityViolationException; 
import org.springframework.dao.DuplicateKeyException; 

8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
This code example shows how to use the following methods:
    public static final char NOT_NULL_PREFIX = '_';
 
    @Override 
    public String fromNonNullValue(String s) {
        if (s.charAt(0) != NOT_NULL_PREFIX) {
            throw new HibernateException("Persistent storage of " + this.getClass().getName() + " corrupted, database contained string [" + s + "] which should be prefixed by: " + NOT_NULL_PREFIX);
        } 
 
        return s.substring(1);
    } 
 
    @Override 
    public String toNonNullValue(String value) {
        return NOT_NULL_PREFIX + value;
    } 
} 
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods: getMessage
	 * Create a new HibernateSystemException, 
	 * wrapping an arbitrary HibernateException. 
	 * @param cause the HibernateException thrown 
	 */ 
	public HibernateSystemException(HibernateException cause) {
		super(cause != null ? cause.getMessage() : null, cause);
	} 
 
} 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
	@Override 
	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);
	} 
 
	/** 
	 * Return the DataSource to use for retrieving Connections. 
	 * <p>This implementation returns the passed-in DataSource as-is. 
	 * @param originalDataSource the DataSource as configured by the user 
	 * on LocalSessionFactoryBean 
	 * @return the DataSource to actually retrieve Connections from 
	 * (potentially wrapped) 
	 * @see LocalSessionFactoryBean#setDataSource 
	 */ 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
	} 
	/** 
	 * @param s 
	 */ 
	public JDBCBinderException(String s) { 
		super(s); 
	} 
 
} 
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
		} 
		catch (ClassNotFoundException ex) {
			throw new HibernateException("Couldn't clone BLOB contents", ex);
		} 
		catch (IOException ex) {
			throw new HibernateException("Couldn't clone BLOB contents", ex);
		} 
	} 
 
	@Override 
	protected Object nullSafeGetInternal( 
			ResultSet rs, String[] names, Object owner, LobHandler lobHandler)
			throws SQLException, IOException, HibernateException {
 
		InputStream is = lobHandler.getBlobAsBinaryStream(rs, names[0]);
		if (is != null) {
			ObjectInputStream ois = new ObjectInputStream(is);
			try { 
				return ois.readObject();
			} 
Full Snippet Info
7
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE
This code example shows how to use the following methods:
        } 
        catch (InstantiationException e) { 
            throw new HibernateException("Could not instantiate result class: " + instantiatedClass.getName());
        } 
        catch (IllegalAccessException e) {
            throw new HibernateException("Could not instantiate result class: " + instantiatedClass.getName());
        } 
    } 
} 
Full Snippet Info
8
CodeRank
Stop searching for code, let great code find you!  Add Codota to your java IDE