Manipulating JMS queues using WLST Script


Today, let’s talk about Java Message Systems (JMS), the reason led me talk about this, is that my environment, a complex architecture of messages where we have more of two hundred queues in the same domain.
The administration of queues in the weblogic console is very simple, but, if you need to remove a million messages, in a hundred queues, you have a problem!
To turn more agile the visualization of messages, state and other queue properties, nothing better than to use WLST.

This post shows a script, which can grow up where you imagine, for while the script have just three options (the most useful to me) and nothing prevents to have more.

More“Manipulating JMS queues using WLST Script”

Bypass user and password in the Oracle BAM ICommand.

Every time you need to execute ICommand, you must enter the user and password of the application server running Oracle BAM.
With the configuration below, it is no longer necessary to inform username and password every time.

In the file “BAMICommandConfig.xml” located in “$BEA_HOME/Oracle_SOA1/bam/config/”, add the lines below to the end of the file, before the tag “/BAMICommand”:


Restart the Oracle BAM.


Error BAD_CERTIFICATE in Node Manager


Mar 8, 2016 2:41:16 PM weblogic.nodemanager.server.Handler run
WARNING: Uncaught exception in server [Security:090482]BAD_CERTIFICATE alert was received from - Check the peer to determine why it rejected the certificate chain (trusted CA configuration, hostname verification). SSL debug tracing may be required to determine the exact reason the certificate was rejected. [Security:090482]BAD_CERTIFICATE alert was received from - Check the peer to determine why it rejected the certificate chain (trusted CA configuration, hostname verification). SSL debug tracing may be required to determine the exact reason the certificate was rejected.
at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireException(Unknown Source)
at com.certicom.tls.interfaceimpl.TLSConnectionImpl.fireAlertReceived(Unknown Source)
at com.certicom.tls.record.alert.AlertHandler.handle(Unknown Source)
at com.certicom.tls.record.alert.AlertHandler.handleAlertMessages(Unknown Source)
at com.certicom.tls.record.MessageInterpreter.interpretContent(Unknown Source)
at com.certicom.tls.record.MessageInterpreter.decryptMessage(Unknown Source)
at com.certicom.tls.record.ReadHandler.processRecord(Unknown Source)
at com.certicom.tls.record.ReadHandler.readRecord(Unknown Source)
at com.certicom.tls.record.ReadHandler.readUntilHandshakeComplete(Unknown Source)
at com.certicom.tls.interfaceimpl.TLSConnectionImpl.completeHandshake(Unknown Source)
at Source)
at Source)
at sun.nio.cs.StreamDecoder.readBytes(
at sun.nio.cs.StreamDecoder.implRead(


source $DOMAIN_HOME/bin/
. $WL_HOME/server/bin/
java utils.CertGen -cn `hostname` -keyfilepass DemoIdentityPassPhrase -certfile mycert -keyfile mykey
java utils.ImportPrivateKey -keystore DemoIdentity.jks -storepass DemoIdentityKeyStorePassPhrase -keyfile mykey.pem -keyfilepass DemoIdentityPassPhrase -certfile mycert.pem -alias demoidentity
cp DemoIdentity.jks $WL_HOME/server/lib


Restart node manager.


Weblogic in debug mode

Usually, in non-production environments, it is necessary to check applications deployed on a Weblogic server. The default log (.out) does not report or details conclusively the real cause of the problem.
In this case, beyond the levels of logs that can be configured via weblogic console (Managed Server > Logging > Advanced), we can add to the JVM startup arguments (Managed Server > Configuration > Server Start > Arguments) the following arguments:

-Dweblogic.webservice.verbose=true -Dweblogic.wsee.verbose=* -Dweblogic.wsee.verbose=weblogic.wsee.* -Dweblogic.wsee.verbose.timestamp=true

Recommended use only during the troubleshoot, because it generates a lot of logs.


Quickly change Weblogic to Production Mode

You were running away to deploy your newest project on Weblogic 12c and lately discover  that you made your environment as development mode (OPSSSS =/)

Quickly set check box ‘Production mode’ on your domain tab.

It will be necessary to bounce Weblogic server.


Thank’s Oracle for this checkbox in 12c 😛


WLST easeSyntax

Who works with WLST know it’s pretty boring to natigate to MBeans, because whenever necessary to put in parentheses () commands and quotation marks ‘ ‘. When we forget, need to retype the whole command again.
I found a command that helps a lot when it comes to navigate in MBean tree, it eliminates the need for parentheses and quotation marks.
After entering the WLST, type:

wls:/xpto_domain/serverConfig> easeSyntax()

wls:/xpto_domain/serverConfig> ls
dr– AdminConsole

dr– SelfTuning
dr– Servers
dr– ShutdownClasses
dr– SingletonServices

wls:/xpto_domain/serverConfig> cd Servers
wls:/xpto_domain/serverConfig/Servers> ls
dr– AdminServer
dr– WLS1_MSWS1
dr– WLS1_MSWS2

wls:/xpto_domain/serverConfig/Servers> cd WLS1_MSWS1
wls:/xpto_domain/serverConfig/Servers/WLS1_MSWS1> cd Log
wls:/xpto_domain/serverConfig/Servers/WLS1_MSWS1/Log> cd ..
wls:/xpto_domain/serverConfig/Servers/WLS1_MSWS1> cd Machine
wls:/xpto_domain/serverConfig/Servers/WLS1_MSWS1/Machine> ls
dr– app1wsmachine1

Not tested within python scripts, only browsing the tree Mbean.


WebLogic AdminServer Startup stopped at “Initializing self-tuning thread pool”

After starting AdminServer, it remains with starting status and stopped writing in log file in:

Check the disk space used, to make sure that there are no partitions with 100% utilization, including /tmp.
After them, make sure the owner of the weblogic (oracle) has have write permission of “/tmp”

[root@app1xptoosb1 /]# ls -tlhr / |grep tmp
drwxr-xr-x 5 root root 4.0K Nov 15 09:11 tmp

If the owner of weblogic does not have write permission must be set, because the application server writes some temporary files in the directory:

[root@app1xptoosb1 /]# chmod 777 /tmp

[root@app1xptoosb1 /]# ls -tlhr / |grep tmp
drwxrwxrwx 10 root root 4.0K Nov 18 09:44 tmp