`

weblogic设置远程调试

 
阅读更多

首先修改对应的domian下\bin\startweblogic.cmd文件

加上set JAVA_DEBUG=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n

 

address可以随意指定

 

具体见附件第一张

 

接下来配置eclipse

具体见附件第二张

QQ截图20140630084431.png

 

 

方法2 直接修改setDomainEnv.cmd

如下 红色的字是我们所要增加的

@ECHO OFF

@REM WARNING: This file is created by the Configuration Wizard.
@REM Any changes to this script may be lost when adding extensions to this configuration.

@REM *************************************************************************
@REM This script is used to setup the needed environment to be able to start Weblogic Server in this domain.
@REM 
@REM This script initializes the following variables before calling commEnv to set other variables:
@REM 
@REM WL_HOME         - The BEA home directory of your WebLogic installation.
@REM JAVA_VM         - The desired Java VM to use. You can set this environment variable before calling
@REM                   this script to switch between Sun or BEA or just have the default be set. 
@REM JAVA_HOME       - Location of the version of Java used to start WebLogic
@REM                   Server. Depends directly on which JAVA_VM value is set by default or by the environment.
@REM USER_MEM_ARGS   - The variable to override the standard memory arguments
@REM                   passed to java.
@REM PRODUCTION_MODE - The variable that determines whether Weblogic Server is started in production mode.
@REM DOMAIN_PRODUCTION_MODE 
@REM                 - The variable that determines whether the workshop related settings like the debugger,
@REM                   testconsole or iterativedev should be enabled. ONLY settable using the 
@REM                   command-line parameter named production
@REM                   NOTE: Specifying the production command-line param will force 
@REM                          the server to start in production mode.
@REM 
@REM Other variables used in this script include:
@REM SERVER_NAME     - Name of the weblogic server.
@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
@REM                   MEM_ARGS)
@REM 
@REM For additional information, refer to "Managing Server Startup and Shutdown for Oracle WebLogic Server"
@REM (http://download.oracle.com/docs/cd/E17904_01/web.1111/e13708/overview.htm).
@REM *************************************************************************

set WL_HOME=E:\Oracle\Middleware\wlserver_10.3
for %%i in ("%WL_HOME%") do set WL_HOME=%%~fsi

set BEA_JAVA_HOME=E:\Oracle\Middleware\jrockit_160_22_D1.1.1-3

set SUN_JAVA_HOME=E:\Oracle\Middleware\jdk160_21

if "%JAVA_VENDOR%"=="Oracle" (
	set JAVA_HOME=%BEA_JAVA_HOME%
) else (
	if "%JAVA_VENDOR%"=="Sun" (
		set JAVA_HOME=%SUN_JAVA_HOME%
	) else (
		set JAVA_VENDOR=Sun
		set JAVA_HOME=E:\Oracle\Middleware\jdk160_21
	)
)

@REM We need to reset the value of JAVA_HOME to get it shortened AND 
@REM we can not shorten it above because immediate variable expansion will blank it

set JAVA_HOME=%JAVA_HOME%
for %%i in ("%JAVA_HOME%") do set JAVA_HOME=%%~fsi

set SAMPLES_HOME=%WL_HOME%\samples

set DOMAIN_HOME=E:\Oracle\Middleware\user_projects\domains\fxgl2.1_domain
for %%i in ("%DOMAIN_HOME%") do set DOMAIN_HOME=%%~fsi

set LONG_DOMAIN_HOME=E:\Oracle\Middleware\user_projects\domains\fxgl2.1_domain

if "%DEBUG_PORT%"=="" (
	set DEBUG_PORT=8453
)

if "%SERVER_NAME%"=="" (
	set SERVER_NAME=AdminServer
)

set DERBY_FLAG=false

set enableHotswapFlag=

set PRODUCTION_MODE=

set doExitFlag=false
set verboseLoggingFlag=false
for %%p in (%*) do call :SET_PARAM %%p
GOTO :CMD_LINE_DONE
	:SET_PARAM
	for %%q in (%1) do set noQuotesParam=%%~q
	if /i "%noQuotesParam%" == "nodebug" (
		set debugFlag=false
		GOTO :EOF
	)
	if /i "%noQuotesParam%" == "production" (
		set DOMAIN_PRODUCTION_MODE=true
		GOTO :EOF
	)
	if /i "%noQuotesParam%" == "notestconsole" (
		set testConsoleFlag=false
		GOTO :EOF
	)
	if /i "%noQuotesParam%" == "noiterativedev" (
		set iterativeDevFlag=false
		GOTO :EOF
	)
	if /i "%noQuotesParam%" == "noLogErrorsToConsole" (
		set logErrorsToConsoleFlag=false
		GOTO :EOF
	)
	if /i "%noQuotesParam%" == "noderby" (
		set DERBY_FLAG=false
		GOTO :EOF
	)
	if /i "%noQuotesParam%" == "doExit" (
		set doExitFlag=true
		GOTO :EOF
	)
	if /i "%noQuotesParam%" == "noExit" (
		set doExitFlag=false
		GOTO :EOF
	)
	if /i "%noQuotesParam%" == "verbose" (
		set verboseLoggingFlag=true
		GOTO :EOF
	)
	if /i "%noQuotesParam%" == "enableHotswap" (
		set enableHotswapFlag=-javaagent:%WL_HOME%\server\lib\diagnostics-agent.jar
		GOTO :EOF
	) else (
		set PROXY_SETTINGS=%PROXY_SETTINGS% %1
	)
	GOTO :EOF
:CMD_LINE_DONE


set MEM_DEV_ARGS=

if "%DOMAIN_PRODUCTION_MODE%"=="true" (
	set PRODUCTION_MODE=%DOMAIN_PRODUCTION_MODE%
)

if "%PRODUCTION_MODE%"=="true" (
	set debugFlag=false
	set testConsoleFlag=false
	set iterativeDevFlag=false
	set logErrorsToConsoleFlag=false
)

@REM If you want to override the default Patch Classpath, Library Path and Path for this domain,
@REM Please uncomment the following lines and add a valid value for the environment variables
@REM set PATCH_CLASSPATH=[myPatchClasspath] (windows)
@REM set PATCH_LIBPATH=[myPatchLibpath] (windows)
@REM set PATCH_PATH=[myPatchPath] (windows)
@REM PATCH_CLASSPATH=[myPatchClasspath] (unix)
@REM PATCH_LIBPATH=[myPatchLibpath] (unix)
@REM PATCH_PATH=[myPatchPath] (unix)

call "%WL_HOME%\common\bin\commEnv.cmd"

set WLS_HOME=%WL_HOME%\server

if "%JAVA_VENDOR%"=="Sun" (
	set WLS_MEM_ARGS_64BIT=-Xms1024m -Xmx1024m
	set WLS_MEM_ARGS_32BIT=-Xms256m -Xmx512m
) else (
	set WLS_MEM_ARGS_64BIT=-Xms1024m -Xmx1024m
	set WLS_MEM_ARGS_32BIT=-Xms512m -Xmx512m
)

set MEM_ARGS_64BIT=%WLS_MEM_ARGS_64BIT%

set MEM_ARGS_32BIT=%WLS_MEM_ARGS_32BIT%

if "%JAVA_USE_64BIT%"=="true" (
	set MEM_ARGS=%MEM_ARGS_64BIT%
) else (
	set MEM_ARGS=%MEM_ARGS_32BIT%
)

set MEM_PERM_SIZE_64BIT=-XX:PermSize=256m

set MEM_PERM_SIZE_32BIT=-XX:PermSize=48m

if "%JAVA_USE_64BIT%"=="true" (
	set MEM_PERM_SIZE=%MEM_PERM_SIZE_64BIT%
) else (
	set MEM_PERM_SIZE=%MEM_PERM_SIZE_32BIT%
)

set MEM_MAX_PERM_SIZE_64BIT=-XX:MaxPermSize=512m

set MEM_MAX_PERM_SIZE_32BIT=-XX:MaxPermSize=128m

if "%JAVA_USE_64BIT%"=="true" (
	set MEM_MAX_PERM_SIZE=%MEM_MAX_PERM_SIZE_64BIT%
) else (
	set MEM_MAX_PERM_SIZE=%MEM_MAX_PERM_SIZE_32BIT%
)

if "%JAVA_VENDOR%"=="Sun" (
	if "%PRODUCTION_MODE%"=="" (
		set MEM_DEV_ARGS=-XX:CompileThreshold=8000 %MEM_PERM_SIZE% 
	)
)

@REM Had to have a separate test here BECAUSE of immediate variable expansion on windows

if "%JAVA_VENDOR%"=="Sun" (
	set MEM_ARGS=%MEM_ARGS% %MEM_DEV_ARGS% %MEM_MAX_PERM_SIZE%
)

if "%JAVA_VENDOR%"=="HP" (
	set MEM_ARGS=%MEM_ARGS% %MEM_MAX_PERM_SIZE%
)

if "%JAVA_VENDOR%"=="Apple" (
	set MEM_ARGS=%MEM_ARGS% %MEM_MAX_PERM_SIZE%
)

@REM IF USER_MEM_ARGS the environment variable is set, use it to override ALL MEM_ARGS values

if NOT "%USER_MEM_ARGS%"=="" (
	set MEM_ARGS=%USER_MEM_ARGS%
)

set JAVA_PROPERTIES=-Dplatform.home=%WL_HOME% -Dwls.home=%WLS_HOME% -Dweblogic.home=%WLS_HOME% 

@REM  To use Java Authorization Contract for Containers (JACC) in this domain, 
@REM  please uncomment the following section. If there are multiple machines in 
@REM  your domain, be sure to edit the setDomainEnv in the associated domain on 
@REM  each machine.
@REM 
@REM -Djava.security.manager
@REM -Djava.security.policy=location of weblogic.policy
@REM -Djavax.security.jacc.policy.provider=weblogic.security.jacc.simpleprovider.SimpleJACCPolicy
@REM -Djavax.security.jacc.PolicyConfigurationFactory.provider=weblogic.security.jacc.simpleprovider.PolicyConfigurationFactoryImpl
@REM -Dweblogic.security.jacc.RoleMapperFactory.provider=weblogic.security.jacc.simpleprovider.RoleMapperFactoryImpl

set JAVA_PROPERTIES=%JAVA_PROPERTIES% %EXTRA_JAVA_PROPERTIES%

set ARDIR=%WL_HOME%\server\lib

pushd %LONG_DOMAIN_HOME%

@REM Clustering support (edit for your cluster!)

if "%ADMIN_URL%"=="" (
	@REM The then part of this block is telling us we are either starting an admin server OR we are non-clustered
	set CLUSTER_PROPERTIES=-Dweblogic.management.discover=true
) else (
	set CLUSTER_PROPERTIES=-Dweblogic.management.discover=false -Dweblogic.management.server=%ADMIN_URL%
)

if NOT "%LOG4J_CONFIG_FILE%"=="" (
	set JAVA_PROPERTIES=%JAVA_PROPERTIES% -Dlog4j.configuration=file:%LOG4J_CONFIG_FILE%
)

set JAVA_PROPERTIES=%JAVA_PROPERTIES% %CLUSTER_PROPERTIES%

set JAVA_DEBUG=

set debugFlag=true  

if "%debugFlag%"=="true" (
	set JAVA_DEBUG=-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=%DEBUG_PORT%,server=y,suspend=n -Djava.compiler=NONE
	set JAVA_OPTIONS=%JAVA_OPTIONS% %enableHotswapFlag% -ea -da:com.bea... -da:javelin... -da:weblogic... -ea:com.bea.wli... -ea:com.bea.broker... -ea:com.bea.sbconsole...
) else (
	set JAVA_OPTIONS=%JAVA_OPTIONS% %enableHotswapFlag% -da
)

if NOT exist %JAVA_HOME%\lib (
	echo The JRE was not found in directory %JAVA_HOME%. ^(JAVA_HOME^)
	echo Please edit your environment and set the JAVA_HOME
	echo variable to point to the root directory of your Java installation.
	popd
	pause
	GOTO :EOF
)

if "%DERBY_FLAG%"=="true" (
	set DATABASE_CLASSPATH=%DERBY_CLASSPATH%
) else (
	set DATABASE_CLASSPATH=%DERBY_CLIENT_CLASSPATH%
)

if NOT "%DATABASE_CLASSPATH%"=="" (
	if NOT "%POST_CLASSPATH%"=="" (
		set POST_CLASSPATH=%POST_CLASSPATH%;%DATABASE_CLASSPATH%
	) else (
		set POST_CLASSPATH=%DATABASE_CLASSPATH%
	)
)

if NOT "%ARDIR%"=="" (
	if NOT "%POST_CLASSPATH%"=="" (
		set POST_CLASSPATH=%POST_CLASSPATH%;%ARDIR%\xqrl.jar
	) else (
		set POST_CLASSPATH=%ARDIR%\xqrl.jar
	)
)

@REM PROFILING SUPPORT

set JAVA_PROFILE=

set SERVER_CLASS=weblogic.Server

set JAVA_PROPERTIES=%JAVA_PROPERTIES% %WLP_JAVA_PROPERTIES%

set JAVA_OPTIONS=%JAVA_OPTIONS% %JAVA_PROPERTIES% -Dwlw.iterativeDev=%iterativeDevFlag% -Dwlw.testConsole=%testConsoleFlag% -Dwlw.logErrorsToConsole=%logErrorsToConsoleFlag%

if "%PRODUCTION_MODE%"=="true" (
	set JAVA_OPTIONS= -Dweblogic.ProductionModeEnabled=true %JAVA_OPTIONS%
)

@REM -- Setup properties so that we can save stdout and stderr to files

if NOT "%WLS_STDOUT_LOG%"=="" (
	echo Logging WLS stdout to %WLS_STDOUT_LOG%
	set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.Stdout=%WLS_STDOUT_LOG%
)

if NOT "%WLS_STDERR_LOG%"=="" (
	echo Logging WLS stderr to %WLS_STDERR_LOG%
	set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.Stderr=%WLS_STDERR_LOG%
)

@REM ADD EXTENSIONS TO CLASSPATHS

if NOT "%EXT_PRE_CLASSPATH%"=="" (
	if NOT "%PRE_CLASSPATH%"=="" (
		set PRE_CLASSPATH=%EXT_PRE_CLASSPATH%;%PRE_CLASSPATH%
	) else (
		set PRE_CLASSPATH=%EXT_PRE_CLASSPATH%
	)
)

if NOT "%EXT_POST_CLASSPATH%"=="" (
	if NOT "%POST_CLASSPATH%"=="" (
		set POST_CLASSPATH=%POST_CLASSPATH%;%EXT_POST_CLASSPATH%
	) else (
		set POST_CLASSPATH=%EXT_POST_CLASSPATH%
	)
)

if NOT "%WEBLOGIC_EXTENSION_DIRS%"=="" (
	set JAVA_OPTIONS=%JAVA_OPTIONS% -Dweblogic.ext.dirs=%WEBLOGIC_EXTENSION_DIRS%
)

set JAVA_OPTIONS=%JAVA_OPTIONS%

@REM SET THE CLASSPATH

if NOT "%WLP_POST_CLASSPATH%"=="" (
	if NOT "%CLASSPATH%"=="" (
		set CLASSPATH=%WLP_POST_CLASSPATH%;%CLASSPATH%
	) else (
		set CLASSPATH=%WLP_POST_CLASSPATH%
	)
)

if NOT "%POST_CLASSPATH%"=="" (
	if NOT "%CLASSPATH%"=="" (
		set CLASSPATH=%POST_CLASSPATH%;%CLASSPATH%
	) else (
		set CLASSPATH=%POST_CLASSPATH%
	)
)

if NOT "%WEBLOGIC_CLASSPATH%"=="" (
	if NOT "%CLASSPATH%"=="" (
		set CLASSPATH=%WEBLOGIC_CLASSPATH%;%CLASSPATH%
	) else (
		set CLASSPATH=%WEBLOGIC_CLASSPATH%
	)
)

if NOT "%PRE_CLASSPATH%"=="" (
	set CLASSPATH=%PRE_CLASSPATH%;%CLASSPATH%
)

if NOT "%JAVA_VENDOR%"=="BEA" (
	set JAVA_VM=%JAVA_VM% %JAVA_DEBUG% %JAVA_PROFILE%
) else (
	set JAVA_VM=%JAVA_VM% %JAVA_DEBUG% %JAVA_PROFILE%
)

 

 

  • 大小: 40.2 KB
  • 大小: 46.6 KB
分享到:
评论

相关推荐

    eclipse与tomcat、weblogic远程调试小结(windows系统)

    3. **WebLogic远程调试配置**: - 配置WebLogic服务器的启动脚本,通常在`startWebLogic.sh`(或`startWebLogic.cmd`)中。 - 添加类似以下的JVM参数: ```bash -Xdebug -Xnoagent -Djava.compiler=NONE -...

    weblogic远程debug

    远程Debug允许开发者在不中断生产环境服务的情况下,通过网络连接到运行中的WebLogic实例,对应用代码进行调试。这通常涉及到设置服务器端的Debug端口,并在IDE(如Eclipse或IntelliJ IDEA)中配置相应的Debug连接。...

    WebLogic+Tomcat远程调试

    #### 一、WebLogic远程调试配置步骤 **1. 准备工作** - **安装WebLogic服务器**:确保安装了WebLogic服务器,并且成功创建了一个域。 - **安装Eclipse集成开发环境(IDE)**:Eclipse作为主流的开发工具之一,...

    常用中间件开启远程调试方法汇总

    接下来,我们转向WebLogic的远程调试设置。在Windows环境下,需要编辑`setDomainEnv.cmd`文件,增加`set debugFlag=true`;而在Linux环境下,需要编辑`setDomainEnv.sh`文件,添加`debugFlag="true"`并导出。完成后...

    weblogic 9 远程调试

    weblogic 8.9.10破解 博文链接:https://julyboxer.iteye.com/blog/214013

    Weblogic,tomcat调试eclipse配置

    通过以上步骤,你可以在Eclipse中启动远程调试会话,监视Weblogic或Tomcat服务器上的应用程序执行情况,并能够查看实际发送到数据库的SQL语句。这对于快速定位问题和性能优化具有重要意义。希望这篇文章能对你有所...

    web服务器远程调试配置方法

    本文介绍的是Tomcat、YAK和Weblogic这三种流行的Web服务器的远程调试配置方法。 首先,我们先来了解服务端设置。对于Tomcat服务器来说,我们需要找到安装目录下的bin目录,编辑catalina.sh文件(Linux系统为...

    Debug远程断点调试配制

    Weblogic是一款广泛使用的Java应用服务器,它提供了强大的远程调试功能。以下是对"Debug远程断点调试配制"这一主题的详细解释: 首先,我们来理解什么是远程断点调试。断点调试是一种编程调试技术,允许我们在代码...

    Myeclipse+weblogic断点调试jsp.pdf

    例如,设置DEBUG_PORT为4000,并在启动参数中添加`-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=%DEBUG_PORT%,server=y,suspend=n`,这使得Weblogic服务器启动时支持远程调试。 回到Myeclipse,配置...

    Debug本地断点调试配制

    - 在 "Connection Properties" 中,输入之前在WebLogic Server设置的远程调试端口号(例如:8453)。 - 点击 "Apply" 并 "Debug",Eclipse将尝试连接到WebLogic Server。 7. **开始调试**: - 当WebLogic Server...

    weblogic配置说明(正式版)

    **参数用途:** Java参数用于设置WebLogic Server的内存分配、垃圾回收策略、JVM安全策略等。 **示例配置:** - `-Xms`: 设置初始Java堆内存大小。 - `-Xmx`: 设置最大Java堆内存大小。 - `-XX:+UseConcMarkSweepGC...

    weblogic plusion2.0 Eclipse插件 weblogic9.0

    3. **服务器连接与管理**:插件允许用户连接到本地或远程的WebLogic Server实例,进行启动、停止、重启等操作,同时也能查看服务器状态和管理应用部署。 4. **部署和更新**:开发人员可以直接从Eclipse将应用部署到...

    elcipse的weblogic插件

    1. **调试支持**:通过Eclipse的调试工具,你可以设置断点,对WebLogic Server上的应用程序进行远程调试,查看变量值,控制执行流程。 2. **生命周期管理**:轻松启动、停止、重启WebLogic Server,以及部署、卸载...

    Weblogic Server Tools for eclipse 3.5

    4. **调试**:集成调试工具,可以在服务器上设置断点,进行远程调试。 5. **日志查看**:查看WebLogic Server的日志,帮助定位和解决问题。 6. **性能监控**:实时监控WebLogic Server的性能指标,如CPU使用率、内存...

    Weblogic在AIX下的安装和调试.txt

    ### Weblogic在AIX下的安装和调试:详细指南与注意事项 #### 一、环境准备与配置 在开始Weblogic在AIX系统上的安装与调试前,确保满足以下环境要求: 1. **硬件环境**:本案例中使用的是IBM P5 5A服务器,配备有...

    Weblogic wtc调用tuxedo服务

    这通常涉及在WebLogic集群中部署应用程序,并设置相应的事务属性。 3. **配置Linux/AIX上的Tuxedo** - **配置DM_REMOTE_DOMAINS**:在Tuxedo的配置文件中,需要添加一个`DM_REMOTE_DOMAINS`节点,该节点的name和ID...

Global site tag (gtag.js) - Google Analytics