[JBoss JIRA] Created: (JBRULES-3116) Performance Regression due to mvel ParserContext now set, resulting in CompositeClassLoader loads
by Fabian Lange (JIRA)
Performance Regression due to mvel ParserContext now set, resulting in CompositeClassLoader loads
-------------------------------------------------------------------------------------------------
Key: JBRULES-3116
URL: https://issues.jboss.org/browse/JBRULES-3116
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler
Affects Versions: 5.2.0.Final
Reporter: Fabian Lange
Assignee: Mark Proctor
I observed this issue already with 5.1, but now had time to verify it with 5.2.
Initial compilation time has exploded with those versions.
I have with the same test cases with 5.2 this:
org.drools.util.CompositeClassLoader$CachingLoader.load taking a total of 42 seconds
With 5.0 (where this Caching was not yet implemented)
I had a total time of less than 5 seconds spend in the ClassLoading.
The reason for this took me a while to find, but now I do have it:
org.mvel2.compiler.AbstractParser.createPropertyToken
is invoking hasImports() and getImport() on the ParseContext if not null.
Those in turn are invoking org.mvel2.ParserConfiguration.checkForDynamicImport
which invokes org.drools.util.CompositeClassLoader.loadClass
This is invoked on my table for expressions like this: "age >= 16"
So the org.drools.util.CompositeClassLoader$CachingLoader.load
will look for a class called "age" and a class called "16". Because the class not exists null/false are returned from the callchain.
However neither the CachingLoader, nor the Map in AbstractParser will cache the negative result. Causing this to happen for each row in my decisiontable.
And in 5.0 the whole part of the callgraph is not there.
I figured out, that in 5.0 versions, the AbstractParser never had a parse context in createPropertyToken
This might be because of the inconsistent usage of
protected static ThreadLocal<ParserContext> parserContext;
protected ParserContext pCtx;
So where does us leave this?
A possible easy solution would be to add the "negative" lookups to the CachingLoader.
However I would like to have doublechecked if the change in Abstract Parser was intentional and is now working correctly. Thus invoking the checkDynamicImports a lot is correct. Is it really the case that the parser needs to check for each literal this dynamic import thing? it obviously didnt do before.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 8 months
[JBoss JIRA] Created: (JBRULES-3005) decision table building => NPE
by Wolfgang Laun (JIRA)
decision table building => NPE
------------------------------
Key: JBRULES-3005
URL: https://issues.jboss.org/browse/JBRULES-3005
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler (expert)
Affects Versions: 5.2.0.M2
Reporter: Wolfgang Laun
Assignee: Mark Proctor
kBuilder.add( resource, resourceType.DTABLE ); results in a NPE:
Exception in thread "main" java.lang.NullPointerException
at org.drools.decisiontable.DecisionTableProviderImpl.compileStream(DecisionTableProviderImpl.java:26)
at org.drools.decisiontable.DecisionTableProviderImpl.loadFromInputStream(DecisionTableProviderImpl.java:19)
at org.drools.compiler.DecisionTableFactory.loadFromInputStream(DecisionTableFactory.java:18)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:497)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
at rss.drools.setup.Application.setup(Application.java:47)
Notice that a simple
DecisionTableConfiguration dtConf = KnowledgeBuilderFactory.newDecisionTableConfiguration();
kBuilder.add( resource, resourceType, dtConf );
is not sufficient, the DecisionTableConfiguration still needs a DecisionTableInputType
Expected. there is a reasonable default DecisionTableConfiguration with DecisionTableInputType.XLS being set.
The simple call worked fine in 5.1.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 8 months
[JBoss JIRA] Created: (AS7-1342) :test-connection-in-pool fails in a strange way
by Heiko Rupp (JIRA)
:test-connection-in-pool fails in a strange way
-----------------------------------------------
Key: AS7-1342
URL: https://issues.jboss.org/browse/AS7-1342
Project: Application Server 7
Issue Type: Bug
Components: JCA
Affects Versions: 7.0.0.Final
Reporter: Heiko Rupp
Assignee: Stefano Maestri
[11:54:03] <+pilhuhn> maeste hi
[11:54:06] <+pilhuhn> what does this mean:
[11:54:07] <+pilhuhn> [domain@localhost:9999 data-source=lalaDS] :test-connection-in-pool
[11:54:07] <+pilhuhn> {
[11:54:07] <+pilhuhn> "outcome" => "failed",
[11:54:07] <+pilhuhn> "failure-description" => "failed to invoke operation: failed to match pool. Check JndiName: lalaJNDI",
[11:54:57] <+maeste> that jndiName is not matched
[11:55:19] <+pilhuhn> matched by?
[11:55:34] <+maeste> by the runtime connection invoker
[11:55:35] <+pilhuhn> If it is invalid, creation of the datasource should have failed ?
[11:56:01] <+maeste> BTW maybe it'0s a bug when ds name and jndiName are not the same I'll check
[11:56:14] <+pilhuhn> [domain@localhost:9999 data-source=lalaDS] :read-resource
[11:56:14] <+pilhuhn> {
[11:56:14] <+pilhuhn> "outcome" => "success",
[11:56:14] <+pilhuhn> "result" => {
[11:56:14] <+pilhuhn> "background-validation" => undefined,
[11:56:14] <+pilhuhn> "background-validation-minutes" => undefined,
[11:56:14] <+pilhuhn> "blocking-timeout-wait-millis" => undefined,
[11:56:14] <+pilhuhn> "connection-url" => "jdbc:lala",
[11:56:14] <+pilhuhn> "driver-name" => "postgresql-9.0-801.jdbc4.jar",
[11:56:14] <+pilhuhn> "idle-timeout-minutes" => undefined,
[11:56:14] <+pilhuhn> "jndi-name" => "lalaJNDI",
[11:56:38] <+pilhuhn> I did define an invalid connection URL (on purpose)
[11:56:39] <+maeste> yup probably the problem is mine
[11:56:49] <+maeste> I'll have a look this afternoon
[11:57:53] ChanServ sets mode +v Jaikiran
[11:57:54] <+pilhuhn> ok
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 8 months