Syntax of JMS Header property - properties

I am getting the an error while executing the code below
jmsMsg.setStringProperty("MessageHeader.ServiceName","MyService");
The error is
java.lang.IllegalArgumentException: The property name 'MessageHeader.ServiceName' is not a valid java identifier.
But as per this post! my property name is a valid one.
What is going wrong here?

I don't think it likes the . (dot) character in the name. Can you can that to something like underscore and see if that works? I get a false when running Character.isJavaIdentifierPart('c').

Related

How to identify an element by classname containing curly brackets

when i try to access element:
browser.element('.object{ media }');
I get the following error message:
Error: Argument was an invalid selector (e.g. XPath/CSS).
at element(".object{ media }") - index.js:312:3
Is it possible to access elements by class name including curly brackets?
As per your question and your code trials to access desired element with classname containing curly brackets i.e. {} you can use the following solution:
XPath:
"//*[#class=\"object{ media }\"]"
Following what #DebanjanB said,
You can use something called Regular Expressions to sort issues like this out, what Debanjan has shown you is known as this.
Regular Expressions Guide
It would be useful if you read through a guide so you fully understand the code you are putting into your project, this will allow you to make better use of it later on in your testing.
All the best,
Jack

hapijs - route config 'id' attribute - won't accept string value

I'm not sure if this is a bug or not, so I'm asking here, rather than submitting a bug report.
In the documentation for the latest version of hapijs (16.1.1)
https://hapijs.com/api#serverlookupid
For server.lookup, it clearly indicates that an 'id' property can be a string.
const route = server.lookup('root');
However strings are expressively forbidden by the actual implementation code.
https://github.com/hapijs/hapi/blob/master/lib/connection.js#L340
Hoek.assert(id && typeof id === 'string', 'Invalid route id:', id);
Am I missing something here? Is this a bug, or an error in the documentation, or am I simply misunderstanding something?
It seems an strange limitation to impose. Strings are a lot more logical for a route id.
The other issue, is that in the index.d.ts, it specifically forces the use of a string parameter.
This functionality just seems completely broken. How am I supposed to use it, if when creating a route I need to use a numeric id, and then when trying to retrieve it I'm forced to use a string?
You are reading the assert backwards. The error message only displays if the assertion fails. If an id is provided it can only be of type string.

Xamlparse Exception occured

I am getting this error again and again in silver light code .It says, The invocation of the constructor on type "LookupControl.SilverCrmLookup" that matches the specified binding constraints threw an exception. Though there is no error in code .
Check your XAML there must be something wrong in there ..

VBScript to VB error

I have been rewriting some of my old VBscript code to VB code.I am almost done with everything but I get an error at one place.
VB Script
Session("FirstName") = Request.Cookies("FirstName").Item
VB
Session.Add("FirstName", Request.Cookies("FirstName").Item)
and the error is
BC30455: Argument not specified for parameter 'key' of 'Public Default Property Item(key As String) As String'.
Can anybody tell me how to correct this error or atleast what does the error mean?
Thanks in advance.
Session.Add("FirstName", Request.Cookies("FirstName"))
should work , when you use .Item it is expecting a key for Item such as:
Session.Add("FirstName", Request.Cookies("FirstName").Item("ItemKey"))

MSAccess use of special character

I have got a very strange problem.
In the earlier version of programm i have found the following statement inside a query.
table1!field1 > table2!Field2
I ma not able to understand the meaning of the ! sign here.
Can any one able to help me in this regard
thank you in advance
! means default property with String parameter type in VB/VBA. Apparently Table object has default property Field("fieldname") and Field object has default property Value, thereby instead of table1.Field("field1").Value you can use shortcut notation table1!field1.