Package net.sf.hibernate

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


    try {
      return nullSafeGetInternal(rs, rs.findColumn(names[0]), this.lobHandler);
    }
    catch (IOException ex) {
      throw new HibernateException("I/O errors during LOB access", ex);
    }
  }
View Full Code Here

    LobCreator lobCreator = this.lobHandler.getLobCreator();
    try {
      nullSafeSetInternal(st, index, value, lobCreator);
    }
    catch (IOException ex) {
      throw new HibernateException("I/O errors during LOB access", ex);
    }
    LobCreatorUtils.registerTransactionSynchronization(lobCreator, this.jtaTransactionManager);
  }
View Full Code Here

      finally {
        ois.close();
      }
    }
    catch (ClassNotFoundException ex) {
      throw new HibernateException("Couldn't clone BLOB contents", ex);
    }
    catch (IOException ex) {
      throw new HibernateException("Couldn't clone BLOB contents", ex);
    }
  }
View Full Code Here

      ObjectInputStream ois = new ObjectInputStream(is);
      try {
        return ois.readObject();
      }
      catch (ClassNotFoundException ex) {
        throw new HibernateException("Could not deserialize BLOB contents", ex);
      }
      finally {
        ois.close();
      }
    }
View Full Code Here

        if (saveIdProperty != null) {
            try {
                saveReturn = (Integer) saveIds[saveCalledCount - 1];
                PropertyUtils.setProperty(object, saveIdProperty, saveReturn);
            } catch (Exception e) {
                throw new HibernateException(e);
            }
        }
        return saveReturn;
    }
View Full Code Here

        assertTrue(support.hibernateSession.flushCalled);
        assertTrue(support.connection.commitCalled);
    }

    public void testChangingPasswordWithError() throws Exception {
        support.hibernateSession.find2HibernateException = new HibernateException("test");
        assertTrue(xplannerLoginModule.isCapableOfChangingPasswords());

        try {
            xplannerLoginModule.changePassword("userId", "newpass");
            fail("no exception");
View Full Code Here

        assertCommit();
    }

    public void testJoinError() throws Exception {
        mockSession.saveHibernateException = new HibernateException("test");
        support.request.setParameterValue("action.join", new String[]{""});
        support.request.setParameterValue("personId", new String[]{"1"});
        support.request.setParameterValue("comment", new String[]{"a comment"});
        replay();
View Full Code Here

        assertFalse("listeners notified", mockIntegrationListener.onEventCalled);
        assertCommit();
    }

    public void testLeaveError() throws Exception {
        mockSession.loadHibernateException = new HibernateException("test");
        support.request.setParameterValue("action.leave", new String[]{""});
        support.request.setParameterValue("oid", new String[]{"1"});
        replay();

        ActionForward forward = support.executeAction(action);
View Full Code Here

        assertNull(integration2.getWhenStarted());
        assertCommit();
    }

    public void testStartError() throws Exception {
        mockSession.findHibernateException = new HibernateException("test");
        support.request.setParameterValue("action.start", new String[]{""});
        replay();

        ActionForward forward = support.executeAction(action);
View Full Code Here

TOP

Related Classes of net.sf.hibernate.HibernateException

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.