Jump to content
We've recently updated our Privacy Statement, available here ×

How to create excel datasource for 4.7.0 jasperserver


lalitha.nov20

Recommended Posts

Hi ,

I am new to jasper and i need to create a report from excel datasource.

I create excel datasource in ireport and the report executes fines but doesnot work in jasperserver.

I have created a xml file that creates dataadapter that connects to excel but this is not working. This throws an error

Here is the code of xml


ExcelData
D:excel_datasource.xlsx
true
M/d/yy h:mm a
#,##0.###
true
Employee_id
 Employee_Name
 
http://www.w3.org/2001/XMLSchema-instance"">www.w3.org/2001/XMLSchema-instance"> xsi:type="java:java.lang.Integer">0
http://www.w3.org/2001/XMLSchema-instance"">www.w3.org/2001/XMLSchema-instance"> xsi:type="java:java.lang.Integer">1
http://www.w3.org/2001/XMLSchema-instance"">www.w3.org/2001/XMLSchema-instance"> xsi:type="java:java.lang.Integer">2
http://www.w3.org/2001/XMLSchema-instance"">www.w3.org/2001/XMLSchema-instance"> xsi:type="java:java.lang.Integer">3

 

this throws the below given error

org.exolab.castor.xml.MarshalException: The class for the root element 'XlsxDataAdapter' could not be found.{File: [not available]; line: 1; column: 76}


java.lang.Exception: 1 - org.exolab.castor.xml.MarshalException: The class for the root element 'XlsxDataAdapter' could not be found.{File: [not available]; line: 1; column: 76} 
    at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:403) 
    at com.jaspersoft.ireport.jasperserver.ws.WSClient.runReport(WSClient.java:320) 
    at com.jaspersoft.ireport.jasperserver.ReportRunner.run(ReportRunner.java:70) 
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) 
    at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) 

 

Second, i tried create odbc connection . The datasource connection was successfully created but the report does not work. this throws the below error.

Error Message

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted

Error Trace

org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:103) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.JdbcDataSourceService.createConnection(JdbcDataSourceService.java:55) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.BaseJdbcDataSource.setReportParameterValues(BaseJdbcDataSource.java:49) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.JdbcDataSourceService.setReportParameterValues(JdbcDataSourceService.java:68) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl.fillReport(EngineServiceImpl.java:1463) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportFill.runReport(EngineServiceImpl.java:874) at com.jaspersoft.jasperserver.api.engine.jasperreports.service.impl.EngineServiceImpl$ReportRunnable.run(EngineServiceImpl.java:754) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:619) Caused by: java.util.NoSuchElementException: Could not create a validated object, cause: [Microsoft][ODBC Excel Driver]Optional feature not implemented at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:806) at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95) ... 9 more

 

Please let me know how do we create a datasource for excel.

Thank you,

Lalitha

 

 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...