I am writing a very simple RMI server, and I am seeing intermittent java.rmi.NoSuchObjectExceptions in the unit tests.
I have a string of remote method calls on the same object, and while the first few go through, the later ones will sometimes fail. I am not doing anything to unregister the server object in between.
These error do not...
This:
Timerange longest = Timerange.longest(breaks);
if (longest.durationInHours() >= MIN_FREE_HOURS)
return true;
is OK.
But this:
if (Timerange.longest(breaks).durationInHours() >= MIN_FREE_HOURS)
return true;
gives:
java.lang.ClassCastException
Do you know why?!
For simplicity:
public static final <T extends Timera...
I know about unittest Python module.
I know about assertRaises() method of TestCase class.
I would like to write a test that succeeds when an exception is not raised.
Any hints please?
...
I have a WCF service that if something goes wrong throws a generic FaultException.
I don't know why, sometimes the clients will catch a non-generic FaultException instead of the generic exception.
Does anybody know, what the problem is?
...
Hi,
I have a website developed in ASP.Net 2.0 that is throwing the error
"Exception has been thrown by the target of an invocation"
in the production environment. It was not throwing this error in development.
The source is 'mscorlib', and the stack trace says the error at
System.RuntimeMethodHandle._InvokeMethodFast.
The o...
Twice this week, I've read people write that an event (.net) was "thrown". I've always thought that the verb to use with events is either "fire" or "raise". I thought that "thrown" was used for exceptions, but not events ("raise" can be used for either).
Does anyone else find it confusing for events to be "thrown"?
...
Hello,
I am getting a java.sql.SQLException: No suitable driver when I am trying to connect to a database with Java. I am on Mac OS 10.5 using the NetBeans IDE. It seems to be having trouble with the EmbeddedDriver, but I'm not sure what I am missing:
public class A
{
Connection conn = null;
public A(String URL...
I'm switching back and forth between Java and C# and one thing I miss while I'm coding in C# is the enforced exception checking (Although I admit I also find it really irritating sometimes while I'm coding in Java).
I'm aware that Exception Hunter can help you track down what exceptions a piece of code might throw but is there a free/ch...
hi all!
I have the following problem, basically i have a WCF service which operates fine in small tests. However when i attempt a batch/load test i get an InvalidOperationException with the message when the open() method is called on the proxy class:
"The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be m...
I've encountered a strange difference between a program running in VS2005 and running the executable directly. Essentially, when an exception is thrown in a method inside an Application.DoEvents() call, the exception can be caught when running inside Visual Studio. When running the compiled executable, the exception is not caught and t...
Hello,
This question is a bit specific (MOSS2007) and I don't high hopes for getting an answer, but maybe luck will smile upon me.
I have a web part that works except the very first time it's being added to a page. It throws an exception inside a constructor when I'm trying to open a connection to a SQL server. The demand for the SqlCl...
When I execute my C++ code (which uses the CGAL library) under debug mode, I see a lot of debug messages in the Output window about a first-chance exception CGAL::Uncertain_conversion_exception. I am aware of what a first-chance exception is.
Now, how do I turn off the display of debug messages for this one kind of exception (CGAL::Unce...
Let us assume that a particular Exception "SomeException" is part of the exception stack,
so let us assume ex.InnerException.InnerException.InnerException is of type "SomeException"
Is there any built-in API in C# which will try to locate a given exception type in exception stack?
Example:
SomeException someExp = exp.LocateExceptionI...
I'm working on win 32 multithreading with c++.
Scenario:
I have a function used by multiple threads.
This function as a critical sections (or any kind of construct that can lock a resource).
In the critical section an exception is thrown.
At this point I need to take care of unlocking the resource in the exception catch block.
Is there ...
I am using Eclipse and i-series Navigator for database. when I ran my application it is showing:
Exception=Exception001{Id=0,Message=java.lang.RuntimeException:
Failed to connect to queue manager,Severity=2}],
ServiceID=GetCustomerProfile2,Status=2,TransactionID=1}
Please suggest what to do?
...
I work on a fairly complex Open Source project (opensimulator.org). It's currently sitting around 300 KLOC of C#, and there are a number of places where code has built up to trap and ignore exceptions, which end up disguising subtle bugs.
I'm wondering what tools are out there that can produce reports of overly general exception catchin...
I'm currently using Microsoft Visual C# Express Edition (with SP1) for a Project.
I'm getting some strange errors in the Forms editor when editing one particular form, the message reads:
Type 'System.Windows.Forms.Control' in assembly
'System.Windows.Forms, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089' is not...
To my understanding, binding errors are displayed only during debug mode in Visual Studio's Output window. However, I want to know about broken bindings when the user runs my app, and I want to notify him that something is not working quite right.
Is there a way to handle binding exceptions from code, when the datacontext is set, and so...
I've dealt with instances where I would throw/rethrow an exception knowing that the code surrounding it would catch the specific exception. But is there any time you would want to throw an exception, knowing that it wouldn't be caught?
Or at least, NOT catch an exception?
Exceptions immediately halt the application unless their handle...
Hi all,
I'm mantaining a EJB 2 CMP legacy app runing on a JBoss 4.0.4 GA application server with deployed entity/stateless session beans. All the EJB boilerplate code is generated via XDoclet from the EntityEJB/EntityEJBManager annotations.
I've noticed that when my GUI client invokes the facade create method, I have lots of cases of E...