本文整理了Java中java.lang.LinkageError.getMessage()
方法的一些代码示例,展示了LinkageError.getMessage()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LinkageError.getMessage()
方法的具体详情如下:
包路径:java.lang.LinkageError
类名称:LinkageError
方法名:getMessage
暂无
代码示例来源:origin: jenkinsci/jenkins
private void fireBeforeShutdown(List<Throwable> errors) {
LOGGER.log(Level.FINE, "Notifying termination");
for (ItemListener l : ItemListener.all()) {
try {
l.onBeforeShutdown();
} catch (OutOfMemoryError e) {
// we should just propagate this, no point trying to log
throw e;
} catch (LinkageError e) {
LOGGER.log(Level.WARNING, "ItemListener " + l + ": " + e.getMessage(), e);
// safe to ignore and continue for this one
} catch (Throwable e) {
LOGGER.log(Level.WARNING, "ItemListener " + l + ": " + e.getMessage(), e);
// save for later
errors.add(e);
}
}
}
代码示例来源:origin: jenkinsci/jenkins
@Override
public void run() {
for( Computer c : computers.values() ) {
try {
c.interrupt();
killComputer(c);
pending.add(c.disconnect(null));
} catch (OutOfMemoryError e) {
// we should just propagate this, no point trying to log
throw e;
} catch (LinkageError e) {
LOGGER.log(Level.WARNING, "Could not disconnect " + c + ": " + e.getMessage(), e);
// safe to ignore and continue for this one
} catch (Throwable e) {
LOGGER.log(Level.WARNING, "Could not disconnect " + c + ": " + e.getMessage(), e);
// save for later
errors.add(e);
}
}
}
});
代码示例来源:origin: hawtio/hawtio
e.getMessage());
return;
代码示例来源:origin: com.thoughtworks.xstream/xstream
errors.put(converter.getClass().getName(), e.getMessage());
} catch (final LinkageError e) {
errors.put(converter.getClass().getName(), e.getMessage());
代码示例来源:origin: org.codehaus.groovy/groovy
@Override
public List<MetaMethod> getMetaMethods() {
List<MetaMethod> metaMethods = new LinkedList<MetaMethod>();
List<Class> extensionClasses = getInstanceMethodsExtensionClasses();
for (Class extensionClass : extensionClasses) {
try {
createMetaMethods(extensionClass, metaMethods, false);
} catch (LinkageError e) {
LOG.warning("Module ["+getName()+"] - Unable to load extension class ["+extensionClass+"] due to ["+e.getMessage()+"]. Maybe this module is not supported by your JVM version.");
}
}
extensionClasses = getStaticMethodsExtensionClasses();
for (Class extensionClass : extensionClasses) {
try {
createMetaMethods(extensionClass, metaMethods, true);
} catch (LinkageError e) {
LOG.warning("Module ["+getName()+"] - Unable to load extension class ["+extensionClass+"] due to ["+e.getMessage()+"]. Maybe this module is not supported by your JVM version.");
}
}
return metaMethods;
}
代码示例来源:origin: commons-logging/commons-logging
"the compatibility was caused by a classloader conflict: " + e.getMessage());
} catch (ClassNotFoundException e) {
代码示例来源:origin: org.netbeans.api/org-openide-util-lookup
continue;
throw new ClassNotFoundException(err.getMessage(), err);
} catch (ClassNotFoundException cnfe) {
if (remove) {
代码示例来源:origin: robovm/robovm
+ e.getMessage());
} catch (ClassNotFoundException e) {
代码示例来源:origin: micronaut-projects/micronaut-core
private MutableHttpResponse<?> encodeBodyWithCodec(MutableHttpResponse<?> response,
Object body,
MediaTypeCodec codec,
MediaType mediaType,
ChannelHandlerContext context,
AtomicReference<HttpRequest<?>> requestReference) {
ByteBuf byteBuf;
try {
byteBuf = encodeBodyAsByteBuf(body, codec, context, requestReference);
int len = byteBuf.readableBytes();
MutableHttpHeaders headers = response.getHeaders();
if (!headers.contains(HttpHeaders.CONTENT_TYPE)) {
headers.add(HttpHeaderNames.CONTENT_TYPE, mediaType);
}
headers.remove(HttpHeaders.CONTENT_LENGTH);
headers.add(HttpHeaderNames.CONTENT_LENGTH, String.valueOf(len));
setBodyContent(response, byteBuf);
return response;
} catch (LinkageError e) {
// rxjava swallows linkage errors for some reasons so if one occurs, rethrow as a internal error
throw new InternalServerException("Fatal error encoding bytebuf: " + e.getMessage() , e);
}
}
代码示例来源:origin: apache/maven
ps.println(
"An API incompatibility was encountered during configuration of mojo " + mojoDescriptor.getId() + ": "
+ e.getClass().getName() + ": " + e.getMessage() );
pluginRealm.display( ps );
代码示例来源:origin: apache/maven
PrintStream ps = new PrintStream( os );
ps.println( "An API incompatibility was encountered while executing " + mojoDescriptor.getId() + ": "
+ e.getClass().getName() + ": " + e.getMessage() );
pluginRealm.display( ps );
代码示例来源:origin: hcoles/pitest
public static Function<ClassName, Stream<Class<?>>> nameToClass(
final ClassLoader loader) {
return className -> {
try {
final Class<?> clazz = Class.forName(className.asJavaName(), false,
loader);
return Stream.of(clazz);
} catch (final ClassNotFoundException e1) {
LOG.warning("Could not load " + className
+ " (ClassNotFoundException: " + e1.getMessage() + ")");
return Stream.empty();
} catch (final NoClassDefFoundError e2) {
LOG.warning("Could not load " + className
+ " (NoClassDefFoundError: " + e2.getMessage() + ")");
return Stream.empty();
} catch (final LinkageError e3) {
LOG.warning("Could not load " + className + " " + e3.getMessage());
return Stream.empty();
} catch (final SecurityException e4) {
LOG.warning("Could not load " + className + " " + e4.getMessage());
return Stream.empty();
}
};
}
代码示例来源:origin: camunda/camunda-bpm-platform
reportError(skip.getMessage(), skip, ErrorManager.OPEN_FAILURE);
} catch (final LinkageError skip) {
reportError(skip.getMessage(), new InvocationTargetException(skip),
ErrorManager.OPEN_FAILURE);
代码示例来源:origin: com.sun.mail/javax.mail
reportError(skip.getMessage(), skip, ErrorManager.OPEN_FAILURE);
} catch (final LinkageError skip) {
reportError(skip.getMessage(), new InvocationTargetException(skip),
ErrorManager.OPEN_FAILURE);
代码示例来源:origin: oriley-me/crate
private static String getLinkageErrorMessage(LinkageError e) {
String name = System.mapLibraryName("mediainfo");
String arch = System.getProperty("os.arch");
return String.format("Unable to load %s native library %s: %s", arch, name, e.getMessage());
}
}
代码示例来源:origin: com.github.albfernandez.richfaces/richfaces-core
private boolean isAtmospherePresent() {
try {
Class.forName(ATMOSPHERE_SERVLET_CLASS, false, Thread.currentThread().getContextClassLoader());
return true;
} catch (ClassNotFoundException e) {
// no atmosphere present - no push then
LOGGER.debug("AtmosphereServlet class is not present on classpath, PushServlet won't be registered automatically");
} catch (LinkageError e) {
// atmosphere is missing some dependency - no push too
LOGGER.error(e.getMessage(), e);
}
return false;
}
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
private void fireBeforeShutdown(List<Throwable> errors) {
LOGGER.log(Level.FINE, "Notifying termination");
for (ItemListener l : ItemListener.all()) {
try {
l.onBeforeShutdown();
} catch (OutOfMemoryError e) {
// we should just propagate this, no point trying to log
throw e;
} catch (LinkageError e) {
LOGGER.log(Level.WARNING, "ItemListener " + l + ": " + e.getMessage(), e);
// safe to ignore and continue for this one
} catch (Throwable e) {
LOGGER.log(Level.WARNING, "ItemListener " + l + ": " + e.getMessage(), e);
// save for later
errors.add(e);
}
}
}
代码示例来源:origin: org.apache.drill.exec/drill-java-exec
@Override
public void setup(DrillConfig drillConfig) throws DrillbitStartupException {
profiles = drillConfig.getStringList(ExecConstants.PAM_AUTHENTICATOR_PROFILES);
// Create a JPAM object so that it triggers loading of native "jpamlib" needed. Issues in loading/finding native
// "jpamlib" will be found it Drillbit start rather than when authenticating the first user.
try {
new Pam();
} catch(LinkageError e) {
final String errMsg = "Problem in finding the native library of JPAM (Pluggable Authenticator Module API). " +
"Make sure to set Drillbit JVM option 'java.library.path' to point to the directory where the native " +
"JPAM exists.";
logger.error(errMsg, e);
throw new DrillbitStartupException(errMsg + ":" + e.getMessage(), e);
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
@Override
protected void populateCollection(HierarchicalStreamReader reader, UnmarshallingContext context, Collection collection) {
while (reader.hasMoreChildren()) {
reader.moveDown();
try {
Object item = readItem(reader, context, collection);
collection.add(item);
} catch (CannotResolveClassException e) {
LOGGER.log(WARNING, "Failed to resolve class " + e.getMessage());
RobustReflectionConverter.addErrorInContext(context, e);
} catch (LinkageError e) {
LOGGER.log(WARNING, "Failed to resolve class " + e.getMessage());
RobustReflectionConverter.addErrorInContext(context, e);
}
reader.moveUp();
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
@Override
protected void populateCollection(HierarchicalStreamReader reader, UnmarshallingContext context, Collection collection) {
while (reader.hasMoreChildren()) {
reader.moveDown();
try {
Object item = readItem(reader, context, collection);
collection.add(item);
} catch (CannotResolveClassException e) {
LOGGER.log(WARNING, "Failed to resolve class " + e.getMessage());
RobustReflectionConverter.addErrorInContext(context, e);
} catch (LinkageError e) {
LOGGER.log(WARNING, "Failed to resolve class " + e.getMessage());
RobustReflectionConverter.addErrorInContext(context, e);
}
reader.moveUp();
}
}
内容来源于网络,如有侵权,请联系作者删除!