Unexpected exception running Jobs project · Issue #1346 · actframework/actframework · GitHub
Skip to content

Unexpected exception running Jobs project #1346

Open

Description

@greenlaw110

The Jobs sample project sometimes (not always) throws IllegalARgumentException issue:

2020-06-29 08:57:05,607 ERROR i.u.request@[XNIO-1 I/O-2] - UT005071: Undertow request failed HttpServerExchange{ GET /log}
java.lang.IllegalArgumentException: null
	at org.osgl.util.E.illegalArgumentIf(E.java:672)
	at org.osgl.util.S.requireNotBlank(S.java:518)
	at act.inject.param.JsonDtoPatch.<init>(JsonDtoPatch.java:50)
	at act.inject.param.JsonDtoPatch.of(JsonDtoPatch.java:125)
	at act.handler.builtin.controller.impl.ReflectedHandlerInvoker.<init>(ReflectedHandlerInvoker.java:331)
	at act.handler.builtin.controller.impl.ReflectedHandlerInvoker.createControllerAction(ReflectedHandlerInvoker.java:1289)
	at act.Act$Mode.createRequestHandler(Act.java:164)
	at act.handler.builtin.controller.RequestHandlerProxy.generateHandlers(RequestHandlerProxy.java:445)
	at act.handler.builtin.controller.RequestHandlerProxy.ensureAgentsReady(RequestHandlerProxy.java:369)
	at act.handler.builtin.controller.RequestHandlerProxy.skipEvents(RequestHandlerProxy.java:307)
	at act.handler.DelegateRequestHandler.skipEvents(DelegateRequestHandler.java:47)
	at act.app.ActionContext.skipEvents(ActionContext.java:243)
	at act.handler.event.ResultEvent$2.apply(ResultEvent.java:92)
	at act.handler.event.ResultEvent$2.apply(ResultEvent.java:86)
	at org.osgl.mvc.MvcConfig.applyAfterCommitResultHandler(MvcConfig.java:230)
	at act.ActResponse.afterWritingContent(ActResponse.java:167)
	at act.xio.undertow.UndertowResponse.writeContent(UndertowResponse.java:109)
	at act.xio.undertow.UndertowResponse.writeContent(UndertowResponse.java:48)
	at org.osgl.mvc.ErrorPageRenderer.apply(ErrorPageRenderer.java:48)
	at org.osgl.mvc.result.ErrorResult.applyMessage(ErrorResult.java:195)
	at org.osgl.mvc.result.Result.apply(Result.java:265)
	at act.xio.NetworkHandler.handleErrorResult(NetworkHandler.java:289)
	at act.xio.NetworkHandler.handleException(NetworkHandler.java:281)
	at act.xio.NetworkHandler.handle(NetworkHandler.java:256)
	at act.xio.undertow.ActHttpHandler.handleRequest(ActHttpHandler.java:58)
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:370)
	at io.undertow.server.protocol.http.HttpReadListener.handleEventWithNoRunningRequest(HttpReadListener.java:255)
	at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:136)
	at io.undertow.server.protocol.http.HttpReadListener.handleEvent(HttpReadListener.java:59)
	at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
	at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
	at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
	at org.xnio.nio.WorkerThread.run(WorkerThread.java:591)

Activity

  1. added this to the 1.9.1 milestone on Jun 28, 2020
  2. self-assigned this
    on Jun 28, 2020
  3. greenlaw110 commented on Jun 28, 2020

    @greenlaw110
    ContributorAuthor

    This is due to sometimes bytecode enhancer failed to tag @Named("limit") annotation to the limit parameter in JobLog controller:

        @Command(name = "log.list", help = "List job logs")
        @PropertySpec("this as log")
        @GetAction("/log")
        public static List<String> logs(
                @Optional(help = "limit the lines returned") Integer limit // this one should be tagged with @Named("limit")
        ) {
            if (null != limit && limit > 0) {
                return logs.take(limit);
            } else {
                return C.list(logs);
            }
        }
  4. removed this from the 1.9.1 milestone on Dec 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions