Related
I must migrate an existing application, running on Wildfly Swarm (2018) to Thorntail. Yes, I know this is outdated already, but ...
I did it with another application, without problems.
But now I get an deployment error:
2021-10-07 13:59:04,226 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: Thorntail 2.5.0.Final (WildFly Core 7.0.0.Final) started in 3109ms - Started 150 of 155 services (31 services are lazy, passive or on-demand)
2021-10-07 14:02:35,651 ERROR [stderr] (main) org.wildfly.swarm.container.DeploymentException: java.lang.NullPointerException
2021-10-07 14:02:35,652 ERROR [stderr] (main) at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:301)
2021-10-07 14:02:35,652 ERROR [stderr] (main) at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:174)
2021-10-07 14:02:35,652 ERROR [stderr] (main) at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:107)
2021-10-07 14:02:35,653 ERROR [stderr] (main) at org.wildfly.swarm.container.runtime.RuntimeDeployer$Proxy$_$$_WeldClientProxy.deploy(Unknown Source)
2021-10-07 14:02:35,653 ERROR [stderr] (main) at org.wildfly.swarm.Swarm.deploy(Swarm.java:476)
2021-10-07 14:02:35,653 ERROR [stderr] (main) at org.wildfly.swarm.Swarm.main(Swarm.java:747)
2021-10-07 14:02:35,653 ERROR [stderr] (main) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2021-10-07 14:02:35,653 ERROR [stderr] (main) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
2021-10-07 14:02:35,653 ERROR [stderr] (main) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
2021-10-07 14:02:35,653 ERROR [stderr] (main) at java.lang.reflect.Method.invoke(Unknown Source)
2021-10-07 14:02:35,654 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.MainInvoker.invoke(MainInvoker.java:57)
2021-10-07 14:02:35,654 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.Main.run(Main.java:134)
2021-10-07 14:02:35,654 ERROR [stderr] (main) at org.wildfly.swarm.bootstrap.Main.main(Main.java:87)
2021-10-07 14:02:35,654 ERROR [stderr] (main) Caused by: java.lang.NullPointerException
2021-10-07 14:02:35,655 ERROR [stderr] (main) at io.smallrye.openapi.runtime.util.TypeUtil.getAnnotation(TypeUtil.java:281)
2021-10-07 14:02:35,655 ERROR [stderr] (main) at io.smallrye.openapi.runtime.util.TypeUtil.getSchemaAnnotation(TypeUtil.java:236)
2021-10-07 14:02:35,655 ERROR [stderr] (main) at io.smallrye.openapi.runtime.scanner.OpenApiDataObjectScanner.readKlass(OpenApiDataObjectScanner.java:236)
2021-10-07 14:02:35,655 ERROR [stderr] (main) at io.smallrye.openapi.runtime.scanner.OpenApiDataObjectScanner.depthFirstGraphSearch(OpenApiDataObjectScanner.java:206)
2021-10-07 14:02:35,655 ERROR [stderr] (main) at io.smallrye.openapi.runtime.scanner.OpenApiDataObjectScanner.process(OpenApiDataObjectScanner.java:190)
2021-10-07 14:02:35,655 ERROR [stderr] (main) at io.smallrye.openapi.runtime.scanner.OpenApiDataObjectScanner.process(OpenApiDataObjectScanner.java:141)
2021-10-07 14:02:35,656 ERROR [stderr] (main) at io.smallrye.openapi.runtime.util.SchemaFactory.introspectClassToSchema(SchemaFactory.java:242)
2021-10-07 14:02:35,656 ERROR [stderr] (main) at io.smallrye.openapi.runtime.util.SchemaFactory.typeToSchema(SchemaFactory.java:214)
2021-10-07 14:02:35,656 ERROR [stderr] (main) at io.smallrye.openapi.runtime.scanner.OpenApiAnnotationScanner.processJaxRsMethod(OpenApiAnnotationScanner.java:645)
2021-10-07 14:02:35,656 ERROR [stderr] (main) at io.smallrye.openapi.runtime.scanner.OpenApiAnnotationScanner.processJaxRsResourceClass(OpenApiAnnotationScanner.java:373)
2021-10-07 14:02:35,656 ERROR [stderr] (main) at io.smallrye.openapi.runtime.scanner.OpenApiAnnotationScanner.scan(OpenApiAnnotationScanner.java:207)
2021-10-07 14:02:35,656 ERROR [stderr] (main) at io.smallrye.openapi.runtime.OpenApiProcessor.modelFromAnnotations(OpenApiProcessor.java:72)
2021-10-07 14:02:35,657 ERROR [stderr] (main) at org.wildfly.swarm.microprofile.openapi.runtime.OpenApiDeploymentProcessor.process(OpenApiDeploymentProcessor.java:101)
2021-10-07 14:02:35,657 ERROR [stderr] (main) at org.wildfly.swarm.microprofile.openapi.runtime.OpenApiDeploymentProcessor$Proxy$_$$_WeldClientProxy.process(Unknown Source)
2021-10-07 14:02:35,657 ERROR [stderr] (main) at org.wildfly.swarm.container.runtime.RuntimeDeployer.deploy(RuntimeDeployer.java:233)
2021-10-07 14:02:35,657 ERROR [stderr] (main) ... 12 more
Debugging into the code at startup, I see that there is a NPE when parsing annotations of the Endpoint. The difference to my other application is, that the Payload uses Polymorphism:
#JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXTERNAL_PROPERTY, property = "eventType")
#JsonSubTypes({
#JsonSubTypes.Type(value = PayloadDocument.class, name = "document"),
#JsonSubTypes.Type(value = PayloadCampaign.class, name = "campaign"),
#JsonSubTypes.Type(value = PayloadMessage.class, name = "message")
})
public void setPayload(Payload payload) {
this.payload = payload;
}
The class Payload is abstract.
I solved the issue, without switching to Quarkus (what I will definitely do in the next step).
The problem was, that I used an Optional attribute in my Payload PoJo. I found it by digging a little deeper in the debugger.
After eliminating the Optional attribute, the deployment worked as expected.
i try to use use ManagedExecutorService in JBoss webapp
initialContext = new InitialContext();
ManagedExecutorService managedExecutorService = (ManagedExecutorService) initialContext.lookup("java:comp/DefaultManagedExecutorService");
but getting this exception when trying to lookup
11:12:12,445 ERROR [stderr] (default task-4) javax.naming.NameNotFoundException: DefaultManagedExecutorService -- service jboss.naming.context.java.module.webapp_war.webapp_war.DefaultManagedExecutorService
11:12:12,446 ERROR [stderr] (default task-4) at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:106)
11:12:12,447 ERROR [stderr] (default task-4) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:207)
11:12:12,448 ERROR [stderr] (default task-4) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:184)
11:12:12,448 ERROR [stderr] (default task-4) at org.jboss.as.naming.InitialContext$DefaultInitialContext.lookup(InitialContext.java:239)
11:12:12,449 ERROR [stderr] (default task-4) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:193)
11:12:12,450 ERROR [stderr] (default task-4) at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:189)
11:12:12,450 ERROR [stderr] (default task-4) at javax.naming.InitialContext.lookup(InitialContext.java:417)
11:12:12,451 ERROR [stderr] (default task-4) at javax.naming.InitialContext.lookup(InitialContext.java:417)
11:12:12,451 ERROR [stderr] (default task-4) at MainServlet.doGet(MainServlet.java:42)
11:12:12,451 ERROR [stderr] (default task-4) at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
11:12:12,452 ERROR [stderr] (default task-4) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
11:12:12,452 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:85)
11:12:12,452 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
11:12:12,453 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
11:12:12,453 ERROR [stderr] (default task-4) at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
11:12:12,453 ERROR [stderr] (default task-4) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
11:12:12,454 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
11:12:12,454 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
11:12:12,454 ERROR [stderr] (default task-4) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
11:12:12,454 ERROR [stderr] (default task-4) at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
11:12:12,455 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
11:12:12,455 ERROR [stderr] (default task-4) at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
11:12:12,455 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
11:12:12,456 ERROR [stderr] (default task-4) at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
11:12:12,456 ERROR [stderr] (default task-4) at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
11:12:12,457 ERROR [stderr] (default task-4) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
11:12:12,457 ERROR [stderr] (default task-4) at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
11:12:12,457 ERROR [stderr] (default task-4) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
11:12:12,458 ERROR [stderr] (default task-4) at org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
11:12:12,458 ERROR [stderr] (default task-4) at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
11:12:12,458 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
11:12:12,459 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
11:12:12,459 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
11:12:12,460 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
11:12:12,460 ERROR [stderr] (default task-4) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
11:12:12,460 ERROR [stderr] (default task-4) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
11:12:12,461 ERROR [stderr] (default task-4) at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
11:12:12,461 ERROR [stderr] (default task-4) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
11:12:12,462 ERROR [stderr] (default task-4) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
11:12:12,462 ERROR [stderr] (default task-4) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
11:12:12,462 ERROR [stderr] (default task-4) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1508)
11:12:12,462 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
11:12:12,462 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
11:12:12,463 ERROR [stderr] (default task-4) at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
11:12:12,463 ERROR [stderr] (default task-4) at io.undertow.server.Connectors.executeRootHandler(Connectors.java:326)
11:12:12,464 ERROR [stderr] (default task-4) at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:812)
11:12:12,464 ERROR [stderr] (default task-4) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
11:12:12,465 ERROR [stderr] (default task-4) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
11:12:12,466 ERROR [stderr] (default task-4) at java.lang.Thread.run(Thread.java:745)
14:13:54,515 ERROR [stderr] (Memcached IO over {MemcachedConnection to /172.16.0.63:11211 /172.16.0.66:11211 /172.16.0.68:11211}) 2017-10-20 14:13:54.515 INFO net.spy.memcached.MemcachedConnection: Connection state changed for sun.nio.ch.SelectionKeyImpl#19f3d5d5
14:13:54,516 ERROR [stderr] (Memcached IO over {MemcachedConnection to /172.16.0.63:11211 /172.16.0.66:11211 /172.16.0.68:11211}) 2017-10-20 14:13:54.516 INFO net.spy.memcached.MemcachedConnection: Reconnecting due to failure to connect to {QA sa=/172.16.0.68:11211, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0}
14:13:54,516 ERROR [stderr] (Memcached IO over {MemcachedConnection to /172.16.0.63:11211 /172.16.0.66:11211 /172.16.0.68:11211}) java.net.ConnectException: Connection timed out: no further information
I am new to drools.
I am using drools 6.5.0 and wildfly 10.
I am developing a REST application with drools rules and executing through REST url.
My drools rules are executed in eclipse perfectly. After that I have deployed my REST application on wildfly. It is successful.
But, If I call the url from browser, it throws the below exception in console.
Is it mandatory to deploy KIE server for the rule execution? Because in tomcat the same application is working fine without KIE server.
droolsTest.java
KieServices ks = KieServices.Factory.get(); //This statement is working fine
KieContainer kContainer = ks.getKieClasspathContainer(); // Error is thrown in this statement
KieSession kSession = kContainer.newKieSession("ksession-rules");
Message message = new Message();
message.setMessage("Hello World Testing");
message.setStatus(Message.HELLO);
kSession.insert(message);
kSession.fireAllRules();
System.out.println("Drools Rules execution is Completed");
14:47:43,604 INFO [stdout] (default task-19) Error caught :java.lang.NoClassDef
FoundError: Could not initialize class org.drools.compiler.kie.builder.impl.KieC
ontainerImpl
14:47:43,607 ERROR [stderr] (default task-19) java.lang.NoClassDefFoundError: Co
uld not initialize class org.drools.compiler.kie.builder.impl.KieContainerImpl
14:47:43,625 ERROR [stderr] (default task-19) at org.drools.compiler.kie.build
er.impl.KieServicesImpl.newKieClasspathContainer(KieServicesImpl.java:135)
14:47:43,626 ERROR [stderr] (default task-19) at org.drools.compiler.kie.build
er.impl.KieServicesImpl.getKieClasspathContainer(KieServicesImpl.java:101)
14:47:43,626 ERROR [stderr] (default task-19) at org.drools.compiler.kie.build
er.impl.KieServicesImpl.getKieClasspathContainer(KieServicesImpl.java:79)
14:47:43,627 ERROR [stderr] (default task-19) at com.sample.DroolsTest.drools(
DroolsTest.java:45)
14:47:43,627 ERROR [stderr] (default task-19) at com.abc.rest.MessageRestSe
rvice.TestDroolsCode(MessageRestService.java:29)
14:47:43,628 ERROR [stderr] (default task-19) at sun.reflect.NativeMethodAcces
sorImpl.invoke0(Native Method)
14:47:43,628 ERROR [stderr] (default task-19) at sun.reflect.NativeMethodAcces
sorImpl.invoke(NativeMethodAccessorImpl.java:62)
14:47:43,628 ERROR [stderr] (default task-19) at sun.reflect.DelegatingMethodA
ccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
14:47:43,629 ERROR [stderr] (default task-19) at java.lang.reflect.Method.invo
ke(Method.java:498)
14:47:43,630 ERROR [stderr] (default task-19) at org.jboss.resteasy.core.Resou
rceLocatorInvoker.createResource(ResourceLocatorInvoker.java:79)
14:47:43,630 ERROR [stderr] (default task-19) at org.jboss.resteasy.core.Resou
rceLocatorInvoker.createResource(ResourceLocatorInvoker.java:58)
14:47:43,631 ERROR [stderr] (default task-19) at org.jboss.resteasy.core.Resou
rceLocatorInvoker.invoke(ResourceLocatorInvoker.java:100)
14:47:43,631 ERROR [stderr] (default task-19) at org.jboss.resteasy.core.Synch
ronousDispatcher.invoke(SynchronousDispatcher.java:402)
14:47:43,632 ERROR [stderr] (default task-19) at org.jboss.resteasy.core.Synch
ronousDispatcher.invoke(SynchronousDispatcher.java:209)
14:47:43,634 ERROR [stderr] (default task-19) at org.jboss.resteasy.plugins.se
rver.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:
221)
14:47:43,635 ERROR [stderr] (default task-19) at org.jboss.resteasy.plugins.se
rver.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
14:47:43,638 ERROR [stderr] (default task-19) at org.jboss.resteasy.plugins.se
rver.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
14:47:43,639 ERROR [stderr] (default task-19) at javax.servlet.http.HttpServle
t.service(HttpServlet.java:790)
14:47:43,640 ERROR [stderr] (default task-19) at io.undertow.servlet.handlers.
ServletHandler.handleRequest(ServletHandler.java:85)
14:47:43,641 ERROR [stderr] (default task-19) at io.undertow.servlet.handlers.
security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.jav
a:62)
14:47:43,641 ERROR [stderr] (default task-19) at io.undertow.servlet.handlers.
ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
14:47:43,642 ERROR [stderr] (default task-19) at org.wildfly.extension.underto
w.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssoci
ationHandler.java:78)
14:47:43,644 ERROR [stderr] (default task-19) at io.undertow.server.handlers.P
redicateHandler.handleRequest(PredicateHandler.java:43)
14:47:43,645 ERROR [stderr] (default task-19) at io.undertow.servlet.handlers.
security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociatio
nHandler.java:131)
14:47:43,647 ERROR [stderr] (default task-19) at io.undertow.servlet.handlers.
security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCal
lHandler.java:57)
14:47:43,649 ERROR [stderr] (default task-19) at io.undertow.server.handlers.P
redicateHandler.handleRequest(PredicateHandler.java:43)
14:47:43,653 ERROR [stderr] (default task-19) at io.undertow.security.handlers
.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.jav
a:46)
14:47:43,655 ERROR [stderr] (default task-19) at io.undertow.servlet.handlers.
security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidenti
alityConstraintHandler.java:64)
14:47:43,657 ERROR [stderr] (default task-19) at io.undertow.security.handlers
.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.j
ava:60)
14:47:43,658 ERROR [stderr] (default task-19) at io.undertow.servlet.handlers.
security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSess
ionHandler.java:77)
14:47:43,661 ERROR [stderr] (default task-19) at io.undertow.security.handlers
.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
14:47:43,663 ERROR [stderr] (default task-19) at io.undertow.security.handlers
.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContext
AssociationHandler.java:43)
14:47:43,664 ERROR [stderr] (default task-19) at io.undertow.server.handlers.P
redicateHandler.handleRequest(PredicateHandler.java:43)
14:47:43,665 ERROR [stderr] (default task-19) at org.wildfly.extension.underto
w.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
14:47:43,665 ERROR [stderr] (default task-19) at io.undertow.server.handlers.P
redicateHandler.handleRequest(PredicateHandler.java:43)
14:47:43,668 ERROR [stderr] (default task-19) at io.undertow.server.handlers.P
redicateHandler.handleRequest(PredicateHandler.java:43)
14:47:43,669 ERROR [stderr] (default task-19) at io.undertow.servlet.handlers.
ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
14:47:43,670 ERROR [stderr] (default task-19) at io.undertow.servlet.handlers.
ServletInitialHandler.access$100(ServletInitialHandler.java:81)
14:47:43,671 ERROR [stderr] (default task-19) at io.undertow.servlet.handlers.
ServletInitialHandler$2.call(ServletInitialHandler.java:138)
14:47:43,672 ERROR [stderr] (default task-19) at io.undertow.servlet.handlers.
ServletInitialHandler$2.call(ServletInitialHandler.java:135)
14:47:43,675 ERROR [stderr] (default task-19) at io.undertow.servlet.core.Serv
letRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction
.java:48)
14:47:43,676 ERROR [stderr] (default task-19) at io.undertow.servlet.core.Cont
extClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
14:47:43,677 ERROR [stderr] (default task-19) at io.undertow.servlet.api.Legac
yThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
14:47:43,681 ERROR [stderr] (default task-19) at io.undertow.servlet.api.Legac
yThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
14:47:43,682 ERROR [stderr] (default task-19) at io.undertow.servlet.api.Legac
yThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
14:47:43,686 ERROR [stderr] (default task-19) at io.undertow.servlet.api.Legac
yThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
14:47:43,695 ERROR [stderr] (default task-19) at io.undertow.servlet.api.Legac
yThreadSetupActionWrapper$1.call(LegacyThreadSetupActionWrapper.java:44)
14:47:43,702 ERROR [stderr] (default task-19) at io.undertow.servlet.handlers.
ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
14:47:43,703 ERROR [stderr] (default task-19) at io.undertow.servlet.handlers.
ServletInitialHandler.access$000(ServletInitialHandler.java:81)
14:47:43,704 ERROR [stderr] (default task-19) at io.undertow.servlet.handlers.
ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
14:47:43,704 ERROR [stderr] (default task-19) at io.undertow.server.Connectors
.executeRootHandler(Connectors.java:202)
14:47:43,705 ERROR [stderr] (default task-19) at io.undertow.server.HttpServer
Exchange$1.run(HttpServerExchange.java:805)
14:47:43,705 ERROR [stderr] (default task-19) at java.util.concurrent.ThreadPo
olExecutor.runWorker(ThreadPoolExecutor.java:1142)
14:47:43,706 ERROR [stderr] (default task-19) at java.util.concurrent.ThreadPo
olExecutor$Worker.run(ThreadPoolExecutor.java:617)
14:47:43,706 ERROR [stderr] (default task-19) at java.lang.Thread.run(Thread.j
ava:745)
14:47:43,707 INFO [stdout] (default task-19) Executed
Could anyone provide your help.
Thanks
Senthil
I've got an strange problem when trying to combine an JMS with MDB queue. The thing is that I want to send an JMS to the queue, and when receiving the message, make 2 asynchronous http get to a server.
I've managed to set up the queue and send/receive messages. Also, I can make a single http or synchronous, but when I try to do an asynchronous http get, I get the NoClassDefFoundError. I've been using the Apache example class
hc.apache.org/httpcomponents-core-ga/httpcore-nio/examples/org/apache/http/examples/nio/NHttpClient.java
And it works fine when using as a java aplication, but I get NoClassDefFOundError when trying to call from the MDB.
I'm using JBoss 6 and Eclipse
13:55:54,073 ERROR [STDERR] java.lang.NoClassDefFoundError: org/apache/http/nio/NHttpClientEventHandler
13:55:54,073 ERROR [STDERR] at com.mdb.QueueListenerMDB.onMessage(QueueListenerMDB.java:59)
13:55:54,074 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:55:54,074 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
13:55:54,074 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
13:55:54,074 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
13:55:54,075 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
13:55:54,075 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
13:55:54,075 ERROR [STDERR] at org.jboss.ejb3.interceptors.container.ContainerMethodInvocationWrapper.invokeNext(ContainerMethodInvocationWrapper.java:72)
13:55:54,076 ERROR [STDERR] at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:76)
13:55:54,076 ERROR [STDERR] at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:62)
13:55:54,077 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
13:55:54,077 ERROR [STDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
13:55:54,077 ERROR [STDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
13:55:54,077 ERROR [STDERR] at java.lang.reflect.Method.invoke(Method.java:597)
13:55:54,078 ERROR [STDERR] at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
13:55:54,078 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:55:54,079 ERROR [STDERR] at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:74)
13:55:54,079 ERROR [STDERR] at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_1427582905.invoke(InvocationContextInterceptor_z_fillMethod_1427582905.java)
13:55:54,080 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:55:54,080 ERROR [STDERR] at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:90)
13:55:54,080 ERROR [STDERR] at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_1427582905.invoke(InvocationContextInterceptor_z_setup_1427582905.java)
13:55:54,080 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:55:54,081 ERROR [STDERR] at org.jboss.ejb3.async.impl.interceptor.AsynchronousServerInterceptor.invoke(AsynchronousServerInterceptor.java:110)
13:55:54,081 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:55:54,081 ERROR [STDERR] at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)
13:55:54,081 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:55:54,082 ERROR [STDERR] at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)
13:55:54,082 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:55:54,082 ERROR [STDERR] at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
13:55:54,082 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:55:54,083 ERROR [STDERR] at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
13:55:54,083 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:55:54,084 ERROR [STDERR] at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:68)
13:55:54,085 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:55:54,085 ERROR [STDERR] at org.jboss.ejb3.core.context.InvocationContextAdapter.proceed(InvocationContextAdapter.java:70)
13:55:54,085 ERROR [STDERR] at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invokeInCallerTx(CMTTxInterceptor.java:223)
13:55:54,085 ERROR [STDERR] at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.required(CMTTxInterceptor.java:353)
13:55:54,086 ERROR [STDERR] at org.jboss.ejb3.tx2.impl.CMTTxInterceptor.invoke(CMTTxInterceptor.java:209)
13:55:54,086 ERROR [STDERR] at org.jboss.ejb3.tx2.aop.CMTTxInterceptorWrapper.invoke(CMTTxInterceptorWrapper.java:52)
13:55:54,086 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:55:54,086 ERROR [STDERR] at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
13:55:54,087 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:55:54,087 ERROR [STDERR] at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:79)
13:55:54,089 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:55:54,089 ERROR [STDERR] at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
13:55:54,089 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:55:54,090 ERROR [STDERR] at org.jboss.ejb3.core.context.CurrentInvocationContextInterceptor.invoke(CurrentInvocationContextInterceptor.java:47)
13:55:54,090 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:55:54,090 ERROR [STDERR] at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
13:55:54,091 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:55:54,091 ERROR [STDERR] at org.jboss.ejb3.interceptor.EJB3TCCLInterceptor.invoke(EJB3TCCLInterceptor.java:86)
13:55:54,091 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
13:55:54,092 ERROR [STDERR] at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:306)
13:55:54,092 ERROR [STDERR] at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:299)
13:55:54,092 ERROR [STDERR] at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:152)
13:55:54,093 ERROR [STDERR] at $Proxy130.onMessage(Unknown Source)
13:55:54,093 ERROR [STDERR] at org.hornetq.ra.inflow.HornetQMessageHandler.onMessage(HornetQMessageHandler.java:256)
13:55:54,094 ERROR [STDERR] at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:822)
13:55:54,094 ERROR [STDERR] at org.hornetq.core.client.impl.ClientConsumerImpl.access$100(ClientConsumerImpl.java:46)
13:55:54,095 ERROR [STDERR] at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:940)
13:55:54,095 ERROR [STDERR] at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)
13:55:54,095 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
13:55:54,096 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
13:55:54,098 ERROR [STDERR] at java.lang.Thread.run(Thread.java:662)
13:55:54,098 ERROR [STDERR] Caused by: java.lang.ClassNotFoundException: org.apache.http.nio.NHttpClientEventHandler from BaseClassLoader#72d47b5a{vfs:///C:/Users/Guillermo/Documents/Workspace%20Eclipse/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.0_Runtime_Server1379590260770/deploy/FirstMDBProyect.jar}
13:55:54,099 ERROR [STDERR] at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:480)
13:55:54,099 ERROR [STDERR] at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
13:55:54,099 ERROR [STDERR] ... 64 more
Any help would be appreciated!
Thank you!
I found how to: I had to edit the server libs to include the missing files