Error code:EXTENSION_POINT_NOT_FOUND [message #156738] |
Thu, 27 April 2006 09:22  |
Eclipse User |
|
|
|
Hi all,
When I try to run this code (below), it gives an error. I could not find
the reason. Could you please help me.
Onder.
Error;
org.eclipse.birt.report.model.metadata.ExtensionLoader
logExtenstionException
[java] SEVERE: Message:The extension point
[org.eclipse.birt.report.model.reportItemModel] is not found. Error
code:EXTENSION_POINT_NOT_FOUND
My code (which I have taken from eclipse site - dedemo.java)
// Create a session handle. This is used to manage all open designs.
// Your app need create the session only once.
SessionHandle session = DesignEngine.newSession( null );
// Create a new report design.
ReportDesignHandle design = session.createDesign( );
// The element factory creates instances of the various BIRT elements.
ElementFactory factory = design.getElementFactory( );
// Create a simple master page that describes how the report will
// appear when printed.
//
// Note: The report will fail to load in the BIRT designer
// unless you create a master page.
DesignElementHandle element = factory.newSimpleMasterPage( "Page Master"
); //$NON-NLS-1$
design.getMasterPages( ).add( element );
// Create a grid and add it to the "body" slot of the report
// design.
GridHandle grid = factory.newGridItem( null, 2 /* cols */, 1 /* row */ );
design.getBody( ).add( grid );
// Note: Set the table width to 100% to prevent the label
// from appearing too narrow in the layout view.
grid.setWidth( "100%" ); //$NON-NLS-1$
// Get the first row.
RowHandle row = (RowHandle) grid.getRows( ).get( 0 );
// Create an image and add it to the first cell.
ImageHandle image = factory.newImage( null );
CellHandle cell = (CellHandle) row.getCells( ).get( 0 );
cell.getContent( ).add( image );
image.setURI( "http://www.eclipse.org/birt/tutorial/multichip-4.jpg" );
//$NON-NLS-1$
// Create a label and add it to the second cell.
LabelHandle label = factory.newLabel( null );
cell = (CellHandle) row.getCells( ).get( 1 );
cell.getContent( ).add( label );
label.setText( "Hello, world!" ); //$NON-NLS-1$
// Save the design and close it.
design.saveAs( "sample.rptdesign" ); //$NON-NLS-1$
design.close( );
// We're done!
I think it is about a .jar (which jar ?)
Regards,
Onder.
|
|
|
|
|
|
|
Re: Error code:EXTENSION_POINT_NOT_FOUND [message #157458 is a reply to message #157403] |
Mon, 01 May 2006 12:05  |
Eclipse User |
|
|
|
Onder,
BIRT_HOME should be set to 1.
There is no relation between 1 and 2.
Just set BIRT_HOME to C:\birtruntime\birt-runtime-2_0_1\Report Engine.
You do not have to set any other variable.
Here is an example. In this example I set BIRT_HOME by just creating an
EngineConfig class. It is probably better to have as an Environ variable
though.
Jason
import java.io.IOException;
import org.eclipse.birt.report.engine.api.EngineConfig;
import org.eclipse.birt.report.model.api.CellHandle;
import org.eclipse.birt.report.model.api.DesignElementHandle;
import org.eclipse.birt.report.model.api.DesignEngine;
import org.eclipse.birt.report.model.api.ElementFactory;
import org.eclipse.birt.report.model.api.GridHandle;
import org.eclipse.birt.report.model.api.ImageHandle;
import org.eclipse.birt.report.model.api.LabelHandle;
import org.eclipse.birt.report.model.api.ReportDesignHandle;
import org.eclipse.birt.report.model.api.RowHandle;
import org.eclipse.birt.report.model.api.SessionHandle;
import org.eclipse.birt.report.model.api.TableHandle;
import org.eclipse.birt.report.model.api.activity.SemanticException ;
public class CreateReport {
static void createReport()throws IOException, SemanticException
{
//Engine Configuration - set and get temp dir, BIRT home, Servlet context
EngineConfig config = new EngineConfig();
config.setEngineHome( "C:/birt-runtime-2_0_1/birt-runtime-2_0_1/Report
Engine" );
// Create a session handle. Use Default Locale
SessionHandle session = DesignEngine.newSession( null );
// Create a new report design.
ReportDesignHandle design = session.createDesign( );
// The element factory creates instances of the various BIRT elements.
ElementFactory factory = design.getElementFactory( );
// Create a simple master page
DesignElementHandle element = factory.newSimpleMasterPage( "Page
Master" );
design.getMasterPages( ).add( element );
// Create a grid and add it to the "body" slot of the report
// design.
GridHandle grid = factory.newGridItem( null, 2 /* cols */, 1 /* row */ );
design.getBody( ).add( grid );
TableHandle th = factory.newTableItem("test",2);
design.getBody( ).add( th );
th.setWidth("100%");
grid.setWidth( "100%" );
// Get the first row of grid.
RowHandle row = (RowHandle) grid.getRows( ).get( 0 );
// Create an image and add it to the first cell.
ImageHandle image = factory.newImage( null );
CellHandle cell = (CellHandle) row.getCells( ).get( 0 );
cell.getContent( ).add( image );
image.setURI( "\"c:/test/CreateReport/images/eclipseconlogo.jpg\"" );
// Create a label and add it to the second cell.
LabelHandle label = factory.newLabel( null );
cell = (CellHandle) row.getCells( ).get( 1 );
cell.getContent( ).add( label );
label.setText( "Welcome to EclipseCon!" );
// Save the design and close it.
design.saveAs( "c:/test/CreateReport/EclipseCon.rptdesign" );
design.close( );
session.closeAll(true);
System.out.println("Finished!");
}
public static void main(String[] args) {
try
{
createReport( );
}
catch ( Exception e )
{
e.printStackTrace();
}
}
}
"Onder" <onderulker@gmail.com> wrote in message
news:b1f70f2c005f06442d3c265fa8144257$1@www.eclipse.org...
> Thanks Jason,
> I have new question about BIRT_HOME.
>
> Which must be the path (system variable) :
> 1) C:\birtruntime\birt-runtime-2_0_1\Report Engine
> 2) C:\eclipse
> 3) The relation between birt_home and org.eclipse.sdk_3.1.0 is what (if
> there is)? And how do I make this relation?
>
> 1 and 2 has a plugin directory. I have tried both but I couldn't fixed the
> problem.
> In addition, do I have to add any thing to like; path=%BIRT_HOME%\plugin
> or path=%BIRT_HOME% or somethingelse?
>
> My other question is, do I have to make any path like eclipse_home or
> eclipse sdk?
>
> Regards,
>
> Onder.
>
|
|
|
Powered by
FUDForum. Page generated in 0.06461 seconds