【发布时间】:2014-10-22 01:40:16
【问题描述】:
我们正在使用 WebSphere 7- 应用程序服务器来部署项目,并且这个应用程序服务器被赋予了这样的简单 JVM 参数,
–Dsecurityresource=/web/sharedLibraries/security_config.xml -DConfig=/web/properties/Config.ini
但是当尝试启动应用程序服务器时,会抛出一个原生错误(native_stderr.log),
<?xml version="1.0" ?>
<verbosegc version="GA24_Java6_SR15_20131016_1337_B170922_CMPRSS">
<initialized>
<attribute name="gcPolicy" value="-Xgcpolicy:optthruput" />
<attribute name="maxHeapSize" value="0x100000000" />
<attribute name="initialHeapSize" value="0xc0000000" />
<attribute name="compressedRefs" value="true" />
<attribute name="compressedRefsDisplacement" value="0x0" />
<attribute name="compressedRefsShift" value="0x3" />
<attribute name="pageSize" value="0x10000" />
<attribute name="requestedPageSize" value="0x10000" />
</initialized>
Exception in thread "main" java.lang.NoClassDefFoundError: Dsecurityresource=.web.sharedLibraries.security-config.xml
Caused by: java.lang.ClassNotFoundException: Dsecurityresource=.web.sharedLibraries.FalconCluster.security-config.xml
at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
at java.lang.ClassLoader.loadClass(ClassLoader.java:677)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
at java.lang.ClassLoader.loadClass(ClassLoader.java:643)
</verbosegc>
Could not find the main class: Dsecurityresource=/web/sharedLibraries/security-config.xml. Program will exit.
JVM 参数在 WebSphere 中的以下位置给出。
Servers > Server Types > WebSphere application servers > server_name >Java and process management > Process definition > Java virtual machine and in Generic JVM arguments
它抛出 NoClassDefFoundError 很奇怪。
或者 Websphere 中是否有任何其他配置可能导致此问题?
注意:JVM参数中提供的文件和路径存在并且具有读取和执行权限
提前致谢。
【问题讨论】:
-
查看 NoClassDefFoundError 我认为您没有提到参数作为 JVM 参数。它被解析为类名
-
@Neeraj:它作为 JVM 参数传递(编辑帖子)。但是有些它是如何作为类名传递的。这就是谜团。
标签: java jvm noclassdeffounderror websphere-7 jvm-arguments