Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
AW: [rap-dev] exception logging on EntryPoint registration

Hi,

sorry for the unconvenience, but we use the logging mechanism of equinox in the bundles that belong to the workbench layer to ensure that log messages are all treated the same way. To show those log messages in the console add a -consoleLog as Program arguments in the Argument tab of the launch configuration. The log file is located in the runtime workspace (see working directory in the same tab) at workspace/.metadata/.log

Hopefully this helps in future, in case you encounter similar problems...


Ciao
Frank
 

-----Ursprüngliche Nachricht-----
Von: rap-dev-bounces@xxxxxxxxxxx [mailto:rap-dev-bounces@xxxxxxxxxxx] Im Auftrag von Lars Martin
Gesendet: Samstag, 20. Oktober 2007 14:59
An: rap-dev@xxxxxxxxxxx
Betreff: [rap-dev] exception logging on EntryPoint registration 

Hi RAP folks, after several hours of fiddling with "caught but somehow not logged" execeptions in my RAP eval project I came across a very annoying part while debugging into the EntryPoint registration. While starting my RAP application I only got "An entry point named ''default'' 
does not exist." Over and over I checked my plugins but could not locate the reason for that. Finally I stepped into the registration process and found the cause. A simple UnsupportedClassVersionError set me back 4-5h. 
I started with Java 1.6 but had to switch back to Java 1.4 while development. Of course this could be considered as a beginner's mistake. 
;-) But why I didnt see any helpful log message?

EngineConfigWrapper.registerWorkbenchEntryPoint() contains the following piece of code:

try {
   Bundle bundle = Platform.getBundle( contributorName );
   Class clazz = bundle.loadClass( className );    // throws exception
   EntryPointManager.register( parameter, clazz );
   BrandingRegistry.getInstance().bindEntrypoint( id, parameter ); } catch( final Throwable thr ) {
   String text =   "Could not register entry point ''{0}'' "
                 + "with request startup parameter ''{1}''.";
   Object[] param = new Object[] { className, parameter };
   String msg = MessageFormat.format( text, param );
   Status status = new Status( IStatus.ERROR,
                               contributorName,
                               IStatus.OK,
                               msg,
                               thr );
   WorkbenchPlugin.getDefault().getLog().log( status ); }

But where does this "WorkbenchPlugin.getDefault()" logs into? Where can I find it? Other methods additionally added something like:

   // TODO [rst] Added to make errors visible on the console, revise this
   System.err.println( msg + " Reason: " + e.getMessage() );

Maybe this could be temporarily added in registerWorkbenchEntryPoint() too?

Im really happy with this finding, because now I can continue my RAP development. I'm really suprised how easy web development can be using RAP. So keep up the good work.

Thanks, Lars
_______________________________________________
rap-dev mailing list
rap-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/rap-dev


Back to the top