[JBoss JIRA] Created: (JBRULES-1075) Support overloading of accumulate functions: Add int (or long) based sum's, int based avarage's, etc
by Geoffrey De Smet (JIRA)
Support overloading of accumulate functions: Add int (or long) based sum's, int based avarage's, etc
-----------------------------------------------------------------------------------------------------
Key: JBRULES-1075
URL: http://jira.jboss.com/jira/browse/JBRULES-1075
Project: JBoss Rules
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Drl Parser/Builder
Affects Versions: 4.0.0.GA
Reporter: Geoffrey De Smet
Assigned To: Edson Tirelli
Priority: Minor
Fix For: FUTURE
TTP nl10 solver has about a 3% performance increase when switching from sumDouble to sumLong (and possibly a bit more when switching to sumInteger)
There are 2 ways I see to implement this:
1) Force the user to explicitly declare he wants to use an integer based sum and add a sumInteger.
This is not so user-friendly. This is what I 've done in the patch.
2) Support overloading of accumulate functions based on the function arguments.
AFAIK drl is strongly typed (at least with the java dialect), so it should be theoretically possible for the drl parser to see
sum($myInteger)
and bind it to SumIntegerAccumulateFunction,
while binding
sum($myInteger.doubleValue())
to SumDoubleAccumulateFunction.
And added advantage is that the drl compiler will also mark some bugs as compiler errors. For example
sum($myString)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 2 months
[JBoss JIRA] Created: (AS7-1083) admin console for Datasource allows to edit JNDI of datasource
by Marek Novotny (JIRA)
admin console for Datasource allows to edit JNDI of datasource
--------------------------------------------------------------
Key: AS7-1083
URL: https://issues.jboss.org/browse/AS7-1083
Project: Application Server 7
Issue Type: Bug
Components: Console
Affects Versions: No Release
Environment: Build #1250 (22.6.2011 2:51:44)
Reporter: Marek Novotny
admin console for Datasource allows to edit JNDI of datasource although then it complains the JNDI property is not writable.
{code:title=Error stack trace}
14:25:02,023 WARN [org.jboss.as.controller] (HttpManagementService-threads - 8) Operation ("write-attribute") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "DefaultDS")
]): org.jboss.as.controller.OperationFailedException [ "Attribute jndi-name is not writeable" ]
at org.jboss.as.controller.operations.global.GlobalOperationHandlers$WriteAttributeHandler.execute(GlobalOperationHandlers.java:378)
at org.jboss.as.controller.NewOperationContextImpl.executeStep(NewOperationContextImpl.java:352)
at org.jboss.as.controller.NewOperationContextImpl.doCompleteStep(NewOperationContextImpl.java:299)
at org.jboss.as.controller.NewOperationContextImpl.completeStep(NewOperationContextImpl.java:224)
at org.jboss.as.controller.NewCompositeOperationHandler.execute(NewCompositeOperationHandler.java:84)
at org.jboss.as.controller.NewOperationContextImpl.executeStep(NewOperationContextImpl.java:352)
at org.jboss.as.controller.NewOperationContextImpl.doCompleteStep(NewOperationContextImpl.java:299)
at org.jboss.as.controller.NewOperationContextImpl.completeStep(NewOperationContextImpl.java:224)
at org.jboss.as.controller.NewModelControllerImpl$DefaultPrepareStepHandler.execute(NewModelControllerImpl.java:350)
at org.jboss.as.controller.NewOperationContextImpl.executeStep(NewOperationContextImpl.java:352)
at org.jboss.as.controller.NewOperationContextImpl.doCompleteStep(NewOperationContextImpl.java:299)
at org.jboss.as.controller.NewOperationContextImpl.completeStep(NewOperationContextImpl.java:224)
at org.jboss.as.controller.NewModelControllerImpl.execute(NewModelControllerImpl.java:119)
at org.jboss.as.controller.NewModelControllerImpl$1.execute(NewModelControllerImpl.java:209)
at org.jboss.as.controller.NewModelControllerImpl$1.execute(NewModelControllerImpl.java:199)
at org.jboss.as.domain.http.server.DomainApiHandler.processRequest(DomainApiHandler.java:188)
at org.jboss.as.domain.http.server.DomainApiHandler.handle(DomainApiHandler.java:123)
at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
at org.jboss.sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:80)
at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:85)
at org.jboss.sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:606)
at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
at org.jboss.sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:578)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_24]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_24]
at java.lang.Thread.run(Thread.java:662) [:1.6.0_24]
at org.jboss.threads.JBossThread.run(JBossThread.java:122)
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 2 months
[JBoss JIRA] Created: (JBRULES-2671) Allow relational operators for String
by Toshiya Kobayashi (JIRA)
Allow relational operators for String
-------------------------------------
Key: JBRULES-2671
URL: https://jira.jboss.org/browse/JBRULES-2671
Project: Drools
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.1.0.FINAL
Reporter: Toshiya Kobayashi
Assignee: Mark Proctor
Currently you cannot use relational operators for String fields. e.g. MyFact(name > "bbb")
org.drools.base.evaluators.ComparableEvaluatorsDefinition.evaluators has entries for ValueType.OBJECT_TYPE, but not for ValueType.STRING_TYPE. So it results in DescrBuildError:
=========
Evaluator '>' does not support type 'ValueType = 'String' : [Rule name='Your First Rule']
Unable to create restriction '[LiteralRestriction: > bbb]' for field 'name' in the rule 'Your First Rule' : [Rule name='Your First Rule']
=========
According to docs:
4.8.3.1.1.3.1. Operators
"Other relational operatory may be used whenever the type values are ordered;"
http://downloads.jboss.com/drools/docs/5.1.0.34406.FINAL/drools-expert/ht...
It is desirable to allow relational operators for String fields as String is Comparable.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 2 months
[JBoss JIRA] Created: (JGRP-798) unable to setup the protocol stack on AIX
by Aleksandar Kostadinov (JIRA)
unable to setup the protocol stack on AIX
-----------------------------------------
Key: JGRP-798
URL: http://jira.jboss.com/jira/browse/JGRP-798
Project: JGroups
Issue Type: Bug
Affects Versions: 2.4.2
Environment: SOA-P 4.2 CP02 or EAP 4.3 CP01
AIX 5.3
IBM jdk 5.0
JGroups 2.4.2 CP01
Reporter: Aleksandar Kostadinov
Assigned To: Bela Ban
Starting the server produces following exception and some services fail to start properly.
2008-07-11 03:11:32,870 ERROR [org.jgroups.protocols.UDP] max_bundle_size (64000) is greater than largest TP fragmentation size (8000)
2008-07-11 03:11:32,870 ERROR [org.jgroups.protocols.UDP] the following properties are not recognized: {enable_bundling=true, max_bundle_size=64000, max_bundle_timeout=30}
2008-07-11 03:11:32,872 DEBUG [org.jboss.cache.aop.TreeCacheAop] Initialization failed jboss.cache:service=TomcatClusteringCache
org.jgroups.ChannelException: unable to setup the protocol stack
at org.jgroups.JChannel.init(JChannel.java:1272)
at org.jgroups.JChannel.<init>(JChannel.java:265)
at org.jgroups.JChannel.<init>(JChannel.java:248)
at org.jboss.cache.TreeCache._createService(TreeCache.java:1474)
at org.jboss.cache.TreeCache.createService(TreeCache.java:1388)
at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:243)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.create(Unknown Source)
at org.jboss.system.ServiceController.create(ServiceController.java:330)
at org.jboss.system.ServiceController.create(ServiceController.java:273)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.create(Unknown Source)
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:258)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Thread.java:810)
Caused by:
java.lang.Exception: couldn't create protocol stack
at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:182)
at org.jgroups.JChannel.init(JChannel.java:1269)
... 98 more
2008-07-11 03:11:32,876 WARN [org.jboss.system.ServiceController] Problem creating service jboss.cache:service=TomcatClusteringCache
org.jgroups.ChannelException: unable to setup the protocol stack
at org.jgroups.JChannel.init(JChannel.java:1272)
at org.jgroups.JChannel.<init>(JChannel.java:265)
at org.jgroups.JChannel.<init>(JChannel.java:248)
at org.jboss.cache.TreeCache._createService(TreeCache.java:1474)
at org.jboss.cache.TreeCache.createService(TreeCache.java:1388)
at org.jboss.system.ServiceMBeanSupport.jbossInternalCreate(ServiceMBeanSupport.java:260)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:243)
at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.create(Unknown Source)
at org.jboss.system.ServiceController.create(ServiceController.java:330)
at org.jboss.system.ServiceController.create(ServiceController.java:273)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.create(Unknown Source)
at org.jboss.deployment.SARDeployer.create(SARDeployer.java:258)
at org.jboss.deployment.MainDeployer.create(MainDeployer.java:969)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:818)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:508)
at java.lang.Thread.run(Thread.java:810)
Caused by:
java.lang.Exception: couldn't create protocol stack
at org.jgroups.stack.ProtocolStack.setup(ProtocolStack.java:182)
at org.jgroups.JChannel.init(JChannel.java:1269)
... 98 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 2 months
[JBoss JIRA] Created: (JBRULES-3067) Error creating org.drools.persistence.PersistenceContextManager in org.drools.persistence.SingleSessionCommandService in a Spring environment
by Perit Bezek (JIRA)
Error creating org.drools.persistence.PersistenceContextManager in org.drools.persistence.SingleSessionCommandService in a Spring environment
---------------------------------------------------------------------------------------------------------------------------------------------
Key: JBRULES-3067
URL: https://issues.jboss.org/browse/JBRULES-3067
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Environment: I observed the problem in Drools 5.2.0.M1 and 5.2.0.CR1. Spring version is 2.5.6.
Reporter: Perit Bezek
Assignee: Mark Proctor
org.drools.persistence.SingleSessionCommandService throws a NullPointerException during the application startup. As described in the environment section the application uses Drools 5.2.0.CR1 and Spring 2.5.6. Drools configuration is created in a Spring xml file:
<drools:kbase id="knowledgeBase">
<drools:resources>
<drools:resource type="BPMN2" source="..." />
</drools:resources>
</drools:kbase>
<drools:ksession id="knowledgeSession" kbase="knowledgeBase" type="stateful">
<drools:configuration>
<drools:jpa-persistence>
<drools:entity-manager-factory ref="entityManagerFactory" />
<drools:transaction-manager ref="transactionManager" />
</drools:jpa-persistence>
</drools:configuration>
</drools:ksession>
Releated EntityManagerFactory and TransactionManager declarations are as follows:
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="persistenceXmlLocation" value="classpath:META-INF/persistence.xml" />
<property name="jpaVendorAdapter">
<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" />
</property>
</bean>
<tx:jta-transaction-manager />
The related stack trace is as follows:
Caused by: java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommanService(KnowledgeStoreServiceImpl.java:130)
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newStatefulKnowledgeSession(KnowledgeStoreServiceImpl.java:54)
at org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:109)
at org.drools.container.spring.beans.StatefulKnowledgeSessionBeanFactory.internalAfterPropertiesSet(StatefulKnowledgeSessionBeanFactory.java:82)
at org.drools.container.spring.beans.AbstractKnowledgeSessionBeanFactory.afterPropertiesSet(AbstractKnowledgeSessionBeanFactory.java:108)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
... 30 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:44)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:516)
at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommanService(KnowledgeStoreServiceImpl.java:116)
... 36 more
Caused by: java.lang.RuntimeException: Could not commit session
at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:136)
... 41 more
Caused by: java.lang.NullPointerException
at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:125)
The problem is also discussed in the forum in this thread: http://community.jboss.org/message/595927#595927 The actual problem is caused by the line 232 in org.drools.persistence.SingleSessionCommandService:
if ( tm.getClass().getName().toLowerCase().contains( "jpa" ) ) {
Now, if Spring is configured to use a JpaTransactionManager there is no problem. However, if a JtaTransactionManager is used, which I believe is the usual case, it is ignored and no PersistenceContextManager is created which causes the NPE on line 125:
jpm.getApplicationScopedPersistenceContext().persist( this.sessionInfo );
To fix the problem I, currently, use a modified version of the org.drools.container.spring.beans.StatefulKnowledgeSessionBeanFactory which creates an org.drools.runtime.Environment as follows:
DroolsSpringTransactionManager dstm = new DroolsSpringTransactionManager((AbstractPlatformTransactionManager) jpaConfiguration.getPlatformTransactionManager());
Environment env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, jpaConfiguration.getEntityManagerFactory());
env.set(EnvironmentName.TRANSACTION_MANAGER, dstm);
env.set(EnvironmentName.OBJECT_MARSHALLING_STRATEGIES, new ObjectMarshallingStrategy[] { new SerializablePlaceholderResolverStrategy(ClassObjectMarshallingStrategyAcceptor.DEFAULT) });
DroolsSpringJpaManager dsjm = new DroolsSpringJpaManager(env);
env.set(EnvironmentName.PERSISTENCE_CONTEXT_MANAGER, dsjm);
This creates a PersistenceContextManager which uses the correct JtaTransactionManager. This way I have no problems.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
13 years, 2 months