参考示例实现导出api(http://help.finereport.com/doc-view-738.html),报错(猜想是数据库连接的问题),导出示例报表和我自己做的报表都出这个错,应该是哪个地方设置的问题,请大神指导,
部分代码如下:
FileOutputStream outputStream;
outputStream = new FileOutputStream(new File("d:\\ExcelExport.xls"));
ExcelExporter ExcelExport = new ExcelExporter();
ExcelExport.export(outputStream, workbook.execute(parameterMap,new WriteActor())); 这句话报错
错误如下:
com.fr.third.alibaba.druid.pool.DruidDataSource : {dataSource-2} init error
java.sql.SQLException: oracle.jdbc.driver.OracleDriver
at com.fr.third.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:570)
at com.fr.third.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:694)
at com.fr.third.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1057)
at com.fr.third.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:1053)
at com.fr.third.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:101)
at com.fr.data.pool.MemoryConnection.create(Unknown Source)
at com.fr.data.impl.JDBCDatabaseConnection.createConnection(Unknown Source)
at com.fr.data.impl.NameDatabaseConnection.createConnection(Unknown Source)
at com.fr.data.impl.AbstractDBDataModel.initConnectionAndResultAndCheckInColumns(Unknown Source)
at com.fr.data.impl.AbstractDBDataModel.getColumnCount(Unknown Source)
at com.fr.data.impl.SharedDBDataModel.getColumnCount(Unknown Source)
at com.fr.base.SynchronizedLiveDataModelUtils.recordDataModel(Unknown Source)
at com.fr.base.SynchronizedLiveDataModelUtils.getLiveDataModel(Unknown Source)
at com.fr.report.core.sheet.SheetExecutor.__s_name2ResultSet(Unknown Source)
at com.fr.report.core.A.J.A(Unknown Source)
at com.fr.report.core.A.J.dealWithBEDSColumn(Unknown Source)
at com.fr.report.core.A.n.cc_ce_array(Unknown Source)
at com.fr.report.core.A.J.A(Unknown Source)
at com.fr.report.core.A.J.A(Unknown Source)
编辑于 2017-10-27 13:02