当前位置: 首页>>代码示例>>Java>>正文


Java Log.error方法代码示例

本文整理汇总了Java中org.jfree.util.Log.error方法的典型用法代码示例。如果您正苦于以下问题:Java Log.error方法的具体用法?Java Log.error怎么用?Java Log.error使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jfree.util.Log的用法示例。


在下文中一共展示了Log.error方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: publishMetaDataFile

import org.jfree.util.Log; //导入方法依赖的package包/类
/**
 * Jersey call to use the put service to load a metadataFile file into the Jcr repsoitory
 * @param metadataFile
 * @param domainId is fileName
 * @throws Exception
 * return code to detrmine next step
 */
public int publishMetaDataFile(InputStream metadataFile, String domainId) throws Exception {
  String storeDomainUrl = biServerConnection.getUrl() + "plugin/data-access/api/metadata/import";
  WebResource resource = client.resource(storeDomainUrl);

  int response = ModelServerPublish.PUBLISH_FAILED;
  FormDataMultiPart part = new FormDataMultiPart();
  part.field("domainId", domainId, MediaType.MULTIPART_FORM_DATA_TYPE)
    .field("metadataFile", metadataFile, MediaType.MULTIPART_FORM_DATA_TYPE);
  part.getField("metadataFile").setContentDisposition(
      FormDataContentDisposition.name("metadataFile")
      .fileName(domainId).build());
  try {
    ClientResponse resp = resource
        .type(MediaType.MULTIPART_FORM_DATA_TYPE)
        .put(ClientResponse.class, part);
    if(resp != null && resp.getStatus() == 200){
      response = ModelServerPublish.PUBLISH_SUCCESS;
    }
  } catch (Exception ex) {
    Log.error(ex.getMessage());      
  }
  return response;
}
 
开发者ID:pentaho,项目名称:pdi-agile-bi-plugin,代码行数:31,代码来源:ModelServerPublish.java

示例2: generateParameterizedPolygon

import org.jfree.util.Log; //导入方法依赖的package包/类
/**
 * Convert geometry to polygon drawing primitives
 * 
 * @param geometry
 *            geometry to convert
 * @param viewport
 *            viewport used to generate shapes
 * @return a list of drawing primitives
 */
public static DrawingPrimitive generateParameterizedPolygon(final PolygonSymbolizer polygonSymbolizer, final IFeature feature, final Viewport viewport) {
    if (feature.getGeom().isPolygon()) {
        return generateParameterizedPolygon(polygonSymbolizer, feature.getGeom(), feature, viewport);
    } else if (feature.getGeom().isMultiSurface()) {
        GM_MultiSurface<?> surface = (GM_MultiSurface<?>) feature.getGeom();
        MultiDrawingPrimitive multi = new MultiDrawingPrimitive();

        for (IGeometry element : surface.getList()) {
            DrawingPrimitive polygon = generateParameterizedPolygon(polygonSymbolizer, element, feature, viewport);
            if (polygon != null) {
                multi.addPrimitive(polygon);
            }
        }

        return multi;
    } else {
        Log.error("Polygon symbolizer do not know how to convert geometry type " + feature.getGeom().getClass().getSimpleName());
    }
    return null;
}
 
开发者ID:IGNF,项目名称:geoxygene,代码行数:30,代码来源:ParameterizedConverterUtil.java

示例3: getProperty

import org.jfree.util.Log; //导入方法依赖的package包/类
/**
 * @return
 */
private List<String> getProperty(String key) {
    List<String> infoSubscriptions = new ArrayList<String>();
    List<PropertyImpl> properties = propertyManager.findProperties(ident, null, null, null, key);

    if (properties.size() > 1) {
        Log.error("more than one property found, something went wrong, deleting them and starting over.");
        for (PropertyImpl prop : properties) {
            propertyManager.deleteProperty(prop);
        }

    } else if (properties.size() == 0l) {
        PropertyImpl p = propertyManager.createPropertyInstance(ident, null, null, null, key, null, null, null, null);
        propertyManager.saveProperty(p);
        properties = propertyManager.findProperties(ident, null, null, null, key);
    }
    String value = properties.get(0).getTextValue();

    if (value != null && !value.equals("")) {
        String[] subscriptions = properties.get(0).getTextValue().split(SEPARATOR);
        infoSubscriptions.addAll(Arrays.asList(subscriptions));
    }

    return infoSubscriptions;
}
 
开发者ID:huihoo,项目名称:olat,代码行数:28,代码来源:InfoSubscription.java

示例4: getCourseCalendarSubscriptionProperty

import org.jfree.util.Log; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
public List<String> getCourseCalendarSubscriptionProperty(final PropertyParameterObject propertyParameterObject) {
    List<String> infoSubscriptions = new ArrayList<String>();
    List<PropertyImpl> properties = findProperties(propertyParameterObject);

    if (properties.size() > 1) {
        Log.error("more than one property found, something went wrong, deleting them and starting over.");
        for (PropertyImpl prop : properties) {
            propertyManager.deleteProperty(prop);
        }

    } else if (properties.size() == 0l) {
        createAndSaveProperty(propertyParameterObject);
        properties = findProperties(propertyParameterObject);
    }
    String value = properties.get(0).getTextValue();

    if (value != null && !value.equals("")) {
        String[] subscriptions = properties.get(0).getTextValue().split(SEPARATOR);
        infoSubscriptions.addAll(Arrays.asList(subscriptions));
    }

    return infoSubscriptions;
}
 
开发者ID:huihoo,项目名称:olat,代码行数:25,代码来源:PropertyManagerEBL.java

示例5: onMessage

import org.jfree.util.Log; //导入方法依赖的package包/类
/**
*/
  @Override
  public void onMessage(Message message) {

      try {
          if (message instanceof TextMessage) {
              TextMessage tm = (TextMessage) message;
              // TODO use MapMessage and allow update of more then one property at one
              String propertyName = tm.getText();
              String value = tm.getStringProperty(propertyName);
              System.out.printf("*****************  Processed message (listener 1) 'key=%s' 'value=%s'. hashCode={%d}\n", propertyName, value, this.hashCode());

              propertiesLoader.setProperty(propertyName, value);
          }
      } catch (JMSException e) {
          Log.error("Error while processing jms message ", e);
      }
  }
 
开发者ID:huihoo,项目名称:olat,代码行数:20,代码来源:ManagedPropertiesMessageCoordinator.java

示例6: updateItemStatus

import org.jfree.util.Log; //导入方法依赖的package包/类
public boolean updateItemStatus(String itemBarcode,String status){
    boolean updated = false;
    Item items = null;
    org.kuali.ole.docstore.common.document.Item item = getItemUsingBarcode(itemBarcode);
    if(item!=null){
    String itemContent = item.getContent();
     if(itemContent!=null){
    ItemOlemlRecordProcessor itemOlemlRecordProcessor = new ItemOlemlRecordProcessor();
         items=itemOlemlRecordProcessor.fromXML(itemContent);
    if(items!=null && items.getItemStatus()!=null){
        ItemStatus itemStatus = new ItemStatus();
        itemStatus.setCodeValue(status);
        items.setItemStatus(itemStatus);
        item.setContent(itemOlemlRecordProcessor.toXML(items));
        try{
       getDocstoreClientLocator().getDocstoreClient().updateItem(item);
            updated=true;
        } catch(Exception e){
            Log.error(e,e);
        }
    }
     }
    }

  return updated;
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:27,代码来源:ASRHelperServiceImpl.java

示例7: updateItemStatusForInTransit

import org.jfree.util.Log; //导入方法依赖的package包/类
public boolean updateItemStatusForInTransit(String itemBarcode,String status){
    boolean updated = false;
    Item items = null;
    org.kuali.ole.docstore.common.document.Item item = getItemUsingBarcode(itemBarcode);
    if(item!=null){
        String itemContent = item.getContent();
        if(itemContent!=null){
            ItemOlemlRecordProcessor itemOlemlRecordProcessor = new ItemOlemlRecordProcessor();
            items=itemOlemlRecordProcessor.fromXML(itemContent);
            if(items!=null && items.getItemStatus()!=null && items.getItemStatus().getCodeValue().equals(ASRConstants.IN_TRANSIT)){
                ItemStatus itemStatus = new ItemStatus();
                itemStatus.setCodeValue(status);
                items.setItemStatus(itemStatus);
                item.setContent(itemOlemlRecordProcessor.toXML(items));
                try{
                    getDocstoreClientLocator().getDocstoreClient().updateItem(item);
                    updated=true;
                } catch(Exception e){
                    Log.error(e,e);
                }
            }
        }
    }

    return updated;
}
 
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:27,代码来源:ASRHelperServiceImpl.java

示例8: getSingleNidNoSearchTermCaseList

import org.jfree.util.Log; //导入方法依赖的package包/类
protected Set<Integer> getSingleNidNoSearchTermCaseList(Set<Integer> startList) {
	Set<Integer> mergedSet = new HashSet<Integer>();

	try {
		ConceptVersionBI con = OTFUtility.getConceptVersion(getSingleNid().get());
		ConceptVersionBI rootCon = OTFUtility.getRootConcept(con);

		NativeIdSetBI allConcepts = ExtendedAppContext.getDataStore().getAllConceptNids();
		NoSearchTermConcurrentSearcher searcher = new NoSearchTermConcurrentSearcher(allConcepts, rootCon.getConceptNid());
		ExtendedAppContext.getDataStore().iterateConceptDataInParallel(searcher);

		if (!startList.isEmpty()) {
			for (Integer examCon : startList) {
				if (searcher.getResults().contains(examCon)) {
					mergedSet.add(examCon);
				}
			}
		} else {
			mergedSet.addAll(searcher.getResults());
		}
	} catch (Exception e) {
		Log.error("Cannot find calculate the NoSearchTermCaseList", e);
	}

	return mergedSet;
}
 
开发者ID:Apelon-VA,项目名称:ISAAC,代码行数:27,代码来源:NonSearchTypeFilter.java

示例9: createComponent

import org.jfree.util.Log; //导入方法依赖的package包/类
@Override
public Component createComponent(Host host) {

	if (bootstrap != null) {
		bootstrap.setAttributes(attributes);
	} else {
		Log.error("No Overlay has been specified for Mercury! Please set an overlay using DHTOverlay-option.");
	}

	// Create the service
	MercuryService service = new MercuryService(host, port, bootstrap,
			timeBetweenMaintenance, timeToCollectNotifications);
	service.setAvailableAttributes(attributes);

	// Register Service as a Component - Correct way of implementing a
	// service?
	// Needed to allow for actions in .dat-File
	DefaultHost defaultHost = (DefaultHost) host;
	defaultHost.setComponent(service);

	return service;
}
 
开发者ID:flyroom,项目名称:PeerfactSimKOM_Clone,代码行数:23,代码来源:MercuryServiceFactory.java

示例10: getRemoteConnection

import org.jfree.util.Log; //导入方法依赖的package包/类
/**
 * Returns the remote connection. If the force flag is set the connection is 
 * always refreshed from the remote BI server. If the force flag is not set
 * a cached connection is returned.
 * @return
 */
public DatabaseConnection getRemoteConnection(String connectionName, boolean force) {
  if (remoteConnection == null || force) {
    // get information about the remote connection
    String storeDomainUrl = biServerConnection.getUrl() + DATA_ACCESS_API_CONNECTION_GET +REST_NAME_PARM+ connectionName;
    WebResource resource = client.resource(storeDomainUrl);
    ClientResponse response;
    try {
     response  = resource
      		.type(MediaType.APPLICATION_JSON)
      		.type(MediaType.APPLICATION_XML)        	
      		.get(ClientResponse.class);
     if(response.getStatus() == 200){
       remoteConnection = response.getEntity(DatabaseConnection.class); 
     } else {
       Log.error(response.getEntity(String.class));
     }
    } catch (Exception ex) {
      Log.error(ex.getMessage());
      remoteConnection = null;
    }
  }
  return remoteConnection;

}
 
开发者ID:pentaho,项目名称:pdi-agile-bi-plugin,代码行数:31,代码来源:ModelServerPublish.java

示例11: updateConnection

import org.jfree.util.Log; //导入方法依赖的package包/类
/**
 * Jersey call to add or update connection
 * @param connection
 * @param update
 * @return
 */
private boolean updateConnection(DatabaseConnection connection, boolean update) {   
  String storeDomainUrl;
  try {
    if (update) {
      storeDomainUrl = biServerConnection.getUrl() + PLUGIN_DATA_ACCESS_API_CONNECTION_UPDATE;
    } else {

      storeDomainUrl = biServerConnection.getUrl() + PLUGIN_DATA_ACCESS_API_CONNECTION_ADD;
    }
    WebResource resource = client.resource(storeDomainUrl);
    Builder builder = resource
  		  .type(MediaType.APPLICATION_JSON)
  		  .entity(connection);
  		  ClientResponse resp = builder.post(ClientResponse.class);
  		  if(resp != null && resp.getStatus() != 200){
  		    return false;
  		  }
  } catch (Exception ex) {    	
    Log.error(ex.getMessage());
    return false;
  }
  return true;
}
 
开发者ID:pentaho,项目名称:pdi-agile-bi-plugin,代码行数:30,代码来源:ModelServerPublish.java

示例12: createObject

import org.jfree.util.Log; //导入方法依赖的package包/类
/**
 * Creates an object based on this description.
 *
 * @return The object.
 */
public Object createObject() {
    try {
        final Object o = getObjectClass().newInstance();
        // now add the various parameters ...

        final Iterator it = getParameterNames();
        while (it.hasNext()) {
            final String name = (String) it.next();

            if (isParameterIgnored(name)) {
                continue;
            }

            final Method method = findSetMethod(name);
            final Object parameterValue = getParameter(name);
            if (parameterValue == null) {
                // Log.debug ("Parameter: " + name + " is null");
            }
            else {
                method.invoke(o, new Object[]{parameterValue});
            }
        }
        return o;
    }
    catch (Exception e) {
        Log.error("Unable to invoke bean method", e);
    }
    return null;
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:35,代码来源:BeanObjectDescription.java

示例13: readBeanDescription

import org.jfree.util.Log; //导入方法依赖的package包/类
private void readBeanDescription(final Class className, final boolean init) {
  try {
      this.properties = new HashMap();

      final BeanInfo bi = Introspector.getBeanInfo(className);
      final PropertyDescriptor[] propertyDescriptors 
          = bi.getPropertyDescriptors();
      for (int i = 0; i < propertyDescriptors.length; i++)
      {
          final PropertyDescriptor propertyDescriptor = propertyDescriptors[i];
          final Method readMethod = propertyDescriptor.getReadMethod();
          final Method writeMethod = propertyDescriptor.getWriteMethod();
          if (isValidMethod(readMethod, 0) && isValidMethod(writeMethod, 1))
          {
              final String name = propertyDescriptor.getName();
              this.properties.put(name, propertyDescriptor);
              if (init) {
                  super.setParameterDefinition(name, 
                          propertyDescriptor.getPropertyType());
              }
          }
      }
  }
  catch (IntrospectionException e) {
      Log.error ("Unable to build bean description", e);
  }
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:28,代码来源:BeanObjectDescription.java

示例14: getUnconfiguredInstance

import org.jfree.util.Log; //导入方法依赖的package包/类
/**
 * Returns a cloned instance of the object description. The contents
 * of the parameter objects collection are cloned too, so that any
 * already defined parameter value is copied to the new instance.
 * <p>
 * Parameter definitions are not cloned, as they are considered read-only.
 * <p>
 * The newly instantiated object description is not configured. If it
 * need to be configured, then you have to call configure on it.
 *
 * @return A cloned instance.
 */
public ObjectDescription getUnconfiguredInstance() {
    try {
        final AbstractObjectDescription c = (AbstractObjectDescription) super.clone();
        c.parameters = (HashMap) this.parameters.clone();
        c.config = null;
        return c;
    }
    catch (Exception e) {
        Log.error("Should not happen: Clone Error: ", e);
        return null;
    }
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:25,代码来源:AbstractObjectDescription.java

示例15: getTemplateProva

import org.jfree.util.Log; //导入方法依赖的package包/类
private JasperReport getTemplateProva(GenerationPayloadVO genPayloadVO) {
	JasperReport jasperReport=null;
	/*
	JasperReport jasperReport = genPayloadVO.getModeloProva();
	
	if(jasperReport==null){
		DataHandler dHandler = genPayloadVO.getModeloProvaDH();
		
		if(dHandler!=null){
			try {
				jasperReport = (JasperReport) JRLoader.loadObject(dHandler.getInputStream());
			} catch (Exception e) {
				throw new JazzOMRRuntimeException("Erro ao tentar carregar os bytes enviados como JasperReport. Um arquivo .jasper � esperado! "+e.getMessage(),e);
			}
		}
	}
	*/
	
	if(jasperReport==null){
		
		Log.error("nenhum template de relat�rio foi informado. Utilizando template default /reports/ExamReportDSP2.jrxml ");
		
		InputStream stream = this.getClass().getResourceAsStream("/reports/ExamReportDSP2.jrxml");

		try {
			jasperReport = JasperCompileManager.compileReport(stream);
		} catch (JRException e) {
			throw new JazzOMRRuntimeException("Nenhum template de relat�rio foi informado. Envie um arquivo em base64 no campo 'modeloProva', ou um arquvo em anexo no padr�o MTOM, no campo modeloProvaDH!");
		}
	}
	
	return jasperReport;
}
 
开发者ID:darciopacifico,项目名称:omr,代码行数:34,代码来源:OmrGenerator.java


注:本文中的org.jfree.util.Log.error方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。