[otj-users] several errors

Stephan Herrmann stephan at cs.tu-berlin.de
Sat Jun 28 20:42:32 CEST 2008


Hi,

> > i'm currently facing the following errors when working on a team class:
> >
> > * Internal compiler error (java.lang.NullPointerException)
> >   at org.eclipse.jdt.internal.compiler.ast.Expression.computeConversion
> >   [..]
> >
> > * Unhandled event loop exception: org.eclipse.swt.SWTException: Failed to
> > execute runnable (java.lang.NullPointerException)
> >   at org.eclipse.swt.SWT.error(SWT.java:3777)
> >   [..]
> >
> > (full log attached)
> >
> > These exceptions are raised more or less permanently (even on tool
> > tip "request"). This effectively renders the editor useless.

Sorry for the inconvenience, but the log file you sent actually contains
perfect instructions for reconstructing the issue.
The corresponding test case will appear here:
	http://www.objectteams.org/distrib/jacks/1.2.1/#results/B.1.1-otjld-rm-1.html

> And one little question (the log contains a snippet of your source code): 
> 
> > protected class SalesPointBinder implements SalesPoint playedBy SalesPoint
> 
> Why does your SalesPointBinder both implement SalesPoint and is played by it? 
> Usually roles change the behavior of their base class or add to it, and do 
> not share the same interface. Is there a special reason why you need to do 
> that? (This *might* also be a reason for the errors you get -- I didn't try 
> it, but I'd guess that you're the first to try this :-] )

That's a good observation. Actually two errors are reported here:

1. ERROR
protected class SalesPointBinder implements SalesPoint playedBy SalesPoint
                                            ^^^^^^^^^^
SalesPoint cannot be resolved to a type

-- Reason: SalesPoint has been imported using a base import only.
   Thus it is not available in non-base positions.

2. ERROR
protected class SalesPointBinder implements SalesPoint playedBy SalesPoint
                                                                ^^^^^^^^^^
Unsupported feature (incomplete implementation): binding interface SalesPoint as base of SalesPointBinder (OTJLD 2.1.1).


Indeed the NPE was caused by the failure to handle the broken type SalesPointBinder
(inconsistent hierarchy due to the reported errors) during further compilation of 
the specified callin binding. (Remember, the Eclipse compiler compiles _every_ class
to legal Java bytecode, no matter how broken it is).

I guess we will have to negotiate about the necessity of specifying an interface
after "playedBy" ;-)


The NPE is fixed in SVN and I can provide you a link to the next nightly build,
given that tests approve my patch ...

best regards,
Stephan





More information about the otj-users mailing list