Package org.apache.openjpa.util

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


         * 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

                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

                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

                    "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

                        evict(cache);
                    }
                }
                lastRun = now;
            } catch (Exception e) {
                throw new InvalidStateException(_loc.get("scheduler-fail"), e).
                    setFatal(true);
            }
        }

        _log.info(_loc.get("scheduler-stop"));
View Full Code Here

            if (_extendedTransaction != null) {
                try {
                    _registerSync.invoke(_extendedTransaction,
                        new Object[] { new WASSynchronization(arg0) });
                } catch (Exception e) {
                    throw new InvalidStateException(_loc
                        .get("was-reflection-exception")).setCause(e);
                }
            } else {
                throw new InvalidStateException(_loc.get("was-lookup-error"));
            }
        }
View Full Code Here

         */
        private byte[] getGlobalId() {
            try {
                return (byte[]) _getGlobalId.invoke(_extendedTransaction, null);
            } catch (Exception e) {
                throw new InvalidStateException(_loc
                    .get("was-reflection-exception")).setCause(e);
            }
        }
View Full Code Here

        /**
         * Unimplemented, WAS does not provide this level of control. Throws an
         * IllegalStateException
         */
        public void begin() throws NotSupportedException, SystemException {
            throw new InvalidStateException(_loc.get("was-unsupported-op",
                "begin"));
        }
View Full Code Here

         * IllegalStateException
         */
        public void commit() throws HeuristicMixedException,
            HeuristicRollbackException, IllegalStateException,
            RollbackException, SecurityException, SystemException {
            throw new InvalidStateException(_loc.get("was-unsupported-op",
                "commit"));
        }
View Full Code Here

TOP

Related Classes of org.apache.openjpa.util.InvalidStateException

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.