Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Unhandled event loop exception
Unhandled event loop exception [message #299813] Fri, 24 February 2006 09:32 Go to next message
Eclipse UserFriend
Originally posted by: mightymate.gmail.com

I am developing a Plug-in (wizard) for eclipse. It is supposed to connect
to the CVS and add the selected file to the CVS.

I am using org.netbeans.lib.cvsclient.jar

The problem is I keep getting this message when I try to start the wizard
in the run-time work space:

Unhandled event loop exception
Reason:
org/netbeans/lib/cvsclient/connection/Connection

And the wizard doesnt even open.

I am sure that the above mentioned jar is included in the build path.
The wizard was working fine until I added this bit of code as below:

private void commitFile(String containerLocation) throws CoreException {

GlobalOptions globalOptions = new GlobalOptions();
globalOptions.setCVSRoot(":pserver:reddyva@zug:/jdev/cvs");

PServerConnection c = null;

try {

c = new PServerConnection();
c.setUserName("reddyva");
c.setEncodedPassword("AAd!b=?!");
c.setHostName("zug");
c.setRepository("/jdev/cvs");
c.open();

}catch (Exception ex) {
ex.printStackTrace();
}
// -problem area.
Client client = new Client(c, new StandardAdminHandler());
AddCommand command = new AddCommand();

try {

client.setLocalPath(containerLocation);
command.setBuilder(null);
File file = new File(page.getAbsoluteFileName());
File[] files = new File[1];
files[0] = file;
command.setFiles(files);

boolean flag = client.executeCommand(command, globalOptions);
System.out.println("AddCommandStatus: " + flag);

}catch (Exception ex) {
ex.printStackTrace();
}
}

If I comment out the part below // -problem area, at least it starts the
wizard without any problem, but I need to get this part to be able to add
the file to the CVS.
Strangely even when I dont call this method in my code, but if its there
the problem persists and if I comment it out, the wizard works.

I tried everything I possible could, but couldnt find what the problem was.
Could somebody please tell me if I am missing some thing very obvious or
is there anything else I have to do?

I checked the log file under .metadata in both the development and
run-time workspace and there seems to be no entry made in the log file as
its empty.

Any help would be appreciated.

Thanks in advance,
Vic.
Re: Unhandled event loop exception [message #299814 is a reply to message #299813] Fri, 24 February 2006 09:41 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.bettsockentraeger.de

Some suggestions to locate the actual problem:

- Look in the logs for any exceptions which immediatly follows this one
and see if this gives you more detail.

One of the reasons for this exception is that there might be a class
which org/netbeans/lib/cvsclient/connection/Connection needs which it
can't locate due to the way classloaders are used in plugins. Another
reason are nullpointers but in this case most of the time a
NullPointerException follows this exception.

BTW Why are you using the netbeans classes and not the built in cvs
support of eclipse?

Regards
Stefan


Vic Rowan wrote:
> I am developing a Plug-in (wizard) for eclipse. It is supposed to
> connect to the CVS and add the selected file to the CVS.
>
> I am using org.netbeans.lib.cvsclient.jar
>
> The problem is I keep getting this message when I try to start the
> wizard in the run-time work space:
>
> Unhandled event loop exception
> Reason:
> org/netbeans/lib/cvsclient/connection/Connection
>
> And the wizard doesnt even open.
>
> I am sure that the above mentioned jar is included in the build path.
> The wizard was working fine until I added this bit of code as below:
>
> private void commitFile(String containerLocation) throws CoreException {
>
> GlobalOptions globalOptions = new GlobalOptions();
> globalOptions.setCVSRoot(":pserver:reddyva@zug:/jdev/cvs");
>
> PServerConnection c = null;
>
> try {
>
> c = new PServerConnection();
> c.setUserName("reddyva");
> c.setEncodedPassword("AAd!b=?!");
> c.setHostName("zug");
> c.setRepository("/jdev/cvs"); c.open();
> }catch (Exception ex) {
> ex.printStackTrace();
> }
> // -problem area.
> Client client = new Client(c, new StandardAdminHandler());
> AddCommand command = new AddCommand();
>
> try {
>
> client.setLocalPath(containerLocation);
> command.setBuilder(null);
> File file = new File(page.getAbsoluteFileName());
> File[] files = new File[1];
> files[0] = file;
> command.setFiles(files);
>
> boolean flag = client.executeCommand(command, globalOptions);
> System.out.println("AddCommandStatus: " + flag);
>
> }catch (Exception ex) {
> ex.printStackTrace();
> }
> }
>
> If I comment out the part below // -problem area, at least it starts the
> wizard without any problem, but I need to get this part to be able to
> add the file to the CVS.
> Strangely even when I dont call this method in my code, but if its there
> the problem persists and if I comment it out, the wizard works.
>
> I tried everything I possible could, but couldnt find what the problem was.
> Could somebody please tell me if I am missing some thing very obvious or
> is there anything else I have to do?
>
> I checked the log file under .metadata in both the development and
> run-time workspace and there seems to be no entry made in the log file
> as its empty.
>
> Any help would be appreciated.
>
> Thanks in advance,
> Vic.
>
>
>
>
Re: Unhandled event loop exception [message #299818 is a reply to message #299814] Fri, 24 February 2006 10:49 Go to previous message
Eclipse UserFriend
Originally posted by: mightymate.gmail.com

Thanks for the reply Stefan. I am using the netbeans library becuase the
eclipse team API is not public. I mean its quite stable, but as its
internal I was not sure if it would change in the future.

Secondly is there a way I can make sure that any class required by the
netbeans library be loaded before the causing the exception.

Also, if I use the eclipse API. Do I have to write another plugin as an
extension point to the hook provided for
org.eclipse.team.core.repository?? I am really confused here as if I just
use the eclipse library wouldnt it casuse problems with the existing team
plugin for the CVS which I am also using.

Thanks once again.
cheers,
varun.
Previous Topic:R/, does not match outer scope rule: P/my.project
Next Topic:how to configure ErrorDialog of JFace?
Goto Forum:
  


Current Time: Sun Nov 09 22:22:09 EST 2025

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

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

Back to the top