Examples of PersistenceException


Examples of net.sf.jportlet.portlets.PersistenceException

                return col;
            }
        }
        catch ( HibernateException e )
        {
            throw new PersistenceException( e );
        }
        catch ( SQLException e )
        {
            throw new PersistenceException( e );
        }
        finally
        {
            close( session );
        }
View Full Code Here

Examples of net.sf.jportlet.portlets.PersistenceException

            {
                session.close(  );
            }
            catch ( Exception e )
            {
                throw new PersistenceException( "Error while closing the session", e );
            }
        }
    }
View Full Code Here

Examples of net.sf.jportlet.portlets.PersistenceException

            {
                tx.rollback(  );
            }
            catch ( Exception ee )
            {
                throw new PersistenceException( "Error while roll-backing the transaction", ee );
            }
        }
    }
View Full Code Here

Examples of net.sourceforge.pebble.dao.PersistenceException

        parser.parse(source, handler);

      } catch (Exception e) {
        log.error(e.getMessage() + " while loading blog enty from " + source.getAbsolutePath(), e);
        e.printStackTrace();
        throw new PersistenceException(e.getMessage());
      }

      return blogEntry;
    } else {
      return null;
View Full Code Here

Examples of nexj.core.persistence.PersistenceException

    */
   public void initialize() throws Exception
   {
      if (m_sDataSource == null)
      {
         throw new PersistenceException("err.persistence.sqlConnectionProperties");
      }
     
      if (m_sDataSource.indexOf(':') < 0)
      {
         if (m_sDataSource.length() > 0 && m_sDataSource.charAt(0) == '/')
View Full Code Here

Examples of org.apache.ambari.view.PersistenceException

      String entityName = entityClassMap.get(clazz);
      if (entityMap.containsKey(entityName)) {
        return entityMap.get(entityName).getIdProperty();
      }
    }
    throw new PersistenceException("The class " + clazz.getName() + "is not registered as an entity.");
  }
View Full Code Here

Examples of org.apache.geronimo.timer.PersistenceException

                        insertStatement.setLong(7, workInfo.getPeriod().longValue());
                    }
                    insertStatement.setBoolean(8, workInfo.getAtFixedRate());
                    int result = insertStatement.executeUpdate();
                    if (result != 1) {
                        throw new PersistenceException("Could not insert!");
                    }
                } finally {
                    insertStatement.close();
                }
            } else {
                PreparedStatement insertStatement = c.prepareStatement(insertSQLWithIdentity);
                try {
                    String serializedUserId = serialize(workInfo.getUserId());
                    String serializedUserKey = serialize(workInfo.getUserInfo());
                    insertStatement.setString(1, serverUniqueId);
                    insertStatement.setString(2, workInfo.getKey());
                    insertStatement.setString(3, serializedUserId);
                    insertStatement.setString(4, serializedUserKey);
                    insertStatement.setLong(5, workInfo.getTime().getTime());
                    if (workInfo.getPeriod() == null) {
                        insertStatement.setNull(6, Types.NUMERIC);
                    } else {
                        insertStatement.setLong(6, workInfo.getPeriod().longValue());
                    }
                    insertStatement.setBoolean(7, workInfo.getAtFixedRate());
                    int result = insertStatement.executeUpdate();
                    if (result != 1) {
                        throw new PersistenceException("Could not insert!");
                    }
                } finally {
                    insertStatement.close();
                }
                long id;
                PreparedStatement identityStatement = c.prepareStatement(identitySQL);
                try {
                    ResultSet seqRS = identityStatement.executeQuery();
                    try {
                        seqRS.next();
                        id = seqRS.getLong(1);
                    } finally {
                        seqRS.close();
                    }
                } finally {
                    identityStatement.close();
                }
                workInfo.setId(id);
            }
        } catch (SQLException e) {
            threwException = true;
            throw new PersistenceException(e);
        } finally {
            close(c, !threwException);
        }
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.PersistenceException

            tx.commit();
            fail("RollbackException should have been thrown from the externalizer");
        }catch (RollbackException rollBackException) {
            Throwable[] throwables = rollBackException.getNestedThrowables();
            assertTrue(throwables[0] instanceof PersistenceException);
            PersistenceException persistentException = (PersistenceException) throwables[0];
            assertNotNull(persistentException);
            assertEquals(1, persistentException.getNestedThrowables().length);
        }
    }
View Full Code Here

Examples of org.apache.sling.api.resource.PersistenceException

        final Modifiable mod = new Modifiable();
        mod.resource = parent;
        mod.node = parent.adaptTo(Node.class);
        mod.valueMap = parent.adaptTo(ModifiableValueMap.class);
        if ( mod.valueMap == null ) {
            throw new PersistenceException("Resource at '" + parent.getPath() + "' is not modifiable.");
        }

        final String name = prop.getName();
        if (prop.providesValue()) {
            // if user provided a value, don't mess with it
View Full Code Here

Examples of org.broadleafcommerce.openadmin.server.service.persistence.PersistenceException

                        }
                    }
                    break;
            }
        } catch (Exception e) {
            throw new PersistenceException(e);
        }
        populateValueRequest.getProperty().setIsDirty(dirty);
        return FieldProviderResponse.HANDLED;
    }
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.