热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

java.lang.NoSuchMethodError.getMessage()方法的使用及代码示例

本文整理了Java中java.lang.NoSuchMethodError.getMessage()方法的一些代码示例,展示了NoSuchMethodErr

本文整理了Java中java.lang.NoSuchMethodError.getMessage()方法的一些代码示例,展示了NoSuchMethodError.getMessage()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NoSuchMethodError.getMessage()方法的具体详情如下:
包路径:java.lang.NoSuchMethodError
类名称:NoSuchMethodError
方法名:getMessage

NoSuchMethodError.getMessage介绍

暂无

代码示例

代码示例来源:origin: org.springframework.boot/spring-boot

private String extractClassName(NoSuchMethodError cause) {
int descriptorIndex = cause.getMessage().indexOf('(');
if (descriptorIndex == -1) {
return null;
}
String classAndMethodName = cause.getMessage().substring(0, descriptorIndex);
int methodNameIndex = classAndMethodName.lastIndexOf('.');
if (methodNameIndex == -1) {
return null;
}
return classAndMethodName.substring(0, methodNameIndex);
}

代码示例来源:origin: org.springframework.boot/spring-boot

private String getDescription(NoSuchMethodError cause, String className,
List candidates, URL actual) {
StringWriter description = new StringWriter();
PrintWriter writer = new PrintWriter(description);
writer.print("An attempt was made to call the method ");
writer.print(cause.getMessage());
writer.print(" but it does not exist. Its class, ");
writer.print(className);
writer.println(", is available from the following locations:");
writer.println();
for (URL candidate : candidates) {
writer.print(" ");
writer.println(candidate);
}
writer.println();
writer.println("It was loaded from the following location:");
writer.println();
writer.print(" ");
writer.println(actual);
return description.toString();
}

代码示例来源:origin: redisson/redisson

String msg = nsme.getMessage();
if (msg != null && msg.contains("org.slf4j.impl.StaticLoggerBinder.getSingleton()")) {
INITIALIZATION_STATE = FAILED_INITIALIZATION;

代码示例来源:origin: wildfly/wildfly

String msg = nsme.getMessage();
if (msg != null && msg.contains("org.slf4j.impl.StaticLoggerBinder.getSingleton()")) {
INITIALIZATION_STATE = FAILED_INITIALIZATION;

代码示例来源:origin: camunda/camunda-bpm-platform

public void loadFromXml(Properties props, InputStream is) throws IOException {
try {
props.loadFromXML(is);
}
catch (NoSuchMethodError err) {
throw new IOException("Cannot load properties XML file - not running on JDK 1.5+: " + err.getMessage());
}
}

代码示例来源:origin: camunda/camunda-bpm-platform

public void storeToXml(Properties props, OutputStream os, String header) throws IOException {
try {
props.storeToXML(os, header);
}
catch (NoSuchMethodError err) {
throw new IOException("Cannot store properties XML file - not running on JDK 1.5+: " + err.getMessage());
}
}

代码示例来源:origin: camunda/camunda-bpm-platform

public void storeToXml(Properties props, OutputStream os, String header, String encoding) throws IOException {
try {
props.storeToXML(os, header, encoding);
}
catch (NoSuchMethodError err) {
throw new IOException("Cannot store properties XML file - not running on JDK 1.5+: " + err.getMessage());
}
}

代码示例来源:origin: spring-projects/spring-loaded

Throwable t = ite.getCause();
NoSuchMethodError icce = (NoSuchMethodError) t;
assertEquals("SimpleClass.toInt(Ljava/lang/String;)I", icce.getMessage());

代码示例来源:origin: camunda/camunda-bpm-platform

String msg = nsme.getMessage();
if (msg != null && msg.indexOf("org.slf4j.impl.StaticLoggerBinder.getSingleton()") != -1) {
INITIALIZATION_STATE = FAILED_INITIALIZATION;

代码示例来源:origin: ac-pm/Inspeckage

log(TAG + ex.getMessage());
}catch (NoSuchMethodError ex) {
log(TAG + ex.getMessage());

代码示例来源:origin: com.bbossgroups/bboss-util

public void storeToXml(Properties props, OutputStream os, String header, String encoding) throws IOException {
try {
props.storeToXML(os, header, encoding);
}
catch (NoSuchMethodError err) {
throw new IOException("Cannot store properties XML file - not running on JDK 1.5+: " + err.getMessage());
}
}

代码示例来源:origin: PeteGoo/tcSlackBuildNotifier

public static String getExternalProjectIdOrNull(SProject project){
try {
return project.getExternalId();
} catch (NoSuchMethodError ex) {
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return null;
}
}

代码示例来源:origin: PeteGoo/tcSlackBuildNotifier

public static String getExternalBuildIdOrNull(SBuildType buildType){
try {
return buildType.getExternalId();
} catch (NoSuchMethodError ex) {
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return null;
}
}

代码示例来源:origin: PeteGoo/tcSlackBuildNotifier

public static String getInternalBuildIdOrNull(SBuildType buildType){
try {
return buildType.getInternalId();
} catch (NoSuchMethodError ex) {
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return null;
}
}

代码示例来源:origin: com.bbossgroups/bboss-util

public void storeToXml(Properties props, OutputStream os, String header) throws IOException {
try {
props.storeToXML(os, header);
}
catch (NoSuchMethodError err) {
throw new IOException("Cannot store properties XML file - not running on JDK 1.5+: " + err.getMessage());
}
}

代码示例来源:origin: PeteGoo/tcSlackBuildNotifier

public static String getInternalBuildId(SBuildType buildType){
try {
return buildType.getInternalId();
} catch (NoSuchMethodError ex) {
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return buildType.getBuildTypeId();
}
}

代码示例来源:origin: PeteGoo/tcSlackBuildNotifier

public static String getProjectId(SProject project){
try {
return project.getExternalId();
} catch (NoSuchMethodError ex) {
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return project.getProjectId();
}
}

代码示例来源:origin: PeteGoo/tcSlackBuildNotifier

public static String getExternalProjectId(SProject project){
try {
return project.getExternalId();
} catch (NoSuchMethodError ex) {
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return project.getProjectId();
}
}

代码示例来源:origin: PeteGoo/tcSlackBuildNotifier

public static String getBuildTypeId(SBuildType buildType){
try {
return buildType.getExternalId();
} catch (NoSuchMethodError ex) {
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return buildType.getBuildTypeId();
}
}

代码示例来源:origin: PeteGoo/tcSlackBuildNotifier

public static String getExternalBuildId(SBuildType buildType){
try {
return buildType.getExternalId();
} catch (NoSuchMethodError ex) {
LOGGER.log(Level.INFO,ex.getMessage(),ex);
return buildType.getBuildTypeId();
}
}

推荐阅读
author-avatar
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有