Enable debugging in remote weblogic for ADF and Webcenter Applications

Hi All,

In my previous post of Debugging taskflow in webcenter spaces , I mention about setting java option in startManagedWebLogic.sh or startWeblogic.cmd .But you can do same thing in more easier way. I will tell about debug flag of weblogic today.

Best way to enable debug flag in WebLogic Server is to use weblogic console. This is done in:

Environment–>Servers–>>–>Debug
Select the required flags and click on Enable/Disable.

Enable the level of debug you need, e.g.: security, servlet, jdbc.This change does not require weblogic Server Restart.

You need Make sure the severity is set to debug in weblogic console:

Environment > Servers > MyServer > Logging >Advanced > Minimum severity to log: Debug
This change requires server restart.

You can also do by follow way as well-

Setting Up setDomainEnv.cmd
Near the top of your file add the following line to enable debugging.

echo ——————————————————————
echo Setting Debug to true
set debugFlag=true
echo ——————————————————————

Locate the following line locate further down the file and make a note of the port number.You can change the default port number as well.

rem set the port number
if “%DEBUG_PORT%”==”” (
set DEBUG_PORT=8453
)

So , if you are working on ADF and Webcenter application , follow this approach to accomplish this task.You should also make connection from jdeveloper
to remote/standalone weblogic server as well.

Following Debug flags will help you debug different issues in Oracle Weblogic Server :

Java Messaging Services

Messaging Kernel
-Dweblogic.debug.DebugMessagingKernel=true

MDB connectivity
-Dweblogic.debug.DebugEjbMdbConnection=true

JMS Wrappers
-Dweblogic.debug.DebugJMSWrappers=true

JMS SAF
Sending side:
-Dweblogic.debug.DebugJMSSAF=true
-Dweblogic.debug.DebugJMSMessagePath=true

Receiving side:
-Dweblogic.debug.DebugJMSBackEnd=true
-Dweblogic.debug.DebugJMSFrontEnd=true
-Dweblogic.debug.DebugJMSMessagePath=true

JMS Distributed Destinations
-Dweblogic.debug.DebugJMSCommon=true
-Dweblogic.debug.DebugJMSDistTopic=true
-Dweblogic.debug.DebugJMSMessagePath=true

JMS Boot
-Dweblogic.debug.DebugJMSBoot=true
-Dweblogic.debug.DebugMessagingKernelBoot=true
-Dweblogic.debug.DebugStoreIOLogicalBoot=true

JMS store
Logical IO:
-Dweblogic.debug.DebugJMSStoreIOLogical=true
-Dweblogic.debug.DebugJMSStoreIOLogicalBoot=true

Physical IO:
-Dweblogic.debug.DebugStoreIOPhysical=true
-Dweblogic.debug.DebugStoreIOPhysicalVerbose=true

Store XA:
-Dweblogic.debug.DebugStoreXA=true
-Dweblogic.debug.DebugStoreXAVerbose=true

JMS CDS
-Dweblogic.debug.DebugJMSCDS=true

JMS Backend
-Dweblogic.debug.DebugJMSBackEnd=true

JMS Frontend
-Dweblogic.debug.DebugJMSFrontEnd=true

JMS Dispatcher
-Dweblogic.debug.DebugJMSDispatcher=true

Messaging Bridge :
-Dweblogic.debug.DebugMessagingBridgeRuntime=true
-Dweblogic.debug.DebugMessagingBridgeRuntimeVerbose=true
-Dweblogic.debug.DebugMessagingBridgeStartup=true

Clustering

-Dweblogic.diagnostics.debug.DebugLogger.DISABLED=false & one or all of the following
-Dweblogic.debug.DebugClusterAnnouncements=true
-Dweblogic.debug.DebugCluster=true
-Dweblogic.debug.DebugClusterFragments=true
-Dweblogic.debug.DebugJTAMigration=true
-Dweblogic.debug.DebugAsyncQueue=true
-Dweblogic.debug.DebugReplication=true
-Dweblogic.debug.DebugReplicationDetails=true
-Dweblogic.debug.DebugServerMigration=true
-Dweblogic.debug.DebugSingletonServices=true
-Dweblogic.debug.DebugConsensusLeasing=true
-Dweblogic.debug.DebugUnicastMessaging=true
-Dweblogic.cluster.leasing.ClusterFormation=true
-Dweblogic.cluster.leasing.ClusterGroupView=true
-Dweblogic.cluster.leasing.ClusterLeader=true
-Dweblogic.cluster.leasing.ClusterLeaderService=true
-Dweblogic.cluster.leasing.ClusterMember=true
-Dweblogic.cluster.leasing.ClusterMessaging=true
-Dweblogic.cluster.leasing.LeaseClient=true
-Dweblogic.cluster.leasing.LeaseServer=true
-Dweblogic.cluster.leasing.LeaseView=true
-Dweblogic.cluster.leasing.MachineState=true
-Dweblogic.cluster.leasing.DiscoveryService=true
-Dweblogic.cluster.leasing.DisconnectMonitor=true
-Dweblogic.cluster.leasing.MessageEndPoint=true
-Dweblogic.cluster.leasing.MessageSender=true
-Dweblogic.cluster.leasing.SRMResult=true
-Dweblogic.cluster.leasing.FailureDetector=true
-Dweblogic.cluster.leasing.SRMService

RMI & IIOP

-Dweblogic.diagnostics.debug.DebugLogger.DISABLED=false & one or all of the following
-Dweblogic.debug.DebugCorbaClientHttp=true
-Dweblogic.debug.DebugCorbaClientIIOP=true
-Dweblogic.debug.DebugIIOPNaming=true
-Dweblogic.iiop.naming=true
-Dweblogic.debug.DebugIIOPOTS=true
-Dweblogic.iiop.ots=true
-Dweblogic.debug.DebugIIOPTransport=true
-Dweblogic.iiop.transport=true
-Dweblogic.debug.DebugIIOPTunneling=true
-Dweblogic.iiop.http.tunnelLogin=true
-Dweblogic.iiop.http.tunnelRecv=true
-Dweblogic.iiop.http.tunnelSend=true
-Dweblogic.debug.client.dgc=true, to enable debug for dgc
-Dweblogic.rmi.extensions.server.ServerHelper.DebugExportObject=true
-Dweblogic.debug.DebugDGCEnrollment=true
-Dweblogic.debug.ForceGCEachDGCPeriod=true
-Dweblogic.debug.LogDGCStatistics=true
-Dweblogic.debug.DebugMessaging=true
-Dweblogic.debug.DebugGenericMethodDescriptor=true
-Dweblogic.debug.DebugIIOPDetail=true
-Dweblogic.debug.DebugIIOPMarshal=true
-Dweblogic.debug.DebugIIOPTransport=true
-Dweblogic.debug.DebugIIOPSecurity=true
-Dweblogic.debug.DebugIIOPStartup=true
-Dweblogic.debug.DebugIIOPRepalcer=true
-Dweblogic.debug.DebugIIOPConnection=true
-Dweblogic.debug.DebugIIOPDetail=true
-Dweblogic.debug.DebugIIOPDetail=true
-Dweblogic.iiop.marshal=true
-Dweblogic.iiop.transport=true
-Dweblogic.iiop.security=true
-Dweblogic.iiop.startup=true
-Dweblogic.iiop.replacer=true
-Dweblogic.iiop.connection=true

Deployment debugs

-Dweblogic.debug.DebugDeployment=true
-Dweblogic.debug.DebugDeploymentServiceInternal=true
-Dweblogic.debug.DebugDeploymentServiceTransport=true
-Dweblogic.debug.DebugDeploymentServiceTransportHttp=true
-Dweblogic.debug.DebugDeploymentServiceStatusUpdates=true
If you have problem in edit lock, system resource deployment or configuration updates, you may also turn on configure debug flag:
-Dweblogic.debug.DebugConfigurationEdit=true

HTTP Debugs

-Dweblogic.debug.DebugURLResolution=true
-Dweblogic.debug.DebugHttp=true
-Dweblogic.debug.httpd=true
-Dweblogic.debug.httpd.log=true
-Dweblogic.debug.httpd.servlet=true

JTA

-Dweblogic.debug.DebugJTAPropagate=true
-Dweblogic.debug.DebugJTAGateway=true
-Dweblogic.debug.DebugJTAXA=true
-Dweblogic.debug.DebugJTA2PC=true
-Dweblogic.debug.DebugJTAJDBC=true
-Dweblogic.debug.DebugJDBCSQL=true

JNDI

-Dweblogic.debug.DebugJNDI =true
-Dweblogic.debug.DebugJNDIResolution =true
-Dweblogic.debug.DebugJNDIFactories =true
-Dweblogic.debug.DebugJNDIAppVersion =true

Workmanager

-Dweblogic.workmanager=true
-Dweblogic.StuckThreadHandling=true
-Dweblogic.IncrementAdvisor=true
-Dweblogic.MinThreadsConstraint=true
-Dweblogic.responsetimerequestclass=true
-Dweblogic.workmanagerservice=true

Server Life Cycle

-Dweblogic.slc=true
-Dweblogic.slcruntime=true
-Dweblogic.debug.DebugServerLifeCycle=true

Classloaders

-Dweblogic.utils.classloaders.GenericClassLoader.Verbose=true
-Dweblogic.utils.classloaders.ChangeAwareClassLoader.Verbose=true
-Dweblogic.utils.classloaders.ClasspathClassFinder=true
-Dweblogic.utils.classloaders.DefaultFilteringClassLoader.Verbose=true
-Dweblogic.utils.classloaders.FilteringClassLoader.Verbose=true
-Dweblogic.utils.classloaders.FilteringClassLoader.ResourceDump=true
-Dweblogic.utils.classloaders.URLClassFinder.Verbose=true

WebService

-Dweblogic.wsee.verbose=*

Security

SAML:
-Dweblogic.debug.DebugSecuritySAMLService=true
-Dweblogic.debug.DebugSecuritySAMLCredMap=true
-Dweblogic.debug.DebugSecuritySAMLAtn=true
-Dweblogic.debug.DebugSecuritySAMLLib=true
-Dweblogic.debug.DebugSecuritySAML2Service=true
-Dweblogic.debug.DebugSecuritySAML2CredMap=true
-Dweblogic.debug.DebugSecuritySAML2Atn=true
-Dweblogic.debug.DebugSecuritySAML2Lib=true
-Dweblogic.debug.DebugSecurityCredMap=true

WebService Security
-Dweblogic.xml.crypto.wss.debug=true
-Dweblogic.xml.crypto.wss.verbose=true
-Dweblogic.xml.crypto.keyinfo.debug=true
-Dweblogic.xml.crypto.keyinfo.verbose=true
-Dweblogic.xml.crypto.dsig.debug=true
-Dweblogic.xml.crypto.dsig.verbose=true
-Dweblogic.xml.crypto.encrypt.debug=true
-Dweblogic.xml.crypto.encrypt.verbose=true

Debugging Taskflows in WebCenter Spaces

Requirement – Debugging Taskflows in WebCenter Spaces

Solutions-
One way of setting this up is to modify the startManagedWebLogic.sh (linux) that will start Spaces. This script is located in the /user_projects/domains//bin directory.

In the new startManagedWebLogic.sh file locate the section that declares the JAVA_OPTIONS. Modify the startManagedWebLogic.sh file and add the debug java options:

-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n

to the JAVA_OPTIONS. For example, in my file I added this option in front of the existing option already there:

JAVA_OPTIONS="-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=n 
-Dweblogic.security.SSL.trustedCAKeyStore="/home/oracle/Middleware/wlserver_10.3/server/lib/cacerts" ${JAVA_OPTIONS}"
export JAVA_OPTIONS

Once this is done you will be able to use this script to start Spaces in debug mode. To check to see if the option has been enabled you will see the reference to the debug mode: Listening for transport dt_socket at address: 4000 in the Spaces terminal window.

Configuring JDeveloper

The next step is to enable the remote debugging feature for your project in JDeveloper. To do this, go to your project’s properties. Select the Run/Debug/Profile section, and click the Edit button for the “default” setting. This will bring up a dialog where you can check the Remote Debugging option.

For more information read this

Happy Debugging with Vinay Kumar in techartifact…