我们使用的是WebSphere 7应用程序服务器部署项目,该应用程序服务器提供简单的JVM参数就是这样,WebSphere Application Server的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参数的参数。它被解析为类名 – 2014-08-28 09:11:17
@Neeraj:它作为JVM参数传递(编辑后)。但有些如何将它作为类名称进行解析。这一直是个谜。 – naamadheya 2014-08-29 17:11:53