[JBoss JIRA] Created: (JBRULES-2955) drools-spring: exception if you define a stateful ksession after a kagent in configuration file
by Esteban Aliverti (JIRA)
drools-spring: exception if you define a stateful ksession after a kagent in configuration file
-----------------------------------------------------------------------------------------------
Key: JBRULES-2955
URL: https://issues.jboss.org/browse/JBRULES-2955
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-spring
Affects Versions: 5.2.0.M1
Reporter: Esteban Aliverti
Assignee: Esteban Aliverti
Priority: Minor
Fix For: 5.3.0.M1
An exception occurs if you define a stateful ksession AFTER a kagent in spring's config file.
The problem is that drools-spring will try to set the kagent attribute of the session. This attribute only exists for stateless ksessions.
The exception you get is:
Exception in thread "main"
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'ksession2': Error setting property values; nested exception is
org.springframework.beans.NotWritablePropertyException: Invalid property
'knowledgeAgent' of bean class
[org.drools.container.spring.beans.StatefulKnowledgeSessionBeanFactory]:
Bean property 'knowledgeAgent' is not writable or has an invalid setter
method.
--
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-2913) SingleSessionCommandService Constructor Eats an Actual / Real Exception on Rollback
by Esteban Aliverti (JIRA)
SingleSessionCommandService Constructor Eats an Actual / Real Exception on Rollback
------------------------------------------------------------------------------------
Key: JBRULES-2913
URL: https://issues.jboss.org/browse/JBRULES-2913
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 5.1.1.FINAL
Reporter: Esteban Aliverti
Assignee: Esteban Aliverti
Priority: Minor
Fix For: FUTURE
Scenario: The constructor of SingleSessionCommandService tries to persist the created SessionInfo and fails.
Problem: Because of the failure, SingleSessionCommandService tries to rollback the TX. If the rollback also fail, an exception is thrown with the cause, but the original problem (The failure on SessionInfo persistence) is swallowed.
The code of the catch section demonstrate this:
try {
this.txm.begin();
//this.appScopedEntityManager.joinTransaction();
registerRollbackSync();
jpm.getApplicationScopedPersistenceContext().persist( this.sessionInfo );
this.txm.commit();
} catch ( Exception t1 ) {
try {
this.txm.rollback();
} catch ( Throwable t2 ) {
throw new RuntimeException( "Could not commit session or rollback",
t2 );
}
throw new RuntimeException( "Could not commit session",
t1 );
}
If this.txm.rollback() fails, t1 is never logged.
A similar issue was fixed in JBRULES-2656
--
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-2960) ClassPathResource fails to get last version if the underlying ClassLoader uses a cache.
by Esteban Aliverti (JIRA)
ClassPathResource fails to get last version if the underlying ClassLoader uses a cache.
---------------------------------------------------------------------------------------
Key: JBRULES-2960
URL: https://issues.jboss.org/browse/JBRULES-2960
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core
Affects Versions: 5.2.0.M1
Reporter: Esteban Aliverti
Assignee: Esteban Aliverti
Priority: Optional
I'm deploying drools-camel-server in a Tomcat 7 container. Inside the WEB-INF/classes directory I have some DRL files that I want to use.
My knowledge-services.xml file declares the following kagent:
<drools:kagent id="kagent1" kbase="kbase1" new-instance="false">
<drools:resources>
<drools:resource type="DRL" source="classpath:simple.drl"/>
...
</drools:resources>
</drools:kagent>
When spring parses this configuration file it creates a KnowledgeAgent instance with a ChangeSet containing all the listed resources.
The next step is to start ResourceChangeNotifierService and ResourceChangeScannerService.
So far so good.
The problem:
The problem I'm having is not directly related to drools, but I think it is quite easy to provide a solution for the people that is in my same situation.
ClassPathResource is the class that represents a resource defined as "classpath:"
This class has 2 important methods:
public long getLastModified(){
return this.classLoader.getResource( this.path ).openConnection().getLastModified();
}
public InputStream getInputStream(){
return this.classLoader.getResourceAsStream( this.path );
}
The first method is used by ResourceChangeScannerService to check whether the resource has changed or not. It works fine. When the resource in the filesystem changes, the scanner detects the change without any problem.
The scanner ends up notifying the kagent about the change, and the kagent passes the Resource to an instance of KnowledgeBuilder.
An here is when things fail.
The kbuilder uses the second method of ClassPathResource (getInputStream()) to get the content of the resource. In the case of Tomcat (and probably some other environments), it seems that the classloader (Tomcat's classloader) is using a cache. So the InputStream returned doesn't reflect the current state of the resource.
Long story short: the agent is notified about a change in the resource, but the change is never applied to the kbase because the kbuilder is unable to get it
--
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: (JASSIST-142) Javassist throws a CannotCompileException on the org.codehaus.groovy.runtime.ArrayUtil class
by Robert Elliot (JIRA)
Javassist throws a CannotCompileException on the org.codehaus.groovy.runtime.ArrayUtil class
--------------------------------------------------------------------------------------------
Key: JASSIST-142
URL: https://issues.jboss.org/browse/JASSIST-142
Project: Javassist
Issue Type: Bug
Affects Versions: 3.14.0.GA
Environment: N/A
Reporter: Robert Elliot
Assignee: Shigeru Chiba
With Groovy 1.7.5 on the classpath the following snippet throws a CannotCompileException:
{noformat}ClassPool classPool = new ClassPool();
classPool.appendSystemPath();
CtClass ctClass = classPool.get("org.codehaus.groovy.runtime.ArrayUtil");
ctClass.toBytecode();{noformat}
This is currently preventing me using PowerMock in a test case written in Groovy, which seems a shame. It appears to be due to an artificial limit imposed in ClassPoolTail.copyStream(InputStream, OutputStream).
--
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-2872) NPE in AbstractCompositeRestriction when using unbound variables
by Wolfgang Laun (JIRA)
NPE in AbstractCompositeRestriction when using unbound variables
----------------------------------------------------------------
Key: JBRULES-2872
URL: https://issues.jboss.org/browse/JBRULES-2872
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-compiler
Affects Versions: 5.1.1.FINAL
Reporter: Wolfgang Laun
Assignee: Mark Proctor
This occurs with a pattern such as
Cell( rowNo == $rano || == $rbno, colNo != $c1no && != $c2no, free contains $i )
where one or more of the bound variables $* are not bound in previous patterns.
Exception in thread "main" java.lang.NullPointerException
at org.drools.rule.AbstractCompositeRestriction.getRequiredDeclarations(AbstractCompositeRestriction.java:59)
at org.drools.rule.MultiRestrictionFieldConstraint.getRequiredDeclarations(MultiRestrictionFieldConstraint.java:73)
at org.drools.rule.Pattern.setConstraintType(Pattern.java:358)
at org.drools.rule.Pattern.addConstraint(Pattern.java:226)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:432)
at org.drools.rule.builder.PatternBuilder.buildConstraint(PatternBuilder.java:264)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:213)
at org.drools.rule.builder.PatternBuilder.build(PatternBuilder.java:108)
at org.drools.rule.builder.GroupElementBuilder.build(GroupElementBuilder.java:69)
at org.drools.rule.builder.RuleBuilder.build(RuleBuilder.java:78)
at org.drools.compiler.PackageBuilder.addRule(PackageBuilder.java:1203)
at org.drools.compiler.PackageBuilder.addPackage(PackageBuilder.java:629)
at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:278)
at org.drools.compiler.PackageBuilder.addKnowledgeResource(PackageBuilder.java:451)
at org.drools.builder.impl.KnowledgeBuilderImpl.add(KnowledgeBuilderImpl.java:28)
at org.drools.examples.sudoku.rules.DroolsUtil.readKnowledgeBase(DroolsUtil.java:33)
at org.drools.examples.sudoku.Main.<init>(Main.java:87)
at org.drools.examples.sudoku.Main.main(Main.java:68)
--
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-2993) Metadata escapes
by Tomáš Schlosser (JIRA)
Metadata escapes
----------------
Key: JBRULES-2993
URL: https://issues.jboss.org/browse/JBRULES-2993
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Reporter: Tomáš Schlosser
Assignee: Mark Proctor
Fix For: 5.2.0.M1
I have a rule:
package org.jboss.qa.drools.bugfixes
rule "hello world"
@output("\"Hello world!\"")
when
then
System.out.println("Hello world!");
end
And a piece of code:
System.out.println(getKnowledgeBase().getRule("org.jboss.qa.drools.bugfixes", "hello world").getMetaData().get("output"));
and the result is:
""Hello world!""
while I expect:
"Hello world!"
--
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-928) integrate hibernate-envers
by Strong Liu (JIRA)
integrate hibernate-envers
--------------------------
Key: AS7-928
URL: https://issues.jboss.org/browse/AS7-928
Project: Application Server 7
Issue Type: Feature Request
Components: JPA / Hibernate
Reporter: Strong Liu
Fix For: 7.0.0.CR1
hibernate-envers now is part of hibernate-core, which provides auditing/versioning function for entities.
it is well used by the hibernate community, so AS 7 should (consider) integrate it.
thanks to org.hibernate.integrator.spi.Integrator, envers can be automatic enabled if the user's application has @Audit annotation and envers jar is on the classpath with hibernate-core. (which also means application classloader needs to see envers class)
p.s. i'm setting the fix version to 7.0.0.CR1 here, just because i'd really like it goes into this release, and i would like help as much as i can to make it happen, but feel free to remove it if this can't happen :)
--
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-1341) Link to console on startup page fails when running in EC2/limited network with any-address
by Max Rydahl Andersen (JIRA)
Link to console on startup page fails when running in EC2/limited network with any-address
------------------------------------------------------------------------------------------
Key: AS7-1341
URL: https://issues.jboss.org/browse/AS7-1341
Project: Application Server 7
Issue Type: Bug
Reporter: Max Rydahl Andersen
Not sure if this is supposed to work but seems it could be detected and then handled better.
Started AS7 on an EC2 instance with:
<interfaces>
<interface name="management">
<any-address/>
</interface>
<interface name="public">
<any-address/>
</interface>
</interfaces>
to have it actually be available from the outside.
Then going to http://<echostname>:8080 the http://<echohostname>:8080/console link on the frontpage redirects to http://0.0.0.0:9990/console
which doesn't resolve to anything anywhere ;)
I would expect an error page as when the management console is not available at all or at least use the same url as the incoming request.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 8 months