Exporting data with URL as a value using SQL to Excel Smart Service.

Tying to export the data from table using "SQL to Excel" smart service. One of the column in the table holds URL value (https://.....). Facing the below error when trying to export the data. Is there any restriction that it will not allow exporting data with URL format.

ERROR : "The Following Error was raised by the export to Excel function : Address of hyperlink must be a valid URI"

Any of your insight will be of great help.

  Discussion posts and replies are publicly visible

Parents
  • The export tool does auto-hyperlink url fields. This error could be thrown if there are invalid hyperlinks.  Is this error in the logs or when trying to open Excel?  Also, what version of the plugin are you using? 

  • Plugin version used is com.appiancorp.ps.exceltools(v1.9.4) and the smart service node fails and it throws this error in the process instance.

     

    Error Log :

    ------------

    2019-03-14 14:25:09,478 [Appian Work Item - 476488 - execution11 : UnattendedJavaActivityRequest] ERROR com.appiancorp.process.engine.UnattendedJavaActivityRequest - An error occurred while executing activity: id=-1342097814, classname=com.appiancorp.ps.exceltools.smartservice.export.ExportSqlToExcel
    com.appiancorp.suiteapi.process.exceptions.SmartServiceException: userMsg[error.export.general=The following error was raised by the Export to Excel function:  Address of hyperlink must be a valid URI]
        at com.appiancorp.suiteapi.process.exceptions.SmartServiceException$Builder.build(SmartServiceException.java:145)
        at com.appiancorp.ps.exceltools.smartservice.export.ExportSqlToExcel.createException(ExportSqlToExcel.java:423)
        at com.appiancorp.ps.exceltools.smartservice.export.ExportSqlToExcel.run(ExportSqlToExcel.java:117)
        at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:131)
        at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:52)
        at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:131)
        at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:125)
        at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:25)
        at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:125)
        at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:83)
        at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55)
        at com.appiancorp.process.engine.ContinuationRequest.executeOuter(ContinuationRequest.java:71)
        at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:100)
        at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:35)
        at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:84)
        at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
    Caused by: java.lang.IllegalArgumentException: Address of hyperlink must be a valid URI
        at org.apache.poi.xssf.usermodel.XSSFHyperlink.validate(XSSFHyperlink.java:263)
        at org.apache.poi.xssf.usermodel.XSSFHyperlink.setAddress(XSSFHyperlink.java:244)
        at com.appiancorp.ps.exceltools.smartservice.export.ExportSqlToExcel.populateHyperlinkCellValue(ExportSqlToExcel.java:414)
        at com.appiancorp.ps.exceltools.smartservice.export.ExportSqlToExcel.populateCellValue(ExportSqlToExcel.java:362)
        at com.appiancorp.ps.exceltools.smartservice.export.ExportSqlToExcel.exportSQLCells(ExportSqlToExcel.java:225)
        at com.appiancorp.ps.exceltools.smartservice.export.ExportSqlToExcel.run(ExportSqlToExcel.java:113)
        ... 16 more
    Caused by: java.net.URISyntaxException: Illegal character in authority at index 8: em.virtualworkspace.aig.net
        at java.net.URI$Parser.fail(URI.java:2848)
        at java.net.URI$Parser.parseAuthority(URI.java:3186)
        at java.net.URI$Parser.parseHierarchical(URI.java:3097)
        at java.net.URI$Parser.parse(URI.java:3053)
        at java.net.URI.<init>(URI.java:588)
        at org.apache.poi.xssf.usermodel.XSSFHyperlink.validate(XSSFHyperlink.java:261)
        ... 21 more

Reply
  • Plugin version used is com.appiancorp.ps.exceltools(v1.9.4) and the smart service node fails and it throws this error in the process instance.

     

    Error Log :

    ------------

    2019-03-14 14:25:09,478 [Appian Work Item - 476488 - execution11 : UnattendedJavaActivityRequest] ERROR com.appiancorp.process.engine.UnattendedJavaActivityRequest - An error occurred while executing activity: id=-1342097814, classname=com.appiancorp.ps.exceltools.smartservice.export.ExportSqlToExcel
    com.appiancorp.suiteapi.process.exceptions.SmartServiceException: userMsg[error.export.general=The following error was raised by the Export to Excel function:  Address of hyperlink must be a valid URI]
        at com.appiancorp.suiteapi.process.exceptions.SmartServiceException$Builder.build(SmartServiceException.java:145)
        at com.appiancorp.ps.exceltools.smartservice.export.ExportSqlToExcel.createException(ExportSqlToExcel.java:423)
        at com.appiancorp.ps.exceltools.smartservice.export.ExportSqlToExcel.run(ExportSqlToExcel.java:117)
        at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.lambda$call$0(DefaultActivityExecutor.java:131)
        at com.appiancorp.plugins.PluginUsageLogger.runWithPluginInformation(PluginUsageLogger.java:52)
        at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:131)
        at com.appiancorp.process.runtime.framework.DefaultActivityExecutor$1.call(DefaultActivityExecutor.java:125)
        at com.appiancorp.common.ContextClassLoaderSwitcher.runInContext(ContextClassLoaderSwitcher.java:25)
        at com.appiancorp.process.runtime.framework.DefaultActivityExecutor.execute(DefaultActivityExecutor.java:125)
        at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute(UnattendedJavaActivityRequest.java:83)
        at com.appiancorp.process.engine.UnattendedJavaActivityRequest.execute0(UnattendedJavaActivityRequest.java:55)
        at com.appiancorp.process.engine.ContinuationRequest.executeOuter(ContinuationRequest.java:71)
        at com.appiancorp.process.engine.ContinuationRequest.execute(ContinuationRequest.java:100)
        at com.appiancorp.process.workpoller.UnattendedRequestHandlerBean.onMessage(UnattendedRequestHandlerBean.java:35)
        at com.appiancorp.process.workpoller.WorkItem.run(WorkItem.java:84)
        at org.springframework.jca.work.SimpleTaskWorkManager$DelegatingWorkAdapter.run(SimpleTaskWorkManager.java:239)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
    Caused by: java.lang.IllegalArgumentException: Address of hyperlink must be a valid URI
        at org.apache.poi.xssf.usermodel.XSSFHyperlink.validate(XSSFHyperlink.java:263)
        at org.apache.poi.xssf.usermodel.XSSFHyperlink.setAddress(XSSFHyperlink.java:244)
        at com.appiancorp.ps.exceltools.smartservice.export.ExportSqlToExcel.populateHyperlinkCellValue(ExportSqlToExcel.java:414)
        at com.appiancorp.ps.exceltools.smartservice.export.ExportSqlToExcel.populateCellValue(ExportSqlToExcel.java:362)
        at com.appiancorp.ps.exceltools.smartservice.export.ExportSqlToExcel.exportSQLCells(ExportSqlToExcel.java:225)
        at com.appiancorp.ps.exceltools.smartservice.export.ExportSqlToExcel.run(ExportSqlToExcel.java:113)
        ... 16 more
    Caused by: java.net.URISyntaxException: Illegal character in authority at index 8: em.virtualworkspace.aig.net
        at java.net.URI$Parser.fail(URI.java:2848)
        at java.net.URI$Parser.parseAuthority(URI.java:3186)
        at java.net.URI$Parser.parseHierarchical(URI.java:3097)
        at java.net.URI$Parser.parse(URI.java:3053)
        at java.net.URI.<init>(URI.java:588)
        at org.apache.poi.xssf.usermodel.XSSFHyperlink.validate(XSSFHyperlink.java:261)
        ... 21 more

Children
No Data