Hello,
This is the error I get

Nested Exception:-

java.sql.SQLException: Error occurred while initializing the EXCEL
datasource



at
org.wso2.carbon.dataservices.core.description.query.SQLQuery.processPreNormalQuery(SQLQuery.java:832)

at
org.wso2.carbon.dataservices.core.description.query.SQLQuery.runPreQuery(SQLQuery.java:2301)

at
org.wso2.carbon.dataservices.core.description.query.Query.execute(Query.java:275)

at
org.wso2.carbon.dataservices.core.engine.CallQuery.executeElement(CallQuery.java:188)

at
org.wso2.carbon.dataservices.core.engine.OutputElement.execute(OutputElement.java:89)

at
org.wso2.carbon.dataservices.core.description.operation.Operation.execute(Operation.java:61)

at
org.wso2.carbon.dataservices.core.engine.DataService.invoke(DataService.java:474)

at
org.wso2.carbon.dataservices.core.engine.DSOMDataSource.execute(DSOMDataSource.java:96)

... 46 more

Caused by: DS Fault Message: Error in opening DBMS connection.

DS Code: UNKNOWN_ERROR

Nested Exception:-

java.sql.SQLException: Error occurred while initializing the EXCEL
datasource


at
org.wso2.carbon.dataservices.core.description.query.SQLQuery.createConnection(SQLQuery.java:752)

at
org.wso2.carbon.dataservices.core.description.query.SQLQuery.processPreNormalQuery(SQLQuery.java:805)

... 53 more

Caused by: java.sql.SQLException: Error occurred while initializing the
EXCEL datasource

at
org.wso2.carbon.dataservices.sql.driver.TExcelConnection.createConnectionToExcelDocument(TExcelConnection.java:56)

at
org.wso2.carbon.dataservices.sql.driver.TExcelConnection.<init>(TExcelConnection.java:36)

at
org.wso2.carbon.dataservices.sql.driver.TConnectionFactory.createConnection(TConnectionFactory.java:32)

at org.wso2.carbon.dataservices.sql.driver.TDriver.connect(TDriver.java:50)

at
org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)

at
org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)

at
org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)

at
org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)

at
org.apache.tomcat.jdbc.pool.ConnectionPool.getConnection(ConnectionPool.java:188)

at
org.apache.tomcat.jdbc.pool.DataSourceProxy.getConnection(DataSourceProxy.java:128)

at
org.wso2.carbon.dataservices.core.description.config.SQLConfig.createConnection(SQLConfig.java:188)

at
org.wso2.carbon.dataservices.core.description.query.SQLQuery.createConnection(SQLQuery.java:728)

... 54 more

Caused by: java.io.IOException: Unable to read entire header; 0 bytes read;
expected 512 bytes

at
org.apache.poi.poifs.storage.HeaderBlock.alertShortRead(HeaderBlock.java:226)

at
org.apache.poi.poifs.storage.HeaderBlock.readFirst512(HeaderBlock.java:207)

at org.apache.poi.poifs.storage.HeaderBlock.<init>(HeaderBlock.java:104)

at
org.apache.poi.poifs.filesystem.POIFSFileSystem.<init>(POIFSFileSystem.java:138)

at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:322)

at org.apache.poi.hssf.usermodel.HSSFWorkbook.<init>(HSSFWorkbook.java:303)

at
org.wso2.carbon.dataservices.sql.driver.TExcelConnection.createConnectionToExcelDocument(TExcelConnection.java:51)

... 65 more


It happens when I try multiple threads to WRITE into the excel file, not
always but often,

Thx

On Fri, Sep 18, 2015 at 2:08 AM, Rajith Vitharana <[email protected]> wrote:

> Hi John,
>
> I have tried a load test with multiple threads to test this. But I was
> able to successfully access the excel file. Used DSS3.2.2 version with
> "*.xls" file format. Will you be able to share more details on the error
> (carbon log with stack trace you get when trying to access, you can find
> the log files in "<SERVER_HOME>/repository/logs" folder)
>
> Thanks,
>
> On Fri, Sep 18, 2015 at 5:39 AM, John Q <[email protected]> wrote:
>
>> Hello, I have a data service that insert data into an excel file, I am
>> using the excel datasource. The problem is that when two or more client
>> call the service at the same time, onlye one of them success, the other
>> fail and the dss throws an exception trying to get the datasource, work
>> with the file or something like that, I guess maybe the excel file cannot
>> be accessed while it is being accessed by other instance of the service.
>> I need to know how can I solve this issue...
>>
>> thanks and best regards,
>> John
>>
>> _______________________________________________
>> Architecture mailing list
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> Rajith Vitharana
>
> Software Engineer,
> WSO2 Inc. : wso2.com
> Mobile : +94715883223
> Blog : http://lankavitharana.blogspot.com/
>
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to