MVEL Expression causing NPE in MVEL optimizer
by womuji
Hi,
I kept getting NPE for the following MVEL express in Drools rule:
---------------------------------------
rule "my Rule"
ruleflow-group "myGroup"
no-loop true
when
not Field(id=="meetingNotes")
$student : Student()
$homeAddress : Address() from
addressManager.findFirstAddressByTypeByPerson( new ReferenceCode("xyz"),
$student )
then
eventFields.put("meetingNotes",new
Field("meetingNotes",AbstractFieldConverter.formatFullAddress($homeAddress)));
end
---------------------------------------
the stack trace is:
---------------------------------------
[Error: null pointer: addressManager.findFirstAddressByTypeByPerson( new
ReferenceCode("xyz"), $student )]
[Near : {... addressManager.findFirstAddres ....}]
^
[Line: 1, Column: 1]
at
org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.compileGetChain(ReflectiveAccessorOptimizer.java:434)
at
org.mvel2.optimizers.impl.refl.ReflectiveAccessorOptimizer.optimizeAccessor(ReflectiveAccessorOptimizer.java:141)
at org.mvel2.ast.ASTNode.optimize(ASTNode.java:157)
at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:113)
at org.mvel2.MVELRuntime.execute(MVELRuntime.java:87)
at
org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:122)
at
org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:115)
at org.mvel2.MVEL.executeExpression(MVEL.java:942)
at
org.drools.base.dataproviders.MVELDataProvider.getResults(MVELDataProvider.java:111)
at org.drools.reteoo.FromNode.assertLeftTuple(FromNode.java:140)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.doPropagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:197)
at
org.drools.reteoo.SingleLeftTupleSinkAdapter.propagateAssertLeftTuple(SingleLeftTupleSinkAdapter.java:72)
at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:161)
at
org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateAssertObject(CompositeObjectSinkAdapter.java:458)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:386)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:215)
at org.drools.reteoo.EntryPointNode.assertObject(EntryPointNode.java:244)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:330)
at org.drools.common.NamedEntryPoint.insert(NamedEntryPoint.java:291)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:886)
at
org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:845)
at
org.drools.impl.StatefulKnowledgeSessionImpl.insert(StatefulKnowledgeSessionImpl.java:255)
at
org.drools.command.runtime.rule.InsertObjectCommand.execute(InsertObjectCommand.java:84)
at
org.drools.command.runtime.rule.InsertObjectCommand.execute(InsertObjectCommand.java:38)
at
org.drools.command.runtime.BatchExecutionCommandImpl.execute(BatchExecutionCommandImpl.java:155)
at
org.drools.command.runtime.BatchExecutionCommandImpl.execute(BatchExecutionCommandImpl.java:76)
at
org.drools.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:264)
---------------------------------------
I'm using Drools5.3.0.Final, which in turn depends on MVEL2.1.0
Anything wrong with my MVEL expression?
Thanks in advance.
--
View this message in context: http://drools.46999.n3.nabble.com/MVEL-Expression-causing-NPE-in-MVEL-opt...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 9 months
Problem while running the project
by arup
Hi all,
when i deployed my EAR in the websphere application server it's deployed
successfully without any errors. But when i'm trying to run my project by
passing a request xml i'm getting some errors as shown below. I'm using
drools 5.1 and WAS 6.1.
java.lang.UnsupportedClassVersionError:
(com/ibm/xmlns/prod/websphere/wcc/common/intf/schema/Control) bad major
version at offset=6
ServletWrappe E Deregister the mbean because of uncaught init() exception
thrown by servlet spring-ws: javax.servlet.ServletException: SRVE0207E:
Uncaught initialization exception thrown by servlet
here is the full console view:
[2/22/12 14:10:58:616 IST] 00000022 WebApp A SRVE0180I:
[GPMServicesEAR#GPMServices.war] [/GPMServices] [Servlet.LOG]: Initializing
Spring FrameworkServlet 'spring-ws'
[2/22/12 14:10:58:616 IST] 00000022 MessageDispat I
org.springframework.web.servlet.FrameworkServlet initServletBean
FrameworkServlet 'spring-ws': initialization started
[2/22/12 14:10:58:666 IST] 00000022 XmlWebApplica I
org.springframework.context.support.AbstractApplicationContext
prepareRefresh Refreshing WebApplicationContext for namespace
'spring-ws-servlet': startup date [Wed Feb 22 14:10:58 IST 2012]; root of
context hierarchy
[2/22/12 14:10:58:746 IST] 00000022 XmlBeanDefini I
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions Loading XML bean definitions from ServletContext
resource [/WEB-INF/spring-ws-servlet.xml]
[2/22/12 14:10:59:562 IST] 00000022 XmlBeanDefini I
org.springframework.beans.factory.xml.XmlBeanDefinitionReader
loadBeanDefinitions Loading XML bean definitions from ServletContext
resource [/WEB-INF/beans-def/gpm-services.xml]
[2/22/12 14:11:00:066 IST] 00000022 AnnotationAct I
org.springframework.ws.soap.addressing.server.AbstractAddressingEndpointMapping
afterPropertiesSet Supporting [WS-Addressing August 2004, WS-Addressing 1.0]
[2/22/12 14:11:00:136 IST] 00000022 DefaultListab I
org.springframework.beans.factory.support.DefaultListableBeanFactory
preInstantiateSingletons Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@44344434:
defining beans
[adapterUtil,addPartyContextAdapterToMdm,addressAdapterToMDM,alertsAdapterToMDM,compositePartyInquiryAdapterToMDM,createSuspectsAdapterToMDM,emailAdapterToMDM,getPartyContextAdapterToMdm,getPartyRelationsAdapterToMdm,govtIdInfoAdapterToMDM,oLifeAdapterToMDM,organizationAdapterToMDM,organizationSearchAdapterToMDM,partyAdapterToMDM,partyContextAdapterToMdm,partyDimensionAdapterToMDM,partyInquiryAdapterToMDM,partyInsertAdapterToMdm,partyMatchAdapterToMDM,partyRelationshipAdapterToMdm,partySearchAdapterToMDM,partyUpdateAdapterToMDM,personAdapterToMDM,phoneAdapterToMDM,updatePartyRelationsAdapterToMdm,addressAdapterToRule,govtIdInfoAdapterToRule,organizationAdapterToRule,partyAdapterToRule,personAdapterToRule,phoneAdapterToRule,standardizationAdapterToTrillium,addressAdapterFromMDM,alertsAdapterFromMDM,compositePartyInquiryAdapterFromMDM,emailAdapterFromMDM,govtIdInfoAdapterFromMDM,organizationAdapterFromMDM,organizationSearchAdapterFromMDM,partyAdapterFromMDM,partyInquiryAdapterFromMDM,partyInsertAdapterFromMDM,partySearchAdapterFromMDM,partyUpdateAdapterFromMDM,personAdapterFromMDM,phoneAdapterFromMDM,relationAdapterFromMDM,ludAdapterToRule,requestPartyAdapterToRule,responsePartyAdapterToRule,suspectPartyAdapterToRule,addressAdapterFromRule,govtIdInfoAdapterFromRule,organizationAdapterFromRule,partyAdapterFromRule,personAdapterFromRule,phoneAdapterFromRule,standardizationAdapterFromTrillium,organizationSearchUtil,personSearchUtil,standardizationUtil,abstractWebServiceConnector,gpmCommonUtil,gpmDomainUtil,notificationMessageGenerator,globalPartyRuleImpl,survivorshipServiceImpl,gpmRuleUtil,survivorshipUtil,partyInquiryServiceImpl,partyInsertServiceImpl,partyUpdateServiceImpl,transactionLogServiceImpl,transactionLogger,globalPartyWS,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping#0,org.springframework.ws.soap.server.endpoint.mapping.SoapActionAnnotationMethodEndpointMapping#0,org.springframework.ws.soap.addressing.server.AnnotationActionEndpointMapping#0,org.springframework.ws.server.endpoint.adapter.method.dom.DomPayloadMethodProcessor#0,org.springframework.ws.server.endpoint.adapter.method.SourcePayloadMethodProcessor#0,org.springframework.ws.server.endpoint.adapter.method.dom.Dom4jPayloadMethodProcessor#0,org.springframework.ws.server.endpoint.adapter.method.jaxb.XmlRootElementPayloadMethodProcessor#0,org.springframework.ws.server.endpoint.adapter.method.jaxb.JaxbElementPayloadMethodProcessor#0,org.springframework.ws.server.endpoint.adapter.DefaultMethodEndpointAdapter#0,ruleMap,mdmContextPaths,rules_1861,validPreferrenceList,gpm_204,gpm_301,gpm_1861,gpm_1862,gpm_1863,gpm_1864,gpm_1001700026,gpm_1001700018,gpm_1001700027,gpm_320,gpmDelegate,addressStandardizerImpl,nameStandardizerImpl,gpmDao,notificationPublisher,messageSource,party,namespacePrefixMapperImpl,gpmMarshaller,gpmMarshallerTarget,gpmMarshallerPoolTargetSource,gpmObjectMarshaller,mdmMarshallerTarget,mdmMarshallerPoolTargetSource,mdmObjectMarshaller,jaxb2marshaller,jaxb2marshallerPoolTargetSource,jaxb2ObjectMarshaller,webServiceTemplate];
root of factory hierarchy
[2/22/12 14:11:00:188 IST] 00000022 ServiceLogger I
com.ibm.ws.ffdc.IncidentStreamImpl initialize FFDC0009I: FFDC opened
incident stream file C:\Program
Files\IBM\SDP\runtimes\base_v61\profiles\AppSrv\logs\ffdc\server1_00000022_12.02.22_14.11.00_0.txt
[2/22/12 14:11:00:228 IST] 00000022 ServiceLogger I
com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC
closed incident stream file C:\Program
Files\IBM\SDP\runtimes\base_v61\profiles\AppSrv\logs\ffdc\server1_00000022_12.02.22_14.11.00_0.txt
[2/22/12 14:11:00:228 IST] 00000022 ServletWrappe E SRVE0100E: Did not
realize init() exception thrown by servlet spring-ws:
java.lang.LinkageError: LinkageError while defining class:
com.ibm.xmlns.prod.websphere.wcc.common.intf.schema.Control
Could not be defined due to:
(com/ibm/xmlns/prod/websphere/wcc/common/intf/schema/Control) bad major
version at offset=6
This is often caused by having a class defined at multiple
locations within the classloader hierarchy. Other potential causes
include compiling against an older or newer version of the class
that has an incompatible method signature.
Dumping the current context classloader hierarchy:
==> indicates defining classloader
==>[0]
com.ibm.ws.classloader.CompoundClassLoader@33923392
Local ClassPath: D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServices\WebContent\WEB-INF\classes;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\MDMDomain\bin;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServices\WebContent
Delegation Mode: PARENT_LAST
[1]
com.ibm.ws.classloader.CompoundClassLoader@b240b24
Local ClassPath: D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\DRools_Runtime\antlr-runtime.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\DRools_Runtime\commons-lang3-3.0.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\DRools_Runtime\drools-api.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\DRools_Runtime\drools-bpmn2.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\DRools_Runtime\drools-compiler.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\DRools_Runtime\drools-core.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\DRools_Runtime\drools-decisiontables.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\DRools_Runtime\drools-ide-common.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\DRools_Runtime\drools-jsr94.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\DRools_Runtime\drools-templates.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\DRools_Runtime\jsr94.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\DRools_Runtime\jxl.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\DRools_Runtime\mvel2.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\DRools_Runtime\org.eclipse.jdt.core_3.4.0.v_874.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\DRools_Runtime\xpp3_min.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\DRools_Runtime\xstream.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\JAXB\jaxb-impl-2.1.7.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\JAXB\jaxb-api.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\JAXB\activation.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\JAXB\jsr173_1.0_api.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\JAXB\jaxb1-impl.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\JAXB\jaxb-xjc-2.1.7.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\JAXB\jaxb-impl.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\JAXB\jaxb1-impl-2.1.7.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\org.springframework.aop-3.0.5.RELEASE.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\org.springframework.asm-3.0.5.RELEASE.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\org.springframework.aspects-3.0.5.RELEASE.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\org.springframework.beans-3.0.5.RELEASE.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\org.springframework.context-3.0.5.RELEASE.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\org.springframework.context.support-3.0.5.RELEASE.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\org.springframework.core-3.0.5.RELEASE.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\org.springframework.expression-3.0.5.RELEASE.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\org.springframework.oxm-3.0.5.RELEASE.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\spring-security-core-3.0.5.RELEASE.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\org.springframework.web-3.0.5.RELEASE.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\org.springframework.web.servlet-3.0.5.RELEASE.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\spring-ws-core-2.0.2.RELEASE.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\spring-ws-security-2.0.2.RELEASE.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\spring-ws-support-2.0.2.RELEASE.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\spring-xml-2.0.2.RELEASE.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\asm-3.2.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\cglib-2.2.2.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\log4j.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\apachecommonspool-1.5.3.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\Spring\aopalliance.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\axiom.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\FastInfoset.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\trillium.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\wss4j-1.5.12.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\xmlsec-1.4.5.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\activation.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\bwlog-client.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\commons-logging.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\sjsxp-1.0.1.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\streambuffer.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\db2jcc.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\db2jcc_license_cu.jar;D:\Project
Work\Project_WorSpace\GPMS_CIF_Project\GPMServicesEAR\lib\wsdl4j.jar
Delegation Mode: PARENT_LAST
[2] com.ibm.ws.classloader.ProtectionClassLoader@1ac61ac6
[3] com.ibm.ws.bootstrap.ExtClassLoader@2d2c2d2c
[4] org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader@63c063c0
[5] sun.misc.Launcher$AppClassLoader@20402040
[6] sun.misc.Launcher$ExtClassLoader@3f2c3f2c
---Original exception---
java.lang.UnsupportedClassVersionError:
(com/ibm/xmlns/prod/websphere/wcc/common/intf/schema/Control) bad major
version at offset=6
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:258)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
at
com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:555)
at
com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:506)
at
com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:389)
at java.lang.ClassLoader.loadClass(ClassLoader.java:597)
at java.lang.Class.getDeclaredMethodsImpl(Native Method)
at java.lang.Class.getDeclaredMethods(Class.java:664)
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.buildAutowiringMetadata(AutowiredAnnotationBeanPostProcessor.java:342)
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.findAutowiringMetadata(AutowiredAnnotationBeanPostProcessor.java:315)
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(AutowiredAnnotationBeanPostProcessor.java:214)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:798)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:493)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442)
at
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458)
at
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339)
at
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306)
at
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:218)
at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:319)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:412)
at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3440)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815)
at
com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1461)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:118)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
--- end Original exception----
at
com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:602)
at
com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java:506)
at
com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:389)
at java.lang.ClassLoader.loadClass(ClassLoader.java:597)
at java.lang.Class.getDeclaredMethodsImpl(Native Method)
at java.lang.Class.getDeclaredMethods(Class.java:664)
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.buildAutowiringMetadata(AutowiredAnnotationBeanPostProcessor.java:342)
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.findAutowiringMetadata(AutowiredAnnotationBeanPostProcessor.java:315)
at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(AutowiredAnnotationBeanPostProcessor.java:214)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:798)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:493)
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580)
at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:442)
at
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:458)
at
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:339)
at
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:306)
at
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:218)
at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:319)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:412)
at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3440)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815)
at
com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1461)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:118)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
[2/22/12 14:11:00:238 IST] 00000022 ServletWrappe E Deregister the mbean
because of uncaught init() exception thrown by servlet spring-ws:
javax.servlet.ServletException: SRVE0207E: Uncaught initialization exception
thrown by servlet
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:270)
at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.init(ServletWrapper.java:319)
at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:412)
at
com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:478)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3440)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267)
at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:815)
at
com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1461)
at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:118)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:458)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:387)
at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:267)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1473)
--
View this message in context: http://drools.46999.n3.nabble.com/Problem-while-running-the-project-tp376...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 9 months
Re: [rules-users] Loop Drools on Multi Element
by FrankVhh
Actually, I think that laune's solution is preferable as it should be a bit
more understandable.
Basically the rule states
If
An order is not high priority
And
There is no item with a quantity <= 2 in that order (Meaning, all items in
the order have a quantity > 2)
Then
Set prioiry of order to high
The main difference between his rule and your rule would be that you would
have to access quantity via your nested objects, while laune assumed it to
be accessible directly.
As for the example of forall, I never tried it with a list. Maybe I'll do it
later today. I would suggest you try it the laune-way.
Regards,
Frank
aliosha79 wrote
>
> Can you give me an example using forall? as i tried with a list object and
> i m not able to make it to work.
> You can take into account the classes generated by the jaxb engine
> described within my previous post.
> Really thanks!
> Alessio
>
--
View this message in context: http://drools.46999.n3.nabble.com/Loop-Drools-on-Multi-Element-tp3761638p...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 9 months
Guvnor pojo & InitialConext
by gombasp
Hello,
i tried to create a pojo and load it to Guvnor which would call an EJB on
the same Jboss AS 7.1.
Below code works in another app without problem.
public class Calculation implements IFCalculation {
IFRemoteCalculation remoteCalculation;
public Calculation() {
final String jndiName =
"java:global/remoteejb/CalculationBean!com.gp.IFRemoteCalculation";
try {
Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jboss.as.naming.InitialContextFactory");
env.put(Context.URL_PKG_PREFIXES,
"org.jboss.naming:org.jnp.interfaces");
env.put(Context.PROVIDER_URL, "jnp://localhost:1099");
Context ic = new InitialContext(env);
System.out.println("about to look up jndi name " + jndiName);
Object obj = ic.lookup(jndiName);
System.out.println("lookup returned " + obj);
remoteCalculation = (IFRemoteCalculation) obj;
} catch (NamingException e) {
System.out.println("Nem talatam meg a calculation beant! " + e);
}
}
public void add(String s, int faktor) {
remoteCalculation.add(s, faktor);
}
public String getItems() {
return remoteCalculation.getItems();
}
public void setItems() {
remoteCalculation.setItems();
}
}
When i load this as a POJO and try to use it in a Guvnor test scenario with
my rules i get following error:
12:47:17,673 ERROR [org.drools.guvnor.server.RepositoryAssetService]
(http--127.0.0.1-8080-5) Unable to run the scenario.: [Error: could not
instantiate class: null]
[Near : {... new com.gp.Calculation() ....}]
^
[Line: 1, Column: 5]
at org.mvel2.ast.NewObjectNode.getReducedValue(NewObjectNode.java:294)
[mvel2-2.1.0.drools4.jar:]
at
org.mvel2.MVELInterpretedRuntime.parseAndExecuteInterpreted(MVELInterpretedRuntime.java:106)
[mvel2-2.1.0.drools4.jar:]
at org.mvel2.MVELInterpretedRuntime.parse(MVELInterpretedRuntime.java:49)
[mvel2-2.1.0.drools4.jar:]
at org.mvel2.MVEL.eval(MVEL.java:92) [mvel2-2.1.0.drools4.jar:]
at
org.drools.testframework.ScenarioRunner.runScenario(ScenarioRunner.java:162)
[droolsjbpm-ide-common-5.3.0.Final.jar:5.3.0.Final]
at org.drools.testframework.ScenarioRunner.<init>(ScenarioRunner.java:89)
[droolsjbpm-ide-common-5.3.0.Final.jar:5.3.0.Final]
at
org.drools.guvnor.server.RepositoryPackageService.runScenario(RepositoryPackageService.java:696)
[classes:]
at
org.drools.guvnor.server.RepositoryPackageService.runScenario(RepositoryPackageService.java:559)
[classes:]
at
org.drools.guvnor.server.RepositoryPackageService.runScenario(RepositoryPackageService.java:540)
[classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[rt.jar:1.6.0_20]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[rt.jar:1.6.0_20]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rt.jar:1.6.0_20]
at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_20]
at org.jboss.seam.util.Reflections.invoke(Reflections.java:22)
[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:32)
[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:56)
[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at
org.jboss.seam.transaction.RollbackInterceptor.aroundInvoke(RollbackInterceptor.java:28)
[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at
org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:77)
[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at
org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44)
[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at
org.jboss.seam.security.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:163)
[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at
org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at
org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:185)
[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at
org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:103)
[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at
org.drools.guvnor.server.RepositoryPackageService_$$_javassist_seam_5.runScenario(RepositoryPackageService_$$_javassist_seam_5.java)
[classes:]
at
org.drools.guvnor.server.RepositoryServiceServlet.runScenario(RepositoryServiceServlet.java:364)
[classes:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[rt.jar:1.6.0_20]
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[rt.jar:1.6.0_20]
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[rt.jar:1.6.0_20]
at java.lang.reflect.Method.invoke(Method.java:616) [rt.jar:1.6.0_20]
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:569)
[gwt-servlet-2.3.0.jar:]
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:208)
[gwt-servlet-2.3.0.jar:]
at
com.google.gwt.user.server.rpc.RemoteServiceServlet.processPost(RemoteServiceServlet.java:248)
[gwt-servlet-2.3.0.jar:]
at
com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet.doPost(AbstractRemoteServiceServlet.java:62)
[gwt-servlet-2.3.0.jar:]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754)
[jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
[jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
[jbossweb-7.0.10.Final.jar:]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.10.Final.jar:]
at org.jboss.seam.web.ContextFilter$1.process(ContextFilter.java:42)
[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at
org.jboss.seam.servlet.ContextualHttpServletRequest.run(ContextualHttpServletRequest.java:65)
[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at org.jboss.seam.web.ContextFilter.doFilter(ContextFilter.java:37)
[jboss-seam-2.2.2.Final.jar:2.2.2.Final]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.10.Final.jar:]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.10.Final.jar:]
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
[jbossweb-7.0.10.Final.jar:]
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
[jbossweb-7.0.10.Final.jar:]
at
org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:154)
[jboss-as-web-7.1.0.Final.jar:7.1.0.Final]
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155)
[jbossweb-7.0.10.Final.jar:]
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
[jbossweb-7.0.10.Final.jar:]
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
[jbossweb-7.0.10.Final.jar:]
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368)
[jbossweb-7.0.10.Final.jar:]
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
[jbossweb-7.0.10.Final.jar:]
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671)
[jbossweb-7.0.10.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930)
[jbossweb-7.0.10.Final.jar:]
at java.lang.Thread.run(Thread.java:636) [rt.jar:1.6.0_20]
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
[rt.jar:1.6.0_20]
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
[rt.jar:1.6.0_20]
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
[rt.jar:1.6.0_20]
at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
[rt.jar:1.6.0_20]
at org.mvel2.ast.NewObjectNode.getReducedValue(NewObjectNode.java:268)
[mvel2-2.1.0.drools4.jar:]
... 56 more
Caused by: java.lang.NullPointerException
at
com.sun.naming.internal.VersionHelper12$InputStreamEnumeration$1.run(VersionHelper12.java:214)
[rt.jar:1.6.0_20]
at java.security.AccessController.doPrivileged(Native Method)
[rt.jar:1.6.0_20]
at
com.sun.naming.internal.VersionHelper12$InputStreamEnumeration.getNextElement(VersionHelper12.java:211)
[rt.jar:1.6.0_20]
at
com.sun.naming.internal.VersionHelper12$InputStreamEnumeration.hasMore(VersionHelper12.java:231)
[rt.jar:1.6.0_20]
at
com.sun.naming.internal.ResourceManager.getApplicationResources(ResourceManager.java:487)
[rt.jar:1.6.0_20]
at
com.sun.naming.internal.ResourceManager.getInitialEnvironment(ResourceManager.java:176)
[rt.jar:1.6.0_20]
at javax.naming.InitialContext.init(InitialContext.java:236)
[rt.jar:1.6.0_20]
at javax.naming.InitialContext.<init>(InitialContext.java:214)
[rt.jar:1.6.0_20]
at com.gp.Calculation.<init>(Calculation.java:23)
[drools-core-5.3.0.Final.jar:]
... 61 more
It seems it is not possible to get InitialContext in a pojo uploaded to
Guvnor - or is there any way?
Peter
--
View this message in context: http://drools.46999.n3.nabble.com/Guvnor-pojo-InitialConext-tp3756527p375...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 9 months
Not sure that I did it quite right...
by stephen.masters@me.com
It seems that Guvnor bug 1507 was resolved as not reproducible. I came across it this morning and have attached a repo extract that demonstrates it.
However, I'm not able to re-open it.
Is someone else able to re-open it? Or would you prefer it if I were to do raise a new bug?
Thanks,
Steve
12 years, 9 months
Re: [rules-users] Loop Drools on Multi Element
by FrankVhh
Hi,
See forall element in Drools manual:
5.8.3.6.1. Conditional Element forall
It does exactly what you describe. For the record, you may want to insert
all your line items separately to working memory.
Kind regards,
Frank
aliosha79 wrote
>
> Hi,
> i'm Alessio and i'm new in this forum. I'm learning to use drool in this
> period and i'm facing a problem.
> Briefly:
> 1- i have an xml document with a repeated element i.e.:
> <order>
> <orderLine>
> <lineItem>
> <name>item1</name>
> <quantity>35</quantity>
> </lineItem>
> <orderline>
> <orderLine>
> <lineItem>
> <name>item2</name>
> <quantity>65</quantity>
> </lineItem>
> <orderline>
> <orderLine>
> <lineItem>
> <name>item3</name>
> <quantity>52</quantity>
> </lineItem>
> <orderline>
> <priority>Normal</priority>
> </order>
>
> 2- i marshalled it in a java class named "OrderType" using jaxb library
> 3- then i want to apply a rule stating: /IF EVERY LINEITEM QUANTITY IS
> GREATER THAN 2
> THEN SET PRIORITY TO HIGH/
>
> i can access every single order line Element using this rule:
>
> when
> $Order : OrderType($Order.OrderLine[0].LineItem.Quantity.Value > 2)
> then
> $Order.getUBLRuleEnginePriority().setValue("High");
>
> $Order.addApplyedRule("hpRule");
> end
>
> But how can i cycle on each of them writing the rule at point 3?
> Thanks a lot.
> Aliosha
>
--
View this message in context: http://drools.46999.n3.nabble.com/Loop-Drools-on-Multi-Element-tp3761638p...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 9 months
Session persistence
by Alberto R. Galdo
Hi,
We are using Drools Expert, Fusion, Flow, etc... to build a complex
event processing system and one of our main constraints is to be fault
tolerant. As such, we are using an StatefulKnowledgeSession and our system
involves processes, sets of rules, events, accumulators, ... . What we need
is to be able to reconstruct a KnowledgeSession in a given state and all
our changes in the knowledgesession need to be persisted at the very moment
a change is detected.
The documentation is sparse in this point (
http://docs.jboss.org/drools/release/5.4.0.Beta2/drools-expert-docs/html/...)
and what we've seen so far is that our rules are persisted but no
traces
of facts or events ... This would be unaceptable for our product. We need
to be able to stop our service at any time and restore the knowledge
session at any time as it was at the moment of the previous stop.
We have previous experience with JBPM 3 using a persistent storage to be
fault tolerant and it works like a charm, we can see our processes,
process instances, timers, etc... .
Can we get a *full* KnowledgeSession persistence service for Drools?
Greets,
12 years, 9 months