Examples of JournalException


Examples of com.philip.journal.core.exception.JournalException

                throw (Exception) ite.getTargetException();
            } catch (final ClassCastException cce) {
                throw (RuntimeException) ite.getTargetException();
            }
        } catch (final Exception e) { // NOPMD by r39 on 4/5/11 9:10 AM
            throw new JournalException("Proxy method call exception", e);
        }
    }
View Full Code Here

Examples of com.philip.journal.core.exception.JournalException

            throw new IllegalArgumentException(Error.IAE_INVALID_PROP + " "
                    + property); // NOPMD by r39
        } catch (final InvocationTargetException e) {
            throw new RuntimeException(e.getCause()); // NOPMD by r39
        } catch (final Exception e) {
            throw new JournalException(Error.GEN_ERROR, e); // NOPMD by r39
        }
    }
View Full Code Here

Examples of com.philip.journal.core.exception.JournalException

        final String callingClass = Thread.currentThread().getStackTrace()[IDX_HBN_CALL].getClassName();
        if (callingClass.indexOf("org.hibernate.property.BasicPropertyAccessor$BasicSetter") > -1
                || callingClass.indexOf("org.hibernate.tuple.entity.AbstractEntityTuplizer") > -1) {
            this.username = pusername;
        } else {
            throw new JournalException("Illegal access to protected object", null);
        }
    }
View Full Code Here

Examples of com.philip.journal.core.exception.JournalException

        param.put("username", username);
        User user = null;
        try {
            user = readObject(param);
        } catch (final Exception e) {
            throw new JournalException(e.getMessage(), e);
        }
        return user;
    }
View Full Code Here

Examples of com.philip.journal.core.exception.JournalException

            final String pkeyField = (String) klass.getMethod(
                    "getPrimaryKeyField", new Class[0]).invoke(object,
                    new Object[0]);
            return readObject(pkeyField, entityId);
        } catch (final Exception e) {
            throw new JournalException(
                    "This is not supported for this type of target.  Use readByProperty.",
                    e);
        }
    }
View Full Code Here

Examples of com.philip.journal.core.exception.JournalException

                BeanUtils.setProperty(object,
                        AbstractAuditableBean.UPDATE_DATE, now);
                BeanUtils.setProperty(object,
                        AbstractAuditableBean.UPDATE_TIME, now);
            } catch (final Exception e) {
                throw new JournalException("System Error", e);
            }
        }
        super.save(object);
    }
View Full Code Here

Examples of com.philip.journal.core.exception.JournalException

    protected Object proxyMehodCall(final Class<?>[] paramType, final Object[] args)
    {
        try {
            return super.proxyMehodCall(paramType, args);
        } catch (final DataIntegrityViolationException div) {
            throw new JournalException(div.getCause().getCause().getMessage(), div);
        } catch (final Exception e) {
            throw new JournalException(e.getMessage(), e);
        }
    }
View Full Code Here

Examples of com.philip.journal.core.exception.JournalException

    @Override
    public void delete(final long entryId)
    {
        final Entry entry = super.readObject(Entry.ID, entryId);
        if (entry == null) {
            throw new JournalException("Delete failed for entryId [" + entryId + "]", "The object with the entryId ["
                    + entryId + "] was not found in the datastore.", "Cannot find [" + entryId + "]");
        }
        super.delete(entry);
    }
View Full Code Here

Examples of com.philip.journal.core.exception.JournalException

                final Element branchElement = (Element) nodes.item(i);
                getXmlHelper().extractBranchFromDocument(branchElement, ROOT_ID);
            }

        } catch (final Exception exception) {
            throw new JournalException(exception.getMessage(), exception);
        }
    }
View Full Code Here

Examples of net.timewalker.ffmq3.storage.data.impl.journal.JournalException

      // Create a buffered data input stream from file
      in = new DataInputStream(new BufferedInputStream(new FileInputStream(journalFile)));
    }
    catch (IOException e)
    {
      throw new JournalException("Cannot open journal file : "+journalFile.getAbsolutePath(),e);
    }
   
    try
    {
      AbstractJournalOperation op;
      while ((op = JournalRecovery.readJournalOperation(in)) != null)
      {       
        System.out.println(op);
        if (op instanceof CommitOperation)
          System.out.println("----------------------------------------------------------------------");
      }
    }
    finally
    {
      try
      {
        in.close();
      }
      catch (IOException e)
      {
        throw new JournalException("Cannot close journal file : "+journalFile.getAbsolutePath(),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.