javax.jms.MessageFormatException: MQJMS1058: Invalid message property name: writer-id
 Technote (troubleshooting)
 
Problem(Abstract)
You are receiving the exception "javax.jms.MessageFormatException: MQJMS1058: Invalid message property name: writer-id" when your application passes a message property "Property Names" containing the "-" (hyphen) character.
 
Cause
Message property names are not allowed to contain certain characters as outlined below.
 
Resolving the problem
Valid property names must begin with a Java™ identifier start character (any character for which Character.isJavaIdentifierStart returns true) followed by Java identifier part characters (characters for which Character.isJavaIdentifierPart returns true).
From Java Message Service (JMS) specification, section 3.5 Message Properties:

===========================================================

The Message interface contains a built-in facility for supporting property values.  In effect, this provides a mechanism for adding optional header fields to a message. Properties allow a client, via message selectors (see Section 3.8, "Message Selection"), to have a JMS provider select messages on its behalf using application-specific criteria.

Section 3.5.1  Property Names

Property names must obey the rules for a message selector identifier. See Section 3.8.1.1, "Message Selector Syntax," for more information.


Section 3.8.1.1 Message Selector Syntax

A selector can contain:
Identifiers:
An identifier is an unlimited-length character sequence that must begin with a Java identifier start character; all following characters must be Java identifier part characters.  An identifier start character is any character for which the method Character.isJavaIdentifierStart returns true. This includes '_' and '$'. An identifier part character is any character for which the method Character.isJavaIdentifierPart return true. (For other Identifiers limitation please refer to the JMS SPEC)

===========================================================


The java.lang.Character.isJavaIdentifierPart does not include the following punctuation symbols:

+ - : ; , = | / \ ( ) [ ] @ # % ! ^ & ~


For more information, see the javadoc or rulenames for java.lang.Character.isJavaIdentifierPart.
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers WebSphere Application Server Enterprise General AIX, HP-UX, Linux, Solaris, Windows 5.0, 5.0.0, 5.0.1, 5.0.2, 5.0.2.2, 5.0.3 Edition Independent, Enterprise
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Java Message Service (JMS)
Operating system(s): Windows
Software version: 5.0.2.4
Software edition:
Reference #: 1162636
IBM Group: Software Group
Modified date: Mar 8, 2004