首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >将weblogic应用程序作为窗口服务启动。无法加载jvm.dll

将weblogic应用程序作为窗口服务启动。无法加载jvm.dll
EN

Stack Overflow用户
提问于 2017-08-18 16:34:30
回答 2查看 1.2K关注 0票数 1

我使用util beasvc为weblogic应用程序创建了windows服务。当应用程序使用32位JVM -它可以。但如果我使用64位JVM - beasvc -debug "myService“显示аn错误。使用参数-client:

代码语言:javascript
运行
复制
    Java Home: ....... C:\Program Files\Java\jdk1.8.0_144

    Delay: ....... 0

    Thread created successfully!

    Error in java application .......

    The following line contains specific error details .......
    Unable to find a JVM!

使用参数-server:

代码语言:javascript
运行
复制
Java Home: ....... C:\Program Files\Java\jdk1.8.0_144

Delay: ....... 0

Thread created successfully!

Error in java application .......

The following line contains specific error details .......
Unable to load 'C:\Program Files\Java\jdk1.8.0_144\jre\bin\server\jvm.dll'

OS= Windows Server 2008 64位WebLogic服务器版本: 10.3.6.0

Line form installSvc.cmd "C:/Oracle/Middleware/wlserver_10.3/server/bin/beasvcX64.exe‌​" -install -svcname:"beasvc base_domain_AdminServer" -javahome:"C:\Program Files\Java\jdk1.8.0_144" -execdir:"C:/Oracle/Middleware/user_projects/domains/base_do‌​main" -maxconnectretries:"%MAX_CONNECT_RETRIES%" -host:"%HOST%" -port:"%PORT%" -extrapath:"%EXTRAPATH%" -password:"%WLS_PW%" -cmdline:%CMDLINE%

EN

回答 2

Stack Overflow用户

发布于 2017-08-19 02:22:19

我解决了这个问题。WebLogic可以在两种模式下工作: 32位或64位。此条件必须在文件%WL_HOME%\common\bin\commEnv.cmd中设置并定义参数

代码语言:javascript
运行
复制
set WL_USE_X86DLL=false
set WL_USE_IA64DLL=false
set WL_USE_AMD64DLL=true
@rem JAVA_USE_64BIT, true if JVM uses 64 bit operations
set JAVA_USE_64BIT=true
票数 1
EN

Stack Overflow用户

发布于 2018-06-07 07:27:35

我也有类似的问题。在使用Java1.7( 64 )的WinServer2008 64上运行WL11g。我通过以下方式修复了我的问题:

1)在installSvc.cmd中,将"%WL_HOME%\server\bin\beasvc“替换为"%WL_HOME%\server\bin\beasvcX64”(即添加"X64"),以使用我拥有的64位java。

2)在开始时,如果我的自定义安装脚本调用installSvc.cmd,我会调用commEnv.cmd来预置JAVA_HOME和JAVA_VENDOR。这样我就可以正常使用PRODUCTION_MODE了。将PRODUCTION_MODE=true设置为"-server“,一切正常

我的自定义安装脚本:

代码语言:javascript
运行
复制
echo off
SETLOCAL

set WL_HOME="C:\wl11g\wlserver_10.3"
@rem /* set defaults ENV */
call "%WL_HOME%\common\bin\commEnv.cmd"

@rem /* override defaults and add more for service installation */
set DOMAIN_NAME=ExpressDomain
set USERDOMAIN_HOME="C:\wl11g\user_projects\domains\%DOMAIN_NAME%"
set SERVER_NAME=ExpressServer
set PRODUCTION_MODE=true

@rem ******************************************************
@rem * If you run the service even once from command line *
@rem * it asks for credentials and store them             *
@rem * and there is no need to put them here again        *
@rem ******************************************************
@rem set WLS_USER=weblogic
@rem set WLS_PW=weblogic

@rem /* in case of Management server */
@rem set ADMIN_URL=http://localhost:7501

set MEM_ARGS=-Xms1024m -Xmx2048m

call "%WL_HOME%\server\bin\installSvc.cmd"
ENDLOCAL

我的installSvc.cmd

代码语言:javascript
运行
复制
@rem *************************************************************************
@rem This script is used to install WebLogic Server as a Windows Service.
@rem
@rem To create your own start script for your domain, simply set the 
@rem SERVER_NAME variable to your server name then call this script from your
@rem domain directory.
@rem
@rem This script sets the following variables before installing 
@rem WebLogic Server as a Windows Service:
@rem
@rem WL_HOME    - The root directory of your WebLogic installation
@rem JAVA_HOME  - Location of the version of Java used to start WebLogic 
@rem              Server. This variable must point to the root directory of a 
@rem              JDK installation and will be set for you by the installer. 
@rem              See the Oracle Fusion Middleware Supported System Configurations page 
@rem              (http://www.oracle.com/technology/software/products/ias/files/fusion_certification.html) 
@rem               for an up-to-date list of supported JVMs.
@rem PATH       - Adds the JDK and WebLogic directories to the system path.  
@rem CLASSPATH  - Adds the JDK and WebLogic jars to the classpath.  
@rem
@rem Other variables that installSvc takes are:
@rem
@rem WLS_USER     - admin username for server startup
@rem WLS_PW       - cleartext password for server startup
@rem ADMIN_URL    - if this variable is set, the server started will be a 
@rem                managed server, and will look to the url specified (i.e. 
@rem                http://localhost:7001) as the admin server.
@rem PRODUCTION_MODE    - set to true for production mode servers, false for 
@rem                development mode
@rem JAVA_OPTIONS - Java command-line options for running the server. (These
@rem                will be tagged on to the end of the JAVA_VM and MEM_ARGS)
@rem JAVA_VM      - The java arg specifying the VM to run.  (i.e. -server, 
@rem                -client, etc.)
@rem MEM_ARGS     - The variable to override the standard memory arguments
@rem                passed to java
@rem
@rem
@rem MAX_CONNECT_RETRIES - Number of attempts the Windows Service will make to check 
@rem                if the Weblogic Server is started. If this variable 
@rem                is specified along with HOST and PORT, the Windows Service will 
@rem                wait until the Weblogic Server is started.
@rem HOST         - IP address of the Weblogic Server  
@rem PORT         - Port number where the WebLogic Server is listening for requests 
@rem               
@rem jDriver for Oracle users: This script assumes that native libraries
@rem required for jDriver for Oracle have been installed in the proper
@rem location and that your system PATH variable has been set appropriately.
@rem 
@rem For additional information, refer to "Managing Server Startup and Shutdown for Oracle WebLogic Server"  
@rem (http://download.oracle.com/docs/cd/E23943_01/web.1111/e13708/overview.htm).
@rem *************************************************************************

@echo off
SETLOCAL


set WL_HOME=C:\wl11g\wlserver_10.3
call "%WL_HOME%\common\bin\commEnv.cmd"

@rem Check that the WebLogic classes are where we expect them to be
:checkWLS
if exist "%WL_HOME%\server\lib\weblogic.jar" goto checkJava
echo The WebLogic Server wasn't found in directory %WL_HOME%\server.
echo Please edit your script so that the WL_HOME variable points 
echo to the WebLogic installation directory.
goto finish

@rem Check that java is where we expect it to be
:checkJava
if exist "%JAVA_HOME%\bin\java.exe" goto runWebLogic
echo The JDK wasn't found in directory %JAVA_HOME%.
echo Please edit your script so that the JAVA_HOME variable 
echo points to the location of your JDK.
goto finish

:runWebLogic

if not "%JAVA_VM%" == "" goto noResetJavaVM
if "%JAVA_VENDOR%" == "BEA" set JAVA_VM=-jrocket
if "%JAVA_VENDOR%" == "HP"  set JAVA_VM=-server
if "%JAVA_VENDOR%" == "Sun" set JAVA_VM=-server

:noResetJavaVM
if not "%MEM_ARGS%" == "" goto noResetMemArgs
set MEM_ARGS=-Xms32m -Xmx200m

:noResetMemArgs

@echo on

set CLASSPATH=%WEBLOGIC_CLASSPATH%;%CLASSPATH%

@echo ***************************************************
@echo *  To start WebLogic Server, use the password     *
@echo *  assigned to the system user.  The system       *
@echo *  username and password must also be used to     *
@echo *  access the WebLogic Server console from a web  *
@echo *  browser.                                       *
@echo ***************************************************

rem *** Set Command Line for service to execute within created JVM

@echo off

if "%ADMIN_URL%" == "" goto runAdmin
@echo on
set CMDLINE="%JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -classpath \"%CLASSPATH%\" -Dweblogic.Name=%SERVER_NAME% -Dweblogic.management.username=%WLS_USER% -Dweblogic.management.server=\"%ADMIN_URL%\" -Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE% -Djava.security.policy=\"%WL_HOME%\server\lib\weblogic.policy\" weblogic.Server"
goto finish

:runAdmin
@echo on
set CMDLINE="%JAVA_VM% %MEM_ARGS% %JAVA_OPTIONS% -classpath \"%CLASSPATH%\" -Dweblogic.Name=%SERVER_NAME% -Dweblogic.management.username=%WLS_USER% -Dweblogic.ProductionModeEnabled=%PRODUCTION_MODE% -Djava.security.policy=\"%WL_HOME%\server\lib\weblogic.policy\" weblogic.Server"

:finish
rem *** Set up extrapath for win32 and win64 platform separately
if "%WL_USE_X86DLL%" == "true" set EXTRAPATH=%WL_HOME%\server\native\win\32;%WL_HOME%\server\bin;%JAVA_HOME%\jre\bin;%JAVA_HOME%\bin;%WL_HOME%\server\native\win\32\oci920_8

if "%WL_USE_IA64DLL%" == "true" set EXTRAPATH=%WL_HOME%\server\native\win\64\;%WL_HOME%\server\bin;%JAVA_HOME%\jre\bin;%JAVA_HOME%\bin;%WL_HOME%\server\native\win\64\oci920_8

if "%WL_USE_AMD64DLL%" == "true" set EXTRAPATH=%WL_HOME%\server\native\win\x64\;%WL_HOME%\server\bin;%JAVA_HOME%\jre\bin;%JAVA_HOME%\bin;%WL_HOME%\server\native\win\x64\oci920_8

rem *** Install the service
"%WL_HOME%\server\bin\beasvcX64" -install -svcname:"beasvc %DOMAIN_NAME%_%SERVER_NAME%" -javahome:"%JAVA_HOME%" -execdir:"%USERDOMAIN_HOME%" -maxconnectretries:"%MAX_CONNECT_RETRIES%" -host:"%HOST%" -port:"%PORT%" -extrapath:"%EXTRAPATH%" -password:"%WLS_PW%" -cmdline:%CMDLINE%

ENDLOCAL
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45752153

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档