[JBoss JIRA] (AS7-5663) CLONE - System properties are currently unusable for setting a connector's proxy-name
by Tomaz Cerar (JIRA)
[ https://issues.jboss.org/browse/AS7-5663?page=com.atlassian.jira.plugin.s... ]
Tomaz Cerar moved JBPAPP-10061 to AS7-5663:
-------------------------------------------
Project: Application Server 7 (was: JBoss Enterprise Application Platform)
Key: AS7-5663 (was: JBPAPP-10061)
Workflow: GIT Pull Request workflow (was: jira)
Affects Version/s: 7.1.1.Final
(was: EAP 6.0.0)
Component/s: Domain Management
Web
(was: Web)
Security: (was: Public)
Docs QE Status: (was: NEW)
> CLONE - System properties are currently unusable for setting a connector's proxy-name
> -------------------------------------------------------------------------------------
>
> Key: AS7-5663
> URL: https://issues.jboss.org/browse/AS7-5663
> Project: Application Server 7
> Issue Type: Enhancement
> Components: Domain Management, Web
> Affects Versions: 7.1.1.Final
> Environment: -JBoss Enterprise Application Platform (EAP) 6.0.0
> Reporter: Aaron Ogburn
> Assignee: Tomaz Cerar
>
> A connector's proxy-name cannot be set through system properties currently in the web subsystem:
> ==domain.xml==
> <subsystem xmlns="urn:jbossomain:web:1.1" default-virtual-server="default-host" instance-id="${jboss.node.name}"
> native="false">
> <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" proxy-name="${jboss.proxy.name}"/>
> The property is never parsed though and
> request.getServerName() just returns ${jboss.node.name}.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] (AS7-5661) CLONE - Absolute path in attribute "path" in paging-directory, bindings-directory, journal-directory and large-messages-directory elements is always taken as relative path
by Miroslav Novak (JIRA)
[ https://issues.jboss.org/browse/AS7-5661?page=com.atlassian.jira.plugin.s... ]
Miroslav Novak commented on AS7-5661:
-------------------------------------
You're right. Somehow I missed it when I was looking for it.
Thanks,
Jeff
> CLONE - Absolute path in attribute "path" in paging-directory, bindings-directory, journal-directory and large-messages-directory elements is always taken as relative path
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AS7-5661
> URL: https://issues.jboss.org/browse/AS7-5661
> Project: Application Server 7
> Issue Type: Bug
> Components: JMS
> Affects Versions: 7.1.3.Final (EAP)
> Reporter: Miroslav Novak
> Assignee: Jeff Mesnil
> Fix For: 7.1.4.Final (EAP)
>
>
> When HornetQ journal is specified using absolute paths then it's treated as relative path:
> {code}
> <hornetq-server>
> ...
> <paging-directory path="/home/jbossqa/hornetq_eap6_testsuite/journal_A/paging"/>
> <bindings-directory path="/home/jbossqa/hornetq_eap6_testsuite/journal_A/bindings"/>
> <journal-directory path="/home/jbossqa/hornetq_eap6_testsuite/journal_A/journal"/>
> <large-messages-directory path="/home/jbossqa/hornetq_eap6_testsuite/journal_A/large-messages"/>
> ...
> </hornetq-server>
> {code}
> Server log:
> {code}
> 15:29:07,418 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-7) live server is starting with configuration HornetQ Configuration (clustered=true,backup=false,sharedStore=true,journalDirectory=/home/jbossqa/hornetq_eap6_testsuite/server1/jboss-eap-6.0/standalone/data//home/jbossqa/hornetq_eap6_testsuite/journal_A/journal,bindingsDirectory=/home/jbossqa/hornetq_eap6_testsuite/server1/jboss-eap-6.0/standalone/data//home/jbossqa/hornetq_eap6_testsuite/journal_A/bindings,largeMessagesDirectory=/home/jbossqa/hornetq_eap6_testsuite/server1/jboss-eap-6.0/standalone/data//home/jbossqa/hornetq_eap6_testsuite/journal_A/large-messages,pagingDirectory=/home/jbossqa/hornetq_eap6_testsuite/server1/jboss-eap-6.0/standalone/data//home/jbossqa/hornetq_eap6_testsuite/journal_A/paging)
> {code}
> Definition of "directoryType" from jboss-as-messaging_1_2.xsd:
> {code}
> <xs:complexType name="directoryType">
> <xs:annotation>
> <xs:documentation>
> <![CDATA[
> A directory location configuration.
> The "path" attribute denotes a relative or absolute filesystem pathname where the directory should be
> located.
> The "relative-to" attribute references a global path configuration in the domain model, defaulting
> to the JBoss Application Server data directory (jboss.server.data.dir). If the value of the "path" attribute
> does not specify an absolute pathname, it will treated as relative to this path.
> ]]>
> </xs:documentation>
> </xs:annotation>
> <xs:attribute name="relative-to" type="xs:string" default="jboss.server.data.dir" />
> <xs:attribute name="path" type="xs:string" />
> </xs:complexType>
> {code}
> It seems that detection that given string in path attribute is absolute path is not correct.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] (AS7-5661) CLONE - Absolute path in attribute "path" in paging-directory, bindings-directory, journal-directory and large-messages-directory elements is always taken as relative path
by Jeff Mesnil (JIRA)
[ https://issues.jboss.org/browse/AS7-5661?page=com.atlassian.jira.plugin.s... ]
Jeff Mesnil resolved AS7-5661.
------------------------------
Resolution: Duplicate Issue
this issue has been fixed in AS7-5600
> CLONE - Absolute path in attribute "path" in paging-directory, bindings-directory, journal-directory and large-messages-directory elements is always taken as relative path
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AS7-5661
> URL: https://issues.jboss.org/browse/AS7-5661
> Project: Application Server 7
> Issue Type: Bug
> Components: JMS
> Affects Versions: 7.1.3.Final (EAP)
> Reporter: Miroslav Novak
> Assignee: Jeff Mesnil
> Fix For: 7.1.4.Final (EAP)
>
>
> When HornetQ journal is specified using absolute paths then it's treated as relative path:
> {code}
> <hornetq-server>
> ...
> <paging-directory path="/home/jbossqa/hornetq_eap6_testsuite/journal_A/paging"/>
> <bindings-directory path="/home/jbossqa/hornetq_eap6_testsuite/journal_A/bindings"/>
> <journal-directory path="/home/jbossqa/hornetq_eap6_testsuite/journal_A/journal"/>
> <large-messages-directory path="/home/jbossqa/hornetq_eap6_testsuite/journal_A/large-messages"/>
> ...
> </hornetq-server>
> {code}
> Server log:
> {code}
> 15:29:07,418 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-7) live server is starting with configuration HornetQ Configuration (clustered=true,backup=false,sharedStore=true,journalDirectory=/home/jbossqa/hornetq_eap6_testsuite/server1/jboss-eap-6.0/standalone/data//home/jbossqa/hornetq_eap6_testsuite/journal_A/journal,bindingsDirectory=/home/jbossqa/hornetq_eap6_testsuite/server1/jboss-eap-6.0/standalone/data//home/jbossqa/hornetq_eap6_testsuite/journal_A/bindings,largeMessagesDirectory=/home/jbossqa/hornetq_eap6_testsuite/server1/jboss-eap-6.0/standalone/data//home/jbossqa/hornetq_eap6_testsuite/journal_A/large-messages,pagingDirectory=/home/jbossqa/hornetq_eap6_testsuite/server1/jboss-eap-6.0/standalone/data//home/jbossqa/hornetq_eap6_testsuite/journal_A/paging)
> {code}
> Definition of "directoryType" from jboss-as-messaging_1_2.xsd:
> {code}
> <xs:complexType name="directoryType">
> <xs:annotation>
> <xs:documentation>
> <![CDATA[
> A directory location configuration.
> The "path" attribute denotes a relative or absolute filesystem pathname where the directory should be
> located.
> The "relative-to" attribute references a global path configuration in the domain model, defaulting
> to the JBoss Application Server data directory (jboss.server.data.dir). If the value of the "path" attribute
> does not specify an absolute pathname, it will treated as relative to this path.
> ]]>
> </xs:documentation>
> </xs:annotation>
> <xs:attribute name="relative-to" type="xs:string" default="jboss.server.data.dir" />
> <xs:attribute name="path" type="xs:string" />
> </xs:complexType>
> {code}
> It seems that detection that given string in path attribute is absolute path is not correct.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] (AS7-5661) CLONE - Absolute path in attribute "path" in paging-directory, bindings-directory, journal-directory and large-messages-directory elements is always taken as relative path
by Miroslav Novak (JIRA)
[ https://issues.jboss.org/browse/AS7-5661?page=com.atlassian.jira.plugin.s... ]
Miroslav Novak reassigned AS7-5661:
-----------------------------------
Assignee: Jeff Mesnil (was: Clebert Suconic)
> CLONE - Absolute path in attribute "path" in paging-directory, bindings-directory, journal-directory and large-messages-directory elements is always taken as relative path
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AS7-5661
> URL: https://issues.jboss.org/browse/AS7-5661
> Project: Application Server 7
> Issue Type: Bug
> Components: JMS
> Affects Versions: 7.1.3.Final (EAP)
> Reporter: Miroslav Novak
> Assignee: Jeff Mesnil
> Fix For: 7.1.4.Final (EAP)
>
>
> When HornetQ journal is specified using absolute paths then it's treated as relative path:
> {code}
> <hornetq-server>
> ...
> <paging-directory path="/home/jbossqa/hornetq_eap6_testsuite/journal_A/paging"/>
> <bindings-directory path="/home/jbossqa/hornetq_eap6_testsuite/journal_A/bindings"/>
> <journal-directory path="/home/jbossqa/hornetq_eap6_testsuite/journal_A/journal"/>
> <large-messages-directory path="/home/jbossqa/hornetq_eap6_testsuite/journal_A/large-messages"/>
> ...
> </hornetq-server>
> {code}
> Server log:
> {code}
> 15:29:07,418 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-7) live server is starting with configuration HornetQ Configuration (clustered=true,backup=false,sharedStore=true,journalDirectory=/home/jbossqa/hornetq_eap6_testsuite/server1/jboss-eap-6.0/standalone/data//home/jbossqa/hornetq_eap6_testsuite/journal_A/journal,bindingsDirectory=/home/jbossqa/hornetq_eap6_testsuite/server1/jboss-eap-6.0/standalone/data//home/jbossqa/hornetq_eap6_testsuite/journal_A/bindings,largeMessagesDirectory=/home/jbossqa/hornetq_eap6_testsuite/server1/jboss-eap-6.0/standalone/data//home/jbossqa/hornetq_eap6_testsuite/journal_A/large-messages,pagingDirectory=/home/jbossqa/hornetq_eap6_testsuite/server1/jboss-eap-6.0/standalone/data//home/jbossqa/hornetq_eap6_testsuite/journal_A/paging)
> {code}
> Definition of "directoryType" from jboss-as-messaging_1_2.xsd:
> {code}
> <xs:complexType name="directoryType">
> <xs:annotation>
> <xs:documentation>
> <![CDATA[
> A directory location configuration.
> The "path" attribute denotes a relative or absolute filesystem pathname where the directory should be
> located.
> The "relative-to" attribute references a global path configuration in the domain model, defaulting
> to the JBoss Application Server data directory (jboss.server.data.dir). If the value of the "path" attribute
> does not specify an absolute pathname, it will treated as relative to this path.
> ]]>
> </xs:documentation>
> </xs:annotation>
> <xs:attribute name="relative-to" type="xs:string" default="jboss.server.data.dir" />
> <xs:attribute name="path" type="xs:string" />
> </xs:complexType>
> {code}
> It seems that detection that given string in path attribute is absolute path is not correct.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] (AS7-5661) CLONE - Absolute path in attribute "path" in paging-directory, bindings-directory, journal-directory and large-messages-directory elements is always taken as relative path
by Miroslav Novak (JIRA)
[ https://issues.jboss.org/browse/AS7-5661?page=com.atlassian.jira.plugin.s... ]
Miroslav Novak updated AS7-5661:
--------------------------------
Component/s: JMS
> CLONE - Absolute path in attribute "path" in paging-directory, bindings-directory, journal-directory and large-messages-directory elements is always taken as relative path
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AS7-5661
> URL: https://issues.jboss.org/browse/AS7-5661
> Project: Application Server 7
> Issue Type: Bug
> Components: JMS
> Affects Versions: 7.1.3.Final (EAP)
> Reporter: Miroslav Novak
> Assignee: Clebert Suconic
> Fix For: 7.1.4.Final (EAP)
>
>
> When HornetQ journal is specified using absolute paths then it's treated as relative path:
> {code}
> <hornetq-server>
> ...
> <paging-directory path="/home/jbossqa/hornetq_eap6_testsuite/journal_A/paging"/>
> <bindings-directory path="/home/jbossqa/hornetq_eap6_testsuite/journal_A/bindings"/>
> <journal-directory path="/home/jbossqa/hornetq_eap6_testsuite/journal_A/journal"/>
> <large-messages-directory path="/home/jbossqa/hornetq_eap6_testsuite/journal_A/large-messages"/>
> ...
> </hornetq-server>
> {code}
> Server log:
> {code}
> 15:29:07,418 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-7) live server is starting with configuration HornetQ Configuration (clustered=true,backup=false,sharedStore=true,journalDirectory=/home/jbossqa/hornetq_eap6_testsuite/server1/jboss-eap-6.0/standalone/data//home/jbossqa/hornetq_eap6_testsuite/journal_A/journal,bindingsDirectory=/home/jbossqa/hornetq_eap6_testsuite/server1/jboss-eap-6.0/standalone/data//home/jbossqa/hornetq_eap6_testsuite/journal_A/bindings,largeMessagesDirectory=/home/jbossqa/hornetq_eap6_testsuite/server1/jboss-eap-6.0/standalone/data//home/jbossqa/hornetq_eap6_testsuite/journal_A/large-messages,pagingDirectory=/home/jbossqa/hornetq_eap6_testsuite/server1/jboss-eap-6.0/standalone/data//home/jbossqa/hornetq_eap6_testsuite/journal_A/paging)
> {code}
> Definition of "directoryType" from jboss-as-messaging_1_2.xsd:
> {code}
> <xs:complexType name="directoryType">
> <xs:annotation>
> <xs:documentation>
> <![CDATA[
> A directory location configuration.
> The "path" attribute denotes a relative or absolute filesystem pathname where the directory should be
> located.
> The "relative-to" attribute references a global path configuration in the domain model, defaulting
> to the JBoss Application Server data directory (jboss.server.data.dir). If the value of the "path" attribute
> does not specify an absolute pathname, it will treated as relative to this path.
> ]]>
> </xs:documentation>
> </xs:annotation>
> <xs:attribute name="relative-to" type="xs:string" default="jboss.server.data.dir" />
> <xs:attribute name="path" type="xs:string" />
> </xs:complexType>
> {code}
> It seems that detection that given string in path attribute is absolute path is not correct.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] (AS7-5661) CLONE - Absolute path in attribute "path" in paging-directory, bindings-directory, journal-directory and large-messages-directory elements is always taken as relative path
by Miroslav Novak (JIRA)
[ https://issues.jboss.org/browse/AS7-5661?page=com.atlassian.jira.plugin.s... ]
Miroslav Novak moved JBPAPP-10058 to AS7-5661:
----------------------------------------------
Project: Application Server 7 (was: JBoss Enterprise Application Platform)
Key: AS7-5661 (was: JBPAPP-10058)
Workflow: GIT Pull Request workflow (was: jira)
Affects Version/s: 7.1.3.Final (EAP)
(was: EAP 6.0.1 ER 2)
Release Notes Docs Status: (was: Not Required)
Component/s: (was: HornetQ)
Security: (was: Public)
Fix Version/s: 7.1.4.Final (EAP)
(was: EAP 6.0.1 ER 3)
> CLONE - Absolute path in attribute "path" in paging-directory, bindings-directory, journal-directory and large-messages-directory elements is always taken as relative path
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: AS7-5661
> URL: https://issues.jboss.org/browse/AS7-5661
> Project: Application Server 7
> Issue Type: Bug
> Affects Versions: 7.1.3.Final (EAP)
> Reporter: Miroslav Novak
> Assignee: Clebert Suconic
> Fix For: 7.1.4.Final (EAP)
>
>
> When HornetQ journal is specified using absolute paths then it's treated as relative path:
> {code}
> <hornetq-server>
> ...
> <paging-directory path="/home/jbossqa/hornetq_eap6_testsuite/journal_A/paging"/>
> <bindings-directory path="/home/jbossqa/hornetq_eap6_testsuite/journal_A/bindings"/>
> <journal-directory path="/home/jbossqa/hornetq_eap6_testsuite/journal_A/journal"/>
> <large-messages-directory path="/home/jbossqa/hornetq_eap6_testsuite/journal_A/large-messages"/>
> ...
> </hornetq-server>
> {code}
> Server log:
> {code}
> 15:29:07,418 INFO [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-7) live server is starting with configuration HornetQ Configuration (clustered=true,backup=false,sharedStore=true,journalDirectory=/home/jbossqa/hornetq_eap6_testsuite/server1/jboss-eap-6.0/standalone/data//home/jbossqa/hornetq_eap6_testsuite/journal_A/journal,bindingsDirectory=/home/jbossqa/hornetq_eap6_testsuite/server1/jboss-eap-6.0/standalone/data//home/jbossqa/hornetq_eap6_testsuite/journal_A/bindings,largeMessagesDirectory=/home/jbossqa/hornetq_eap6_testsuite/server1/jboss-eap-6.0/standalone/data//home/jbossqa/hornetq_eap6_testsuite/journal_A/large-messages,pagingDirectory=/home/jbossqa/hornetq_eap6_testsuite/server1/jboss-eap-6.0/standalone/data//home/jbossqa/hornetq_eap6_testsuite/journal_A/paging)
> {code}
> Definition of "directoryType" from jboss-as-messaging_1_2.xsd:
> {code}
> <xs:complexType name="directoryType">
> <xs:annotation>
> <xs:documentation>
> <![CDATA[
> A directory location configuration.
> The "path" attribute denotes a relative or absolute filesystem pathname where the directory should be
> located.
> The "relative-to" attribute references a global path configuration in the domain model, defaulting
> to the JBoss Application Server data directory (jboss.server.data.dir). If the value of the "path" attribute
> does not specify an absolute pathname, it will treated as relative to this path.
> ]]>
> </xs:documentation>
> </xs:annotation>
> <xs:attribute name="relative-to" type="xs:string" default="jboss.server.data.dir" />
> <xs:attribute name="path" type="xs:string" />
> </xs:complexType>
> {code}
> It seems that detection that given string in path attribute is absolute path is not correct.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] (AS7-4654) vault.sh/vauld.bat should provide a sriptable mode
by Tom Fonteyne (JIRA)
Tom Fonteyne created AS7-4654:
---------------------------------
Summary: vault.sh/vauld.bat should provide a sriptable mode
Key: AS7-4654
URL: https://issues.jboss.org/browse/AS7-4654
Project: Application Server 7
Issue Type: Feature Request
Components: Security
Affects Versions: 7.1.1.Final
Reporter: Tom Fonteyne
Assignee: Anil Saldhana
Currently the vault.sh / vault.bat script can only be run in interactive mode.
We tried scripting vault.sh by redirecting stdin, but that fails due to it using the Java Console class.
This RFE is to add a non-interactive mode, e.g. be able to invoke the vault script with all parameters passed on the command line.
We realise this would expose passwords in plain text, but it is the intention to be able to run this on a private machine and copy the result to the actual deployment box.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] (AS7-5660) Internal/Redundant information stored in Domain Model
by Thomas Diesler (JIRA)
Thomas Diesler created AS7-5660:
-----------------------------------
Summary: Internal/Redundant information stored in Domain Model
Key: AS7-5660
URL: https://issues.jboss.org/browse/AS7-5660
Project: Application Server 7
Issue Type: Feature Request
Components: ConfigAdmin
Reporter: Thomas Diesler
Assignee: David Bosschaert
Fix For: 7.2.0.Alpha1
Only property 'foo' should show up in the model. Property service.pid is redundant, service.bundleLocation,.org.jboss.source is for internal use only and should not survive shutdown
{code}
<configuration pid="org.jboss.as.test.integration.osgi.api.ConfiguredService">
<property name="service.pid" value="org.jboss.as.test.integration.osgi.api.ConfiguredService"/>
<property name="service.bundleLocation" value="config-admin-bundle-a"/>
<property name="foo" value="bar"/>
<property name=".org.jboss.source" value="notfromdmr"/>
</configuration>
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 2 months
[JBoss JIRA] (JBRULES-3617) NullpointerException in Accumulate when use query
by Yingzhi Wang (JIRA)
Yingzhi Wang created JBRULES-3617:
-------------------------------------
Summary: NullpointerException in Accumulate when use query
Key: JBRULES-3617
URL: https://issues.jboss.org/browse/JBRULES-3617
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.4.0.Final
Environment: OS: Windows xp
IDE: Eclipse
JRE: 1.6
Reporter: Yingzhi Wang
Assignee: Mark Proctor
Priority: Minor
FACT: Person
package test;
public class Persion {
private String firstname;
private String secondname;
private String address;
public Persion() {
}
public String getFirstname() {
return firstname;
}
public void setFirstname(String firstname) {
this.firstname = firstname;
}
public String getSecondname() {
return secondname;
}
public void setSecondname(String secondname) {
this.secondname = secondname;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
}
r1.drl:
package test1
import test.Persion
import java.util.HashSet
query find(String $first, String $second)
p: Persion(firstname == "111", secondname==$second)
end
rule "test"
no-loop true
when
$list: HashSet( size >= 0 )
from accumulate (
Persion($addr: address, firstname=="Tom", secondname=="Cat"),
init ( HashSet set = new HashSet(); ),
action ( set.add($addr); ),
reverse ( set.remove($addr); ),
result(set) )
then
System.out.println("It' OK~!");
end
Test.java
package test;
import java.util.Collection;
import org.drools.KnowledgeBase;
import org.drools.KnowledgeBaseFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderError;
import org.drools.builder.KnowledgeBuilderErrors;
import org.drools.builder.KnowledgeBuilderFactory;
import org.drools.builder.ResourceType;
import org.drools.definition.KnowledgePackage;
import org.drools.io.ResourceFactory;
import org.drools.runtime.StatefulKnowledgeSession;
import org.drools.runtime.rule.FactHandle;
public class Test {
public static void main(String[] args) throws Exception {
new Test().test();
}
public void test() throws Exception {
KnowledgeBase base = KnowledgeBaseFactory.newKnowledgeBase();
StatefulKnowledgeSession s = base.newStatefulKnowledgeSession();
new Th(s).start();
Thread.sleep(2000);
KnowledgeBuilder builder = KnowledgeBuilderFactory.newKnowledgeBuilder();
builder.add(ResourceFactory.newClassPathResource("r1.drl", getClass()), ResourceType.DRL);
KnowledgeBuilderErrors errs = builder.getErrors();
if (!errs.isEmpty()) {
for (KnowledgeBuilderError e: errs) {
System.out.println(e.toString());
}
}
Collection<KnowledgePackage> col = builder.getKnowledgePackages();
base.addKnowledgePackages(col);
}
class Th extends Thread {
StatefulKnowledgeSession s;
public Th(StatefulKnowledgeSession s) {
this.s = s;
}
public void run() {
Persion p = new Persion();
p.setFirstname("Tom");
p.setSecondname("Cat");
p.setAddress("Mars");
FactHandle fact = s.insert(p);
int i=0;
while (true) {
s.update(fact, p);
s.fireAllRules();
try {
Thread.sleep(1000);
} catch (InterruptedException e) {}
i++;
}
}
}
}
Run Test.java, will throws Exception:
Exception in thread "Thread-0" org.drools.RuntimeDroolsException: java.lang.NullPointerException
at org.drools.rule.Accumulate.reverse(Accumulate.java:212)
at org.drools.reteoo.AccumulateNode.removeMatch(AccumulateNode.java:902)
at org.drools.reteoo.AccumulateNode.modifyRightTuple(AccumulateNode.java:537)
at org.drools.reteoo.BetaNode.modifyObject(BetaNode.java:531)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateModifyObject(SingleObjectSinkAdapter.java:68)
at org.drools.reteoo.AlphaNode.modifyObject(AlphaNode.java:157)
at org.drools.reteoo.SingleObjectSinkAdapter.propagateModifyObject(SingleObjectSinkAdapter.java:68)
at org.drools.reteoo.AlphaNode.modifyObject(AlphaNode.java:157)
at org.drools.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:507)
at org.drools.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:421)
at org.drools.reteoo.ObjectTypeNode.modifyObject(ObjectTypeNode.java:314)
at org.drools.reteoo.EntryPointNode.modifyObject(EntryPointNode.java:265)
at org.drools.common.NamedEntryPoint.update(NamedEntryPoint.java:470)
at org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:960)
at org.drools.common.AbstractWorkingMemory.update(AbstractWorkingMemory.java:933)
at org.drools.impl.StatefulKnowledgeSessionImpl.update(StatefulKnowledgeSessionImpl.java:284)
at test.Test$Th.run(Test.java:53)
Caused by: java.lang.NullPointerException
at test1.Rule_test_b59970efe0844a8d8797758b863454b1$Accumulate0.reverse(Rule_test_b59970efe0844a8d8797758b863454b1.java:52)
at test1.Rule_test_b59970efe0844a8d8797758b863454b1Accumulate0Invoker.reverse(Rule_test_b59970efe0844a8d8797758b863454b1Accumulate0Invoker.java:69)
at org.drools.rule.Accumulate.reverse(Accumulate.java:203)
... 16 more
But, if I change the query to like this:
query find(String $first, String $second)
p: Persion(firstname == "111", secondname==$second)
end
It will be ok.
However if I change the query to like this:
query find(String $first, String $second)
p: Persion(firstname == "Tom", secondname==$second)
end
It will throws Exception again.
firstname=="Tom" is a condition of rule "test"
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 3 months