Examples of InvalidStateException


Examples of com.aaspring.InvalidStateException

  protected States state = States.MODIFIABLE;

  public void addFile(final FileAccessorProperties fap)
      throws InvalidStateException {
    if (state != States.MODIFIABLE)
      throw new InvalidStateException("Cannot add a new file"
          + " from list when it is not in modifiable state");
    fapSet.add(fap);
  }
View Full Code Here

Examples of com.amazonaws.services.kinesis.clientlibrary.exceptions.InvalidStateException

            } else {
                String message =
                        String.format("Was asked to checkpoint at %s but no checkpointer was provided for shard %s",
                                sequenceNumber, shardId);
                LOG.error(message);
                return this.messageWriter.writeCheckpointMessageWithError(sequenceNumber, new InvalidStateException(
                        message));
            }
        } catch (Throwable t) {
            return this.messageWriter.writeCheckpointMessageWithError(sequenceNumber, t);
        }
View Full Code Here

Examples of com.amazonaws.services.kinesis.leases.exceptions.InvalidStateException

                LOG.debug("Listed " + result.size() + " leases from table " + table);
            }

            return result;
        } catch (ResourceNotFoundException e) {
            throw new InvalidStateException("Cannot scan lease table " + table + " because it does not exist.", e);
        } catch (ProvisionedThroughputExceededException e) {
            throw new ProvisionedThroughputException(e);
        } catch (AmazonClientException e) {
            throw new DependencyException(e);
        }
View Full Code Here

Examples of com.arjuna.wsc.InvalidStateException

        if (protocolIdentifier.equals(TestUtil.ALREADY_REGISTERED_PROTOCOL_IDENTIFIER))
            throw new AlreadyRegisteredException();
        else if (protocolIdentifier.equals(TestUtil.INVALID_PROTOCOL_PROTOCOL_IDENTIFIER))
            throw new InvalidProtocolException();
        else if (protocolIdentifier.equals(TestUtil.INVALID_STATE_PROTOCOL_IDENTIFIER))
            throw new InvalidStateException();
        else if (protocolIdentifier.equals(TestUtil.NO_ACTIVITY_PROTOCOL_IDENTIFIER))
            throw new NoActivityException();

        return new EndpointReferenceType(new AttributedURIType(TestUtil.PROTOCOL_COORDINATOR_SERVICE)) ;
    }
View Full Code Here

Examples of de.danet.an.workflow.omgcore.InvalidStateException

     */
    static String asap2omgState(String asapState)
        throws InvalidStateException {
        String omgState = (String) omgStates.get(asapState);
        if (omgState == null) {
            throw new InvalidStateException("unkonwn state: '" + asapState
                    + "'");
        }
        return omgState;
    }
View Full Code Here

Examples of org.apache.openjpa.util.InvalidStateException

            }
        }

        Throwable[] t = (Throwable []) errors.toArray(
            new Throwable [errors.size()]);
        throw new InvalidStateException(_loc.get("tm-not-found")).
            setFatal(true).setNestedThrowables(t);
    }
View Full Code Here

Examples of org.apache.openjpa.util.InvalidStateException

         * Return the query expressions for one candidate type, or die if none.
         */
        private QueryExpressions assertQueryExpression() {
            QueryExpressions[] exp = getQueryExpressions();
            if (exp == null || exp.length < 1)
                throw new InvalidStateException(_loc.get("no-expressions"));

            return exp[0];
        }
View Full Code Here

Examples of org.apache.openjpa.util.InvalidStateException

                String ordering = _exps[0].orderingClauses[orderIndex];
                for (int i = 0; i < _exps[0].projectionClauses.length; i++)
                    if (ordering.equals(_exps[0].projectionClauses[i]))
                        return ((Object[]) resultObject)[i];

                throw new InvalidStateException(_loc.get
                    ("merged-order-with-result", q.getContext().getLanguage(),
                        q.getContext().getQueryString(), ordering));
            }

            // use the parsed ordering expression to extract the ordering value
View Full Code Here

Examples of org.apache.openjpa.util.InvalidStateException

                String ordering = _exps[0].orderingClauses[orderIndex];
                for (int i = 0; i < _exps[0].projectionClauses.length; i++)
                    if (ordering.equals(_exps[0].projectionClauses[i]))
                        return ((Object[]) resultObject)[i];

                throw new InvalidStateException(_loc.get
                    ("merged-order-with-result", q.getContext().getLanguage(),
                        q.getContext().getQueryString(), ordering));
            }

            // need to parse orderings?
View Full Code Here

Examples of org.apache.openjpa.util.InvalidStateException

                    "com.ibm.websphere.jtaextensions.SynchronizationCallback",
                    true, loader) });
            _getGlobalId = extendedJTATransaction.
                getMethod("getGlobalId", null);
        } catch (Exception e) {
            throw new InvalidStateException(_loc
                .get("was-reflection-exception"), e).setFatal(true);
        }
    }
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.