Archives
Recent Comments
WebSphere Process Server–esAdmin to delete the event sequencing locks
Sometimes, the event sequencing message are locked because of some issues on the server. the symptom is that the SCA queue is pipling up.
esAdmin tool will be used to delete locks
go to <profile dir>/bin, run esAdmin command to list or delete locks.
esAdmin.sh -p 8880 listAll
-p will used to specified the soap port of the server. ...
Error happen after upgrading WebSphere Application Server Toolkit
After you installation WebSphere Application Server Toolkit, please check the version, if the version is 6.1.0, do not use Rational Product Updater to update WebSphere Application Server Toolkit, or you will met the startup error after you install the update
The correct step is to download the Application Server Toolkit refresh pack 6.1.1, then unzip it ...
WebSphere — Get Current Threadpool Value
tpName=AdminControl.completeObjectName('type=ThreadPool,name=CSMIDThreadPool,process=server1,*')
tpObj=AdminControl.makeObjectName(tpName)
perf=AdminControl.completeObjectName('type=Perf,process=server1,*')
perfObj=AdminControl.makeObjectName(perf)
perfObj2=AdminControl.invoke_jmx(perfobj,'getStatsObject',[tpobj,java.lang.Boolean('false')],['javax.management.ObjectName','java.lang.Boolean'])
currentValue=perfObj2.getStatistic('PoolSize').getCurrent()
print currentValue
WebSphere — Read the property file using Jython
A property file test.prop like following:
J2CAliasName=CLDDBAlias
J2CAliasUser=cldprog
J2CAliasPass=cld2dlc
J2CAliasDesc=this is a test
the Jython scripts like following:
import sys
import java
import java.util.Properties
import java.io.FileInputStream
fileStream=java.io.FileInputStream("test.prop")
properties=java.util.Properties()
properties=load(fileStream)
j2cAliasName=properties.getProperty('J2CAliasName').strip()
j2cAliasUser=properties.getProperty('J2CAliasUser').strip()
j2cAliasPass=properties.getProperty('J2CAliasPass').strip()
j2cAliasDesc=properties.getProperty('J2CAliasDesc').strip()
WebSphere–Get Running JVM HeapSize
The following script can be used to get the current JVM HeapSize:
serverJVM=AdminControl.completeObjectName('type=JVM,process=server1,*')
serverJVMObj=AdminControl.makeObjectName(serverJVM)
perf=AdminControl.completeObjectName('type=Perf,process=server1,*')
perfObj=AdminControl.makeObjectName(perf)
jvmObj=AdminControl.invoke_jmx(perfObj,'getStatsObject',[serverJVMObj,java.lang.Boolean('false')],['javax.management.ObjectName','java.lang.Boolean'])
currentHeapsize=jvmObj.getStatistic('HeapSize').getCurrent()
usedMemory=jvmObj.getStatistic('UsedMemory').getCount()
usage=float(usedMemory)/float(currentHeapsize)*100
print serverName+" --> "+str(currentHeapsize)+"K --> "+str(usedMemory)+"K --> "+"Usage:%.2f" % usage+"%"
This script will print current heap size and used memory of JVM.
WebSphere-Get Queue Point Depth Using Script
Here is how to get the depth of a queue point:
Jython:
queueId=AdminControl.queryNames('type=SIBQueuePoint,name=queuePointName,*')
queueDepth=AdminControl.getAttribute(queueId,'depth')
print "The queue depth is:"+queueDepth
Jacl:
set queueId [$AdminControl queryNames type=SIBQueuePoint,name=queuePointName,*]
set queueDepth [$AdminControl getAttribute $queueId "depth"]
print $queueDepth
Some Userful WebSphere Links
WebSphere Process Server 6.0 Information Center: http://publib.boulder.ibm.com/infocenter/dmndhelp/v6rxmx/index.jsp
WebSphere Application Server 6.0 Information Center: http://publib.boulder.ibm.com/infocenter/wasinfo/v6r0/index.jsp
WebSphere Process Server 6.1 Information Center: http://publib.boulder.ibm.com/infocenter/dmndhelp/v6r1mx/index.jsp
WebSphere Application Server 6.1 Information Center: http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp
WebSphere Process Server 7.0 Information Center: http://publib.boulder.ibm.com/infocenter/dmndhelp/v7r0mx/index.jsp
WebSphere Application Server 7.0 Information Center: http://publib.boulder.ibm.com/infocenter/wasinfo/v7r0/index.jsp
WebSphere Process Server 6.1 fixpack: http://www-01.ibm.com/support/docview.wss?uid=swg27006649
WebSphere Application Server 6.1 fixpack: http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg27007951
WebSphere Application Server 7.0 fixpack: http://www-01.ibm.com/support/docview.wss?rs=180&uid=swg27014463
WebSphere Process Server 7.0 fixpack: ...
WebSphere-EJBDeploy error
You may see the following error when you uninstall the fixpack:
EJB Deploy configuration directory: /IBM/wpsProfiles/wpsCellMgr/ejbdeploy/configuration/
framework search path: /IBM/WebSphere/ProcServer/deploytool/itp/plugins
Debug options:
Shutting down workbench.
Failure invoking BootLoader.startup method
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.ibm.etools.ejbdeploy.batch.impl.BootLoaderLoader.startup(BootLoaderLoader.java:590)
at com.ibm.etools.ejbdeploy.batch.impl.BatchDeploy.startup(BatchDeploy.java:185)
at com.ibm.etools.ejbdeploy.EJBDeploy.startup(EJBDeploy.java:410)
at com.ibm.etools.ejbdeploy.EJBDeploy.execute(EJBDeploy.java:103)
at com.ibm.etools.ejbdeploy.EJBDeploy.main(EJBDeploy.java:336)
Caused by: java.lang.RuntimeException: Exception in org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start() of bundle system.bundle.
at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:557)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:484)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:275)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.launch(StartLevelManager.java:245)
at org.eclipse.osgi.framework.internal.core.SystemBundle.resume(SystemBundle.java:155)
at org.eclipse.osgi.framework.internal.core.Framework.launch(Framework.java:512)
at org.eclipse.osgi.framework.internal.core.OSGi.launch(OSGi.java:51)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:289)
... 9 more
EJBDeploy level: o0825.02
The following ...
Jython-Delete the messages in the Queue Point
Here is a way to delete all the messages in a queue point:
queueName="queue1"
queuePointId=AdminControl.completeObjectName('type=SIBQueuePoint,name='+queueName+',*')
queuePointObj=AdminControl.makeObjectName(queuePointId)
queuedMessages=AdminControl.invoke_jmx(queuePointObj,'getQueuedMessages',[],[])
print "Deleting the messages in queuePoint:"+queueName
for queuedMessage in queuedMessages:
AdminControl.invoke_jmx(queuePointObj,'deleteQueuedMessage',[queuedMessage.getId(),java.lang.Boolean('false')],['java.lang.String','java.lang.Boolean'])
On WebSphere Application Server 6.1, there is a simple way to delete all the messages in a queue point:
set id [$AdminControl queryNames type=SIBQueuePoint,name=queue1,*]
$AdminControl invoke $id deleteAllQueuedMessages ...
JACL-Generate JAVA Core file
Sometimes, you need to generate the java core file, in general, you can run the kill command to generate the java core.
kill -3 PID (WebSphere Application server process id)
also, you can use JACL to generate the java core file. here is an example:
set jvm [$AdminControl queryNames type=JVM,process=server1,*]
$AdminControl invoke $jvm dumpThreads