[JBoss JIRA] (DROOLS-1414) OOPath constraint bug3
by Tibor Zimányi (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1414?page=com.atlassian.jira.plugi... ]
Tibor Zimányi updated DROOLS-1414:
----------------------------------
Labels: oopath (was: )
> OOPath constraint bug3
> ----------------------
>
> Key: DROOLS-1414
> URL: https://issues.jboss.org/browse/DROOLS-1414
> Project: Drools
> Issue Type: Sub-task
> Reporter: Matteo Mortari
> Assignee: Mario Fusco
> Labels: oopath
>
> {code:java}
> @Test
> public void testWronglyMatchAlsoEqualsTris() {
> String drl =
> "import org.drools.compiler.xpath.*;\n" +
> "global java.util.Set duplicateNames; \n" +
> "\n" +
> "rule DIFF_FILES_BUT_WITH_SAME_FILENAME when\n" +
> " $ic1 : TMFileWithParentObj( parent instanceof TMFileSet ,\n" +
> " $curName : name,\n" +
> " $ic2: /parent{#TMFileSet}/files{name == $curName, this != $ic1 } )\n" +
> "then\n" +
> " System.out.println( $ic1 + \" \" + $ic2 );\n" +
> " duplicateNames.add( $ic1.getName() );\n" +
> "end\n";
> KieSession ksession = new KieHelper().addContent( drl, ResourceType.DRL )
> .build()
> .newKieSession();
>
> Set duplicateNames = new HashSet();
> ksession.setGlobal("duplicateNames", duplicateNames);
>
> TMFileSet x = new TMFileSet("X");
> TMFileWithParentObj file0 = new TMFileWithParentObj(0, "File0", 47, x);
> TMFileWithParentObj file1 = new TMFileWithParentObj(1, "File1", 47, x);
> TMFileWithParentObj file2 = new TMFileWithParentObj(2, "File0", 47, x);
> x.getFiles().addAll(Arrays.asList(new TMFile[]{file0, file1, file2}));
>
> ksession.insert( x );
> ksession.insert( file0 );
> ksession.insert( file1 );
> ksession.insert( file2 );
> ksession.fireAllRules();
>
> assertTrue( duplicateNames.contains("File0") );
> assertFalse( duplicateNames.contains("File1") );
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months
[JBoss JIRA] (DROOLS-1451) NPE when building KieBase with OOPath in a declared window
by Tibor Zimányi (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1451?page=com.atlassian.jira.plugi... ]
Tibor Zimányi updated DROOLS-1451:
----------------------------------
Labels: oopath (was: )
> NPE when building KieBase with OOPath in a declared window
> ----------------------------------------------------------
>
> Key: DROOLS-1451
> URL: https://issues.jboss.org/browse/DROOLS-1451
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.0.0.Beta6
> Environment: Reproducible with 7.0.0-SNAPSHOT.
> Reporter: Marek Winkler
> Assignee: Mario Fusco
> Labels: oopath
> Fix For: 7.0.0.Beta7
>
> Attachments: oopath-cep-stacktrace.txt
>
>
> When using an OOPath expression in a declared window (does not matter if a length or a time window), a NPE is thrown. For instance, a rule such as:
> {code}
> declare window Pings
> MessageEvent( /msg{ message == 'Ping' } ) over window:length( 2 )
> end
> rule R when
> $messageEvent: MessageEvent() from window Pings
> then
> events.add( $messageEvent );
> end
> {code}
> produces the following exception (see the attachment for the full stacktrace) when building the KieBase:
> {code}
> java.lang.NullPointerException
> at org.drools.core.reteoo.builder.WindowReferenceBuilder.build(WindowReferenceBuilder.java:40)
> at org.drools.core.reteoo.builder.PatternBuilder.attachPattern(PatternBuilder.java:116)
> at org.drools.core.reteoo.builder.PatternBuilder.build(PatternBuilder.java:77)
> at org.drools.core.reteoo.builder.GroupElementBuilder$AndBuilder.build(GroupElementBuilder.java:108)
> at org.drools.core.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:68)
> at org.drools.core.reteoo.builder.ReteooRuleBuilder.addSubRule(ReteooRuleBuilder.java:164)
> at org.drools.core.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:136)
> at org.drools.core.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:110)
> ...
> at org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:630)
> ...
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months
[JBoss JIRA] (DROOLS-1415) OOPath constraint bug4
by Tibor Zimányi (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1415?page=com.atlassian.jira.plugi... ]
Tibor Zimányi updated DROOLS-1415:
----------------------------------
Labels: oopath (was: )
> OOPath constraint bug4
> ----------------------
>
> Key: DROOLS-1415
> URL: https://issues.jboss.org/browse/DROOLS-1415
> Project: Drools
> Issue Type: Sub-task
> Reporter: Matteo Mortari
> Assignee: Mario Fusco
> Labels: oopath
> Fix For: 7.0.0.Beta7
>
>
> {code:java}
> public static class TMFileSetQuater extends AbstractReactiveObject {
> private final String name;
> private final Set<TMFileWithParentObj> members = new ReactiveSet<TMFileWithParentObj>();
> public TMFileSetQuater(String name) {
> this.name = name;
> }
> public String getName() {
> return name;
> }
> public Set<TMFileWithParentObj> getFiles() {
> return members;
> }
> }
>
> @Test
> public void testWronglyMatchAlsoEqualsQuater() {
> String drl =
> "import org.drools.compiler.xpath.*;\n" +
> "import "+TMFileSetQuater.class.getCanonicalName()+";\n" +
> "global java.util.Set duplicateNames; \n" +
> "\n" +
> "rule DIFF_FILES_BUT_WITH_SAME_FILENAME when\n" +
> " $ic1 : TMFileWithParentObj( parent instanceof TMFileSetQuater ,\n" +
> " $curName : name, $curId : id, \n" +
> " $ic2: /parent{#TMFileSetQuater}/files{name == $curName, id != $curId } )\n" +
> "then\n" +
> " System.out.println( $ic1 + \" \" + $ic2 );\n" +
> " duplicateNames.add( $ic1.getName() );\n" +
> "end\n";
> KieSession ksession = new KieHelper().addContent( drl, ResourceType.DRL )
> .build()
> .newKieSession();
>
> Set duplicateNames = new HashSet();
> ksession.setGlobal("duplicateNames", duplicateNames);
>
> TMFileSetQuater x = new TMFileSetQuater("X");
> TMFileWithParentObj file0 = new TMFileWithParentObj(0, "File0", 47, x);
> TMFileWithParentObj file1 = new TMFileWithParentObj(1, "File1", 47, x);
> TMFileWithParentObj file2 = new TMFileWithParentObj(2, "File0", 47, x);
> x.getFiles().addAll(Arrays.asList(new TMFileWithParentObj[]{file0, file1, file2}));
>
> ksession.insert( x );
> ksession.insert( file0 );
> ksession.insert( file1 );
> ksession.insert( file2 );
> ksession.fireAllRules();
>
> assertTrue( duplicateNames.contains("File0") );
> assertFalse( duplicateNames.contains("File1") );
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months
[JBoss JIRA] (DROOLS-1468) Support OOPath in accumulate functions
by Tibor Zimányi (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1468?page=com.atlassian.jira.plugi... ]
Tibor Zimányi updated DROOLS-1468:
----------------------------------
Labels: oopath (was: )
> Support OOPath in accumulate functions
> --------------------------------------
>
> Key: DROOLS-1468
> URL: https://issues.jboss.org/browse/DROOLS-1468
> Project: Drools
> Issue Type: Feature Request
> Components: core engine
> Affects Versions: 7.0.0.Beta7
> Reporter: Tibor Zimányi
> Assignee: Mario Fusco
> Priority: Minor
> Labels: oopath
>
> It would be nice to have the ability to use OOPath in accumulate functions. E.g. _sum(/fact/property)_.
> Example of a rule:
> import org.drools.compiler.oopath.*;
> global java.lang.Object globalVar
> rule R when
> accumulate ( Adult() ; $accumulateResult: sum(/children/age) )
> then
> kcontext.getKieRuntime().setGlobal(\"globalVar\", $accumulateResult);
> end
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months
[JBoss JIRA] (DROOLS-1564) Change oopath syntax
by Tibor Zimányi (JIRA)
[ https://issues.jboss.org/browse/DROOLS-1564?page=com.atlassian.jira.plugi... ]
Tibor Zimányi updated DROOLS-1564:
----------------------------------
Labels: oopath (was: )
> Change oopath syntax
> --------------------
>
> Key: DROOLS-1564
> URL: https://issues.jboss.org/browse/DROOLS-1564
> Project: Drools
> Issue Type: Enhancement
> Components: core engine
> Reporter: Mario Fusco
> Assignee: Mario Fusco
> Priority: Blocker
> Labels: oopath
> Fix For: 7.0.0.Final
>
>
> It is required to change the oopath syntax to make it closer to xpath one. This means that constraints will have to be put between square brackets instead of curly ones and inline cast should be expressed out of constraints. In other words the following oopath:
> {code}
> /list{#SubClass, prop == 0}
> {code}
> should become:
> {code}
> /list#SubClass[prop == 0]
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months
[JBoss JIRA] (WFCORE-2879) UnrecoverableKeyException: Cannot recover key when using Credential Reference
by Jan Kalina (JIRA)
[ https://issues.jboss.org/browse/WFCORE-2879?page=com.atlassian.jira.plugi... ]
Jan Kalina reassigned WFCORE-2879:
----------------------------------
Assignee: Jan Kalina (was: Darran Lofthouse)
> UnrecoverableKeyException: Cannot recover key when using Credential Reference
> -----------------------------------------------------------------------------
>
> Key: WFCORE-2879
> URL: https://issues.jboss.org/browse/WFCORE-2879
> Project: WildFly Core
> Issue Type: Bug
> Components: Security
> Reporter: Martin Choma
> Assignee: Jan Kalina
> Priority: Blocker
>
> Unable to configure ssl using credential reference.
>
> {code:server.log}
> 08:00:24,687 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service org.wildfly.core.management.security.realm.ManagementWebRealmCr.key-manager: org.jboss.msc.service.StartException in service org.wildfly.core.management.security.realm.ManagementWebRealmCr.key-manager: WFLYDM0018: Unable to start service
> at org.jboss.as.domain.management.security.AbstractKeyManagerService.start(AbstractKeyManagerService.java:91)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.security.UnrecoverableKeyException: Cannot recover key
> at sun.security.provider.KeyProtector.recover(KeyProtector.java:328)
> at sun.security.provider.JavaKeyStore.engineGetKey(JavaKeyStore.java:146)
> at sun.security.provider.JavaKeyStore$JKS.engineGetKey(JavaKeyStore.java:56)
> at sun.security.provider.KeyStoreDelegator.engineGetKey(KeyStoreDelegator.java:96)
> at sun.security.provider.JavaKeyStore$DualFormatJKS.engineGetKey(JavaKeyStore.java:70)
> at java.security.KeyStore.getKey(KeyStore.java:1023)
> at sun.security.ssl.SunX509KeyManagerImpl.<init>(SunX509KeyManagerImpl.java:133)
> at sun.security.ssl.KeyManagerFactoryImpl$SunX509.engineInit(KeyManagerFactoryImpl.java:70)
> at javax.net.ssl.KeyManagerFactory.init(KeyManagerFactory.java:256)
> at org.jboss.as.domain.management.security.AbstractKeyManagerService.createKeyManagers(AbstractKeyManagerService.java:136)
> at org.jboss.as.domain.management.security.AbstractKeyManagerService.start(AbstractKeyManagerService.java:89)
> ... 5 more
> 08:00:24,692 INFO [org.wildfly.extension.undertow] (MSC service thread 1-7) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443
> 08:00:24,696 INFO [org.jboss.ws.common.management] (MSC service thread 1-4) JBWS022052: Starting JBossWS 5.1.8.Final-redhat-1 (Apache CXF 3.1.11.redhat-1)
> 08:00:24,702 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
> ("core-service" => "management"),
> ("security-realm" => "ManagementWebRealmCr")
> ]) - failure description: {"WFLYCTL0080: Failed services" => {"org.wildfly.core.management.security.realm.ManagementWebRealmCr.key-manager" => "WFLYDM0018: Unable to start service
> Caused by: java.security.UnrecoverableKeyException: Cannot recover key"}}
> {code}
> When I use {{key-password}} instead of {{key-password-credential-reference}} I am able to make it work.
> {code}
> /core-service=management/security-realm=ManagementWebRealmCr/server-identity=ssl:add(keystore-path=server.keystore, keystore-relative-to=jboss.server.config.dir,keystore-password-credential-reference={clear-text=123456}, key-password=123456)
> {code}
> Note, I also get UnrecoverableKeyException: Cannot recover key when I don't specify key-password nor key-password-credential-reference.
> {code}
> /core-service=management/security-realm=ManagementWebRealmCr/server-identity=ssl:add(keystore-path=server.keystore, keystore-relative-to=jboss.server.config.dir,keystore-password-credential-reference={clear-text=123456})
> {code}
> In legacy if {{key-password}} is ommitted {{keystore-password}} is used instead.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months
[JBoss JIRA] (WFCORE-2876) runtime-failure-causes-rollback does not seem to have effect when configured in model
by Miroslav Novak (JIRA)
[ https://issues.jboss.org/browse/WFCORE-2876?page=com.atlassian.jira.plugi... ]
Miroslav Novak updated WFCORE-2876:
-----------------------------------
Steps to Reproduce:
Steps to reproduce:
{code}
git clone git://git.app.eng.bos.redhat.com/jbossqe/eap-tests-hornetq.git
cd eap-tests-hornetq/scripts/
git checkout master
groovy -DEAP_VERSION=7.1.0.DR19 PrepareServers7.groovy
export WORKSPACE=$PWD
export JBOSS_HOME_1=$WORKSPACE/server1/jboss-eap
export JBOSS_HOME_2=$WORKSPACE/server2/jboss-eap
export JBOSS_HOME_3=$WORKSPACE/server3/jboss-eap
export JBOSS_HOME_4=$WORKSPACE/server4/jboss-eap
cd ../jboss-hornetq-testsuite/
mvn clean test -Dtest=ReplicatedColocatedClusterFailoverTestCase#testFailbackWithMdbsShutdown -DfailIfNoTests=false -Deap=7x | tee log
{code}
There is 2nd test which is deploying MDB using CLI {{deploy}} command and shows that MDB is awakens on node 2 once Artemis live activates and deploys queues/connection factories:
ReplicatedColocatedClusterFailoverTestCase#testFailbackWithMdbsShutdownDeployUsingCLI
> runtime-failure-causes-rollback does not seem to have effect when configured in model
> -------------------------------------------------------------------------------------
>
> Key: WFCORE-2876
> URL: https://issues.jboss.org/browse/WFCORE-2876
> Project: WildFly Core
> Issue Type: Bug
> Components: Deployment Scanner
> Affects Versions: 3.0.0.Beta21
> Reporter: Miroslav Novak
> Assignee: ehsavoie Hugonnet
>
> This is follow up on discussion in WFCORE-1912. There is difference in behavior if deployment is deployed like:
> {code}deploy ~/tmp/mdb1.jar --unmanaged --headers={rollback-on-runtime-failure=false}{code}
> and if it's deployed by copying to deployments directory and setting {{rollback-on-runtime-failure=false}} in model:
> {code}
> /subsystem=deployment-scanner/scanner=default:write-attribute(name=runtime-failure-causes-rollback,value=false)
> {code}
> If it's deployed by the 1st way using CLI {{deploy}} command then If deployment is missing some dependencies (like connection factories, queues/topics) and those are added later then deployment is able recover from it and start working without need to reload/restart server or redeploy.
> However if it's deployed the 2nd way then deployment does not recover when missing dependencies are added. It looks like attribute {{runtime-failure-causes-rollback}} does not have the effect in this case.
> This is causing problems when Artemis is configured in colocated HA topology with replicated journal where it takes some time for Artemis to activate but deployment which depends on some connection factories and queues has already tried to deploy. We need deployment to recover from this situation automatically. Restart/Reload will not help in this case as it would end up in the same situation. Only manual redeploy will help which is a workaround.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months
[JBoss JIRA] (WFCORE-2879) UnrecoverableKeyException: Cannot recover key when using Credential Reference
by Martin Choma (JIRA)
Martin Choma created WFCORE-2879:
------------------------------------
Summary: UnrecoverableKeyException: Cannot recover key when using Credential Reference
Key: WFCORE-2879
URL: https://issues.jboss.org/browse/WFCORE-2879
Project: WildFly Core
Issue Type: Bug
Components: Security
Reporter: Martin Choma
Assignee: Darran Lofthouse
Priority: Blocker
Unable to configure ssl using credential reference.
{code:server.log}
08:00:24,687 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service org.wildfly.core.management.security.realm.ManagementWebRealmCr.key-manager: org.jboss.msc.service.StartException in service org.wildfly.core.management.security.realm.ManagementWebRealmCr.key-manager: WFLYDM0018: Unable to start service
at org.jboss.as.domain.management.security.AbstractKeyManagerService.start(AbstractKeyManagerService.java:91)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.security.UnrecoverableKeyException: Cannot recover key
at sun.security.provider.KeyProtector.recover(KeyProtector.java:328)
at sun.security.provider.JavaKeyStore.engineGetKey(JavaKeyStore.java:146)
at sun.security.provider.JavaKeyStore$JKS.engineGetKey(JavaKeyStore.java:56)
at sun.security.provider.KeyStoreDelegator.engineGetKey(KeyStoreDelegator.java:96)
at sun.security.provider.JavaKeyStore$DualFormatJKS.engineGetKey(JavaKeyStore.java:70)
at java.security.KeyStore.getKey(KeyStore.java:1023)
at sun.security.ssl.SunX509KeyManagerImpl.<init>(SunX509KeyManagerImpl.java:133)
at sun.security.ssl.KeyManagerFactoryImpl$SunX509.engineInit(KeyManagerFactoryImpl.java:70)
at javax.net.ssl.KeyManagerFactory.init(KeyManagerFactory.java:256)
at org.jboss.as.domain.management.security.AbstractKeyManagerService.createKeyManagers(AbstractKeyManagerService.java:136)
at org.jboss.as.domain.management.security.AbstractKeyManagerService.start(AbstractKeyManagerService.java:89)
... 5 more
08:00:24,692 INFO [org.wildfly.extension.undertow] (MSC service thread 1-7) WFLYUT0006: Undertow HTTPS listener https listening on 127.0.0.1:8443
08:00:24,696 INFO [org.jboss.ws.common.management] (MSC service thread 1-4) JBWS022052: Starting JBossWS 5.1.8.Final-redhat-1 (Apache CXF 3.1.11.redhat-1)
08:00:24,702 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("core-service" => "management"),
("security-realm" => "ManagementWebRealmCr")
]) - failure description: {"WFLYCTL0080: Failed services" => {"org.wildfly.core.management.security.realm.ManagementWebRealmCr.key-manager" => "WFLYDM0018: Unable to start service
Caused by: java.security.UnrecoverableKeyException: Cannot recover key"}}
{code}
When I use {{key-password}} instead of {{key-password-credential-reference}} I am able to make it work.
{code}
/core-service=management/security-realm=ManagementWebRealmCr/server-identity=ssl:add(keystore-path=server.keystore, keystore-relative-to=jboss.server.config.dir,keystore-password-credential-reference={clear-text=123456}, key-password=123456)
{code}
Note, I also get UnrecoverableKeyException: Cannot recover key when I don't specify key-password nor key-password-credential-reference.
{code}
/core-service=management/security-realm=ManagementWebRealmCr/server-identity=ssl:add(keystore-path=server.keystore, keystore-relative-to=jboss.server.config.dir,keystore-password-credential-reference={clear-text=123456})
{code}
In legacy if {{key-password}} is ommitted {{keystore-password}} is used instead.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 11 months