Thursday, January 10, 2013

Exceptions to Quotes with IBM Business Process Manager 8.0.1

This one briefly caught me out this afternoon.

Having set up IBM Business Process Manager 8.0.1 to work with SSL, one of the final configuration changes is to allow process snapshots to be deployed via HTTPS rather than the default HTTP.

This requires the addition of a line to the 100Custom.xml file. Specifically, one has to add the line: -

                <deploy-snapshot-using-https merge="replace">true</deploy-snapshot-using-https>

to the <server></server> stanza in: -

/opt/IBM/WebSphere/AppServer/profiles/PCN1Profile/config/cells/PCCELL/nodes/PCNODE1/servers/PCSR011.AppTarget/process-center/config/100Custom.xml

Now I simply copied the required line from a PDF document, which I'd previously generated from a Microsoft Word document using IBM Lotus Symphony.

This was the fatal flaw. I actually pasted: -

<deploy-snapshot-using-https merge="replace">true</deploy-snapshot-using-https>

into the file, which I was editing using vi.

Now it's subtle, but note the quotation marks around the word: -

"replace"

They're NOT valid XML characters - what I should have used was this: -

"replace"

The symptom of the problem was that my AppTarget cluster failed to start, with a slew of XML/syntax error messages, including: -

[10/01/13 16:28:58:451 GMT] 00000013 wle           E   CWLLG2035E:  The registry was not initialized.   Error:  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'twConfiguration' defined in class path resource [registry.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [private static com.lombardisoftware.core.config.TWConfiguration com.lombardisoftware.core.config.TWConfiguration.loadConfigurationLocally()] threw exception; nested exception is java.lang.RuntimeException: Cannot load configuration locally, exception = com.lombardisoftware.core.TeamWorksException: Error on line 33 of document file:/opt/IBM/WebSphere/AppServer/profiles/PCN1Profile/config/cells/PCCELL/nodes/PCNODE1/servers/PCSR011.AppTarget/process-center/config/100Custom.xml: Open quote is expected for attribute "merge" associated with an  element type  "deploy-snapshot-using-https".
                                 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'twConfiguration' defined in class path resource [registry.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [private static com.lombardisoftware.core.config.TWConfiguration com.lombardisoftware.core.config.TWConfiguration.loadConfigurationLocally()] threw exception; nested exception is java.lang.RuntimeException: Cannot load configuration locally, exception = com.lombardisoftware.core.TeamWorksException: Error on line 33 of document file:/opt/IBM/WebSphere/AppServer/profiles/PCN1Profile/config/cells/PCCELL/nodes/PCNODE1/servers/PCSR011.AppTarget/process-center/config/100Custom.xml: Open quote is expected for attribute "merge" associated with an  element type  "deploy-snapshot-using-https".
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [private static com.lombardisoftware.core.config.TWConfiguration com.lombardisoftware.core.config.TWConfiguration.loadConfigurationLocally()] threw exception; nested exception is java.lang.RuntimeException: Cannot load configuration locally, exception = com.lombardisoftware.core.TeamWorksException: Error on line 33 of document file:/opt/IBM/WebSphere/AppServer/profiles/PCN1Profile/config/cells/PCCELL/nodes/PCNODE1/servers/PCSR011.AppTarget/process-center/config/100Custom.xml: Open quote is expected for attribute "merge" associated with an  element type  "deploy-snapshot-using-https".
Caused by: java.lang.RuntimeException: Cannot load configuration locally, exception = com.lombardisoftware.core.TeamWorksException: Error on line 33 of document file:/opt/IBM/WebSphere/AppServer/profiles/PCN1Profile/config/cells/PCCELL/nodes/PCNODE1/servers/PCSR011.AppTarget/process-center/config/100Custom.xml: Open quote is expected for attribute "merge" associated with an  element type  "deploy-snapshot-using-https".
Caused by: com.lombardisoftware.core.TeamWorksException: Error on line 33 of document file:/opt/IBM/WebSphere/AppServer/profiles/PCN1Profile/config/cells/PCCELL/nodes/PCNODE1/servers/PCSR011.AppTarget/process-center/config/100Custom.xml: Open quote is expected for attribute "merge" associated with an  element type  "deploy-snapshot-using-https".
at com.lombardisoftware.core.TeamWorksException.asTeamWorksException(TeamWorksException.java:136)
Caused by: org.jdom.input.JDOMParseException: Error on line 33 of document file:/opt/IBM/WebSphere/AppServer/profiles/PCN1Profile/config/cells/PCCELL/nodes/PCNODE1/servers/PCSR011.AppTarget/process-center/config/100Custom.xml: Open quote is expected for attribute "merge" associated with an  element type  "deploy-snapshot-using-https".
Caused by: org.xml.sax.SAXParseException: Open quote is expected for attribute "merge" associated with an  element type  "deploy-snapshot-using-https".
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)


etc.

The moral of the story ? Be careful what you paste.

PS I checked the original Microsoft Word document, last edited using Word 2010, and the quotation marks are definitely the wrong way around: -

<deploy-snapshot-using-https merge="replace">true</deploy-snapshot-using-https>

I'm guessing it's a font issue …..

IBM Business Process Manager - customising the configuration

Having become recently and intimately acquainted with IBM BPM, it's taken me a little while to become accustomed to the various configuration files that BPM uses.

Thankfully, this IBM Technote: -


has been of immense use, and has validated something that Neil Kolban also says with regard to which file to amend: -

Using the 100Custom.xml file to add new configuration values or replace existing values

The 100Custom.xml file is designed to hold the customization and changes that you want to make to any of the configuration files. The idea is that if you do a fresh installation of a new version, you can simply drop in your existing 100Custom.xml file and all the changes that you have made will be picked up and used instead of the default values. Ask yourself, if I have to reinstall the product, what would I need to change in the configuration files? Those changes are the things that you want to put in the 100Custom.xml file.

Neil puts it even more succinctly: -

It is strongly recommended not to edit the content of the 99Local.xml file. Instead, edit the 100Custom.xml file and add/replace all changes there. When Process Server starts, it will merge the 99Local.xml with the 100Custom.xml producing a combined result. Editing only 100Custom.xml keeps all the changes in one place and aids in maintainability. Changes made to these configuration files don't take effect until after the next restart of the Process Server.

Simple, 100Custom.xml is your friend.

Tuesday, January 8, 2013

IBM BPM - Using the SIBDDLGenerator command with DB2 LUW 9.7

I'm writing this down for future reference, as I know that I'll need it in the future.

IBM Business Process Manager ( and IBM Business Monitor ) need a set of database tables for the messaging engines that both products make heavy use of. Actually, a number of other products, including WebSphere Portal, can also make use of these: -


The product includes a rather useful little tool, sibddlgenerator, which can be used to generate the database definition language (DDL) for the database product of your choice.

As an example, I'm using DB2 Enterprise Server Edition 9.7.0.5 on Red Hat Enterprise Linux 6.3. This is the database that hosts the tables etc. for my IBM Business Process Manager Advanced 8.0.1 installation.

So here's the syntax for the command: -

$ cd /opt/IBM/WebSphere/AppServer/profiles/PCDMProfile/bin
$ ./sibDDLGenerator.sh -help

CWSIS1539I: sibDDLGenerator [-system <DBMS name>] [-version <DBMS version>] [-platform <DBMS platform>] [-schema <schema>] [-user <user>] [-create|-drop] [-database <database> (z/OS only)][-createdbstmt <true|false> (z/OS only)][-tablespaceprefix <tablespace prefix, maximum 5 characters> (z/OS only)][-storagegroup <storage group> [-catalog <high-level qualifier>] (z/OS only)] [-bufferpool <buffer pool> (z/OS only)] [-statementend <terminator>] [-noblanklines] [-nolinebreaks] [-firstline <statements>] [-lastline <statements>] [-permanent <number of permanent tables>] [-temporary <number of temporary tables>]

So I wanted to create a set of tables, for the medbpe00 schema, so I executed the following command: -

./sibDDLGenerator.sh -system db2 -version 9.7 -platform linux -statementend \; -schema medbpe00 -user db2inst1

but this failed with: -

CWSIS1595E: An invalid combination of parameters has been specified, Database: db2, version: 9.7, platform: linux . Refer to the documentation for the correct parameters for your database.

Thinking laterally … hmmmm, well Linux is kinda like Unix ( albeit it's GNU - Gnu (is) Not Unix ) so I tried this instead: -

./sibDDLGenerator.sh -system db2 -version 9.7 -platform unix -statementend \; -schema medbpe00 -user db2inst1

which did the trick, and returned: -

CREATE SCHEMA medbpe00;

CREATE TABLE medbpe00.SIBOWNER (
  ME_UUID VARCHAR(16),
  INC_UUID VARCHAR(16),
  VERSION INTEGER,
  MIGRATION_VERSION INTEGER
);

CREATE TABLE medbpe00.SIBOWNERO (
   EMPTY_COLUMN INTEGER
);

CREATE TABLE medbpe00.SIBCLASSMAP (
  CLASSID INTEGER NOT NULL,
  URI VARCHAR(2048) NOT NULL,
  PRIMARY KEY(CLASSID)
);

CREATE TABLE medbpe00.SIBLISTING (
  ID INTEGER NOT NULL,
  SCHEMA_NAME VARCHAR(10),
  TABLE_NAME VARCHAR(10) NOT NULL,
  TABLE_TYPE CHAR(1) NOT NULL,
  PRIMARY KEY(ID)
);

CREATE TABLE medbpe00.SIB000 (
  ID BIGINT NOT NULL,
  STREAM_ID BIGINT NOT NULL,
  TYPE CHAR(2),
  EXPIRY_TIME BIGINT,
  STRATEGY INTEGER,
  REFERENCE BIGINT,
  CLASS_ID INTEGER NOT NULL,
  PRIORITY INTEGER,
  SEQUENCE BIGINT,
  PERMANENT_ID INTEGER,
  TEMPORARY_ID INTEGER,
  LOCK_ID BIGINT,
  DATA_SIZE INTEGER NOT NULL,
  DATA VARCHAR(3360) FOR BIT DATA,
  LONG_DATA BLOB(1G),
  XID VARCHAR(254),
  DELETED SMALLINT,
  PRIMARY KEY(ID)
);

CREATE INDEX medbpe00.SIB000STREAMIX ON
medbpe00.SIB000(STREAM_ID,SEQUENCE) ALLOW REVERSE SCANS;

ALTER TABLE medbpe00.SIB000 VOLATILE CARDINALITY;

CREATE TABLE medbpe00.SIB001 (
  ID BIGINT NOT NULL,
  STREAM_ID BIGINT NOT NULL,
  TYPE CHAR(2),
  EXPIRY_TIME BIGINT,
  STRATEGY INTEGER,
  REFERENCE BIGINT,
  CLASS_ID INTEGER NOT NULL,
  PRIORITY INTEGER,
  SEQUENCE BIGINT,
  PERMANENT_ID INTEGER,
  TEMPORARY_ID INTEGER,
  LOCK_ID BIGINT,
  DATA_SIZE INTEGER NOT NULL,
  DATA VARCHAR(3360) FOR BIT DATA,
  LONG_DATA BLOB(1G),
  XID VARCHAR(254),
  DELETED SMALLINT,
  PRIMARY KEY(ID)
);

CREATE INDEX medbpe00.SIB001STREAMIX ON
medbpe00.SIB001(STREAM_ID,SEQUENCE) ALLOW REVERSE SCANS;

ALTER TABLE medbpe00.SIB001 VOLATILE CARDINALITY;

CREATE TABLE medbpe00.SIB002 (
  ID BIGINT NOT NULL,
  STREAM_ID BIGINT NOT NULL,
  TYPE CHAR(2),
  EXPIRY_TIME BIGINT,
  STRATEGY INTEGER,
  REFERENCE BIGINT,
  CLASS_ID INTEGER NOT NULL,
  PRIORITY INTEGER,
  SEQUENCE BIGINT,
  PERMANENT_ID INTEGER,
  TEMPORARY_ID INTEGER,
  LOCK_ID BIGINT,
  DATA_SIZE INTEGER NOT NULL,
  DATA VARCHAR(3360) FOR BIT DATA,
  LONG_DATA BLOB(1G),
  XID VARCHAR(254),
  DELETED SMALLINT,
  PRIMARY KEY(ID)
);

CREATE INDEX medbpe00.SIB002STREAMIX ON
medbpe00.SIB002(STREAM_ID,SEQUENCE) ALLOW REVERSE SCANS;

ALTER TABLE medbpe00.SIB002 VOLATILE CARDINALITY;

CREATE TABLE medbpe00.SIBXACTS (
  XID VARCHAR(254) NOT NULL,
  STATE CHAR(1) NOT NULL,
  PRIMARY KEY(XID)
);

CREATE TABLE medbpe00.SIBKEYS (
  ID VARCHAR(50) NOT NULL,
  LAST_KEY BIGINT NOT NULL,
  PRIMARY KEY(ID)
);

GRANT SELECT,INSERT,UPDATE ON medbpe00.SIBOWNER TO db2inst1;

GRANT SELECT,INSERT,UPDATE ON medbpe00.SIBOWNERO TO db2inst1;

GRANT SELECT,INSERT ON medbpe00.SIBCLASSMAP TO db2inst1;

GRANT SELECT,INSERT ON medbpe00.SIBLISTING TO db2inst1;

GRANT SELECT,INSERT,DELETE,UPDATE ON medbpe00.SIB000 TO db2inst1;

GRANT SELECT,INSERT,DELETE,UPDATE ON medbpe00.SIB001 TO db2inst1;

GRANT SELECT,INSERT,DELETE,UPDATE ON medbpe00.SIB002 TO db2inst1;

GRANT SELECT,INSERT,UPDATE,DELETE ON medbpe00.SIBXACTS TO db2inst1;

GRANT SELECT,INSERT,UPDATE ON medbpe00.SIBKEYS TO db2inst1;


Now, for BPM, we need two sets of tables, one for schema MEDBPE00 and one for schema MEDBPS00, so I ran the commands twice, as follows: -

./sibDDLGenerator.sh -system db2 -version 9.7 -platform unix -statementend \; -schema medbpe00 -user db2inst1 -database medb > ~/createMEDBPEtables.sql
$ ./sibDDLGenerator.sh -system db2 -version 9.7 -platform unix -statementend \; -schema medbps00 -user db2inst1 -database medb > ~/createMEDBPStables.sql

generating a .SQL file in each case.

Thanks to Bob for his inspiration with this post: -


*UPDATE* 10 January 2013

I made a slight typo above when I specified -schema medbpe00 and -schema medbps00. I did, of course, mean to write medpe00 and medps00 as per the following: -

./sibDDLGenerator.sh -system db2 -version 9.7 -platform unix -statementend \; -schema medpe00 -user db2inst1 -database medb > ~/createMEDBPEtables.sql
$ ./sibDDLGenerator.sh -system db2 -version 9.7 -platform unix -statementend \; -schema medps00 -user db2inst1 -database medb > ~/createMEDBPStables.sql

With the wrong schema names, the Messaging cluster will not start, which is somewhat annoying.

Monday, January 7, 2013

SSH and X11 on OS X Mountain Lion - No longer OOTB

I have a vague recollection of Stuart McIntyre Tweeting about this when OS X 10.8 Mountain Lion was released, but didn't really follow up at that point.

Having now finally got my act together and installed Mountain Lion, I can see what he means.

On the rare occasion that I want to connect to one of my Unix servers via X11, I'm used to typing the following command: -


which, after a short interval, starts a X11 server, and allows me to log in to the remote box as usual, with the X11 session being established back to the Mac.

Sadly, this is no longer an option.

According to this: -


Apple write: -

X11 is not included with Mountain Lion, but X11 server and client libraries for OS X Mountain Lion are available from the XQuartz project: http://xquartz.macosforge.org. You should use XQuartz version 2.7.2 or later.

So I've headed over to the XQuartz project on MacOSForge, and downloaded a 67 MB DMG file - XQuartz-2.7.4.dmg - and am giving it a try now.

I'll report back ….

*UPDATE - 8/1/2013*

Yep, it worked. It did require me to log out of OS X - I chose to reboot, so had to wait until I had a window in which I could shut down VMware, browser, Notes etc.

However, now when I run: -

$ ssh -X wasadmin@rhel6

I see a short delay whilst XQuartz kicks off, and I get an icon: -

in the dock.

More importantly, I can then run X11 commands such as xev and see the results back on the Mac's desktop. Which is nice :-)

Using IBM Installation Manager to report on what's available to install

Following on from an earlier post: -


here's another potentially useful IBM Installation Manager (IIM) command.

This allows one to query an installation repository ( either created using Packaging Utility or by the expansion of a set of images downloaded from Passport Advantage etc. ) and report on the versions of software available.

Here's an example for IBM Business Process Manager 8.0.1: -

$ /opt/IBM/InstallationManager/eclipse/tools/imcl -silent -nosplash listAvailablePackages -repositories /mnt/hgfs/DaveHay/BPM/install/repository/repos_64bit/

com.ibm.bpm.ADV.V80_8.0.1000.20121102_2136
com.ibm.websphere.ND.v80_8.0.3.20120320_0536
com.ibm.ws.DB2EXP97.linuxia64_9.7.3.20120504_0255

and here's an example for the WebSphere Application Server 8.0 Supplements: -

/opt/IBM/InstallationManager/eclipse/tools/imcl -silent -nosplash listAvailablePackages -repositories /mnt/hgfs/DaveHay/BPM/supplements/

com.ibm.websphere.APPCLIENT.v80_8.0.0.20110503_0200
com.ibm.websphere.IHS.v80_8.0.0.20110503_0200
com.ibm.websphere.PLG.v80_8.0.0.20110503_0200
com.ibm.websphere.PLUGCLIENT.v80_8.0.0.20110503_0200
com.ibm.websphere.WCT.v80_8.0.0.20110503_0200


and here's one for the WebSphere Application Server 8.0.0.5 fix packs: -

$ /opt/IBM/InstallationManager/eclipse/tools/imcl -silent -nosplash listAvailablePackages -repositories /mnt/hgfs/DaveHay/BPM/fixes/Base/

com.ibm.websphere.BASE.v80_8.0.5.20121022_1902
com.ibm.websphere.BASETRIAL.v80_8.0.5.20121022_1902
com.ibm.websphere.DEVELOPERS.v80_8.0.5.20121022_1902
com.ibm.websphere.DEVELOPERSILAN.v80_8.0.5.20121022_1902
com.ibm.websphere.EXPRESS.v80_8.0.5.20121022_1902
com.ibm.websphere.EXPRESSTRIAL.v80_8.0.5.20121022_1902
com.ibm.websphere.ND.v80_8.0.5.20121022_1902
com.ibm.websphere.NDDMZ.v80_8.0.5.20121022_1902
com.ibm.websphere.NDDMZTRIAL.v80_8.0.5.20121022_1902
com.ibm.websphere.NDTRIAL.v80_8.0.5.20121022_1902

$ /opt/IBM/InstallationManager/eclipse/tools/imcl -silent -nosplash listAvailablePackages -repositories /mnt/hgfs/DaveHay/BPM/fixes/Supp/

com.ibm.websphere.APPCLIENT.v80_8.0.5.20121022_1902
com.ibm.websphere.APPCLIENTILAN.v80_8.0.5.20121022_1902
com.ibm.websphere.IHS.v80_8.0.5.20121022_1902
com.ibm.websphere.IHSILAN.v80_8.0.5.20121022_1902
com.ibm.websphere.PLG.v80_8.0.5.20121022_1902
com.ibm.websphere.PLGILAN.v80_8.0.5.20121022_1902
com.ibm.websphere.PLUGCLIENT.v80_8.0.5.20121022_1902
com.ibm.websphere.PLUGCLIENTILAN.v80_8.0.5.20121022_1902


In the latter two examples, I downloaded the WAS 8.0.0.5 fix packs: -

-rw-r--r--@  1 hayd  staff  1377925961  4 Jan 23:10 8.0.0-WS-WAS-FP0000005-part1.zip
-rw-r--r--@  1 hayd  staff  1113282861  4 Jan 20:59 8.0.0-WS-WAS-FP0000005-part2.zip
-rw-r--r--@  1 hayd  staff  1089748410  4 Jan 22:58 8.0.0-WS-WASSupplements-FP0000005-part1.zip
-rw-r--r--@  1 hayd  staff  1495994292  4 Jan 19:44 8.0.0-WS-WASSupplements-FP0000005-part2.zip


and expanded them into Base and Supp subdirectories on my USB drive.

Want to know how and why Linux names its Ethernet adapters ?

I picked this up from a Raspberry Pi forum, whilst trying to get a USB wireless adapter to work with my Pi.

I cannot tell for certain why your device gets renamed from wlan0 to wlan1 but it might be worth looking into "/etc/udev/rules.d/70-persistent-net.rules". This file is created by udev to store the names of network interfaces and keep them consistent throughout the system. Udev should automatically put a comment before each rule, saying which driver is responsible for the interface.

I'd not looked into this before, but had wondered why, on one of my Red Hat Enterprise Linux VMs, the Ethernet card always comes up as eth4 rather than eth0.

When I checked the file: -

cat /etc/udev/rules.d/70-persistent-net.rules

# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x100e (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="08:00:27:87:e2:dc", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:07:2f:73", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:d1:94:31", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:60:44:f2", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"

# PCI device 0x8086:0x100f (e1000)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:9c:4a:af", ATTR{type}=="1", KERNEL=="eth*", NAME="eth4"


I'm guessing that the MAC ( Media Access Control ) address has changed since I first spun up the VM, perhaps meaning that Linux has kindly created a new interface - eth4 - for the "new" MAC address.

I imagine that, if I wanted to change it back to eth0, I could simply "hack" this file, perhaps removing the first four entries, and renaming eth4 to eth0 on the one remaining line.

Still, it's good to know why it happens ….

Wednesday, January 2, 2013

More on 404 errors accessing WCM content through the POC Servlet (/wps/mypoc/…)

A year or so back, I'd posted an article: -


making reference to a solution that one of my correspondents, Cody Burleson, had come up with to a problem that he'd seen with IBM Web Content Manager.

Well, more recently, I had an email from another US-based correspondent who was experiencing the same problem.

Sadly, Cody's original post has disappeared from his blog - I guess he's been doing some house-keeping.

Happily, however, my new correspondent ( Tim ) wrote back to me to say that he'd fixed the problem.

Here's his solution: -

<snip>
guess our issue was more related to the web server. After finding this in the log while tracing...

[Wed Dec 19 14:58:23 2012] [info] [client 10.129.38.3] found %2f (encoded '/') in URI (decoded='<URI removed to protect privacy>'), returning 404

...it was determined that we needed to set "AllowEncodedSlashes On" in the httpd.conf file. 

I've never needed that before but the way the "poc" servlet was being called (with the %2f) it is required in this case.

</snip>

This is a new one on me as I've never seen a requirement to use this parameter - AllowEncodedSlashes - but it's a useful thing to remember, in case I ever need it.

Hope this helps someone else out there ….