Examples of ParseException


Examples of org.apache.james.mime4j.field.mimeversion.parser.ParseException

                v = parser.getMinorVersion();
                if (v != MimeVersionParser.INITIAL_VERSION_VALUE) {
                    minor = v;
                }
            } catch (MimeException ex) {
                parsedException = new ParseException(ex);
            }
        }
    }
View Full Code Here

Examples of org.apache.jsieve.parser.generated.ParseException

        } catch (SieveException ex) {
            if (log.isErrorEnabled())
                log.error("Parse failed. Reason: " + ex.getMessage());
            if (log.isDebugEnabled())
                log.debug("Parse failed.", ex);
            throw new ParseException(ex.getMessage());
        }
    }
View Full Code Here

Examples of org.apache.lucene.queryParser.ParseException

          try {
            aRetArr[d] = new NewsMessageRecord(oTopDoc[d].score, oDoc.get("workarea"),
                         oDoc.get("guid"), oDoc.get("container"), oDoc.get("title"),                      
                         oDoc.get("author"), DateTools.stringToDate(oDoc.get("created")), oDoc.get("abstract"));
          } catch (java.text.ParseException neverthrown) {
            throw new ParseException("NewsMessageSearcher.search() Error parsing date "+oDoc.get("created")+" of document "+oDoc.get("guid"));
          }
        } // next
      } else {
        aRetArr = null;
      }
    } else {
      Hits oHitSet = oSearch.search(oQrx);
      int iHitCount = oHitSet.length();
      if (iHitCount>0) {
        aRetArr = new NewsMessageRecord[iHitCount];
        for (int h=0; h<iHitCount; h++) {
          oDoc = oHitSet.doc(h);
          try {
            aRetArr[h] = new NewsMessageRecord(oHitSet.score(h), oDoc.get("workarea"),
                         oDoc.get("guid"), oDoc.get("container"), oDoc.get("title"),
                         oDoc.get("author"), DateTools.stringToDate(oDoc.get("created")), oDoc.get("abstract"));
          } catch (java.text.ParseException neverthrown) {
            throw new ParseException("NewsMessageSearcher.search() Error parsing date "+oDoc.get("created")+" of document "+oDoc.get("guid"));
          }
        } // next
      } else {
        aRetArr = null;
      }
View Full Code Here

Examples of org.apache.lucene.queryparser.classic.ParseException

  throws ParseException {
    final Map<String, Float> queryFields = SolrPluginUtils.parseFieldBoosts(solrParams.getParams(SirenParams.QF));
    if (queryFields.isEmpty()) {
      final String df = QueryParsing.getDefaultField(indexSchema, solrParams.get(CommonParams.DF));
      if (df == null) {
        throw new ParseException("Neither "+SirenParams.QF+", "+CommonParams.DF +", nor the default search field are present.");
      }
      queryFields.put(df, 1.0f);
    }
    checkFieldTypes(indexSchema, queryFields);
    return queryFields;
View Full Code Here

Examples of org.apache.marmotta.client.exception.ParseException

                }
                result.put(subject.stringValue(),m);
            }
            return result;
        } catch (IOException e) {
            throw new ParseException("could not parse JSON data",e);
        } catch(RDFParseException e) {
            throw new ParseException("could not parse JSON data",e);
        } catch(UnsupportedRDFormatException e) {
            throw new ParseException("could not parse JSON data",e);
        }

    }
View Full Code Here

Examples of org.apache.maven.doxia.parser.ParseException

            parseXdoc(parser, sink);
        }
        catch (Exception ex)
        {
            throw new ParseException("Error parsing the model.", ex);
        }
    }
View Full Code Here

Examples of org.apache.nutch.parse.ParseException

    rtfParser.setDelegate(delegate);

    try {
      rtfParser.parse();
    } catch (com.etranslate.tm.processing.rtf.ParseException e) {
      throw new ParseException("Exception parsing RTF document", e);
    }

    Properties metadata = new Properties();
    metadata.putAll(content.getMetadata());
    metadata.putAll(delegate.getMetaData());
View Full Code Here

Examples of org.apache.openjpa.lib.util.ParseException

        if (str.length() <= 0)
            return super.unalias(str);
       
        // snag this case early as it only causes problems
        if (str.equals(","))
            throw new ParseException(s_loc.get("invalid-list-config",
                getProperty(), str, getAliasList()));
       
        // unalias the list and concatenate the list of
        // canonical values.  Also, catch any bad aliases.
        boolean found;
        String iString;
        StringBuffer retv = new StringBuffer();
        String[] vals = str.split(",", 0);
       
        for (int i = 0; i < vals.length; i++) {
            iString = vals[i] = vals[i].trim();
           
            found = false;
            if (i > 0)
                retv.append(',');
           
            for (int x = 0; x < aliases.length; x += 2)
                if (StringUtils.equals(iString, aliases[x])
                    || StringUtils.equals(iString, aliases[x + 1])) {
                    retv.append(aliases[x + 1]);
                    found = true;
                    break;
                }
           
            // If the alias list is not comprehensive, add any unknown
            // values back onto the list
            if (!found) {
                if (isAliasListComprehensive())
                    throw new ParseException(s_loc.get("invalid-list-config",
                        getProperty(), str, getAliasList()));
                else
                    retv.append(iString);
            }
        }
View Full Code Here

Examples of org.apache.phoenix.parse.ParseException

      return true;
    }
    // Use Codec to prevent Integer object allocation
    int index = PDataType.INTEGER.getCodec().decodeInt(ptr, indexExpr.getSortOrder());
    if(index < 0) {
      throw new ParseException("Index cannot be negative :" + index);
    }
    Expression arrayExpr = children.get(0);
    return PArrayDataType.positionAtArrayElement(tuple, ptr, index, arrayExpr, getDataType(), getMaxLength());
  }
View Full Code Here

Examples of org.apache.pig.impl.logicalLayer.parser.ParseException

            String mapKey, byte valueType, Schema valueSchema)
            throws ParseException {
        super(plan, key);

        if (!DataType.isAtomic(DataType.findType(mapKey))) {
            throw new ParseException("Map key " + mapKey + " is not atomic");
        }
        mMapKey = mapKey;
        mValueType = valueType;
        mValueSchema = valueSchema;
        mType = mValueType;
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.