我們使用的是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