ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ API Support » System.FormatException in IBM.XMS.Client.Impl.dll

Post new topic  Reply to topic Goto page 1, 2  Next
 System.FormatException in IBM.XMS.Client.Impl.dll « View previous topic :: View next topic » 
Author Message
GenCode
PostPosted: Fri Oct 02, 2015 11:26 am    Post subject: System.FormatException in IBM.XMS.Client.Impl.dll Reply with quote

Novice

Joined: 10 Sep 2015
Posts: 21

I am having an issue in in one of my messages in a simple read using XMS in .NET

I read all my messages just fine, but when I read about the 19th message the following exception is thrown.

Exception thrown: 'System.FormatException' in IBM.XMS.Client.Impl.dll
Additional information: String was not recognized as a valid DateTime.


the line it throws the XMSException on is
consumer.Receive();
I also tried ReceiveNoWait() but same error on that one message.

Whats confusing is its only the one message but my older version using the older libraries did not have this issue reading this message.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Sat Oct 03, 2015 3:55 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

So what's different in message #19 from all the other messages?
A timestamp in the RFH2 jms section that cannot be parsed correctly maybe?
Or a user property that was defined as timestamp but does not match the timestamp format of the receiver?
What has changed in .NET parsing of DateTime between the 2 versions?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
bruce2359
PostPosted: Sat Oct 03, 2015 4:09 am    Post subject: Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
Location: US: west coast, almost. Otherwise, enroute.

Other than posting here what have done to diagnose the problem?

Is it always the 19th msg that throws the error? Use some utility to move the 19th msg to the 1st or last position in the queue. Does the error move?

How many messages total are in queue? Presuming that there are more than 19 messages in the queue, if you delete the 19th message, does the problem disappear? Or does the problem move to the "new" 19th message?

Use some utility to display in hex the 18th and 19th msgs. How are they different?
_________________
I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Oct 05, 2015 4:50 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Is it the 19th message? Or is it the 19th Get?

How often are you creating a new connection to MQ? Once for each get?

What does the memory usage of your application look like?
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
GenCode
PostPosted: Mon Oct 05, 2015 5:49 am    Post subject: Reply with quote

Novice

Joined: 10 Sep 2015
Posts: 21

Thanks for the feedback, just returned from the weekend.

> So what's different in message #19 from all the other messages?
Visually there seems to be no difference except the content

> Other than posting here what have done to diagnose the problem?
I ran an older version of the app based on the older amqmdnet dll and it was able to read it.

> How many messages total are in queue? Presuming that there are more than 19 messages in the queue, if you delete the 19th message, does the problem disappear? Or does the problem move to the "new" 19th message?

I assume it would but I did not want to delete the message until I figured out this issue.


> How often are you creating a new connection to MQ? Once for each get?

Tried both ways


Issue is its blowing up inside the IBM DLL not my user code so I really don't know what I can do at this point other than delete it.

Also tried changing to
var msg = (ITextMessage)consumer.Receive();
and
var msg = consumer.ReceiveNoWait();

but no matter what the IBM Receive throws this exception.

This is a client message, not one we produced. Is there anything I can ask the client about it.
Back to top
View user's profile Send private message
GenCode
PostPosted: Mon Oct 05, 2015 5:52 am    Post subject: Reply with quote

Novice

Joined: 10 Sep 2015
Posts: 21

Here is the text content of the message

2015-09-30-15.12.36.294253yyy00000000xxxxxxxyyy01 2015100100000000REJECT 003001DATE EFFECTIVE IS NOT VALID BUS DATE-
Back to top
View user's profile Send private message
GenCode
PostPosted: Mon Oct 05, 2015 6:13 am    Post subject: Reply with quote

Novice

Joined: 10 Sep 2015
Posts: 21

Snapper,

> A timestamp in the RFH2 jms section that cannot be parsed correctly maybe?

That sounds logical, but they are not sending their messages thru jms I don't believe. Is there I can make it ignore the timestamp section on the read?
Back to top
View user's profile Send private message
GenCode
PostPosted: Mon Oct 05, 2015 9:46 am    Post subject: Reply with quote

Novice

Joined: 10 Sep 2015
Posts: 21

Code:

        public bool Consume()
        {
            if (_disposed)
                throw new ObjectDisposedException("Connection is disposed.");

            bool retval = false;
            IMessage recvMsg = null;

            List<IMessage> messages = new List<IMessage>();
            using (var scope = new TransactionScope(TransactionScopeOption.Required))
            {
                while (true)
                {
                    try
                    {
                        //recvMsg = consumer.ReceiveNoWait();
                        recvMsg = (ITextMessage)consumer.Receive();
                        messages.Add(recvMsg);

                        if (recvMsg == null) // no more messages, time to leave
                        {
                            break;
                        }

                        retval = true;
                    }
                    catch (XMSException xmsex)
                    {
                        WMQCommon.WMQLogging.Log(xmsex);
                        session.Rollback();
                        retval = false;
                    }
                    catch(Exception ex)
                    {
                        WMQCommon.WMQLogging.Log(ex);
                        session.Rollback();

                        retval = false;
                    }
                }

                session.Rollback(); // this is for testing only, use parser below and remove when done testing.
//                _parser.Parse(recvMsg);

            } // end scope


            connection.Close();
            return retval;
        }
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Oct 05, 2015 9:53 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Which line throws the exception?
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
GenCode
PostPosted: Mon Oct 05, 2015 11:58 am    Post subject: Reply with quote

Novice

Joined: 10 Sep 2015
Posts: 21

Hi Jeff,

As stated throughout the thread its the IBM call to recieve.
recvMsg = (ITextMessage)consumer.Receive();

Other than options I don't know what I can do.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Oct 05, 2015 6:49 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20696
Location: LI,NY

So we'll have to presume that the error is in the receive method and not in the cast to (ITextMessage) right? If you look at the message with a utility, say RFHUtil it shows "STRING " as the message format?
What is the content of the JMS tab in RFHUtil? Please specify the content for each field.
What is the content of the user properties (see both RFH user tab and properties tab)?

Have you opened a PMR for this?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
GenCode
PostPosted: Tue Oct 06, 2015 4:43 am    Post subject: Reply with quote

Novice

Joined: 10 Sep 2015
Posts: 21

> So we'll have to presume that the error is in the receive method and not in the cast to (ITextMessage) right?

Yup, actually we "know" its not a casting issue because I also tried without a cast.

i.e. I tried this, no cast and use var, same error
var testNoCast =consumer.Receive();

Let me see if I can get more info with that util.
Back to top
View user's profile Send private message
GenCode
PostPosted: Tue Oct 06, 2015 6:46 am    Post subject: Reply with quote

Novice

Joined: 10 Sep 2015
Posts: 21

fjb_saper,

I am able to read that message with the browse of the util
here are the answers to your questions.

> RFHUtil it shows "STRING " as the message format?

DATA Tab, Data Format Char, Char Format Ebcdic

> What is the content of the JMS tab in RFHUtil? Please specify the content for each field.

JMS Tab, Everything is blank, JMS Message Type there are no radio buttons set at all.


> What is the content of the user properties (see both RFH user tab and properties tab)?

User Prop tab
User properties is blank, same with usr tab, the box is blank

data

00000000 2015-09-30-15.12.36.294253yyy000
00000032 00000xxxxxxxyyy01 201510010000
00000064 0000REJECT 003001DATE EFFECTIVE
00000096 IS NOT VALID BUS DATE-
00000128
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue Oct 06, 2015 6:50 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Can you show the amqsbcg/amqsbcgc output of the message?
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
GenCode
PostPosted: Tue Oct 06, 2015 7:35 am    Post subject: Reply with quote

Novice

Joined: 10 Sep 2015
Posts: 21

Using the IBM utility I went to the
MQMD tab and to me as a the
Put Date/Time
looks odd, its value is the following
0930/20/15 17::1:3:.38


mqjeff,

> Can you show the amqsbcg/amqsbcgc output of the message?
I am not sure if you mean one of the tab in RFHUTIL or using the old .NET DLL?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » IBM MQ API Support » System.FormatException in IBM.XMS.Client.Impl.dll
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.