Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Data source
mgranadino
Hi, I want to do my report all with Java ( I dont want to use the Birt graphical application). Then I need to program a data source. I have this code:
void buildDataSource( ) throws SemanticException{
OdaDataSourceHandle dsHandle = designFactory.newOdaDataSource(
"DataSource", "org.eclipse.birt.report.data.oda.jdbc");
dsHandle.setProperty( "odaDriverClass","com.mysql.jdbc.Driver ( v5.1)");
dsHandle.setProperty( "odaURL", "jdbc:mysql://localhost/informesfondos" );
dsHandle.setProperty( "odaUser", "root" );
dsHandle.setProperty( "odaPassword", "root" );
designHandle.getDataSources( ).add( dsHandle );
}
but when I generate the report the test connection dont work. I put in ReportEnginepluginsorg.eclipse.birt.report.data.oda.jdbc_2.3.0.v20080610 the driver for mysql (mysql-connector-java-5.1.6) but when it look for com.mysql.jdbc.Driver ( v5.1) it say that is not there...
I dont know what I can do...
Find more posts tagged with
Comments
mgranadino
Ok, I find my error, I must write:
dsHandle.setProperty( "odaDriverClass","com.mysql.jdbc.Driver");
not
dsHandle.setProperty( "odaDriverClass","com.mysql.jdbc.Driver ( v5.1)");