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

Unexpected exception running Jobs project #1346

Open
greenlaw110 opened this issue Jun 28, 2020 · 1 comment
Open

Unexpected exception running Jobs project #1346

greenlaw110 opened this issue Jun 28, 2020 · 1 comment
Assignees
Labels

Comments

@greenlaw110
Copy link
Contributor

greenlaw110 commented Jun 28, 2020

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)
@greenlaw110
Copy link
Contributor Author

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);
        }
    }

@greenlaw110 greenlaw110 removed this from the 1.9.1 milestone Dec 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant