klosskruemel [http://community.jboss.org/people/klosskruemel] created the 
discussion

"BIRT reports, oda driver throws NullPointerException"

To view the discussion, visit: http://community.jboss.org/message/609171#609171

--------------------------------------------------------------
Hello JBoss Community,

I integrated BIRT into a portal application using the Report Engine API 2.6.2. 
The portal application uses Hibernate, Seam 2.2, GateIn, the JBoss 
Portletbridge among others.
All works fine with the customers.rptdesign you can find in the BIRT tutorials. 
But using the Hibernate Datasource for our own reports I had a lot of trouble 
along way. The Eclipse preview is fine, but not the report I create within the 
application.

This is the error I get:

06.06.2011 14:44:29 org.eclipse.birt.report.engine.api.impl.RunAndRenderTask 
doRun
 SCHWERWIEGEND: An error happened while running the report. Cause:
 java.lang.NullPointerException
 at 
org.jboss.tools.birt.oda.impl.ConsoleConfigurationOdaFactory.getSessionFactory(ConsoleConfigurationOdaFactory.java:54)
 at 
org.jboss.tools.birt.oda.impl.ConsoleConfigurationOdaFactory.<init>(ConsoleConfigurationOdaFactory.java:34)
 at 
org.jboss.tools.birt.oda.impl.HibernateConnection.open(HibernateConnection.java:47)
 at 
org.eclipse.datatools.connectivity.oda.consumer.helper.OdaConnection.open(OdaConnection.java:250)
 at 
org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnection(ConnectionManager.java:165)
 at 
org.eclipse.birt.data.engine.executor.DataSource.newConnection(DataSource.java:224)
 at org.eclipse.birt.data.engine.executor.DataSource.open(DataSource.java:212)
 at 
org.eclipse.birt.data.engine.impl.DataSourceRuntime.openOdiDataSource(DataSourceRuntime.java:208)
 at 
org.eclipse.birt.data.engine.impl.QueryExecutor.openDataSource(QueryExecutor.java:406)
 at 
org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:316)
 at 
org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:455)

The last line in this code of the oda driver causes the NullPointerException: 
public SessionFactory getSessionFactory(Properties properties) throws 
OdaException {
                String configurationName = 
properties.getProperty(CONFIGURATION);
        ConsoleConfiguration[] configurations = 
KnownConfigurations.getInstance().getConfigurations();
        for (int i = 0; i < configurations.length; i++) {
                        if 
(configurations[i].getName().equals(configurationName)) {
                                consoleConfiguration=configurations[i];
                                break;
                        }
                }
        if (!isOpen()) {
                try {
                                sessionFactory = 
consoleConfiguration.getSessionFactory();

The consoleConfiguration seems to be null. But why?

I have to add that I worked through this tutorial:
But i could not "run the Seam Generate Entities action" like said there. I got 
the message "Hibernate console configuration is empty" instead. So I just 
created a new Hibernate console configuration using this  
http://pastebin.com/BHvrCvGu seam-hibernate.cfg.xml and this  
http://pastebin.com/cXeBxH5X hibernate.properties file.

What can I do to bring my reports to work?

Regards
kloss
|  %1,3%  |
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/609171#609171]

Start a new discussion in JBoss Tools at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2128]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to