码迷,mamicode.com
首页 > 编程语言 > 详细

Unrecognized option: -jrockit Error: Could not create the Java Virtual Machine.

时间:2015-05-30 00:41:31      阅读:611      评论:0      收藏:0      [点我收藏+]

标签:weblogic   开发模式   unrecognized option   -jrockit   


Unrecognized option: -jrockit
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit


是weblogic 10.3.5 启动的时候抛出的一个错误


weblogic安装时选择的是开发模式,选用的jdk是jdk1.7,domain域创建的时候选择的jdk也是jdk1.7


在 %DOMAIN_HOME%\bin\startWebLogic.cmd 启动时出现的错误

具体错误信息为

starting weblogic with Java version:
Unrecognized option: -jrockit
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
Starting WLS with line:
D:\DEV_ENV\Java7\JDK17~1.0_6\bin\java -jrockit   -Xms512m -Xmx512m -Dweblogic.Na
me=AdminServer -Djava.security.policy=D:\Oracle\MIDDLE~1\WLSERV~1.3\server\lib\w
eblogic.policy  -Xverify:none  -da -Dplatform.home=D:\Oracle\MIDDLE~1\WLSERV~1.3
 -Dwls.home=D:\Oracle\MIDDLE~1\WLSERV~1.3\server -Dweblogic.home=D:\Oracle\MIDDL
E~1\WLSERV~1.3\server   -Dweblogic.management.discover=true  -Dwlw.iterativeDev=
 -Dwlw.testConsole= -Dwlw.logErrorsToConsole= -Dweblogic.ext.dirs=D:\Oracle\MIDD
LE~1\patch_wls1035\profiles\default\sysext_manifest_classpath;D:\Oracle\MIDDLE~1
\patch_ocp360\profiles\default\sysext_manifest_classpath  weblogic.Server
Unrecognized option: -jrockit
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

D:\Oracle\Middleware\user_projects\domains\dev_domain\bin>

出错地
Unrecognized option: -jrockit
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exi

跟着错误找原因,第一处的错误的上面一行输出信息为

starting weblogic with Java version:

找到该行的脚本内容

echo starting weblogic with Java version:

%JAVA_HOME%\bin\java %JAVA_VM% -version

if "%WLS_REDIRECT_LOG%"=="" (
	echo Starting WLS with line:
	
	echo %JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS%
	%JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS%
) else (
	echo Redirecting output from WLS window to %WLS_REDIRECT_LOG%
	%JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS%  >"%WLS_REDIRECT_LOG%" 2>&1 
)


分析了下,怀疑是 %JAVA_VM%参数的问题


试着将脚本修改为

echo starting weblogic with Java version:
echo %JAVA_VM%
%JAVA_HOME%\bin\java %JAVA_VM% -version

if "%WLS_REDIRECT_LOG%"=="" (
	echo Starting WLS with line:
	
	echo %JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS%
	%JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS%
) else (
	echo Redirecting output from WLS window to %WLS_REDIRECT_LOG%
	%JAVA_HOME%\bin\java %JAVA_VM% %MEM_ARGS% -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS%  >"%WLS_REDIRECT_LOG%" 2>&1 
)

再启动,检验下 %JAVA_VM% 的参数内容
starting weblogic with Java version:
-jrockit
Unrecognized option: -jrockit
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit

证明, %JAVA_VM% 的内容是-jrockit,这是之前bea时候开发的一个jdk,现在用的是sun的jdk,这个参数不识别。

最简单的修改方式,把启动脚本中的 %JAVA_VM% 去掉就可以了


将脚本修改为

<pre name="code" class="html">echo starting weblogic with Java version:

%JAVA_HOME%\bin\java -version

if "%WLS_REDIRECT_LOG%"=="" (
	echo Starting WLS with line:
	
	echo %JAVA_HOME%\bin\java %MEM_ARGS% -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS%
	%JAVA_HOME%\bin\java %MEM_ARGS% -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS%
) else (
	echo Redirecting output from WLS window to %WLS_REDIRECT_LOG%
	%JAVA_HOME%\bin\java %MEM_ARGS% -Dweblogic.Name=%SERVER_NAME% -Djava.security.policy=%WL_HOME%\server\lib\weblogic.policy %JAVA_OPTIONS% %PROXY_SETTINGS% %SERVER_CLASS%  >"%WLS_REDIRECT_LOG%" 2>&1 
)


可以正常启动了。



Unrecognized option: -jrockit Error: Could not create the Java Virtual Machine.

标签:weblogic   开发模式   unrecognized option   -jrockit   

原文地址:http://blog.csdn.net/magi1201/article/details/46246301

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!