Bug 123523 Previewing a scripted data set mapped to a java event handler throws NPE
When previewing a scripted data set we try to get a class loader from the ExecutionContext. (See ScriptExecutor.getClassUsingCustomClassPath). The context will be null in this case. The reason for using the context is to use cached class loaders when possible. Need to use some other mechanism to get the class loader if the context is null. We can either provide an external map to use as cache, or not bother with caching at all.
engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/executor/ExecutionContext.java
public void registerGlobalBean( String name, Serializable value )
	{
		persistentBeans.put( name, value );
		registerInRoot( name, value );
	}
	public void unregisterGlobalBean( String name )
	{
		persistentBeans.remove( name );
		registerInRoot( name, null );
	}
	public Map getGlobalBeans( )
	{
		return persistentBeans;
	}
	private void registerInRoot( String name, Object value )
	{
		Scriptable root = scriptContext.getRootScope( );
		Object sObj = Context.javaToJS( value, root );
		root.put( name, root, sObj );
	}
	/**
	 * Evaluate a BIRT expression
	 * 
	 * @param source
	 *            the expression to be evaluated
	 * @return the result if no error exists, otherwise null.
	 * 
	 * @see evaluate(String,String,int)
	 */
	public Object evaluate( String source )