List of usage examples for java.lang IllegalAccessException printStackTrace
public void printStackTrace()
From source file:org.springside.examples.oadata.service.ProjecgtRuleViewService.java
License:asdf
public boolean sysProjectDoc(ProjectData projectData) { boolean result = false; List<ProjectRuleView> projectRuleViews = projectRuleViewDao .queryProjectRuleView(projectData.getProjectId()); ProjectRuleView projectRuleView = null; if (projectRuleViews != null && projectRuleViews.size() > 0) { projectRuleView = projectRuleViews.get(0); //?// ww w. j a va 2 s .c o m projectRuleView.setIsPack(projectData.getProjectPkgDatas().size() > 0 ? "1" : "0"); if (projectData.getProjectPkgDatas().size() > 0) { for (ProjectRuleView projRView : projectRuleViews) { ProjectRulePkgView projectRulePkgView = new ProjectRulePkgView(); try { BeanUtils.copyProperties(projectRulePkgView, projRView); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } projectRuleView.getPack().add(projectRulePkgView); } } //? List<ProjectDocView> projectDocViews = projectDocViewDao.queryProjectDocView(projectData.getProjectId(), "2"); if (projectDocViews != null && projectDocViews.size() > 0) {//? List<String> purchaseDocUrls = new ArrayList<String>(); for (ProjectDocView projectDocView : projectDocViews) { purchaseDocUrls .add(projectDocView.getAttachmentPath() + "*" + projectDocView.getAttachmentName()); } //? projectRuleView.setPurchaseDocUrl(StringUtils.join(purchaseDocUrls, ",")); } //?? StringWriter writer = new StringWriter(); BodyXml<ProjectRuleView> bodyXml = new BodyXml<ProjectRuleView>(); bodyXml.setProjectInfo(projectRuleView); ProjectRuleXml projectXml = new ProjectRuleXml(); projectXml.setBody(bodyXml); HeadXml header = new HeadXml(projectData.getDepartmentId(), projectData.getCreator()); projectXml.setHeader(header); try { marshaller.marshal(projectXml, writer); } catch (JAXBException e) { logger.error("{}|{}XML?:" + e.getStackTrace(), projectData.getId(), projectData.getProjectName()); } try { HttpPost httpPost = new HttpPost(propertiesLoader.getProperty("syn.synProjectRuleUrl")); // ??/ List<NameValuePair> parameters = new ArrayList<NameValuePair>(); parameters.add(new BasicNameValuePair("xmlContent", writer.toString())); // UrlEncodedFormEntity UrlEncodedFormEntity formEntiry = new UrlEncodedFormEntity(parameters, "UTF-8"); httpPost.setEntity(formEntiry); // ?connection poolclient CloseableHttpResponse closeableHttpResponse = httpClient.execute(httpPost); closeableHttpResponse.getEntity().getContent(); String xmlContentresp = IOUtils.toString(closeableHttpResponse.getEntity().getContent()); if (xmlContentresp.contains("operTag")) { String operTag = StringUtils.substringBetween(xmlContentresp, "<operTag>", "</operTag>"); if ("Y".equals(operTag)) {//? //?? projectData.setSynStatus(ProjectData.SYNSTATUS_DOC_SUCCESS); projectDataDao.save(projectData); result = true; } else { logger.error("?{}|{}??", projectData.getId(), projectData.getProjectName()); } } closeableHttpResponse.close(); } catch (IOException e) { e.printStackTrace(); logger.error("?{}|{}??:" + e.getStackTrace(), projectData.getId(), projectData.getProjectName()); } } return result; }
From source file:org.dmfs.android.retentionmagic.RetentionMagic.java
public static void init(final Activity activity, final SharedPreferences prefs) { try {/*from w w w . ja v a 2 s. c o m*/ init(activity.getClass(), activity, prefs); } catch (IllegalAccessException e) { e.printStackTrace(); } }
From source file:org.dmfs.android.retentionmagic.RetentionMagic.java
public static void init(final Fragment fragment, final SharedPreferences prefs) { try {//from w w w.j a va2s . co m init(fragment.getClass(), fragment, prefs); } catch (IllegalAccessException e) { e.printStackTrace(); } }
From source file:org.dmfs.android.retentionmagic.RetentionMagic.java
public static void init(final android.support.v4.app.Fragment fragment, final SharedPreferences prefs) { try {//from w w w . j a v a 2 s. c o m init(fragment.getClass(), fragment, prefs); } catch (IllegalAccessException e) { e.printStackTrace(); } }
From source file:org.dmfs.android.retentionmagic.RetentionMagic.java
public static void init(final Activity activity, final Bundle extras) { try {/*from w w w.j a va 2s . c o m*/ init(activity.getClass(), activity, extras); } catch (IllegalAccessException e) { e.printStackTrace(); } }
From source file:org.dmfs.android.retentionmagic.RetentionMagic.java
public static void init(final Fragment fragment, final Bundle arguments) { try {/*from w w w .j a va2 s.co m*/ init(fragment.getClass(), fragment, arguments); } catch (IllegalAccessException e) { e.printStackTrace(); } }
From source file:org.dmfs.android.retentionmagic.RetentionMagic.java
public static void init(final android.support.v4.app.Fragment fragment, final Bundle arguments) { try {//from w w w.j ava2 s . c om init(fragment.getClass(), fragment, arguments); } catch (IllegalAccessException e) { e.printStackTrace(); } }
From source file:org.dmfs.android.retentionmagic.RetentionMagic.java
public static void persist(final Activity activity, final SharedPreferences.Editor editor) { try {/*from w w w .j ava 2 s. co m*/ persist(activity.getClass(), activity, editor); } catch (IllegalAccessException e) { e.printStackTrace(); } }
From source file:org.dmfs.android.retentionmagic.RetentionMagic.java
public static void persist(final Fragment fragment, final SharedPreferences.Editor editor) { try {/*from w ww .jav a 2s . c om*/ persist(fragment.getClass(), fragment, editor); } catch (IllegalAccessException e) { e.printStackTrace(); } }
From source file:com.square.client.gwt.server.test.StringConverterTest.java
@SuppressWarnings("unchecked") private Map<String, String> mapperCriteres(RemotePagingCriteriasDto<?> criteres) { try {/*from ww w .j a v a 2 s .c om*/ final Map<String, String> map = BeanUtils.describe(criteres.getCriterias()); map.putAll(BeanUtils.describe(criteres)); // on nettoie la map final Set<String> keyset = new HashSet<String>(map.keySet()); for (String key : keyset) { if (StringUtils.isBlank(map.get(key)) || key.equals(Messages.getString("StringConverterTest.58")) || key.equals("criterias")) { map.remove(key); } } return map; } catch (IllegalAccessException e) { e.printStackTrace(); throw new TechnicalException(Messages.getString("StringConverterTest.60")); } catch (InvocationTargetException e) { e.printStackTrace(); throw new TechnicalException(Messages.getString("StringConverterTest.61")); } catch (NoSuchMethodException e) { e.printStackTrace(); throw new TechnicalException(Messages.getString("StringConverterTest.62")); } }