[JBoss JIRA] (WFLY-5208) UT005023: Exception handling request: NullPointerException
by Michal Vinkler (JIRA)
Michal Vinkler created WFLY-5208:
------------------------------------
Summary: UT005023: Exception handling request: NullPointerException
Key: WFLY-5208
URL: https://issues.jboss.org/browse/WFLY-5208
Project: WildFly
Issue Type: Bug
Components: CDI / Weld
Reporter: Michal Vinkler
Assignee: Stuart Douglas
Setup: 4-node cluster, one node at time either shuts down or undeploys application (clusterbench-ee7.ear), and then recovers after period of time, while standalone clients keep calling the application.
This error was seen during clustering failover testing in the following scenarios:
ejb-ejbservlet-shutdown-repl-async (failover of HTTP traffic accessing a servlet that locally invokes a stateful clustered EJB, failover type: server shutdown, with asynchronously replicated cache)
ejb-ejbservlet-shutdown-repl-sync (the same as above, with synchronously replicated cache)
ejb-ejbservlet-undeploy-dist-sync (failover type: application undeploy, with distributed cache which is replicated synchronously)
It occurs in these two situations (intermittently):
1. server startup after previous shutdown
{code}
[JBossINF] [0m[0m17:23:14,240 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 64) WFLYCLINF0002: Started repl cache from web container
[JBossINF] [0m[0m17:23:14,247 INFO [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 67) WFLYCLINF0002: Started clusterbench-ee7.ear.clusterbench-ee7-web-default.war cache from web container
[JBossINF] [0m[0m17:23:14,374 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 66) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
[JBossINF] [0m[0m17:23:14,375 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (ServerService Thread Pool -- 66) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be passivated.
[JBossINF] [0m[0m17:23:15,708 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 65) Initializing Mojarra 2.2.12-jbossorg-2 20150729-1131 for context '/clusterbench'
[JBossINF] [0m[0m17:23:15,708 INFO [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 71) Initializing Mojarra 2.2.12-jbossorg-2 20150729-1131 for context '/clusterbench-passivating'
[JBossINF] [0m[0m17:23:16,784 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 71) WFLYUT0021: Registered web context: /clusterbench-passivating
[JBossINF] [0m[0m17:23:17,198 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 65) WFLYUT0021: Registered web context: /clusterbench
[JBossINF] [0m[31m17:23:18,931 ERROR [io.undertow.request] (default task-1) UT005023: Exception handling request to /clusterbench/ejbservlet: java.lang.NullPointerException
[JBossINF] at org.jboss.as.weld.ejb.StatefulSessionObjectReferenceImpl.isRemoved(StatefulSessionObjectReferenceImpl.java:133)
[JBossINF] at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:122)
[JBossINF] at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)
[JBossINF] at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)
[JBossINF] at org.jboss.test.clusterbench.ejb.stateful.LocalStatefulSB$Proxy$_$$_Weld$EnterpriseProxy$.getSerialAndIncrement(Unknown Source)
[JBossINF] at org.jboss.test.clusterbench.ejb.stateful.LocalStatefulSB$Proxy$_$$_WeldClientProxy.getSerialAndIncrement(Unknown Source)
[JBossINF] at org.jboss.test.clusterbench.web.ejb.LocalEjbServlet.doGet(LocalEjbServlet.java:38)
[JBossINF] at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
[JBossINF] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
[JBossINF] at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86)
[JBossINF] at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
[JBossINF] at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
[JBossINF] at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
[JBossINF] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[JBossINF] at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
[JBossINF] at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
[JBossINF] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[JBossINF] at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
[JBossINF] at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
[JBossINF] at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
[JBossINF] at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:72)
[JBossINF] at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
[JBossINF] at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
[JBossINF] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[JBossINF] at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
[JBossINF] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[JBossINF] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[JBossINF] at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:282)
[JBossINF] at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:261)
[JBossINF] at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:80)
[JBossINF] at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:172)
[JBossINF] at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199)
[JBossINF] at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:778)
[JBossINF] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[JBossINF] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[JBossINF] at java.lang.Thread.run(Thread.java:745)
{code}
Server log:
http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/eap-7x-failover-ejb-e...
2. Server shutdown/application undeploy
{code}
[JBossINF] [0m[0m18:04:35,977 INFO [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0211: Suspending server
[JBossINF] [0m[0m18:04:35,981 INFO [org.jboss.as.server] (Thread-2) WFLYSRV0220: Server shutdown has been requested.
2015/08/18 18:04:36:037 EDT [DEBUG][RMI TCP Connection(14)-10.16.90.52] HOST perf17.mw.lab.eng.bos.redhat.com:rootProcess:c - [SHUTDOWN] JBossShutdown command executed successfully.
2015/08/18 18:04:36:037 EDT [DEBUG][RMI TCP Connection(14)-10.16.90.52] HOST perf17.mw.lab.eng.bos.redhat.com:rootProcess:c - Waiting for server to shutdown.
[JBossINF] [0m[0m18:04:36,048 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 77) WFLYUT0022: Unregistered web context: /clusterbench-passivating
[JBossINF] [0m[0m18:04:36,063 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 81) WFLYUT0022: Unregistered web context: /clusterbench
[JBossINF] [0m[0m18:04:36,072 INFO [org.infinispan.eviction.impl.PassivationManagerImpl] (ServerService Thread Pool -- 82) ISPN000029: Passivating all entries to disk
[JBossINF] [0m[31m18:04:36,106 ERROR [io.undertow.request] (default task-63) UT005023: Exception handling request to /clusterbench/ejbservlet: java.lang.NullPointerException
[JBossINF] at org.jboss.as.weld.ejb.StatefulSessionObjectReferenceImpl.isRemoved(StatefulSessionObjectReferenceImpl.java:133)
[JBossINF] at org.jboss.weld.bean.proxy.EnterpriseBeanProxyMethodHandler.invoke(EnterpriseBeanProxyMethodHandler.java:122)
[JBossINF] at org.jboss.weld.bean.proxy.EnterpriseTargetBeanInstance.invoke(EnterpriseTargetBeanInstance.java:56)
[JBossINF] at org.jboss.weld.bean.proxy.ProxyMethodHandler.invoke(ProxyMethodHandler.java:100)
[JBossINF] at org.jboss.test.clusterbench.ejb.stateful.LocalStatefulSB$Proxy$_$$_Weld$EnterpriseProxy$.getSerialAndIncrement(Unknown Source)
[JBossINF] at org.jboss.test.clusterbench.ejb.stateful.LocalStatefulSB$Proxy$_$$_WeldClientProxy.getSerialAndIncrement(Unknown Source)
[JBossINF] at org.jboss.test.clusterbench.web.ejb.LocalEjbServlet.doGet(LocalEjbServlet.java:38)
[JBossINF] at javax.servlet.http.HttpServlet.service(HttpServlet.java:687)
[JBossINF] at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
[JBossINF] at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:86)
[JBossINF] at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
[JBossINF] at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
[JBossINF] at org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
[JBossINF] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[JBossINF] at io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
[JBossINF] at io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
[JBossINF] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[JBossINF] at io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
[JBossINF] at io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
[JBossINF] at io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
[JBossINF] at io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:72)
[JBossINF] at io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
[JBossINF] at io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
[JBossINF] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[JBossINF] at org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
[JBossINF] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[JBossINF] at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
[JBossINF] at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:282)
[JBossINF] at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:261)
[JBossINF] at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:80)
[JBossINF] at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:172)
[JBossINF] at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199)
[JBossINF] at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:778)
[JBossINF] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[JBossINF] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[JBossINF] at java.lang.Thread.run(Thread.java:745)
{code}
Server log:
http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/eap-7x-failover-ejb-e...
During server shutdown, it occurred also with different stacktrace:
{code}
[JBossINF] [0m[31m17:19:11,728 ERROR [io.undertow.request] (default task-128) UT005023: Exception handling request to /clusterbench/ejbservlet: java.lang.NullPointerException
[JBossINF] at org.jboss.weld.servlet.WeldInitialListener.requestInitialized(WeldInitialListener.java:143)
[JBossINF] at io.undertow.servlet.core.ApplicationListeners.requestInitialized(ApplicationListeners.java:216)
[JBossINF] at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:281)
[JBossINF] at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:261)
[JBossINF] at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:80)
[JBossINF] at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:172)
[JBossINF] at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199)
[JBossINF] at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:778)
[JBossINF] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[JBossINF] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[JBossINF] at java.lang.Thread.run(Thread.java:745)
[JBossINF]
{code}
Server log:
http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/eap-7x-failover-ejb-e...
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 2 months
[JBoss JIRA] (DROOLS-845) @KSession throws exception when using kmodule in separate jar
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-845?page=com.atlassian.jira.plugin... ]
Mario Fusco commented on DROOLS-845:
------------------------------------
Can you please provide a reproducer for this issue?
> @KSession throws exception when using kmodule in separate jar
> -------------------------------------------------------------
>
> Key: DROOLS-845
> URL: https://issues.jboss.org/browse/DROOLS-845
> Project: Drools
> Issue Type: Bug
> Components: core engine, decision tables, kie server
> Affects Versions: 6.2.0.Final
> Environment: windows 7
> Reporter: lucio piccoli
> Assignee: Mario Fusco
>
> i am using drools with a kmodules.xml and decisiontable inside a separate jar file. when i attempt to bind the @KSession to the spring application context it throws an nullpointer exception deep inside the annotation.
> org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'oft.onlineservice.business.FeeRulesEngineTest': Injection of kie dependencies failed; nested exception is java.lang.NullPointerException
> at org.kie.spring.annotations.AnnotationsPostProcessor.postProcessPropertyValues(AnnotationsPostProcessor.java:109)
> using a simple junittest shows the problem.
> public class FeeRulesEngineTest {
> @KSession( "ksession1")
> private StatelessKieSession ksession;
> @KBase("feeDecisionTable")
> private KieBase kbase;
> the kmodule.xml
> <kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule">
> <kbase name="feeDecisionTable" packages="oft.rulesengine" default="true">
> <ksession name="ksession1" type="stateless" default="true" >
> </ksession>
> </kbase>
> </kmodule>
> the spring config is using the annonation postprocessor.
> <kie:import />
> <bean id="kiePostProcessor"
> class="org.kie.spring.annotations.KModuleAnnotationPostProcessor"/>
>
> my curent work around to is to use @Autowire for the KSession and KBase.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 2 months
[JBoss JIRA] (DROOLS-613) JBRULES-3723 NullPointerException in RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:271)
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-613?page=com.atlassian.jira.plugin... ]
Mario Fusco resolved DROOLS-613.
--------------------------------
Resolution: Cannot Reproduce Bug
As explained by Mark we have no idea of how to reproduce this issue, so I'm closing it as "Cannot Reproduce". If you can provide a reproducer please attach it to this ticket and reopen the ticket.
> JBRULES-3723 NullPointerException in RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:271)
> --------------------------------------------------------------------------------------------------
>
> Key: DROOLS-613
> URL: https://issues.jboss.org/browse/DROOLS-613
> Project: Drools
> Issue Type: Bug
> Affects Versions: 6.0.1.Final, 6.1.0.Final
> Environment: drools-core: 6.1.0.Final
> drools-compiler: 6.1.0.Final
> JDK: 1.7.0_45
> IDE:eclipse kepler
> OS: windows 7
> Test: Junit4
> Reporter: qibiao deng
> Assignee: Mario Fusco
> Labels: DRL, Drools, SDO
>
> when there is one rule in KBase, dynamically add second rule and fire it. drools report this error:
> {code:title=Exception stack |borderStyle=solid}
> java.lang.NullPointerException
> at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:271)
> at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:161)
> at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:116)
> at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:216)
> at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:91)
> at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:964)
> at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1234)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1239)
> at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1222)
> at mock.com.camel.drools.expert.sample.service.DynamicAddRuleBugTest.testReproduceBugWithSDO(DynamicAddRuleBugTest.java:134)
> {code}
> That two drl rules are almost same expect package name:
> {code:title=drl 1|borderStyle=solid}
> package com.camel.drools.expert.sample.testbug1
> import mock.com.camel.drools.expert.sample.service.domain.Order;
> import mock.com.camel.drools.expert.sample.service.domain.RuleConditionSdo;
> rule "order flow"
> when
> $rcs:RuleConditionSdo($rc:ruleCondition)
> $order:Order(price>$rc.getDouble("minPrice"), source==$rc.getString("source"), dest==$rc.getString("dest"))
> then
> System.out.println("finished rule for bug test 1" + $rc.getString("source"));
> end
> {code}
> {code:title=drl 2|borderStyle=solid}
> package com.camel.drools.expert.sample.testbug2
> import mock.com.camel.drools.expert.sample.service.domain.Order;
> import mock.com.camel.drools.expert.sample.service.domain.RuleConditionSdo;
> rule "order flow"
> when
> $rcs:RuleConditionSdo($rc:ruleCondition)
> $order:Order(price>$rc.getDouble("minPrice"), source==$rc.getString("source"), dest==$rc.getString("dest"))
> then
> System.out.println("finished rule for bug test 2" + $rc.getString("source"));
> end
> {code}
> 1. The RuleConditionSdo object was dynamically created at runtime, it using a SDO technic. This works failed
> 2. If changed RuleCondtionSdo with a pre-write pojo, It works fine.
> 3. If use Cglib util net.sf.cglib.beans.BeanGenerator creat RuleConditionSdo object dynamically. It works still fine.
> so, It's like a bug with SDO object.
> Test code below:
> {code:title=DynamicAddRuleBugTest.java |borderStyle=solid}
> package mock.com.camel.drools.expert.sample.service;
> import java.io.IOException;
> import java.io.InputStreamReader;
> import java.io.Reader;
> import java.util.HashMap;
> import java.util.Map;
> import mock.com.camel.drools.expert.sample.service.domain.Order;
> import mock.com.camel.drools.expert.sample.service.domain.RuleCondition;
> import mock.com.camel.drools.expert.sample.service.domain.RuleConditionSdo;
> import org.drools.compiler.builder.impl.KnowledgeBuilderImpl;
> import org.drools.compiler.compiler.DroolsParserException;
> import org.drools.core.impl.InternalKnowledgeBase;
> import org.junit.After;
> import org.junit.Before;
> import org.junit.Test;
> import org.kie.api.runtime.KieSession;
> import org.kie.api.runtime.rule.AgendaFilter;
> import org.kie.api.runtime.rule.Match;
> import org.kie.internal.KnowledgeBaseFactory;
> import com.camel.drools.expert.sample.utils.CglibDynamicBeanGenerator;
> import com.camel.drools.expert.sample.utils.RegisterSDOXsd;
> /**
> * reproduce dynamic add rule bug
> * @author dengqb
> * @date 2014年9月19日
> */
> public class DynamicAddRuleBugTest {
> /**
> * @throws java.lang.Exception
> */
> @Before
> public void setUp() throws Exception {
> }
> /**
> * @throws java.lang.Exception
> */
> @After
> public void tearDown() throws Exception {
> }
> /**
> * using pre-write RuleCondition Object
> * result: fine
> */
> @Test
> public void testReproduceBug() {
> InternalKnowledgeBase kBase = (InternalKnowledgeBase) KnowledgeBaseFactory.newKnowledgeBase();
> String drlFile = "/drools/drl/bug_test1.drl";
> loadPackageFromDrl(kBase, drlFile);
>
> Order order = new Order(50,"ebay","china");
> RuleCondition ruleCondition = new RuleCondition(30,"ebay","china");
>
> KieSession kieSession = kBase.newStatefulKnowledgeSession();
> kieSession.insert(ruleCondition);
> kieSession.insert(order);
> kieSession.fireAllRules(new AgendaFilter(){
> @Override
> public boolean accept(Match match) {
> return match.getRule().getPackageName().endsWith("testbug1");
> }
> });
> //statfull session使用后必需调用dispose
> kieSession.dispose();
>
> System.out.println("========add new rule=================");
> String drlFile2 = "/drools/drl/bug_test2.drl";
> loadPackageFromDrl(kBase, drlFile2);
>
> kieSession = kBase.newStatefulKnowledgeSession();
> Order order2 = new Order(32.0,"ebay","brazil");
> RuleCondition ruleCondition2 = new RuleCondition(30,"ebay","brazil");
> kieSession.insert(ruleCondition2);
> kieSession.insert(order2);
> kieSession.fireAllRules(new AgendaFilter(){
> @Override
> public boolean accept(Match match) {
> return match.getRule().getPackageName().endsWith("testbug2");
> }
> });
> kieSession.dispose();
> }
> /**
> * using a RuleConditonSdo object, it is dynamically created by SDO technic
> * result: false
> */
> @Test
> public void testReproduceBugWithSDO() {
> InternalKnowledgeBase kBase = (InternalKnowledgeBase) KnowledgeBaseFactory.newKnowledgeBase();
> String drlFile = "/drools/drl/bug_sdo_test1.drl";
> loadPackageFromDrl(kBase, drlFile);
>
> Order order = new Order(50,"ebay","china");
>
> //注册sdo对象
> RegisterSDOXsd register = new RegisterSDOXsd();
> register.setXsdFilePath("/drools/xsd/xsdList.txt");
> register.register();
>
> RuleConditionSdo rcsdo = new RuleConditionSdo();
> rcsdo.getRuleCondition().setDouble("minPrice",30);
> rcsdo.getRuleCondition().setString("source","ebay");
> rcsdo.getRuleCondition().setString("dest","china");
>
> KieSession kieSession = kBase.newStatefulKnowledgeSession();
> kieSession.insert(rcsdo);
> kieSession.insert(order);
> kieSession.fireAllRules(new AgendaFilter(){
> @Override
> public boolean accept(Match match) {
> return match.getRule().getPackageName().endsWith("testbug1");
> }
> });
> //statfull session使用后必需调用dispose
> kieSession.dispose();
>
> System.out.println("========add new rule=================");
> String drlFile2 = "/drools/drl/bug_sdo_test2.drl";
> loadPackageFromDrl(kBase, drlFile2);
>
> kieSession = kBase.newStatefulKnowledgeSession();
> Order order2 = new Order(32.0,"ebay","brazil");
> //RuleCondition ruleCondition2 = new RuleCondition(30,"ebay","brazil");
> RuleConditionSdo rcsdo2 = new RuleConditionSdo();
> rcsdo.getRuleCondition().setDouble("minPrice",30);
> rcsdo.getRuleCondition().setString("source","ebay");
> rcsdo.getRuleCondition().setString("dest","breazil");
> kieSession.insert(rcsdo2);
> kieSession.insert(order2);
> kieSession.fireAllRules(new AgendaFilter(){
> @Override
> public boolean accept(Match match) {
> return match.getRule().getPackageName().endsWith("testbug2");
> }
> });
> kieSession.dispose();
> }
>
> /**
> * using a dynamicl RuleCondition object, it created by cglib BeanGenerator
> * result: fine
> * @throws ClassNotFoundException
> */
> @Test
> public void testReproduceBugWithDynamicBean() throws ClassNotFoundException{
> InternalKnowledgeBase kBase = (InternalKnowledgeBase) KnowledgeBaseFactory.newKnowledgeBase();
> String drlFile = "/drools/drl/bug_dyb_test1.drl";
> loadPackageFromDrl(kBase, drlFile);
>
> Order order = new Order(50,"ebay","china");
>
> Map<String,Class<?>> properties = new HashMap<String,Class<?>>();
> properties.put("minPrice", Class.forName("java.lang.Double"));
> properties.put("source", Class.forName("java.lang.String"));
> properties.put("dest", Class.forName("java.lang.String"));
> // 生成动态 Bean
> CglibDynamicBeanGenerator ruleCondition = new CglibDynamicBeanGenerator(properties);
> ruleCondition.setValue("minPrice", 40d);
> ruleCondition.setValue("source", "ebay");
> ruleCondition.setValue("dest", "china");
>
> KieSession kieSession = kBase.newStatefulKnowledgeSession();
> kieSession.insert(ruleCondition);
> kieSession.insert(order);
> kieSession.fireAllRules(new AgendaFilter(){
> @Override
> public boolean accept(Match match) {
> return match.getRule().getPackageName().endsWith("testbug1");
> }
> });
> //statfull session使用后必需调用dispose
> kieSession.dispose();
>
> System.out.println("========add new rule=================");
> String drlFile2 = "/drools/drl/bug_dyb_test2.drl";
> loadPackageFromDrl(kBase, drlFile2);
>
> kieSession = kBase.newStatefulKnowledgeSession();
> Order order2 = new Order(32.0,"ebay","brazil");
>
> ruleCondition = new CglibDynamicBeanGenerator(properties);
> ruleCondition.setValue("minPrice", 30d);
> ruleCondition.setValue("source", "ebay");
> ruleCondition.setValue("dest", "brazil");
>
> kieSession.insert(ruleCondition);
> kieSession.insert(order2);
> kieSession.fireAllRules(new AgendaFilter(){
> @Override
> public boolean accept(Match match) {
> return match.getRule().getPackageName().endsWith("testbug2");
> }
> });
> kieSession.dispose();
> }
> private void loadPackageFromDrl(InternalKnowledgeBase kBase, String drlFile) {
> final Reader drlReader = new InputStreamReader(this.getClass().getResourceAsStream(drlFile));
>
> final KnowledgeBuilderImpl builder = new KnowledgeBuilderImpl();
> try {
> builder.addPackageFromDrl(drlReader);
> if (builder.hasErrors()){
> System.out.println(builder.getErrors());
> }
> kBase.addPackage(builder.getPackage());
> } catch (DroolsParserException e) {
> e.printStackTrace();
> } catch (IOException e) {
> e.printStackTrace();
> }
> }
> }
> {code}
> SDO RuleCondition class
> {code::title=RuleConditionSdo.java |borderStyle=solid}
> package mock.com.camel.drools.expert.sample.service.domain;
> import commonj.sdo.DataObject;
> import commonj.sdo.helper.DataFactory;
> /**
> *
> * @author dengqb
> * @date 2014年9月19日
> */
> public class RuleConditionSdo {
> private DataObject ruleCondition;
>
> public RuleConditionSdo(){
> ruleCondition = DataFactory.INSTANCE.create("http://drools.research.com/xsd/RuleCondition", "RuleCondition");
> }
> public DataObject getRuleCondition() {
> return ruleCondition;
> }
> public void setRuleCondition(DataObject ruleCondition) {
> this.ruleCondition = ruleCondition;
> }
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 2 months
[JBoss JIRA] (WFLY-4423) ClassNotFoundException: org.jboss.naming.remote.client.InitialContextFactory
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/WFLY-4423?page=com.atlassian.jira.plugin.... ]
RH Bugzilla Integration commented on WFLY-4423:
-----------------------------------------------
baranowb <bbaranow(a)redhat.com> changed the Status of [bug 1201358|https://bugzilla.redhat.com/show_bug.cgi?id=1201358] from ASSIGNED to POST
> ClassNotFoundException: org.jboss.naming.remote.client.InitialContextFactory
> ----------------------------------------------------------------------------
>
> Key: WFLY-4423
> URL: https://issues.jboss.org/browse/WFLY-4423
> Project: WildFly
> Issue Type: Bug
> Components: JMS
> Affects Versions: 9.0.0.Alpha1
> Reporter: Jeff Mesnil
> Assignee: Jeff Mesnil
> Fix For: 9.0.0.Beta1
>
>
> To reproduce this issue follow the steps:
> - setup JMS bridge between two WildFly instances
> - once JMS bridge is running, login into jboss-cli and stop the bridge
> - restart the bridge fro jboss-cli
> The following exception appears in the serve log file.
> 10:12:59,414 INFO [org.hornetq.jms.server] (pool-9-thread-1) HQ121000: Failed to set up JMS bridge connections. Most probably the source or target servers are unavailable. Will retry after a pause of 60,000 ms
> 10:13:59,416 WARN [org.hornetq.jms.server] (pool-9-thread-1) HQ122010: Failed to connect JMS Bridge: javax.naming.NamingException: JBAS011843: Failed instantiate InitialContextFactory org.jboss.naming.remote.client.InitialContextFactory from classloader ModuleClassLoader for Module "org.jboss.as.controller:main" from local module loader @543a2dec (finder: local module finder @379d0c27 (roots: /Volumes/RedHat/Work/JBoss/EAP/JBoss-6/current/home/modules,/Volumes/RedHat/Work/JBoss/EAP/JBoss-6/current/home/modules/system/layers/base)) [Root exception is java.lang.ClassNotFoundException: org.jboss.naming.remote.client.InitialContextFactory from [Module "org.jboss.as.controller:main" from local module loader @543a2dec (finder: local module finder @379d0c27 (roots: /Volumes/RedHat/Work/JBoss/EAP/JBoss-6/current/home/modules,/Volumes/RedHat/Work/JBoss/EAP/JBoss-6/current/home/modules/system/layers/base))]]
> at org.jboss.as.naming.InitialContext.getDefaultInitCtx(InitialContext.java:126)
> at org.jboss.as.naming.InitialContext.init(InitialContext.java:107)
> at javax.naming.ldap.InitialLdapContext.<init>(InitialLdapContext.java:153) [rt.jar:1.7.0_75]
> at org.jboss.as.naming.InitialContext.<init>(InitialContext.java:98)
> at org.jboss.as.naming.InitialContextFactory.getInitialContext(InitialContextFactory.java:44)
> at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:684) [rt.jar:1.7.0_75]
> at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:307) [rt.jar:1.7.0_75]
> at javax.naming.InitialContext.init(InitialContext.java:242) [rt.jar:1.7.0_75]
> at javax.naming.InitialContext.<init>(InitialContext.java:216) [rt.jar:1.7.0_75]
> at org.hornetq.jms.bridge.impl.JNDIFactorySupport.createObject(JNDIFactorySupport.java:55)
> at org.hornetq.jms.bridge.impl.JNDIDestinationFactory.createDestination(JNDIDestinationFactory.java:40)
> at org.hornetq.jms.bridge.impl.JMSBridgeImpl.setupJMSObjects(JMSBridgeImpl.java:1236)
> at org.hornetq.jms.bridge.impl.JMSBridgeImpl.setupJMSObjectsWithRetry(JMSBridgeImpl.java:1474)
> at org.hornetq.jms.bridge.impl.JMSBridgeImpl.access$2200(JMSBridgeImpl.java:79)
> at org.hornetq.jms.bridge.impl.JMSBridgeImpl$FailureHandler.run(JMSBridgeImpl.java:2082)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_75]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_75]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_75]
> Caused by: java.lang.ClassNotFoundException: org.jboss.naming.remote.client.InitialContextFactory from [Module "org.jboss.as.controller:main" from local module loader @543a2dec (finder: local module finder @379d0c27 (roots: /Volumes/RedHat/Work/JBoss/EAP/JBoss-6/current/home/modules,/Volumes/RedHat/Work/JBoss/EAP/JBoss-6/current/home/modules/system/layers/base))]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213) [jboss-modules.jar:1.3.5.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:459) [jboss-modules.jar:1.3.5.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:408) [jboss-modules.jar:1.3.5.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:389) [jboss-modules.jar:1.3.5.Final-redhat-1]
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:134) [jboss-modules.jar:1.3.5.Final-redhat-1]
> at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_75]
> at java.lang.Class.forName(Class.java:274) [rt.jar:1.7.0_75]
> at org.jboss.as.naming.InitialContext.getDefaultInitCtx(InitialContext.java:121)
> ... 17 more
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 2 months
[JBoss JIRA] (WFLY-5207) Timestamp rounding issues on Microsoft SQL Server
by Jan Martiska (JIRA)
[ https://issues.jboss.org/browse/WFLY-5207?page=com.atlassian.jira.plugin.... ]
Jan Martiska moved JBEAP-866 to WFLY-5207:
------------------------------------------
Project: WildFly (was: JBoss Enterprise Application Platform)
Key: WFLY-5207 (was: JBEAP-866)
Workflow: GIT Pull Request workflow (was: CDW v1)
Affects Version/s: 10.0.0.Beta2
(was: 7.0.0.DR9)
Component/s: EJB
(was: EJB)
Target Release: (was: 7.0.0.GA)
> Timestamp rounding issues on Microsoft SQL Server
> -------------------------------------------------
>
> Key: WFLY-5207
> URL: https://issues.jboss.org/browse/WFLY-5207
> Project: WildFly
> Issue Type: Bug
> Components: EJB
> Affects Versions: 10.0.0.Beta2
> Environment: all supported Microsoft SQL Server versions (2008, 2012, 2014)
> Reporter: Jan Martiska
> Assignee: Jan Martiska
> Priority: Critical
>
> The DATETIME datatype in SQL Server has a precision of ~0.003 seconds.
> It sometimes can happen that an EJB timer gets scheduled to a timestamp which will get rounded after its insertion into the database, because the timestamps are generated with precision to miliseconds.
> After that, the timer service will be unable to locate this row, because it attempts to select using WHERE NEXT_DATE=$timestamp, where $timestamp is the original unrounded java.sql.Timestamp, and this condition no longer holds true.
> After a timer is scheduled to go off at such unfortunate timestamp, it will never go off again.
> The solution is to either truncate the milisecond part, or to use the newer DATETIME2 datatype, which has an accuracy of 100 nanoseconds (https://msdn.microsoft.com/en-us/library/bb677335.aspx). DATETIME2 is supported on SQL Server 2008+.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 2 months
[JBoss JIRA] (DROOLS-846) KIE Workbench Test Scenarios don't run with ruleflow-group
by Mario Fusco (JIRA)
[ https://issues.jboss.org/browse/DROOLS-846?page=com.atlassian.jira.plugin... ]
Mario Fusco closed DROOLS-846.
------------------------------
Resolution: Duplicate Issue
This issue is a duplicate of what reported here https://issues.jboss.org/browse/GUVNOR-2232 and almost for sure the problem is totally on the guvnor side, so I'm closing this one.
> KIE Workbench Test Scenarios don't run with ruleflow-group
> ----------------------------------------------------------
>
> Key: DROOLS-846
> URL: https://issues.jboss.org/browse/DROOLS-846
> Project: Drools
> Issue Type: Bug
> Components: tools
> Affects Versions: 6.2.0.Final
> Reporter: kevin chabot
> Assignee: Mario Fusco
> Attachments: drools.test.bestOffers.zip, drools.test.bestOffersv2.zip
>
>
> While evaluating a proof of concept with drools & KIE workbench, I created a simple test scenario to test rules created with a guided decision table.
> This decision table is triggered as a business task in a jBPM flow, so it has the ruleflow-group attribute specified.
> However, when running the test scenario from the KIE workbench, it seems that no rules are being fired. The scenario is setup so that it activates the necesary ruleflow groups.
> The test project setup is attached.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 2 months
[JBoss JIRA] (DROOLS-895) Memory leak caused by IdentityHashMap in ClassFieldAccessorStore.BaseLookupEntry
by Mario Fusco (JIRA)
Mario Fusco created DROOLS-895:
----------------------------------
Summary: Memory leak caused by IdentityHashMap in ClassFieldAccessorStore.BaseLookupEntry
Key: DROOLS-895
URL: https://issues.jboss.org/browse/DROOLS-895
Project: Drools
Issue Type: Bug
Reporter: Mario Fusco
Assignee: Mario Fusco
The IdentityHashMap in ClassFieldAccessorStore.BaseLookupEntry retains entries forever even when an incremental compilation makes the old ones no longer necessary. This causes a memory leak that could lead to an OutOfMemoryError especially when a KieBase is updated to a newer version many times.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 2 months
[JBoss JIRA] (WFLY-5206) Intermittent NPE when invoking method requestDestroyed
by Michal Vinkler (JIRA)
Michal Vinkler created WFLY-5206:
------------------------------------
Summary: Intermittent NPE when invoking method requestDestroyed
Key: WFLY-5206
URL: https://issues.jboss.org/browse/WFLY-5206
Project: WildFly
Issue Type: Bug
Components: CDI / Weld
Reporter: Michal Vinkler
Assignee: Stuart Douglas
Setup: 4-node cluster, one node at time undeploys application (clusterbench-ee7.ear), while standalone clients keep calling the application.
This error was seen during clustering failover testing in the following scenario:
ejb-ejbservlet-repl-sync (failover of HTTP traffic accessing a servlet that locally invokes a stateful clustered EJB, with synchronously replicated cache)
After undeploying application on perf19 (second node in the cluster), NullPointerException was logged 31 times in the server log.
Stacktrace:
{code}
2015/08/18 20:01:40:973 EDT [DEBUG][RMI TCP Connection(14)-10.16.90.52] HOST perf17.mw.lab.eng.bos.redhat.com:rootProcess:c - Going to undeploy: 'clusterbench-ee7.ear' from 'perf19' now.
2015/08/18 20:01:41:265 EDT [DEBUG][RMI TCP Connection(14)-10.16.90.52] HOST perf17.mw.lab.eng.bos.redhat.com:rootProcess:c - Requesting: {
"operation" : "undeploy",
"address" : [{
"deployment" : "clusterbench-ee7.ear"
}]
}
20:01:41,706 INFO [org.xnio] (RMI TCP Connection(14)-10.16.90.52) XNIO version 3.3.1.Final
20:01:41,918 INFO [org.xnio.nio] (RMI TCP Connection(14)-10.16.90.52) XNIO NIO Implementation Version 3.3.1.Final
20:01:41,969 INFO [org.jboss.remoting] (RMI TCP Connection(14)-10.16.90.52) JBoss Remoting version 4.0.9.Final
[JBossINF] [0m[0m20:01:42,603 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 79) WFLYUT0022: Unregistered web context: /clusterbench
[JBossINF] [0m[0m20:01:42,603 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 78) WFLYUT0022: Unregistered web context: /clusterbench-passivating
[JBossINF] [0m[0m20:01:42,679 INFO [org.infinispan.eviction.impl.PassivationManagerImpl] (ServerService Thread Pool -- 78) ISPN000029: Passivating all entries to disk
[JBossINF] [0m[0m20:01:42,679 INFO [org.infinispan.eviction.impl.PassivationManagerImpl] (ServerService Thread Pool -- 81) ISPN000029: Passivating all entries to disk
[JBossINF] [0m[31m20:01:42,681 ERROR [io.undertow.servlet.request] (default task-46) UT015005: Error invoking method requestDestroyed on listener class org.jboss.weld.servlet.WeldInitialListener: java.lang.NullPointerException
[JBossINF] at org.jboss.weld.servlet.WeldInitialListener.requestDestroyed(WeldInitialListener.java:135)
[JBossINF] at io.undertow.servlet.core.ApplicationListeners.requestDestroyed(ApplicationListeners.java:225)
[JBossINF] at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:325)
[JBossINF] at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:261)
[JBossINF] at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:80)
[JBossINF] at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:172)
[JBossINF] at io.undertow.server.Connectors.executeRootHandler(Connectors.java:199)
[JBossINF] at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:778)
[JBossINF] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[JBossINF] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[JBossINF] at java.lang.Thread.run(Thread.java:745)
{code}
Server log:
http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/eap-7x-failover-ejb-e...
We also see the very same error in the scenario where the nodes shutdown instead of undeploying application - right after the server shutdown has been requested (we do not use graceful shutdown yet).
Server log:
http://jenkins.mw.lab.eng.bos.redhat.com/hudson/job/eap-7x-failover-ejb-e...
May be relevant to https://issues.jboss.org/browse/JBEAP-863 as both errors come together, under the same conditions.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
10 years, 2 months