#1 2020-07-09 08:24:42

nikolajoder
Member
Registered: 2020-01-10

Error when executing Scheduled Job

After installing ReportServer 3.2.0 (from 3.1.1), we get the following error when, previously working, Scheduled Job is executed:

09-Jul-2020 10:18:45.479 WARNING [pool-DwAsyncService-1-thread-4] net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.executeActions action execution failed
    java.lang.IllegalArgumentException: NTFS ADS separator (':') in file name is forbidden.
        at org.apache.commons.io.FilenameUtils.indexOfExtension(FilenameUtils.java:746)
        at org.apache.commons.io.FilenameUtils.removeExtension(FilenameUtils.java:1122)
        at org.apache.commons.io.FilenameUtils.getBaseName(FilenameUtils.java:1034)
        at net.datenwerke.rs.scheduler.service.scheduler.mail.MailReportAction.doExecute(MailReportAction.java:129)
        at net.datenwerke.scheduler.service.scheduler.entities.AbstractAction.execute(AbstractAction.java:59)
        at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.executeAction(SchedulerTask.java:614)
        at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.executeActions(SchedulerTask.java:502)
        at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.safeCall(SchedulerTask.java:211)
        at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.call(SchedulerTask.java:103)
        at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.call(SchedulerTask.java:1)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

Offline

#2 2020-07-10 08:31:10

Aggr
Member
Registered: 2018-12-03

Re: Error when executing Scheduled Job

I have similar problem. But I never used sheduled jobs before version 3.2.

Community Edition
RS3.2.0-6025
2020-07-02-16-05-16

java.lang.IllegalArgumentException: NTFS ADS separator (':') in file name is forbidden.
    at org.apache.commons.io.FilenameUtils.indexOfExtension(FilenameUtils.java:746)
    at org.apache.commons.io.FilenameUtils.removeExtension(FilenameUtils.java:1122)
    at org.apache.commons.io.FilenameUtils.getBaseName(FilenameUtils.java:1034)
    at net.datenwerke.rs.scheduler.service.scheduler.mail.MailReportAction.doExecute(MailReportAction.java:129)
    at net.datenwerke.scheduler.service.scheduler.entities.AbstractAction.execute(AbstractAction.java:59)
    at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.executeAction(SchedulerTask.java:614)
    at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.executeActions(SchedulerTask.java:502)
    at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.safeCall(SchedulerTask.java:211)
    at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.call(SchedulerTask.java:103)
    at net.datenwerke.scheduler.service.scheduler.tasks.SchedulerTask.call(SchedulerTask.java:1)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

Offline

#3 2020-07-10 10:39:03

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Error when executing Scheduled Job

Hi nikolajoder and Aggr,

can you please post your scheduler.cf configuration file ?

Regards,
Eduardo

Offline

#4 2020-07-10 10:43:40

nikolajoder
Member
Registered: 2020-01-10

Re: Error when executing Scheduled Job

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
   <scheduler>
      <mailaction html="false">
         <subject>ReportServer: ${subject}</subject>
         <text>${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['mailactionMsgText']}
        
  ${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['labelReport']} ${report.getName()}
  ${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['labelMessage']} ${message}
      </text>
         <attachment>
            <name>rep-${report.getName()}-${RS_CURRENT_DATE}</name>
         </attachment>
      </mailaction>
      <fileaction disabled="false" html="false">
         <subject>ReportServer: ${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['fileactionMsgSubject']}</subject>
         <text>${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['fileactionMsgText']}
        
  ${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['labelReport']} ${report.getName()}
  ${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['labelFilename']} ${filename}
  ${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['labelDescription']} ${description}
  ${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['labelTeamspace']} ${teamspace.getName()}
  ${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['labelFolder']} ${folder.getName()}
      </text>
      </fileaction>
      <notification disabled="false" html="false">
         <scheduled>
            <subject>ReportServer: ${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['notificationMsgScheduledSubject']}</subject>
            <text>${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['notificationMsgScheduledText']}

${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['labelReport']} ${report.getName()}
${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['labelUser']} ${scheduleUser}
${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['notificationMsgScheduledNextDates']} ${nextDates}
        </text>
         </scheduled>
         <unscheduled>
            <subject>ReportServer: ${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['notificationMsgUnscheduledSubject']}</subject>
            <text>${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['notificationMsgUnscheduledText']}

${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['labelReport']} ${reportName}</text>
         </unscheduled>
         <failed>
            <subject>ReportServer: ${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['notificationMsgFailedSubject']}</subject>
            <text>${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['notificationMsgFailedText']}

${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['labelReport']} ${report.getName()}
${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['labelErrorMessage']} ${errMsg}
${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['labelRecipient']} ${recipients}
${msgs['net.datenwerke.rs.scheduler.client.scheduler.locale.SchedulerMessages']['labelErrorDetails']} ${stacktrace}
        </text>
         </failed>
      </notification>
      <properties>
         <disabled>false</disabled>
      </properties>
  </scheduler>
</configuration>

Offline

#5 2020-07-10 10:45:15

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Error when executing Scheduled Job

Hi nikolajoder,

do you have any ":" in your report name ?

Regards,
Eduardo

Offline

#6 2020-07-10 10:50:29

nikolajoder
Member
Registered: 2020-01-10

Re: Error when executing Scheduled Job

No, report name is for example STP8. I tried with different reports, the error is the same.

Scheduler for the same reports worked fine with previous version (3.1).

Offline

#7 2020-07-10 10:53:31

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Error when executing Scheduled Job

Hi nikolajoder,

I think this is because of the standard file name: <name>rep-${report.getName()}-${RS_CURRENT_DATE}</name>

RS_CURRENT_DATE contains ":" , which is not a valid file name character (in Windows).

We upgraded the commons-io library in ReportServer 3.2.0 , which seems to check this when creating a file name.

We will discuss this internally and will update here when I have more information. I raised ticket RS-4264 for this purpose.
In the meanwhile, you can change the <name>rep-${report.getName()}-${RS_CURRENT_DATE}</name> to <name>rep-${report.getName()}-${RS_CURRENT_DATE.format("dd.MM.yyyy hhmm")}</name>

After a ReportServer restart it should work. Can you please confirm ?

Regards,
Eduardo

Offline

#8 2020-07-10 11:12:23

nikolajoder
Member
Registered: 2020-01-10

Re: Error when executing Scheduled Job

Thank you, i replaced the line with (you accidentally added smile:

<name>rep-${report.getName()}-${RS_CURRENT_DATE.format("dd.MM.yyyy hhmm")}</name>

and it's working!

Offline

#9 2020-07-10 11:19:47

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Error when executing Scheduled Job

Hi nikolajoder,

thanks for pointing this out. I corrected my post. So the correct text is: <name>rep-${report.getName()}-${RS_CURRENT_DATE.format("dd.MM.yyyy hhmm")}</name>

Regards,
Eduardo

Offline

#10 2020-07-17 11:27:07

eduardo
Administrator
Registered: 2016-11-01
Website

Re: Error when executing Scheduled Job

Hi nikolajoder,

we released ReportServer 3.2.0-6027 today, which includes this bugfix, so you don't need the workaround in this version. The release notes can be found here: https://reportserver.net/releasenotes/RS3.2.0.html

Regards,
Eduardo

Offline

Board footer

Powered by FluxBB