Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[R66] ClassCastException thrown by EXECOUTPUT tasks the the command failed #59

Closed
bcarlin opened this issue Jul 30, 2020 · 2 comments · Fixed by #66
Closed

[R66] ClassCastException thrown by EXECOUTPUT tasks the the command failed #59

bcarlin opened this issue Jul 30, 2020 · 2 comments · Fixed by #66
Labels
bug Something isn't working
Milestone

Comments

@bcarlin
Copy link
Member

bcarlin commented Jul 30, 2020

Here is the full stacktrace:

30/07/2020/12:47:31.051 DEBUG [org.waarp.openr66.protocol.localhandler.LocalServerHandler] [Handler-1] org.waarp.openr66.protocol.localhandler.LocalServerHandler.exceptionCaught(LocalServerHandler.java:370) : [server1] Exception and isFinished: false
java.lang.ClassCastException: java.lang.Thread cannot be cast to org.waarp.openr66.context.task.AllLineReader
	at org.waarp.openr66.context.task.ExecOutputTask.finalizeFromError(ExecOutputTask.java:204)
	at org.waarp.openr66.context.task.AbstractExecTask$ExecuteCommand.invoke(AbstractExecTask.java:552)
	at org.waarp.openr66.context.task.ExecOutputTask.run(ExecOutputTask.java:127)
	at org.waarp.openr66.database.data.DbTaskRunner.runNextTask(DbTaskRunner.java:2718)
	at org.waarp.openr66.database.data.DbTaskRunner.runNext(DbTaskRunner.java:2796)
	at org.waarp.openr66.database.data.DbTaskRunner.run(DbTaskRunner.java:2844)
	at org.waarp.openr66.database.data.DbTaskRunner.finalizeTransfer(DbTaskRunner.java:3035)
	at org.waarp.openr66.context.R66Session.setFinalizeTransfer(R66Session.java:953)
	at org.waarp.openr66.protocol.localhandler.TransferActions.endTransferR(TransferActions.java:1168)
	at org.waarp.openr66.protocol.localhandler.TransferActions.fromEndTransferSToTransferR(TransferActions.java:1048)
	at org.waarp.openr66.protocol.localhandler.TransferActions.endTransfer(TransferActions.java:1033)
	at org.waarp.openr66.protocol.localhandler.LocalServerHandler.channelRead1(LocalServerHandler.java:265)
	at org.waarp.openr66.protocol.localhandler.LocalServerHandler.channelRead0(LocalServerHandler.java:107)
	at org.waarp.openr66.protocol.networkhandler.NetworkServerHandler.channelRead0(NetworkServerHandler.java:392)
	at org.waarp.openr66.protocol.networkhandler.NetworkServerHandler.channelRead0(NetworkServerHandler.java:63)
	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
	at io.netty.channel.AbstractChannelHandlerContext.access$600(AbstractChannelHandlerContext.java:61)
	at io.netty.channel.AbstractChannelHandlerContext$7.run(AbstractChannelHandlerContext.java:370)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
	at java.lang.Thread.run(Thread.java:748)

Steps to reproduce :

create a rule that starts the script fail.sh, which always ends in error :

Content of the rule:

<rule>
  <idrule>error</idrule>
  <comment>The default rule send rule (extended version)</comment>
  <mode>1</mode>
  <rpretasks>
    <tasks>
    </tasks>
  </rpretasks>
  <rposttasks>
    <tasks>
      <task>
        <type>EXECOUTPUT</type>
        <path>./bin/fail.sh</path>
        <delay>60000</delay>
      </task>
    </tasks>
  </rposttasks>
  <rerrortasks>
    <tasks>
    </tasks>
  </rerrortasks>
  <spretasks>
    <tasks>
    </tasks>
  </spretasks>
  <sposttasks>
    <tasks>
    </tasks>
  </sposttasks>
  <serrortasks>
    <tasks>
    </tasks>
  </serrortasks>
</rule>

content of the script:

#!/usr/bin/env bash

echo will fail
exit 34
        
@bcarlin bcarlin added the bug Something isn't working label Jul 30, 2020
fredericBregier added a commit to fredericBregier/Waarp-All that referenced this issue Aug 11, 2020
Wrong Class Cast exception from issue waarp#59 fixed
@fredericBregier
Copy link
Collaborator

fredericBregier commented Aug 11, 2020

Fixed in #66

1 similar comment
@fredericBregier
Copy link
Collaborator

fredericBregier commented Aug 11, 2020

Fixed in #66

@fredericBregier fredericBregier linked a pull request Aug 11, 2020 that will close this issue
@fredericBregier fredericBregier added this to the 3.4.1 milestone Aug 11, 2020
fredericBregier added a commit to fredericBregier/Waarp-All that referenced this issue Aug 26, 2020
Wrong Class Cast exception from issue waarp#59 fixed
fredericBregier added a commit that referenced this issue Aug 26, 2020
Wrong Class Cast exception from issue #59 fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants