Package com.foundationdb.server.error

Examples of com.foundationdb.server.error.ExternalRoutineInvocationException


        else if (value instanceof ResultSet) {
            try {
                outputResultSet((ResultSet)value, appender);
            }
            catch (SQLException ex) {
                throw new ExternalRoutineInvocationException(((PostgresJavaRoutine)statement).getInvocation().getRoutineName(), ex);
            }
        }
        else {
            ValueSource source = encoder.valuefromObject(value, pgType);
            FormatOptions options = context.getServer().getFormatOptions();
View Full Code Here


        encoder.reset();
        try {
            outputMetaData(encoder.getAppender());
        }
        catch (SQLException ex) {
            throw new ExternalRoutineInvocationException(((PostgresJavaRoutine)statement).getInvocation().getRoutineName(), ex);
        }
        ByteArrayOutputStream bytes = encoder.getByteStream();
        messenger.writeInt(bytes.size());
        messenger.writeByteStream(bytes);
        messenger.sendMessage();
View Full Code Here

    public void invokeShielded() {
        try {
            methodResult = method.invoke(null, methodArgs);
        }
        catch (IllegalAccessException ex) {
            throw new ExternalRoutineInvocationException(getInvocation().getRoutineName(), ex);
        }
        catch (InvocationTargetException ex) {
            throw new ExternalRoutineInvocationException(getInvocation().getRoutineName(), ex.getTargetException());
        }
    }
View Full Code Here

        CacheEntry entry = cache.get(routineName);
        if ((entry != null) && (entry.version == currentVersion))
            return entry;
        ScriptEngine engine = getManager(session).getEngineByName(routine.getLanguage());
        if (engine == null)
            throw new ExternalRoutineInvocationException(routineName, "Cannot find " + routine.getLanguage()
                    + " script engine");
        entry = new CacheEntry(routine, engine);
        cache.put(routineName, entry);
        return entry;
    }
View Full Code Here

        public Object eval(Bindings bindings) {
            logger.debug("Evaluating {}", routineName);
            try {
                return engine.eval(script); // Bindings came from engine.
            } catch (ScriptException ex) {
                throw new ExternalRoutineInvocationException(routineName, ex);
            }
        }
View Full Code Here

            setScriptName(routineName, engine);
            logger.debug("Compiling {}", routineName);
            try {
                compiled = ((Compilable) engine).compile(script);
            } catch (ScriptException ex) {
                throw new ExternalRoutineInvocationException(routineName, ex);
            }
            this.shared = shared;
        }
View Full Code Here

                if (shared)
                    return compiled.eval(bindings);
                else
                    return compiled.eval();
            } catch (ScriptException ex) {
                throw new ExternalRoutineInvocationException(routineName, ex);
            }
        }
View Full Code Here

                } else {
                    logger.debug("Evaluating {}", routineName);
                    engine.eval(script);
                }
            } catch (ScriptException ex) {
                throw new ExternalRoutineInvocationException(routineName, ex);
            }
            invocable = (Invocable) engine;
        }
View Full Code Here

        public Object invoke(String function, Object[] args) {
            logger.debug("Calling {} in {}", function, routineName);
            try {
                return invocable.invokeFunction(function, args);
            } catch (ScriptException ex) {
                throw new ExternalRoutineInvocationException(routineName, ex);
            } catch (NoSuchMethodException ex) {
                throw new ExternalRoutineInvocationException(routineName, ex);
            }
        }
View Full Code Here

            Object column;
            try {
                column = resultSet.getObject(i+1);
            }
            catch (SQLException ex) {
                throw new ExternalRoutineInvocationException(((PostgresJavaRoutine)statement).getInvocation().getRoutineName(), ex);
            }
            PostgresType type = columnTypes[i];
            boolean binary = false;
            ByteArrayOutputStream bytes = encoder.encodePObject(column, type, binary);
            if (bytes == null) {
View Full Code Here

TOP

Related Classes of com.foundationdb.server.error.ExternalRoutineInvocationException

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.