NoViableAltException & IndexOutOfRangeException

Automate and integrate using the SQL comparison API

Moderator: Chris Auckland

NoViableAltException & IndexOutOfRangeException

Postby hemantgaur » Mon Aug 23, 2010 6:46 pm

In the immediate window gets bombarded with the following message:

A first chance exception of type 'antlr.NoViableAltException' occurred in RedGate.SQLCompare.ASTParser.DLL

These series of messages appear while it is executing RegisterForDataCompare statement.

If I scan the series of above messages, in the immediate window, I would at random, see the following message as well:

A first chance exception of type 'System.IndexOutOfRangeException' occurred in RedGate.SQLCompare.ASTParser.DLL
hemantgaur
 
Posts: 20
Joined: Wed Dec 16, 2009 9:15 pm

Postby slaphead99 » Thu Aug 26, 2010 3:07 pm

This is on the SDK forum, so I assume you have written a custom application.

How do the supplied examples work for you? It is a lot easier to comment on what might be happing when I know what source is being used.

If the supplied examples work- can you describe what is different about your code as clearly the issue will be with this code...
slaphead99
 
Posts: 92
Joined: Wed Mar 10, 2010 2:27 pm

NoViableAltException & IndexOutOfRangeException

Postby hemantgaur » Thu Aug 26, 2010 3:21 pm

Hi slaphead,

This is a custom application, yes. I started with the supplied examples and then modified it to suit my requirement. I hope I was not clear in my earlier reporting, but I am debugging my application in Visual Studio. I put a break point on "db.RegisterForDataCompare" statement. When I step to the next executable statement, I look at my immediate window and I get series of "NoViableAltException" exceptions. In between these exceptions I see a few of 'System.IndexOutOfRangeException' exceptions. The process does not terminate, it continues executing, but just want to know what is going on, as it tells me something is not perfect and it might raise its head some where later.

Also as an additional information, if it might help, the entire red gate operation is implemented in a WCF service. Might or might not be related, but just wanted to throw that in.
hemantgaur
 
Posts: 20
Joined: Wed Dec 16, 2009 9:15 pm

Postby simon.jackson » Thu Aug 26, 2010 3:24 pm

Hi,
The exceptions are occurring within our parser.
The antlr parser generator ( http://www.antlr.org/ ) produces code which uses exceptions for backtracking. They should all be caught within the RegisterForDataCompare method.

The only exceptions I would expect to see for this reason are NoViableAltException and System.IndexOutOfRangeException.
simon.jackson
 
Posts: 45
Joined: Thu Jan 08, 2009 10:42 am

NoViableAltException & IndexOutOfRangeException

Postby hemantgaur » Thu Aug 26, 2010 3:27 pm

Thank you Simon.

So what are you exactly saying? That this is Ok and I should ignore it? If so, I am cool with it, I just want to make sure I am not doing anything wrong.

Thank you!!
hemantgaur
 
Posts: 20
Joined: Wed Dec 16, 2009 9:15 pm

Postby simon.jackson » Thu Aug 26, 2010 3:28 pm

The exceptions are expected, so you can just ignore them!
simon.jackson
 
Posts: 45
Joined: Thu Jan 08, 2009 10:42 am

NoViableAltException & IndexOutOfRangeException

Postby hemantgaur » Thu Aug 26, 2010 3:32 pm

Thank you Simon. :-)

Really appreciate your promptness. Can you please look into my out of disk space issue also, that I have logged right after this one? :roll:

That one is a real show stopper and I cannot test further because of that.

Would really be ever grateful. Thanks.
hemantgaur
 
Posts: 20
Joined: Wed Dec 16, 2009 9:15 pm


Return to SQL Comparison SDK Previous Versions

Who is online

Users browsing this forum: No registered users and 0 guests