Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » Exception creating DriverManager
Exception creating DriverManager [message #597501] Thu, 13 May 2010 19:14 Go to next message
John Doyle is currently offline John Doyle
Messages: 12
Registered: March 2010
Junior Member
I have some code that's working great in my plugins, but I'm having difficulty unit testing it. When I invoke the following lines in a unit test, I get a ProfileManager but the DriverManager.getinstance() call fails.

profileManager = ProfileManager.getInstance();
driverManager = DriverManager.getInstance();

The stack trace looks like this:
ConnectivityPlugin.getDefault() line: 50
DriverManager.<clinit>() line: 53
...

And the ultimate failure is because the ConnectivityPlugin.plugin is null.

Is there some initialization I should be doing here? I'm running DTP 1.7.0.

thx
~jd
Re: Exception creating DriverManager [message #597509 is a reply to message #597501] Tue, 18 May 2010 15:21 Go to previous message
Brian Fitzpatrick is currently offline Brian Fitzpatrick
Messages: 495
Registered: July 2009
Senior Member
John Doyle wrote:
> I have some code that's working great in my plugins, but I'm having
> difficulty unit testing it. When I invoke the following lines in a unit
> test, I get a ProfileManager but the DriverManager.getinstance() call
> fails.
>
> profileManager = ProfileManager.getInstance();
> driverManager = DriverManager.getInstance();
>
> The stack trace looks like this:
> ConnectivityPlugin.getDefault() line: 50
> DriverManager.<clinit>() line: 53
> ..
>
> And the ultimate failure is because the ConnectivityPlugin.plugin is null.
>
> Is there some initialization I should be doing here? I'm running DTP
> 1.7.0.
>
> thx
> ~jd
>
>
Hmmm... Are you sure the test is running on the UI thread?
--Fitz
Previous Topic:Exception creating DriverManager
Next Topic:Database connection property file
Goto Forum:
  


Current Time: Thu Oct 02 06:25:37 GMT 2014

Powered by FUDForum. Page generated in 0.03066 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software