rblog

I am certified – RAFW

I am now allowed to call myself “IBM Certified Deployment Professional on Rational Automation Middleware Solutions“.

The Deployment Professional has extensive product knowledge of some or all of the IBM WebSphere family of products, IBM Rational Build Forge and IBM Rational Automation Framework for WebSphere and can independently perform configuration, training, and mentoring tasks on these products for deployment projects, with limited assistance from peers and vendor support services.

Extensive amount of RAFW usage the past few months and about two hours of preparations reading the Infocenter did the trick

Test Title: Test 000-055, Rational Automation for WebSphere
Start time: 10/14/2010 10:51:32 AM (GMT+0:00) (cst)
End time: 10/14/2010 11:21:41 AM (GMT+0:00) (cst)
Passing Score: 70%
Your Score: Pass (90%)

Xterm colors

If you are using Xterm I assume that every once in a while you get annoyed by the colors. Today I just had to do something about it and I found the script provided at http://www.steike.com/code/xterm-colors/ … lovely!!

WebGroup / virtual host not defined on WebSphere

Every once in a while I get the error
SRVE0255E: A WebGroup/Virtual Host to handle /KillerApp has not been defined
This is most often caused by me typing either the wrong port number (if no web server is configured) or a type in the context root of the web application. Currently following an internal course where I was supposed to deploy an app and find the url to it. According to what I know it should be http://localhost:9080/KillerApp since the WC_defaulthost of server1 was 9080. But after many minutes of struggle I kept getting the error again and again…so then Google…

IBM Redbook to the rescue, “WebSphere Application Server V6.1: Web Container Problem Determination“. It turned out to be a very simple, and also stupid solution on the problem. Stupid, since I had caused the problem myself. Some time ago I must have altered the default_host virtual host settings, so I had changed the host alias from 9080 to 9089.

This post at coderanch.com helped me find the info, see the last comment to the issue. It references the redpiece, not the redbook, so use my link instead.

How to format your Nokia

Use the code *#7370# to format your phone, resetting it to the fabric settings. Tried it on my Nokia E72 when the email application that comes along with the phone, and which my employee demands me to use in order to sync with Exchange, screwed up. Formatted and reconfigured, now it works as it should again. Nokia Support Forums to the rescue

Did also try out the Emoze messaging client http://www.emoze.com/. Works as a charm, but since the Exchange integration is based on Outlook Web Access (OWA) and not a directly Exchange-server integration, it is a violation of my employers email rules – and therefore not an option for me (it is blocked).

Shell script looping files in a directory, search and replace text in each file

Had to create a shell script that is looping through a set of XML files in a given directory. For each file it checks if the file has the attribute “CCSID“. It it does not have the attribute, it inserts the attribute just after the opening tag MQQueueConnectionFactory using Perl, and if it is there already it will update the value using a SED-command with a simple REGEX-pattern. Ok, I know that I could have used either SED or Perl for both, but I just borrowed from some other scripts I had, so that is the reason.

The REGEX-pattern ain’t no rocket science, but since I use REGEX only once in a while I find it quite hard to crate patterns, could not have done it without http://www.gskinner.com/RegExr/

  FILES=/path_to_directory/my-files*.xml
  for file in $FILES
  do
    # CCSID attribute present or not
    grep CCSID $file  >> /dev/null
    if [ $? -eq 1 ]
    then
      # Not present, insert
      perl -pi -e "s#<MQQueueConnectionFactory\s#<MQQueueConnectionFactory CCSID=\"1208\" #g" ${file}
    else
      # Present, update
      sed -i 's/CCSID="[0-9]*"/CCSID="1208"/' ${file}
    fi
  done 

Splitting text using Python

Created a script just to test how to split text using Python. First I have to split on the delimiter ‘__’, then on the ‘.’.

#!/usr/bin/python
propertyFilename="commons-ear__R01_INC_002.properties"
print propertyFilename
versionWithFileExt = propertyFilename.split('__')
print versionWithFileExt
version = versionWithFileExt[1].split('.')
print version
#And to get the final string
print version[0]

Not that hard, but what confused me when reading the Python documentation was that str.split() is deprecated. But as it turned out, that is in version 2.7, currently we are using 2.4, find out by issuing the command
ls -l /usr/bin/python*

From version 2.7 you should instead use stringObject.rpartition(sep), see more at about.com

Adding a description when installing an application using wsadmin

Using wsadmin to install an application I wanted to add a description to an application edition. Was not able to find any documentation telling me what are valid parameters to apply to the options string, so I just tried “-description”, returning the error

WASX7107E: Invalid options specified: "[description]"; valid options are:
CloneWorkClassClientTask
MapModulesToServers
BindJndiForEJBNonMessageBinding
BindJndiForEJBMessageBinding
MapEJBRefToEJB
MapWebModToVH
CtxRootForWebMod
EnsureMethodProtectionFor20EJB
MapSharedLibForMod
SharedLibRelationship
JSPCompileOptions
JSPReloadForWebMod
CustomActivationPlan
GetServerName
preCompileJSPs
nopreCompileJSPs
distributeApp
nodistributeApp
useMetaDataFromBinary
nouseMetaDataFromBinary
deployejb
nodeployejb
createMBeansForResources
nocreateMBeansForResources
reloadEnabled
noreloadEnabled
deployws
nodeployws
processEmbeddedConfig
noprocessEmbeddedConfig
allowDispatchRemoteInclude
noallowDispatchRemoteInclude
allowServiceRemoteInclude
noallowServiceRemoteInclude
useAutoLink
nouseAutoLink
usedefaultbindings
defaultbinding.force
allowPermInFilterPolicy
noallowPermInFilterPolicy
verbose
update
update.ignore.old
update.ignore.new
installed.ear.destination
appname
edition
edition.desc
reloadInterval
validateinstall
filepermission
buildVersion
blaname
asyncRequestDispatchType
deployejb.rmic
deployejb.dbtype
deployejb.dbschema
deployejb.classpath
deployejb.dbaccesstype
deployejb.sqljclasspath
deployejb.complianceLevel
deployws.classpath
deployws.jardirs
defaultbinding.datasource.jndi
defaultbinding.datasource.username
defaultbinding.datasource.password
defaultbinding.cf.jndi
defaultbinding.cf.resauth
defaultbinding.ejbjndi.prefix
defaultbinding.virtual.host
defaultbinding.strategy.file
filepermission
target
server
node
cell
cluster
contextroot
custom
installed.ear.destination

So, in order to get the information, just create an error 🙂

Switch-case statement in Phyton

I’m not all that familiar with Phyton, but since Jython ,which is the Java implementation of Phyton, is the preferred scripting language for WebSphere I do need to dive into it now and then. Today I needed to check if input parameter to a script was equal to a given value, then check a property file for the corresponding key/value pair. If key/value pair not present then check if the common default value where there. If if all is false, then just break out of the script.

As you might have figured out this will get a bit messy, so I thought that maybe a switch-case statement could help me out to make it a bit cleaner. First I found this article at Bytebaker switch-case-statement-in-python showing a “fake” implementation of swich-case, since it turns out that Phyton does not have this functionality. “Yes!!!”, but then it turned out no…I read the comments to the post and at the end found the follow-up article “Switch-case statement in Python revisited“. So back to square one again…

Fire drill at work – what a lovely day!

When I was about to enter the building and go down to the locker room today I was a bit surprised since so many people where on their way out. Realized fast what is was since there where some of them where walking around with reflective vests. So I just had to turn around and go out and enjoy the sun. Good thing, since I then had time to do some stretching as well. Played around with my cell phone in the nice weather, took pictures of all the people outside, me in the sun, my new mtb shoes in the sun, people walking in to the building in the sun. Not the worst thing that could happen 🙂

Beta testing Sport Tracker: GPS issue

As a start, I’m not sure what is causing this issue, actually I do not think it is the Sport Tracker application itself, I suspect my Nokia E72 GPS unit providing the application with inaccurate information. I have noticed that the altitude is many meters wrong, as I have documented in this post.

First stop, not far from my home, currently not sure of the exact height, must do a follow up, but I do thinkt 215 meters are to much. First picture showing the location.

UPDATE:: On my way home at the exact same location the altitude showed 186 meter.

Sport Tracker dashboard

The second test I’m quite sure about the height, just about 2 meters above sea level, standing at the harbor in Oslo. Note the heading saying Sankt Hanshaugen. The picture is from the GPS application on my Nokia E72, OVI maps. Sankt Hanshaugen is, as the last picture shows, more than 1 kilometer away from the harbor! Strange thing that the location mark is correct, but the address not.

Sport Tracker tells me that I’m 43 meters above sea level

…but I’m not!

The pink dot left bottom showing the location of the harbor, the yellow one right above showing Sankt Hanshaugen. The blue one to the upper right showing my first location.