Thursday, 10 January 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 …..

No comments:

Note to self - use kubectl to query images in a pod or deployment

In both cases, we use JSON ... For a deployment, we can do this: - kubectl get deployment foobar --namespace snafu --output jsonpath="{...