Examples of AuditException


Examples of ch.qos.logback.audit.AuditException

        }
      } catch (IOException e) {
        oos = null;
        this.started = false;
        fireConnector();
        throw new AuditException("Failed sending audit event to host \""
            + remoteHost + "\" down. For more information, please visit "
            + FAILIED_WRITE_URL, e);
      }
    }

    try {
      Object incoming = ois.readObject();
      if (incoming instanceof Exception) {
        if (incoming instanceof AuditException) {
          AuditException ae = (AuditException) incoming;
          throw ae;
        } else {
          throw new AuditException("Server incurred an exception",
              (Exception) incoming);
        }
      } else if (incoming instanceof Boolean) {
        Boolean ack = (Boolean) incoming;
        if (ack.booleanValue()) {
          // System.out.println("ACKED");
        } else {
          throw new AuditException("Acknowledgement failure");
        }
      } else {
        throw new AuditException("Incoming object [" + incoming
            + "] outside of protocol");
      }
    } catch (IOException e) {
      throw new AuditException("Failed reading acknowledgement", e);
    } catch (ClassNotFoundException e) {
      throw new AuditException("Unexpecteed object type while acknowledgement",
          e);
    }
  }
View Full Code Here

Examples of org.hibernate.envers.exception.AuditException

            result = createQuery().forEntitiesAtRevision(cls, entityName, revision)
                .add(AuditEntity.id().eq(primaryKey)).getSingleResult();
        } catch (NoResultException e) {
            result = null;
        } catch (NonUniqueResultException e) {
            throw new AuditException(e);
        }

        return (T) result;
    }   
View Full Code Here

Examples of org.hibernate.envers.exception.AuditException

            }

            // The timestamp object is either a date or a long
            return timestampObject instanceof Date ? (Date) timestampObject : new Date((Long) timestampObject);
        } catch (NonUniqueResultException e) {
            throw new AuditException(e);
        }
    }
View Full Code Here

Examples of org.hibernate.envers.exception.AuditException

                throw new RevisionDoesNotExistException(date);
            }

            return res;
        } catch (NonUniqueResultException e) {
            throw new AuditException(e);
        }
    }
View Full Code Here

Examples of org.hibernate.envers.exception.AuditException

                throw new RevisionDoesNotExistException(revision);
            }

            return revisionData;
        } catch (NonUniqueResultException e) {
            throw new AuditException(e);
        }
    }
View Full Code Here

Examples of org.hibernate.envers.exception.AuditException

             result.put(revNo, revision);
      }

            return result;
        } catch (HibernateException e) {
            throw new AuditException(e);
        }
    }
View Full Code Here

Examples of org.hibernate.envers.exception.AuditException

                                                                                             IllegalArgumentException, AuditException {
        checkNotNull(revision, "Entity revision");
        checkPositive(revision, "Entity revision");
        checkSession();
        if (!verCfg.getGlobalCfg().isTrackEntitiesChangedInRevisionEnabled()) {
            throw new AuditException("This query is designed for Envers default mechanism of tracking entities modified in a given revision."
                                     + " Extend DefaultTrackingModifiedEntitiesRevisionEntity, utilize @ModifiedEntityNames annotation or set "
                                     + "'org.hibernate.envers.track_entities_changed_in_revision' parameter to true.");
        }
        Set<Number> revisions = new HashSet<Number>(1);
        revisions.add(revision);
View Full Code Here

Examples of org.hibernate.envers.exception.AuditException

        Object subObj = ReflectHelper.getDefaultConstructor(
            Thread.currentThread().getContextClassLoader().loadClass(componentClassName)).newInstance();
        setter.set(obj, subObj, null);
        delegate.mapToEntityFromMap(verCfg, subObj, data, primaryKey, versionsReader, revision);
      } catch (Exception e) {
        throw new AuditException(e);
      }
    }
    }
View Full Code Here

Examples of org.hibernate.envers.exception.AuditException

    protected T initializeCollection(int size) {
        try {
            return collectionClass.newInstance();
        } catch (InstantiationException e) {
            throw new AuditException(e);
        } catch (IllegalAccessException e) {
            throw new AuditException(e);
        }
    }
View Full Code Here

Examples of org.hibernate.envers.exception.AuditException

    protected T initializeCollection(int size) {
        try {
            return collectionClass.newInstance();
        } catch (InstantiationException e) {
            throw new AuditException(e);
        } catch (IllegalAccessException e) {
            throw new AuditException(e);
        }
    }
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.