[JBoss JIRA] (WFLY-13074) application context is enabled to mod_cluster for servers that are started as suspended in the JBoss EAP 7.2
by Chao Wang (Jira)
[ https://issues.redhat.com/browse/WFLY-13074?page=com.atlassian.jira.plugi... ]
Chao Wang moved JBEAP-18691 to WFLY-13074:
------------------------------------------
Project: WildFly (was: JBoss Enterprise Application Platform)
Key: WFLY-13074 (was: JBEAP-18691)
Workflow: GIT Pull Request workflow (was: CDW with loose statuses v1)
Component/s: mod_cluster
Web (Undertow)
(was: mod_cluster)
(was: Web (Undertow))
Affects Version/s: 19.0.0.Beta1
(was: 7.2.6.GA)
Fix Version/s: (was: 7.2.8.GA)
> application context is enabled to mod_cluster for servers that are started as suspended in the JBoss EAP 7.2
> ------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-13074
> URL: https://issues.redhat.com/browse/WFLY-13074
> Project: WildFly
> Issue Type: Bug
> Components: mod_cluster, Web (Undertow)
> Affects Versions: 19.0.0.Beta1
> Reporter: Chao Wang
> Assignee: Chao Wang
> Priority: Major
>
> When a server that is running is suspended, the application contexts are stopped:
> {code:java}
> 2020-01-31 09:27:47,548 DEBUG [org.jboss.modcluster] (ServerService Thread Pool -- 6) MODCLUSTER000008: Received stop context event for default-host:/appname
> 2020-01-31 09:27:47,548 DEBUG [org.jboss.modcluster] (ServerService Thread Pool -- 6) MODCLUSTER000010: Sending DISABLE-APP for default-host:/appname
> 2020-01-31 09:27:47,550 INFO [org.jboss.modcluster] (ServerService Thread Pool -- 6) MODCLUSTER000021: All pending requests drained from default-host:/appname in 0.0 seconds
> {code}
> From undertow loadbalancer:
> {code:java}
> 2020-01-31 09:24:55,828 DEBUG [io.undertow] (default task-1) UT005057: Sending MCMP response to destination: /127.0.0.1:44386, HTTP status: 200, Headers: {Content-Type=[text/plain; charset=ISO-8859-1]}, response: Type=STOP-APP-RSP,JvmRoute=slave:server1Alias=default-host,localhostContext=/appnameRequests=0
> {code}
> But if a server is started as suspended, the contexts are enabled:
> {code:java}
> 2020-01-31 09:34:10,570 DEBUG [org.jboss.modcluster] (ServerService Thread Pool -- 81) MODCLUSTER000005: Received add context event for default-host:/appname
> 2020-01-31 09:34:10,570 DEBUG [org.jboss.modcluster] (ServerService Thread Pool -- 81) MODCLUSTER000007: Received start context event for default-host:/appname
> {code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 5 months
[JBoss JIRA] (WFLY-13073) LayeredDistributionTestCase should cope with an existing layers.conf
by Brian Stansberry (Jira)
Brian Stansberry created WFLY-13073:
---------------------------------------
Summary: LayeredDistributionTestCase should cope with an existing layers.conf
Key: WFLY-13073
URL: https://issues.redhat.com/browse/WFLY-13073
Project: WildFly
Issue Type: Task
Components: Test Suite
Reporter: Brian Stansberry
Assignee: Brian Stansberry
LayeredDistributionTestCase writes a layers.conf file but some builds against which this test will run already have one. If that is the case the test should update the existing file instead of discarding its contents.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 5 months
[JBoss JIRA] (DROOLS-5021) ClassCastException thrown when deserializing components of a Generic command
by Steve Davidson (Jira)
[ https://issues.redhat.com/browse/DROOLS-5021?page=com.atlassian.jira.plug... ]
Steve Davidson updated DROOLS-5021:
-----------------------------------
Summary: ClassCastException thrown when deserializing components of a Generic command (was: ClassCastException thrown when deserializing components of a Generice command)
> ClassCastException thrown when deserializing components of a Generic command
> ----------------------------------------------------------------------------
>
> Key: DROOLS-5021
> URL: https://issues.redhat.com/browse/DROOLS-5021
> Project: Drools
> Issue Type: Bug
> Components: kie server
> Affects Versions: 7.29.0.Final
> Reporter: Steve Davidson
> Assignee: Maciej Swiderski
> Priority: Major
> Attachments: DroolsKieContainerCommandServiceImplLine60.png, JSONMarshallerLine328.WrongSelected.png, KieIssueDemo.tbz, KieRun.log
>
>
> When attempting to send a Generic Data object in an Insert Command to be added to the Rule Agenda, the server fails to deserialize the Insert Command with the following;
> Feb 6 11:09:30 thor jetty[21143]: Feb 06, 2020 11:09:30 AM org.kie.server.services.drools.DroolsKieContainerCommandServiceImpl callContainer
> Feb 6 11:09:30 thor jetty[21143]: SEVERE: Error calling container 'JUnit Test: kie-server'
> Feb 6 11:09:30 thor jetty[21143]: java.lang.ClassCastException: class java.util.LinkedHashMap cannot be cast to class org.kie.api.command.Command (java.util.LinkedHashMap is in module java.base of loader 'bootstrap'; org.kie.api.command.Command is in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @51bd8b5c)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.kie.server.services.drools.DroolsKieContainerCommandServiceImpl.callContainer(DroolsKieContainerCommandServiceImpl.java:60)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.kie.server.remote.rest.drools.CommandResource.manageContainer(CommandResource.java:91)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:509)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:399)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$0(ResourceMethodInvoker.java:363)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:365)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:337)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:310)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:443)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:233)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:139)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:142)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:219)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:227)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
> Feb 6 11:09:30 thor jetty[21143]: #011at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1401)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:760)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:226)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.kie.server.services.impl.security.web.CaptureHttpRequestFilter.doFilter(CaptureHttpRequestFilter.java:42)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1596)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:501)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1592)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1296)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1562)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1211)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.Server.handle(Server.java:500)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:386)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:562)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:378)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/java.lang.Thread.run(Thread.java:834)
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 5 months
[JBoss JIRA] (WFLY-13072) Support multiple module layers in HostExcludesTestCase
by Brian Stansberry (Jira)
Brian Stansberry created WFLY-13072:
---------------------------------------
Summary: Support multiple module layers in HostExcludesTestCase
Key: WFLY-13072
URL: https://issues.redhat.com/browse/WFLY-13072
Project: WildFly
Issue Type: Task
Components: Management, Test Suite
Reporter: Brian Stansberry
Assignee: Brian Stansberry
When HostExcludesTestCase searches for available extensions it should test in other module locations besides system/layers/base.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 5 months
[JBoss JIRA] (DROOLS-5021) ClassCastException thrown when deserializing components of a Generice command
by Steve Davidson (Jira)
[ https://issues.redhat.com/browse/DROOLS-5021?page=com.atlassian.jira.plug... ]
Steve Davidson edited comment on DROOLS-5021 at 2/8/20 9:13 PM:
----------------------------------------------------------------
The source of this fault seems to be an if statement in the JSONMarshaller.unmarshall method:
!JSONMarshallerLine328.WrongSelected.png|thumbnail!
What seems to be happening is that if "classesSet" contains the passed type, in this case a BatchExecutionCommandImpl, an Object is passed to the Object Mapper as the actual Type rather than the passed type. The JaxbMapper then returns a LinkedHashMap, resulting in a ClassCastException at DroolsKieContainerCommandServiceImpl.java:60: !DroolsKieContainerCommandServiceImplLine60.png|thumbnail!
I suspect that this will work properly for custom data types as they may have been added to the underlying JAXB Mapper, but this does seem to be an issue for more basic usage.
My next step is to verify that this is an issue for the current code base on the master branch. If it is, I will take a crack at fixing this over the next couple of days.
was (Author: northgorky):
The source of this fault seems to be an if statement in the JSONMarshaller.unmarshall method: !JSONMarshallerLine328.WrongSelected.png|thumbnail!
What seems to be happening is that if "classesSet" contains the passed type, in this case a BatchExecutionCommandImpl, an Object is passed to the Object Mapper as the actual Type rather than the passed type. The JaxbMapper then returns a LinkedHashMap, resulting in a ClassCastException at DroolsKieContainerCommandServiceImpl.java:60: !DroolsKieContainerCommandServiceImplLine60.png|thumbnail!
I suspect that this will work properly for custom data types as they may have been added to the underlying JAXB Mapper, but this does seem to be an issue for more basic usage.
My next step is to verify that this is an issue for the current code base on the master branch. If it is, I will take a crack at fixing this over the next couple of days.
> ClassCastException thrown when deserializing components of a Generice command
> -----------------------------------------------------------------------------
>
> Key: DROOLS-5021
> URL: https://issues.redhat.com/browse/DROOLS-5021
> Project: Drools
> Issue Type: Bug
> Components: kie server
> Affects Versions: 7.29.0.Final
> Reporter: Steve Davidson
> Assignee: Maciej Swiderski
> Priority: Major
> Attachments: DroolsKieContainerCommandServiceImplLine60.png, JSONMarshallerLine328.WrongSelected.png, KieIssueDemo.tbz, KieRun.log
>
>
> When attempting to send a Generic Data object in an Insert Command to be added to the Rule Agenda, the server fails to deserialize the Insert Command with the following;
> Feb 6 11:09:30 thor jetty[21143]: Feb 06, 2020 11:09:30 AM org.kie.server.services.drools.DroolsKieContainerCommandServiceImpl callContainer
> Feb 6 11:09:30 thor jetty[21143]: SEVERE: Error calling container 'JUnit Test: kie-server'
> Feb 6 11:09:30 thor jetty[21143]: java.lang.ClassCastException: class java.util.LinkedHashMap cannot be cast to class org.kie.api.command.Command (java.util.LinkedHashMap is in module java.base of loader 'bootstrap'; org.kie.api.command.Command is in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @51bd8b5c)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.kie.server.services.drools.DroolsKieContainerCommandServiceImpl.callContainer(DroolsKieContainerCommandServiceImpl.java:60)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.kie.server.remote.rest.drools.CommandResource.manageContainer(CommandResource.java:91)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:509)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:399)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$0(ResourceMethodInvoker.java:363)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:365)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:337)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:310)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:443)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:233)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:139)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:142)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:219)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:227)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
> Feb 6 11:09:30 thor jetty[21143]: #011at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1401)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:760)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:226)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.kie.server.services.impl.security.web.CaptureHttpRequestFilter.doFilter(CaptureHttpRequestFilter.java:42)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1596)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:501)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1592)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1296)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1562)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1211)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.Server.handle(Server.java:500)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:386)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:562)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:378)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/java.lang.Thread.run(Thread.java:834)
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 5 months
[JBoss JIRA] (DROOLS-5021) ClassCastException thrown when deserializing components of a Generice command
by Steve Davidson (Jira)
[ https://issues.redhat.com/browse/DROOLS-5021?page=com.atlassian.jira.plug... ]
Steve Davidson edited comment on DROOLS-5021 at 2/8/20 9:13 PM:
----------------------------------------------------------------
The source of this fault seems to be an if statement in the JSONMarshaller.unmarshall method: !JSONMarshallerLine328.WrongSelected.png|thumbnail!
What seems to be happening is that if "classesSet" contains the passed type, in this case a BatchExecutionCommandImpl, an Object is passed to the Object Mapper as the actual Type rather than the passed type. The JaxbMapper then returns a LinkedHashMap, resulting in a ClassCastException at DroolsKieContainerCommandServiceImpl.java:60: !DroolsKieContainerCommandServiceImplLine60.png|thumbnail!
I suspect that this will work properly for custom data types as they may have been added to the underlying JAXB Mapper, but this does seem to be an issue for more basic usage.
My next step is to verify that this is an issue for the current code base on the master branch. If it is, I will take a crack at fixing this over the next couple of days.
was (Author: northgorky):
The source of this fault seems to be an if statement in the JSONMarshaller.unmarshall method: !JSONMarshallerLine328.WrongSelected.png|thumbnail!
What seems to be happening is that if "classesSet" contains the passed type, in this case a BatchExecutionCommandImpl, an Object is passed to the Object Mapper as the actual Type rather than the passed type. The JaxbMapper then returns a LinkedHashMap, resulting in a ClassCastException at: !DroolsKieContainerCommandServiceImplLine60.png|thumbnail!
I suspect that this will work properly for custom data types as they may have been added to the underlying JAXB Mapper, but this does seem to be an issue for more basic usage.
My next step is to verify that this is an issue for the current code base on the master branch. If it is, I will take a crack at fixing this over the next couple of days.
> ClassCastException thrown when deserializing components of a Generice command
> -----------------------------------------------------------------------------
>
> Key: DROOLS-5021
> URL: https://issues.redhat.com/browse/DROOLS-5021
> Project: Drools
> Issue Type: Bug
> Components: kie server
> Affects Versions: 7.29.0.Final
> Reporter: Steve Davidson
> Assignee: Maciej Swiderski
> Priority: Major
> Attachments: DroolsKieContainerCommandServiceImplLine60.png, JSONMarshallerLine328.WrongSelected.png, KieIssueDemo.tbz, KieRun.log
>
>
> When attempting to send a Generic Data object in an Insert Command to be added to the Rule Agenda, the server fails to deserialize the Insert Command with the following;
> Feb 6 11:09:30 thor jetty[21143]: Feb 06, 2020 11:09:30 AM org.kie.server.services.drools.DroolsKieContainerCommandServiceImpl callContainer
> Feb 6 11:09:30 thor jetty[21143]: SEVERE: Error calling container 'JUnit Test: kie-server'
> Feb 6 11:09:30 thor jetty[21143]: java.lang.ClassCastException: class java.util.LinkedHashMap cannot be cast to class org.kie.api.command.Command (java.util.LinkedHashMap is in module java.base of loader 'bootstrap'; org.kie.api.command.Command is in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @51bd8b5c)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.kie.server.services.drools.DroolsKieContainerCommandServiceImpl.callContainer(DroolsKieContainerCommandServiceImpl.java:60)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.kie.server.remote.rest.drools.CommandResource.manageContainer(CommandResource.java:91)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:509)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:399)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$0(ResourceMethodInvoker.java:363)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:365)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:337)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:310)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:443)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:233)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:139)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:142)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:219)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:227)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
> Feb 6 11:09:30 thor jetty[21143]: #011at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1401)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:760)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:226)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.kie.server.services.impl.security.web.CaptureHttpRequestFilter.doFilter(CaptureHttpRequestFilter.java:42)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1596)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:501)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1592)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1296)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1562)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1211)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.Server.handle(Server.java:500)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:386)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:562)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:378)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/java.lang.Thread.run(Thread.java:834)
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 5 months
[JBoss JIRA] (DROOLS-5021) ClassCastException thrown when deserializing components of a Generice command
by Steve Davidson (Jira)
[ https://issues.redhat.com/browse/DROOLS-5021?page=com.atlassian.jira.plug... ]
Steve Davidson edited comment on DROOLS-5021 at 2/8/20 9:11 PM:
----------------------------------------------------------------
The source of this fault seems to be an if statement in the JSONMarshaller.unmarshall method: !JSONMarshallerLine328.WrongSelected.png|thumbnail!
What seems to be happening is that if "classesSet" contains the passed type, in this case a BatchExecutionCommandImpl, an Object is passed to the Object Mapper as the actual Type rather than the passed type. The JaxbMapper then returns a LinkedHashMap, resulting in a ClassCastException at: !DroolsKieContainerCommandServiceImplLine60.png|thumbnail!
I suspect that this will work properly for custom data types as they may have been added to the underlying JAXB Mapper, but this does seem to be an issue for more basic usage.
My next step is to verify that this is an issue for the current code base on the master branch. If it is, I will take a crack at fixing this over the next couple of days.
was (Author: northgorky):
The source of this fault seems to be an if statement in the JSONMarshaller.unmarshall method: !JSONMarshallerLine328.WrongSelected.png|thumbnail!
What seems to be happening is that if "classesSet" contains the passed type, in this case a BatchExecutionCommandImpl, an Object is passed to the Object Mapper as the actual Type rather than the passed type. I suspect that this will work properly for custom data types as they may have been added to the underlying JAXB Mapper, but this does seem to be an issue for more basic usage.
My next step is to verify that this is an issue for the current code base on the master branch. If it is, I will take a crack at fixing this over the next couple of days.
> ClassCastException thrown when deserializing components of a Generice command
> -----------------------------------------------------------------------------
>
> Key: DROOLS-5021
> URL: https://issues.redhat.com/browse/DROOLS-5021
> Project: Drools
> Issue Type: Bug
> Components: kie server
> Affects Versions: 7.29.0.Final
> Reporter: Steve Davidson
> Assignee: Maciej Swiderski
> Priority: Major
> Attachments: DroolsKieContainerCommandServiceImplLine60.png, JSONMarshallerLine328.WrongSelected.png, KieIssueDemo.tbz, KieRun.log
>
>
> When attempting to send a Generic Data object in an Insert Command to be added to the Rule Agenda, the server fails to deserialize the Insert Command with the following;
> Feb 6 11:09:30 thor jetty[21143]: Feb 06, 2020 11:09:30 AM org.kie.server.services.drools.DroolsKieContainerCommandServiceImpl callContainer
> Feb 6 11:09:30 thor jetty[21143]: SEVERE: Error calling container 'JUnit Test: kie-server'
> Feb 6 11:09:30 thor jetty[21143]: java.lang.ClassCastException: class java.util.LinkedHashMap cannot be cast to class org.kie.api.command.Command (java.util.LinkedHashMap is in module java.base of loader 'bootstrap'; org.kie.api.command.Command is in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @51bd8b5c)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.kie.server.services.drools.DroolsKieContainerCommandServiceImpl.callContainer(DroolsKieContainerCommandServiceImpl.java:60)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.kie.server.remote.rest.drools.CommandResource.manageContainer(CommandResource.java:91)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:509)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:399)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$0(ResourceMethodInvoker.java:363)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:365)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:337)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:310)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:443)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:233)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:139)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:142)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:219)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:227)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
> Feb 6 11:09:30 thor jetty[21143]: #011at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1401)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:760)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:226)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.kie.server.services.impl.security.web.CaptureHttpRequestFilter.doFilter(CaptureHttpRequestFilter.java:42)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1596)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:501)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1592)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1296)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1562)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1211)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.Server.handle(Server.java:500)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:386)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:562)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:378)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/java.lang.Thread.run(Thread.java:834)
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 5 months
[JBoss JIRA] (DROOLS-5021) ClassCastException thrown when deserializing components of a Generice command
by Steve Davidson (Jira)
[ https://issues.redhat.com/browse/DROOLS-5021?page=com.atlassian.jira.plug... ]
Steve Davidson commented on DROOLS-5021:
----------------------------------------
The source of this fault seems to be an if statement in the JSONMarshaller.unmarshall method: !JSONMarshallerLine328.WrongSelected.png|thumbnail!
What seems to be happening is that if "classesSet" contains the passed type, in this case a BatchExecutionCommandImpl, an Object is passed to the Object Mapper as the actual Type rather than the passed type. I suspect that this will work properly for custom data types as they may have been added to the underlying JAXB Mapper, but this does seem to be an issue for more basic usage.
My next step is to verify that this is an issue for the current code base on the master branch. If it is, I will take a crack at fixing this over the next couple of days.
> ClassCastException thrown when deserializing components of a Generice command
> -----------------------------------------------------------------------------
>
> Key: DROOLS-5021
> URL: https://issues.redhat.com/browse/DROOLS-5021
> Project: Drools
> Issue Type: Bug
> Components: kie server
> Affects Versions: 7.29.0.Final
> Reporter: Steve Davidson
> Assignee: Maciej Swiderski
> Priority: Major
> Attachments: DroolsKieContainerCommandServiceImplLine60.png, JSONMarshallerLine328.WrongSelected.png, KieIssueDemo.tbz, KieRun.log
>
>
> When attempting to send a Generic Data object in an Insert Command to be added to the Rule Agenda, the server fails to deserialize the Insert Command with the following;
> Feb 6 11:09:30 thor jetty[21143]: Feb 06, 2020 11:09:30 AM org.kie.server.services.drools.DroolsKieContainerCommandServiceImpl callContainer
> Feb 6 11:09:30 thor jetty[21143]: SEVERE: Error calling container 'JUnit Test: kie-server'
> Feb 6 11:09:30 thor jetty[21143]: java.lang.ClassCastException: class java.util.LinkedHashMap cannot be cast to class org.kie.api.command.Command (java.util.LinkedHashMap is in module java.base of loader 'bootstrap'; org.kie.api.command.Command is in unnamed module of loader org.eclipse.jetty.webapp.WebAppClassLoader @51bd8b5c)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.kie.server.services.drools.DroolsKieContainerCommandServiceImpl.callContainer(DroolsKieContainerCommandServiceImpl.java:60)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.kie.server.remote.rest.drools.CommandResource.manageContainer(CommandResource.java:91)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/java.lang.reflect.Method.invoke(Method.java:566)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:140)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.internalInvokeOnTarget(ResourceMethodInvoker.java:509)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTargetAfterFilter(ResourceMethodInvoker.java:399)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.lambda$invokeOnTarget$0(ResourceMethodInvoker.java:363)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:365)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:337)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:310)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:443)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.lambda$invoke$4(SynchronousDispatcher.java:233)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.lambda$preprocess$0(SynchronousDispatcher.java:139)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.interception.PreMatchContainerRequestContext.filter(PreMatchContainerRequestContext.java:358)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.preprocess(SynchronousDispatcher.java:142)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:219)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:227)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
> Feb 6 11:09:30 thor jetty[21143]: #011at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHolder$NotAsyncServlet.service(ServletHolder.java:1401)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:760)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1617)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:226)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1604)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.kie.server.services.impl.security.web.CaptureHttpRequestFilter.doFilter(CaptureHttpRequestFilter.java:42)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1596)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:501)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1592)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1296)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1562)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1211)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.Server.handle(Server.java:500)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:386)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:562)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:378)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:270)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:388)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
> Feb 6 11:09:30 thor jetty[21143]: #011at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
> Feb 6 11:09:30 thor jetty[21143]: #011at java.base/java.lang.Thread.run(Thread.java:834)
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
6 years, 5 months