Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
My own chartevent handler does not get fired if and ONLY IF run in Debugger
Migrateduser
<p>So I am debugging a simple chart event handler that draws all data points on a chart in a particular color. It works well if I export my events to a .jar and include it as a resource in my .rptdesign file, but recently I have been trying to debug it in debug mode. (I'm on BIRT2.5.2 although there's no difference if I try this on BIRT3.7.*). The issue is, if I run it in debugger, the report will render, without any complaints, but only that the datapoints are no longer colored. After some digging and stuff I pinned the issue down to this point in </p><p>org.eclipse.birt.chart.script.AbstractScriptHandler::register(): </p><pre class="_prettyXprint _linenums:630"> if ( getEventHandlerClass().isAssignableFrom( handlerClass ) ) { try { javahandler = (T) SecurityUtil.newClassInstance( handlerClass ); } catch ( InstantiationException e ) { throw new ChartException( ChartEnginePlugin.ID, BirtException.ERROR, e ); } catch ( IllegalAccessException e ) { throw new ChartException( ChartEnginePlugin.ID, BirtException.ERROR, e ); } getLogger( ).log( ILogger.INFORMATION, Messages.getString( "Info.java.handler.loaded", //$NON-NLS-1$ handlerClass, ULocale.getDefault( ) ) ); }</pre><p>The first if statement returns false whereas handlerClass really is an implementation of getEventHandlerClass() which is IChartEventHandler.class. It is this if statement that eventually determines if my event handlers will be used. Some more painful debugging revealed that this might have something to do with java class loaders. I got to a point where I have solid observation that these two classes are loaded with different classloader and hence the 'false' if statement evaluation, but I have no idea how this happened or how to prevent this from happening. I know this is barely enough information for anyone to provide concrete help, I'm just wondering if anyone has seen similar issues before, or if someone can suggest a direction on how to resolve this, may it be a classpath setup, debug configuration, or hardcore debugging. Thanks.</p><p> </p><p> </p><p>EDIT: </p><p>Since I have little idea what could be the issue I did not post more details of my setup, because anything could be relevant or irrelevant. Please ask me for more info that you think might matter. I will actively monitor this thread. </p>
Find more posts tagged with
Comments
There are no comments yet