Examples of LoadException


Examples of com.sun.messaging.jmq.jmsserver.persist.LoadException

        logger.log(Logger.DEBUG,"Loading All Stored Destinations ");
      

        // before we do anything else, make sure we dont have any
        // unexpected exceptions
        LoadException load_ex = Globals.getStore().getLoadDestinationException();

        if (load_ex != null) {
            // some messages could not be loaded
            LoadException processing = load_ex;
            while (processing != null) {
                String destid = (String)processing.getKey();
                Destination d = (Destination)processing.getValue();
                if (destid == null && d == null) {
                    logger.log(Logger.WARNING,
                          BrokerResources.E_INTERNAL_ERROR,
                         "both key and value are corrupted");
                    continue;
                }
                if (destid == null) {
                    // store with valid key
                    try {
                        Globals.getStore().storeDestination(d, PERSIST_SYNC);
                    } catch (Exception ex) {
                        logger.log(Logger.WARNING,
                            BrokerResources.W_DST_RECREATE_FAILED,
                              d.toString(), ex);
                        try {
                            Globals.getStore().removeDestination(d, true);
                        } catch (Exception ex1) {
                            logger.logStack(Logger.DEBUG,"Unable to remove dest", ex1);
                        }
                    }
                } else {
                    DestinationUID duid = new DestinationUID(destid);
                    String name = duid.getName();
                    boolean isqueue = duid.isQueue();
                    int type = isqueue ? DestType.DEST_TYPE_QUEUE
                            : DestType.DEST_TYPE_TOPIC;
                    // XXX we may want to parse the names to determine
                    // if this is a temp destination etc
                    try {
                        d = Destination.createDestination(
                            name, type);
                        d.store();
                        logger.log(Logger.WARNING,
                            BrokerResources.W_DST_REGENERATE,
                                    duid.getLocalizedName());
                    } catch (Exception ex) {
                        logger.log(Logger.WARNING,
                            BrokerResources.W_DST_REGENERATE_ERROR,
                                  duid, ex);
                        try {
                            if (duid.isQueue()) {
                                d = new Queue(duid);
                            } else {
                                d = new Topic(duid);
                            }
                            Globals.getStore().removeDestination(d, true);
                        } catch (Exception ex1) {
                            logger.logStack(Logger.DEBUG,
                                "Unable to remove dest", ex1);
                        }
                    }

                } // end if
                processing = processing.getNextException();
            } // end while
        }

       // retrieve stored destinations
        try {
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.persist.LoadException

    {
        // before we do anything else, make sure we dont have any
        // unexpected exceptions

        // FIRST ... look at transaction table (tid,state)
        LoadException load_ex = Globals.getStore().getLoadTransactionException();

        if (load_ex != null) {
            // some messages could not be loaded
            LoadException processing = load_ex;
            while (processing != null) {
                TransactionUID tid = (TransactionUID)processing.getKey();
                TransactionInfo ti = (TransactionInfo)processing.getValue();
                if (tid == null && ti == null) {
                    logger.log(Logger.WARNING, BrokerResources.E_INTERNAL_ERROR,
                               "Both key and value for a transactions entry"
                               + " are corrupted with key exception "+
                               processing.getKeyCause().getMessage()+
                               " and value exception "+ processing.getValueCause());
                    processing = processing.getNextException();
                    continue;
                }
                if (tid == null ) {
                    // at this point, there is nothing we can do ...
                    // store with valid key
                    // improve when we address 5060661
                    logger.logStack(Logger.WARNING, BrokerResources.W_TRANS_ID_CORRUPT,
                                    ti.toString(), processing.getKeyCause());
                    processing = processing.getNextException();
                    continue;
                }
                if (ti == null) {
                    // if we dont know ... so make it prepared
                    logger.log(Logger.WARNING, Globals.getBrokerResources().getKString(
                               BrokerResources.W_TRAN_INFO_CORRUPTED, tid.toString()));
                    TransactionState ts = new TransactionState(
                                AutoRollbackType.NOT_PREPARED, 0, true);
                    ts.setState(TransactionState.PREPARED);
                    try {
                        store.storeTransaction(tid, ts, false);
                    } catch (Exception ex) {
                        logger.logStack(Logger.WARNING, BrokerResources.E_INTERNAL_ERROR,
                                        "Error updating transaction " + tid, ex);
                    }
                    processing = processing.getNextException();
                    continue;
                }
                if (ti.getType() == TransactionInfo.TXN_NOFLAG) {
                    logger.logStack(Logger.WARNING, Globals.getBrokerResources().getKString(
                           BrokerResources.W_TXN_TYPE_CORRUPTED, tid+"["+ti.toString()+"]",
                           TransactionInfo.toString(TransactionInfo.TXN_LOCAL)),
                                                    processing.getValueCause());
                    TransactionState ts = new TransactionState(
                                AutoRollbackType.NOT_PREPARED, 0, true);
                    ts.setState(TransactionState.PREPARED);
                    try {
                        store.storeTransaction(tid, ts, false);
                    } catch (Exception ex) {
                        logger.logStack(Logger.WARNING, BrokerResources.E_INTERNAL_ERROR,
                                        "Error updating transaction " + tid, ex);
                    }
                    processing = processing.getNextException();
                    continue;
                }
                if (ti.getTransactionState() == null) {
                    logger.log(Logger.WARNING, BrokerResources.W_TRANS_STATE_CORRUPT,
                               tid, processing.getValueCause());
                    TransactionState ts = new TransactionState(
                                AutoRollbackType.NOT_PREPARED, 0, true);
                    ts.setState(TransactionState.PREPARED);
                    try {
                        store.storeTransaction(tid, ts, false);
                    } catch (Exception ex) {
                        logger.logStack(Logger.WARNING, BrokerResources.E_INTERNAL_ERROR,
                                        "Error updating transaction " + tid, ex);
                    }
                    processing = processing.getNextException();
                    continue;
                }
                if (ti.getType() == TransactionInfo.TXN_CLUSTER && ti.getTransactionBrokers() == null) {
                    logger.log(Logger.WARNING,  BrokerResources.W_CLUSTER_TXN_BROKER_INFO_CORRUPTED,
                                                tid, processing.getValueCause());
                    store.storeClusterTransaction(tid, ti.getTransactionState(), null, false);
                    processing = processing.getNextException();
                    continue;
                }
                if (ti.getType() == TransactionInfo.TXN_REMOTE &&
                    ti.getTransactionHomeBroker() == null) {
                    logger.log(Logger.WARNING, BrokerResources.W_REMOTE_TXN_HOME_BROKER_INFO_CORRUPTED,
                                               tid, processing.getValueCause());
                    store.storeRemoteTransaction(tid, ti.getTransactionState(), null, null, false);
                    processing = processing.getNextException();
                    continue;
                }
                logger.log(Logger.ERROR, "XXXI18N Internal Error: unknown load error for TUID="
                           +tid+"["+ti.toString()+"]");

            } // end while
        }

        // now look at acks load exception
        load_ex = Globals.getStore().getLoadTransactionAckException();

        if (load_ex != null) {
            // some messages could not be loaded
            LoadException processing = load_ex;
            while (processing != null) {
                TransactionUID tid = (TransactionUID)processing.getKey();
                TransactionAcknowledgement ta[] =
                         (TransactionAcknowledgement[])processing.getValue();
                if (tid == null && ta == null) {
                    logger.log(Logger.WARNING,
                         BrokerResources.E_INTERNAL_ERROR,
                         "both key and value for a Transaction Ack entry"
                       + " are corrupted");
                    processing = processing.getNextException();
                    continue;
                }
                if (tid == null ) {
                    // at this point, there is nothing we can do ...
                    // store with valid key
                    // improve when we address 5060661
                    logger.log(Logger.WARNING,
                        BrokerResources.W_TRANS_ID_CORRUPT,
                            ta.toString());
                    processing = processing.getNextException();
                    continue;
                }
                //ta == null, nothing we can do, remove it
                logger.log(Logger.WARNING,
                           BrokerResources.W_TRANS_ACK_CORRUPT,
View Full Code Here

Examples of com.sun.messaging.jmq.jmsserver.persist.LoadException

    private void checkStoredLastConfigServer() throws BrokerException {
        Store s =  Globals.getStore();

        boolean bad = false;
        boolean potentiallyBad = false;
        LoadException le  =  s.getLoadPropertyException();
        LoadException savele = null;
        while (le != null) {
            Object o = le.getKey();
            if (o == null || ! (o instanceof String)) {
                potentiallyBad = true;
                savele = le;
View Full Code Here

Examples of de.fzi.herakles.commons.strategy.LoadException

  }
 
  @Override
  public void createNonBufferingReasoner(OWLOntology ontology) {
    if( this.registry == null )
      throw new LoadException( "No registry defined." );
   
    // load only into those reasoners, which are currently idle and have not loaded an ontology yet
    this.paralleliser.setReasoners( registry.getAsSet( true, false ) );
   
    /*
    Class<?> paramTypes = new Class<?>;
    Object params = new Object;
    int index = 0;
    for(OWLOntology ont: ontologies){
      params[index] = ont;
      paramTypes[index++] = OWLOntology.class;
    }*/
   
    Class<?>[] paramTypes = { OWLOntology.class };
    Object[] params = { ontology };
       
    Query query;
        try {
            query = QueryFactory.getQuery( "createNonBufferingReasoner", paramTypes, params );
            if(logger.isInfoEnabled()){
              logger.info( "Executing " + query.getTask() + " ..." );
            }
           
            this.paralleliser.setTask(query);
            try {
                this.paralleliser.parallelise();
                // if some reasoners were unable to load the ontologies, they are not marked as laden
               
                // this exception is thrown if no reasoner succeeds
            } catch( HeraklesException e ) {
                throw new LoadException( "No registered reasoner could load ontologies." );
            }
           
            this.loadedOntology = ontology;
        } catch( IllegalArgumentException e1 ) {
            // TODO Auto-generated catch block
View Full Code Here

Examples of de.fzi.herakles.commons.strategy.LoadException

  }

  @Override
  public void createNonBufferingReasoner(OWLOntology ontology, OWLReasonerConfiguration conf) throws IllegalConfigurationException {
    if( this.registry == null )
      throw new LoadException( "No registry defined." );
     
    // load only into those reasoners, which are currently idle and have not loaded an ontology yet
   
    Set<ReasonerAdapter> reasoners = registry.getAsSet( true, false );
   
    this.paralleliser.setReasoners( reasoners );
   
//    setProgressor();
//    this.progressor.setReasoners( reasoners );
//    this.progressor.setReasonerProgressMonitor(this.monitor);
       
    /*
    Class<?> paramTypes = new Class<?>;
    Object params = new Object;
    int index = 0;
    for(OWLOntology ont: ontologies){
      params[index] = ont;
      paramTypes[index++] = OWLOntology.class;
    }*/
   
    Class<?>[] paramTypes = { OWLOntology.class , OWLReasonerConfiguration.class};
    Object[] params = { ontology, conf };
       
    Query query;
        try {
            query = QueryFactory.getQuery( "createNonBufferingReasoner", paramTypes, params );
            if(logger.isInfoEnabled()){
              logger.info( "Executing " + query.getTask() + " ..." );
            }
           
            this.paralleliser.setTask(query);
            try {
                this.paralleliser.parallelise();
//              this.progressor.showProgress();
                // if some reasoners were unable to load the ontologies, they are not marked as laden
               
                // this exception is thrown if no reasoner succeeds
            } catch( HeraklesException e ) {
                throw new LoadException( "No registered reasoner could load ontologies." );
            }
           
            this.loadedOntology = ontology;
        } catch( IllegalArgumentException e1 ) {
            // TODO Auto-generated catch block
View Full Code Here

Examples of de.fzi.herakles.commons.strategy.LoadException

  }

  @Override
  public void createReasoner(OWLOntology ontology) {
    if( this.registry == null )
      throw new LoadException( "No registry defined." );
   
    // load only into those reasoners, which are currently idle and have not loaded an ontology yet
    this.paralleliser.setReasoners( registry.getAsSet( true, false ) );
   
    /*
    Class<?> paramTypes = new Class<?>;
    Object params = new Object;
    int index = 0;
    for(OWLOntology ont: ontologies){
      params[index] = ont;
      paramTypes[index++] = OWLOntology.class;
    }*/
   
    Class<?>[] paramTypes = { OWLOntology.class };
    Object[] params = { ontology };
       
    Query query;
        try {
            query = QueryFactory.getQuery( "createReasoner", paramTypes, params );
            if(logger.isInfoEnabled()){
              logger.info( "Executing " + query.getTask() + " ..." );
            }
           
            this.paralleliser.setTask(query);
            try {
                this.paralleliser.parallelise();
                // if some reasoners were unable to load the ontologies, they are not marked as laden
               
                // this exception is thrown if no reasoner succeeds
            } catch( HeraklesException e ) {
                throw new LoadException( "No registered reasoner could load ontologies." );
            }
           
            this.loadedOntology = ontology;
        } catch( IllegalArgumentException e1 ) {
            // TODO Auto-generated catch block
View Full Code Here

Examples of de.fzi.herakles.commons.strategy.LoadException

  }
 
  @Override
  public void createReasoner(OWLOntology ontology, OWLReasonerConfiguration conf) throws IllegalConfigurationException {
    if( this.registry == null )
      throw new LoadException( "No registry defined." );
       
    Set<ReasonerAdapter> reasoners = registry.getAsSet( true, false );
   
    this.paralleliser.setReasoners( reasoners );
   
//    setProgressor();
//    this.progressor.setReasoners( reasoners );
//    this.progressor.setReasonerProgressMonitor(this.monitor);
     
    /*
    Class<?> paramTypes = new Class<?>;
    Object params = new Object;
    int index = 0;
    for(OWLOntology ont: ontologies){
      params[index] = ont;
      paramTypes[index++] = OWLOntology.class;
    }*/
   
    Class<?>[] paramTypes = { OWLOntology.class, OWLReasonerConfiguration.class };
    Object[] params = { ontology, conf };
       
    Query query;
        try {
            query = QueryFactory.getQuery( "createReasoner", paramTypes, params );
            if(logger.isInfoEnabled()){
              logger.info( "Executing " + query.getTask() + " ..." );
            }
           
            this.paralleliser.setTask(query);
            try {
                this.paralleliser.parallelise();
//              this.progressor.showProgress();
                // if some reasoners were unable to load the ontologies, they are not marked as laden
               
                // this exception is thrown if no reasoner succeeds
            } catch( HeraklesException e ) {
                throw new LoadException( "No registered reasoner could load ontologies." );
            }
           
            this.loadedOntology = ontology;
        } catch( IllegalArgumentException e1 ) {
            // TODO Auto-generated catch block
View Full Code Here

Examples of de.fzi.herakles.commons.strategy.LoadException

  }
 
  public void dispose() throws LoadException {

    if( this.registry == null )
      throw new LoadException( "No registry defined." );
   
    this.paralleliser.setReasoners( registry.getAsSet( false ) );
    Class<?>[] paramTypes = {};
    Object[] params = {};
   
    Query query;
        try {
            query = QueryFactory.getQuery( "dispose", paramTypes, params );
            if(logger.isInfoEnabled()){
              logger.info( "Executing " + query.getTask() + " ..." );
            }
           
            this.paralleliser.setTask(query);
            try {
                this.paralleliser.parallelise();
               
            // this exception is thrown if no reasoner succeeds
            } catch( HeraklesException e ) {
                throw new LoadException( "No reasoner was able to dispose itself." );
            }
        } catch( IllegalArgumentException e1 ) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        } catch( ClassCastException e1 ) {
View Full Code Here

Examples of jmt.common.exception.LoadException

        //using its name)
        //nodes[i] = NetSystem.getNode(nodeNames[i]);
        //end OLD

      } else {
        throw new LoadException("Name of the node is not a String");
      }
    }

  }
View Full Code Here

Examples of jmt.common.exception.LoadException

        nodeNames[i] = nodeName;

        //sets the corresponding routing probability
        probabilities[i] = entry.getProbability();
      } else {
        throw new LoadException("Name of the node is not a String");
      }
    }

    //uses the obtained probabilities to create the empirical distribution
    //and its parameter
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.