Examples of Error


Examples of org.apache.qpid.amqp_1_0.type.transport.Error

           
            return session;
        }
        catch(JMSException e)
        {
            Error remoteError;
            if(started
               && e.getLinkedException() instanceof ConnectionErrorException
               && (remoteError = ((ConnectionErrorException)e.getLinkedException()).getRemoteError()).getCondition() == ConnectionError.REDIRECT)
            {
                String networkHost = (String) remoteError.getInfo().get(Symbol.valueOf("network-host"));
                int port = (Integer) remoteError.getInfo().get(Symbol.valueOf("port"));
                String hostName = (String) remoteError.getInfo().get(Symbol.valueOf("hostname"));
                reconnect(networkHost,port,hostName);
                return createSession(acknowledgeMode);

            }
            else
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.type.transport.Error

    {


        Destination destination;
        Link_1_0 link = null;
        Error error = null;

        final
        LinkRegistry
                linkRegistry = _vhost.getLinkRegistry(endpoint.getSession().getConnection().getRemoteContainerId());


        if(endpoint.getRole() == Role.SENDER)
        {

            SendingLink_1_0 previousLink = (SendingLink_1_0) linkRegistry.getDurableSendingLink(endpoint.getName());

            if(previousLink == null)
            {

                Target target = (Target) endpoint.getTarget();
                Source source = (Source) endpoint.getSource();


                if(source != null)
                {
                    if(Boolean.TRUE.equals(source.getDynamic()))
                    {
                        AMQQueue tempQueue = createTemporaryQueue(source.getDynamicNodeProperties());
                        source.setAddress(tempQueue.getName());
                    }
                    String addr = source.getAddress();
                    AMQQueue queue = _vhost.getQueue(addr);
                    if(queue != null)
                    {

                        destination = new QueueDestination(queue);



                    }
                    else
                    {
                        Exchange exchg = _vhost.getExchange(addr);
                        if(exchg != null)
                        {
                            destination = new ExchangeDestination(exchg, source.getDurable(), source.getExpiryPolicy());
                        }
                        else
                        {

                            endpoint.setSource(null);
                            destination = null;
                        }
                    }

                }
                else
                {
                    destination = null;
                }

                if(destination != null)
                {
                    final SendingLinkEndpoint sendingLinkEndpoint = (SendingLinkEndpoint) endpoint;
                    try
                    {
                        final SendingLink_1_0 sendingLink = new SendingLink_1_0(new SendingLinkAttachment(this, sendingLinkEndpoint),
                                                                                _vhost,
                                                                                (SendingDestination) destination
                        );
                        sendingLinkEndpoint.setLinkEventListener(sendingLink);
                        link = sendingLink;
                        if(TerminusDurability.UNSETTLED_STATE.equals(source.getDurable()))
                        {
                            linkRegistry.registerSendingLink(endpoint.getName(), sendingLink);
                        }
                    }
                    catch(AmqpErrorException e)
                    {
                        e.printStackTrace();
                        destination = null;
                        sendingLinkEndpoint.setSource(null);
                        error = e.getError();
                    }
                }
            }
            else
            {
                Source newSource = (Source) endpoint.getSource();

                Source oldSource = (Source) previousLink.getEndpoint().getSource();
                final TerminusDurability newSourceDurable = newSource == null ? null : newSource.getDurable();
                if(newSourceDurable != null)
                {
                    oldSource.setDurable(newSourceDurable);
                    if(newSourceDurable.equals(TerminusDurability.NONE))
                    {
                        linkRegistry.unregisterSendingLink(endpoint.getName());
                    }
                }
                endpoint.setSource(oldSource);
                SendingLinkEndpoint sendingLinkEndpoint = (SendingLinkEndpoint) endpoint;
                previousLink.setLinkAttachment(new SendingLinkAttachment(this, sendingLinkEndpoint));
                sendingLinkEndpoint.setLinkEventListener(previousLink);
                link = previousLink;
                endpoint.setLocalUnsettled(previousLink.getUnsettledOutcomeMap());
            }
        }
        else
        {
            if(endpoint.getTarget() instanceof Coordinator)
            {
                Coordinator coordinator = (Coordinator) endpoint.getTarget();
                TxnCapability[] capabilities = coordinator.getCapabilities();
                boolean localTxn = false;
                boolean multiplePerSession = false;
                if(capabilities != null)
                {
                    for(TxnCapability capability : capabilities)
                    {
                        if(capability.equals(TxnCapability.LOCAL_TXN))
                        {
                            localTxn = true;
                        }
                        else if(capability.equals(TxnCapability.MULTI_TXNS_PER_SSN))
                        {
                            multiplePerSession = true;
                        }
                        else
                        {
                            error = new Error();
                            error.setCondition(AmqpError.NOT_IMPLEMENTED);
                            error.setDescription("Unsupported capability: " + capability);
                            break;
                        }
                    }
                }

       /*         if(!localTxn)
                {
                    capabilities.add(TxnCapabilities.LOCAL_TXN);
                }*/

                final ReceivingLinkEndpoint receivingLinkEndpoint = (ReceivingLinkEndpoint) endpoint;
                final TxnCoordinatorLink_1_0 coordinatorLink =
                        new TxnCoordinatorLink_1_0(_vhost, this, receivingLinkEndpoint, _openTransactions);
                receivingLinkEndpoint.setLinkEventListener(coordinatorLink);
                link = coordinatorLink;


            }
            else
            {

                ReceivingLink_1_0 previousLink =
                        (ReceivingLink_1_0) linkRegistry.getDurableReceivingLink(endpoint.getName());

                if(previousLink == null)
                {

                    Target target = (Target) endpoint.getTarget();

                    if(target != null)
                    {
                        if(Boolean.TRUE.equals(target.getDynamic()))
                        {

                            AMQQueue tempQueue = createTemporaryQueue(target.getDynamicNodeProperties());
                            target.setAddress(tempQueue.getName());
                        }

                        String addr = target.getAddress();
                        Exchange exchg = _vhost.getExchange(addr);
                        if(exchg != null)
                        {
                            destination = new ExchangeDestination(exchg, target.getDurable(),
                                                                  target.getExpiryPolicy());
                        }
                        else
                        {
                            AMQQueue queue = _vhost.getQueue(addr);
                            if(queue != null)
                            {

                                destination = new QueueDestination(queue);
                            }
                            else
                            {
                                endpoint.setTarget(null);
                                destination = null;
                            }

                        }


                    }
                    else
                    {
                        destination = null;
                    }
                    if(destination != null)
                    {
                        final ReceivingLinkEndpoint receivingLinkEndpoint = (ReceivingLinkEndpoint) endpoint;
                        final ReceivingLink_1_0 receivingLink = new ReceivingLink_1_0(new ReceivingLinkAttachment(this, receivingLinkEndpoint), _vhost,
                                (ReceivingDestination) destination);
                        receivingLinkEndpoint.setLinkEventListener(receivingLink);
                        link = receivingLink;
                        if(TerminusDurability.UNSETTLED_STATE.equals(target.getDurable()))
                        {
                            linkRegistry.registerReceivingLink(endpoint.getName(), receivingLink);
                        }
                    }
                }
                else
                {
                    ReceivingLinkEndpoint receivingLinkEndpoint = (ReceivingLinkEndpoint) endpoint;
                    previousLink.setLinkAttachment(new ReceivingLinkAttachment(this, receivingLinkEndpoint));
                    receivingLinkEndpoint.setLinkEventListener(previousLink);
                    link = previousLink;
                    endpoint.setLocalUnsettled(previousLink.getUnsettledOutcomeMap());

                }
            }
        }

        endpoint.attach();

        if(link == null)
        {
            if(error == null)
            {
                error = new Error();
                error.setCondition(AmqpError.NOT_FOUND);
            }
            endpoint.detach(error);
        }
        else
        {
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.type.transport.Error

                {
                    final ExceptionListener exceptionListener = _session.getConnection().getExceptionListener();

                    if(exceptionListener != null)
                    {
                        final Error receiverError = _receiver.getError();

                        MessageConsumerException mce = new MessageConsumerException(
                                receiverError.getDescription(),
                                receiverError.getCondition().getValue().toString(),
                                _destination.getAddress());

                        exceptionListener.onException(mce);
                    }
                }
View Full Code Here

Examples of org.apache.qpid.amqp_1_0.type.transport.Error

            return _session.getClientSession().createReceiver(_session.toAddress(_destination), AcknowledgeMode.ALO,
                    _linkName, _durable, getFilters(), null);
        }
        catch (ConnectionErrorException e)
        {
            Error error = e.getRemoteError();
            if(AmqpError.INVALID_FIELD.equals(error.getCondition()))
            {
                throw new InvalidSelectorException(e.getMessage());
            }
            else
            {
                throw new JMSException(e.getMessage(), error.getCondition().getValue().toString());

            }
        }
    }
View Full Code Here

Examples of org.apache.tomcat.jni.Error

                } catch (Throwable t) {
                    ExceptionUtils.handleThrowable(t);
                    if (running) {
                        String msg = sm.getString("endpoint.accept.fail");
                        if (t instanceof Error) {
                            Error e = (Error) t;
                            if (e.getError() == 233) {
                                // Not an error on HP-UX so log as a warning
                                // so it can be filtered out on that platform
                                // See bug 50273
                                log.warn(msg, t);
                            } else {
View Full Code Here

Examples of org.data2semantics.proppred.learners.evaluation.Error

    double[] cs = {1, 10, 100, 1000, 10000}; // 100000, 1000000

    // --------------
    // Learning Algorithm settings
    List<EvaluationFunction> evalFuncs = new ArrayList<EvaluationFunction>();
    evalFuncs.add(new Error());
    evalFuncs.add(new F1());

    List<Double> target = EvaluationUtils.createTarget(labels);

    LibSVMParameters svmParms = new LibSVMParameters(LibSVMParameters.C_SVC, cs);
View Full Code Here

Examples of org.drools.bpmn2.core.Error

                  Map<String, Error> errors = (Map<String, Error>)
                    ((ProcessBuildData) parser.getData()).getMetaData("Errors");
                if (errors == null) {
                    throw new IllegalArgumentException("No errors found");
                }
                Error error = errors.get(errorRef);
                if (error == null) {
                    throw new IllegalArgumentException("Could not find error " + errorRef);
                }
                String type = error.getErrorCode();
                    List<EventFilter> eventFilters = new ArrayList<EventFilter>();
                    EventTypeFilter eventFilter = new EventTypeFilter();
                    eventFilter.setType("Error-" + attachedTo + "-" + type);
                    eventFilters.add(eventFilter);
                    eventNode.setEventFilters(eventFilters);
View Full Code Here

Examples of org.eclim.command.Error

    if(buildfile != null){
      try{
        IClasspathEntry[] entries = mergeWithBuildfile(javaProject, buildfile);
        errors = setClasspath(javaProject, entries, dotclasspath);
      }catch(IllegalStateException ise){
        errors.add(new Error(ise.getMessage(), buildfile, 1, 1, false));
      }

    // .classpath updated.
    }else{
      // if an exception occurs reading the classpath then eclipse will return a
      // default classpath which we would otherwise then write back into the
      // .classpath file. This hack prevents that and will return a relevent
      // error message as a validation error.
      try{
        ((JavaProject)javaProject).readFileEntriesWithException(null);
      } catch(Exception e) {
        errors.add(new Error(e.getMessage(), dotclasspath, 1, 1, false));
        return errors;
      }

      IClasspathEntry[] entries = javaProject.readRawClasspath();
      errors = setClasspath(javaProject, entries, dotclasspath);
View Full Code Here

Examples of org.eclipse.bpmn2.Error

                errorId = (String) entry.getValue();
                errorCode = (String) entry.getValue();
              }
            }

                                                Error err = this._errors.get(errorCode);
                                                if (err == null){
                                                    err = Bpmn2Factory.eINSTANCE.createError();
                                                    err.setId(errorId);
                                                    err.setErrorCode(errorCode);
                                                    this._errors.put(errorCode, err);
                                                }
                                               
            toAddErrors.add(err);
            ((ErrorEventDefinition) ed).setErrorRef(err);
View Full Code Here

Examples of org.exist.xquery.util.Error

                        Messages.getMessage(Error.FUNC_EMPTY_SEQ_DISALLOWED,
                        Integer.valueOf(argPosition), ExpressionDumper.dump(expr)));}
            }
        }
        expr = new DynamicCardinalityCheck(context, type.getCardinality(), expr,
            new Error(Error.FUNC_PARAM_CARDINALITY, argPosition, mySignature));
        // check return type if both types are not Type.ITEM
        int returnType = expr.returnsType();
        if (returnType == Type.ANY_TYPE || returnType == Type.EMPTY)
            {returnType = Type.ITEM;}
        boolean typeMatches = type.getPrimaryType() == Type.ITEM;
        typeMatches = Type.subTypeOf(returnType, type.getPrimaryType());
        if (typeMatches && cardinalityMatches) {
            if (type.getNodeName() != null)
                {expr = new DynamicNameCheck(context,
                    new NameTest(type.getPrimaryType(), type.getNodeName()), expr);}
            return expr;
        }
        //Loose argument check : we may move this, or a part hereof, to UntypedValueCheck
        if (context.isBackwardsCompatible()) {
            if (Type.subTypeOf(type.getPrimaryType(), Type.STRING)) {
                if (!Type.subTypeOf(returnType, Type.ATOMIC)) {
                    expr = new Atomize(context, expr);
                    returnType = Type.ATOMIC;
                }
                expr = new AtomicToString(context, expr);
                returnType = Type.STRING;
            } else if (type.getPrimaryType() == Type.NUMBER
                    || Type.subTypeOf(type.getPrimaryType(), Type.DOUBLE)) {
                if (!Type.subTypeOf(returnType, Type.ATOMIC)) {
                    expr = new Atomize(context, expr);
                    returnType = Type.ATOMIC;
                }
                expr = new UntypedValueCheck(context, type.getPrimaryType(), expr,
                    new Error(Error.FUNC_PARAM_TYPE, String.valueOf(argPosition), mySignature));
                returnType = type.getPrimaryType();
            }
            //If the required type is an atomic type, convert the argument to an atomic
            if (Type.subTypeOf(type.getPrimaryType(), Type.ATOMIC)) {
                if(!Type.subTypeOf(returnType, Type.ATOMIC))
                    {expr = new Atomize(context, expr);}
                if (!(type.getPrimaryType() == Type.ATOMIC))
                    {expr = new UntypedValueCheck(context, type.getPrimaryType(),
                        expr, new Error(Error.FUNC_PARAM_TYPE, String.valueOf(argPosition), mySignature));}
                returnType = expr.returnsType();
            }
        //Strict argument check : we may move this, or a part hereof, to UntypedValueCheck
        } else {
            //If the required type is an atomic type, convert the argument to an atomic
            if (Type.subTypeOf(type.getPrimaryType(), Type.ATOMIC)) {
                if(!Type.subTypeOf(returnType, Type.ATOMIC))
                    {expr = new Atomize(context, expr);}
                expr = new UntypedValueCheck(context, type.getPrimaryType(),
                    expr, new Error(Error.FUNC_PARAM_TYPE, String.valueOf(argPosition), mySignature));
                returnType = expr.returnsType();
            }
        }
        if (returnType != Type.ITEM && !Type.subTypeOf(returnType, type.getPrimaryType())) {
            if (!(Type.subTypeOf(type.getPrimaryType(), returnType) ||
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.