[JBoss JIRA] (WFCORE-4253) SNICombinedWithALPNTestCase fails with security manager on Java 11
by Ondrej Kotek (Jira)
Ondrej Kotek created WFCORE-4253:
------------------------------------
Summary: SNICombinedWithALPNTestCase fails with security manager on Java 11
Key: WFCORE-4253
URL: https://issues.jboss.org/browse/WFCORE-4253
Project: WildFly Core
Issue Type: Bug
Components: Test Suite
Affects Versions: 8.0.0.Beta1
Environment: Java 11
Reporter: Ondrej Kotek
Assignee: Stuart Douglas
{{org.jboss.as.test.integration.security.ssl.sni.SNICombinedWithALPNTestCase}} fails with security manager on Java 11 due to missing permissions:
{noformat}
[ERROR] Failure when constructing test Time elapsed: 0.029 s <<< FAILURE!
java.lang.AssertionError:
Failed to deploy test.jar: 10 assets: {"WFLYCTL0080: Failed services" => {"jboss.undertow-test-server" => "Failed to start service
Caused by: java.lang.ExceptionInInitializerError
Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"/home/okotek/test/asts-core-intermit/testsuite/standalone/target/wildfly-core/modules/system/layers/base/io/undertow/core/main/undertow-core-2.0.15.Final.jar\" \"read\")\" in code source \"(vfs:/content/test.jar <no signer certificates>)\" of \"ModuleClassLoader for Module \"deployment.test.jar\" from Service Module Loader\")"}}
at org.junit.Assert.fail(Assert.java:88)
at org.jboss.as.test.integration.security.ssl.sni.SNICombinedWithALPNTestCase.deploy(SNICombinedWithALPNTestCase.java:414)
at org.jboss.as.test.integration.security.ssl.sni.SNICombinedWithALPNTestCase$Setup.setup(SNICombinedWithALPNTestCase.java:188)
at org.wildfly.core.testrunner.WildflyTestRunner.runSetupTasks(WildflyTestRunner.java:121)
at org.wildfly.core.testrunner.WildflyTestRunner.run(WildflyTestRunner.java:107)
at org.junit.runners.Suite.runChild(Suite.java:128)
...
{noformat}
A customer should not be asked to add such permission for reading a module file, it brings bad UX and it could bring security flaws.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 5 months
[JBoss JIRA] (WFCORE-4252) JmxControlledStateNotificationsTestCase test cases fail with security manager on Java 11
by Ondrej Kotek (Jira)
Ondrej Kotek created WFCORE-4252:
------------------------------------
Summary: JmxControlledStateNotificationsTestCase test cases fail with security manager on Java 11
Key: WFCORE-4252
URL: https://issues.jboss.org/browse/WFCORE-4252
Project: WildFly Core
Issue Type: Bug
Components: JMX, Test Suite
Affects Versions: 8.0.0.Beta1
Environment: Java 11
Reporter: Ondrej Kotek
Assignee: ehsavoie Hugonnet
Three JmxControlledStateNotificationsTestCase test cases fail with security manager on Java 11 due to missing permissions:
{noformat}
[ERROR] Failure when constructing test Time elapsed: 0.004 s <<< FAILURE!
java.lang.AssertionError:
{"outcome" => "failed","failure-description" => {"WFLYCTL0080: Failed services" => {"test.deployment.jmx" => "java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"/home/okotek/test/asts-core-intermit/testsuite/standalone/target/notifications/data/jmx-facade\" \"read\")\" in code source \"(vfs:/content/test-jmx-notifications-deployment.jar <no signer certificates>)\" of \"ModuleClassLoader for Module \"deployment.test-jmx-notifications-deployment.jar\" from Service Module Loader\")
Caused by: java.security.AccessControlException: WFSM000001: Permission check failed (permission \"(\"java.io.FilePermission\" \"/home/okotek/test/asts-core-intermit/testsuite/standalone/target/notifications/data/jmx-facade\" \"read\")\" in code source \"(vfs:/content/test-jmx-notifications-deployment.jar <no signer certificates>)\" of \"ModuleClassLoader for Module \"deployment.test-jmx-notifications-deployment.jar\" from Service Module Loader\")"}},"rolled-back" => true}
at org.junit.Assert.fail(Assert.java:88)
at org.jboss.as.test.integration.management.rbac.RbacUtil.checkOperationResult(RbacUtil.java:115)
at org.jboss.as.test.integration.management.rbac.RbacUtil.executeOperation(RbacUtil.java:100)
at org.wildfly.test.jmx.JMXListenerDeploymentSetupTask.deploy(JMXListenerDeploymentSetupTask.java:97)
at org.wildfly.test.jmx.JMXListenerDeploymentSetupTask.setup(JMXListenerDeploymentSetupTask.java:66)
at org.wildfly.core.testrunner.WildflyTestRunner.runSetupTasks(WildflyTestRunner.java:121)
at org.wildfly.core.testrunner.WildflyTestRunner.run(WildflyTestRunner.java:107)
at org.junit.runners.Suite.runChild(Suite.java:128)
...
{noformat}
The failing tests:
* {{org.jboss.as.test.integration.domain.events.JmxControlledStateNotificationsTestCase}}
* {{org.wildfly.core.test.standalone.mgmt.events.JmxControlledStateNotificationsTestCase}}
* {{org.jboss.as.test.integration.jmx.JmxControlledStateNotificationsTestCase}}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 5 months
[JBoss JIRA] (DROOLS-3402) Encoding set in constructor not taking effect
by Mario Fusco (Jira)
[ https://issues.jboss.org/browse/DROOLS-3402?page=com.atlassian.jira.plugi... ]
Mario Fusco commented on DROOLS-3402:
-------------------------------------
I cannot reproduce this problem. I tried both
{code}
@Test
public void testConsequence() {
// DROOLS-3402
String drl =
"import " + Person.class.getCanonicalName() + ";\n" +
"rule R when\n" +
" $p : Person()\n" +
"then\n" +
" $p.setName(\"Rückfrage\");\n" +
"end";
KieSession ksession = new KieHelper().addContent( drl, ResourceType.DRL ).build().newKieSession();
Person p = new Person();
ksession.insert(p);
int fired = ksession.fireAllRules();
assertEquals(1, fired);
assertEquals("Rückfrage", p.getName());
System.out.println(p.getName());
ksession.dispose();
}
{code}
and
{code}
@Test
public void testConsequence2() {
// DROOLS-3402
KieServices kieServices = KieServices.Factory.get();
KieFileSystem kieFileSystem = kieServices.newKieFileSystem();
kieFileSystem.write(ResourceFactory.newClassPathResource("org/drools/compiler/compiler/i18n.drl", "UTF-8"));
KieBuilder kieBuilder = kieServices.newKieBuilder(kieFileSystem);
kieBuilder.buildAll();
KieModule kieModule = kieBuilder.getKieModule();
KieContainer kieContainer = kieServices.newKieContainer(kieModule.getReleaseId());
KieSession ksession = kieContainer.newKieSession();
Person p = new Person();
ksession.insert(p);
int fired = ksession.fireAllRules();
assertEquals(1, fired);
assertEquals("Rückfrage", p.getName());
System.out.println(p.getName());
ksession.dispose();
}
{code}
and both test cases are ok for me. I believe that the problem is related to some local setting of your environment/operating system. If you can send me a proper reproducer feel free to reopen this ticket.
> Encoding set in constructor not taking effect
> ---------------------------------------------
>
> Key: DROOLS-3402
> URL: https://issues.jboss.org/browse/DROOLS-3402
> Project: Drools
> Issue Type: Bug
> Affects Versions: 7.13.0.Final
> Reporter: Barnabás Kurucz
> Assignee: Mario Fusco
> Priority: Major
>
> In my drl file, I'm using German characters such as Umlauts or ß. Thus, I am setting the encoding to UTF-8 with the overloaded constructor when creating the Resource for the Kie File System. However, after firing the rules on the inserted Fact Drools does not seem to apply the specified encoding. I insert the fact, and if the condition is true to that fact it should modify the Action1 (String) attribute of the fact to "Rückfrage" and return the modified fact. However, when I look at the retrieved bean's Action1 attribute I am seeing "Rückfrage" instead of "Rückfrage". I tried both UTF-8 and ISO-8859-1 encoding. Any ideas what's wrong?
> Drools 7.13
> *KieSessionGenerator*:
> public KieSessionGenerator() {
> KieServices kieServices = KieServices.Factory.get();
> KieFileSystem kieFileSystem = kieServices.newKieFileSystem();
> kieFileSystem.write(ResourceFactory.newClassPathResource(drlFile, "UTF-8"));
> KieBuilder kieBuilder = kieServices.newKieBuilder(kieFileSystem);
> kieBuilder.buildAll();
> KieModule kieModule = kieBuilder.getKieModule();
> KieContainer kieContainer = kieServices.newKieContainer(kieModule.getReleaseId());
> kieSession = kieContainer.newKieSession();
> }
> *Snippet from DRL:*
> rule "813"
> when
> $bean : Bean(longDesc == "Infektion")
> then
> $bean.setAction1("Rückfrage");
> end
> *Inserting the fact:*
> public Bean lookupBean(Bean bean) {
> kieSessionGenerator.getKieSession().insert(bean);
> kieSessionGenerator.getKieSession().fireAllRules();
> return bean;
> }
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 5 months
[JBoss JIRA] (DROOLS-3402) Encoding set in constructor not taking effect
by Mario Fusco (Jira)
[ https://issues.jboss.org/browse/DROOLS-3402?page=com.atlassian.jira.plugi... ]
Mario Fusco resolved DROOLS-3402.
---------------------------------
Resolution: Cannot Reproduce
> Encoding set in constructor not taking effect
> ---------------------------------------------
>
> Key: DROOLS-3402
> URL: https://issues.jboss.org/browse/DROOLS-3402
> Project: Drools
> Issue Type: Bug
> Affects Versions: 7.13.0.Final
> Reporter: Barnabás Kurucz
> Assignee: Mario Fusco
> Priority: Major
>
> In my drl file, I'm using German characters such as Umlauts or ß. Thus, I am setting the encoding to UTF-8 with the overloaded constructor when creating the Resource for the Kie File System. However, after firing the rules on the inserted Fact Drools does not seem to apply the specified encoding. I insert the fact, and if the condition is true to that fact it should modify the Action1 (String) attribute of the fact to "Rückfrage" and return the modified fact. However, when I look at the retrieved bean's Action1 attribute I am seeing "Rückfrage" instead of "Rückfrage". I tried both UTF-8 and ISO-8859-1 encoding. Any ideas what's wrong?
> Drools 7.13
> *KieSessionGenerator*:
> public KieSessionGenerator() {
> KieServices kieServices = KieServices.Factory.get();
> KieFileSystem kieFileSystem = kieServices.newKieFileSystem();
> kieFileSystem.write(ResourceFactory.newClassPathResource(drlFile, "UTF-8"));
> KieBuilder kieBuilder = kieServices.newKieBuilder(kieFileSystem);
> kieBuilder.buildAll();
> KieModule kieModule = kieBuilder.getKieModule();
> KieContainer kieContainer = kieServices.newKieContainer(kieModule.getReleaseId());
> kieSession = kieContainer.newKieSession();
> }
> *Snippet from DRL:*
> rule "813"
> when
> $bean : Bean(longDesc == "Infektion")
> then
> $bean.setAction1("Rückfrage");
> end
> *Inserting the fact:*
> public Bean lookupBean(Bean bean) {
> kieSessionGenerator.getKieSession().insert(bean);
> kieSessionGenerator.getKieSession().fireAllRules();
> return bean;
> }
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 5 months
[JBoss JIRA] (WFLY-11495) WildFly 14-15 Create Query
by Majid Mostafavi (Jira)
Majid Mostafavi created WFLY-11495:
--------------------------------------
Summary: WildFly 14-15 Create Query
Key: WFLY-11495
URL: https://issues.jboss.org/browse/WFLY-11495
Project: WildFly
Issue Type: Bug
Components: JPA / Hibernate
Affects Versions: 15.0.0.Final, 14.0.1.Final
Reporter: Majid Mostafavi
Assignee: Scott Marlow
Hi
When I use this syntax for create lazy data loader
CriteriaBuilder builder = entityManager.getCriteriaBuilder();
CriteriaQuery<{color:#DE350B}X{color}> criteria = builder.createQuery({color:#DE350B}X{color}.class);
Root<{color:#DE350B}XDTO{color}> xRoot = criteria.from(XDTO.class);
.
.
.
.
criteria.where(predicate);
Query queryResult=entityManager.createQuery(criteria);
queryResult.setFirstResult(first);
if (pageSize > 0){
queryResult.setMaxResults(pageSize);
}
wildfly create query by this syntax
select
*
from ( {color:#14892c}select dto item1, select dto item2 from Xroot {color} )
where
rownum <=
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 5 months
[JBoss JIRA] (WFLY-11404) Artemis throws Critical IO Error if new journal file is not created in 5 seconds
by Oleg Sushchenko (Jira)
[ https://issues.jboss.org/browse/WFLY-11404?page=com.atlassian.jira.plugin... ]
Oleg Sushchenko commented on WFLY-11404:
----------------------------------------
https://github.com/apache/activemq-artemis/pull/2460 PR for the Artemis
> Artemis throws Critical IO Error if new journal file is not created in 5 seconds
> --------------------------------------------------------------------------------
>
> Key: WFLY-11404
> URL: https://issues.jboss.org/browse/WFLY-11404
> Project: WildFly
> Issue Type: Enhancement
> Affects Versions: 15.0.0.Beta1
> Reporter: Tomas Hofman
> Assignee: Tomas Hofman
> Priority: Critical
>
> I can see in our CI jobs that Artemis sometimes stops because of error \[1\]. I looked at the code \[2\] where the exception is thrown and I think it could be improved a bit.
> _Customer Impact:_ If Artemis journal is located on slower file system (like NFS) then if server is under load then it might crash. This will lead to unavailability of service. Server must be restarted to recover.
> First thing I noticed is that the 5 seconds timeout is not configurable. I agree that it should be enough in most cases but if someone would want to use NFS for Artemis journal and he doesn't care about performance, we should able him to tune this value. Additionally the timeout doesn't reflect size of journal files.
> Second thing is that when {{openedFiles.poll()}} returns null we can't be sure whether it is problem of exhausted disc or exhausted CPU. I think there should be added some kind of latch which would wait until pushOpenRunnable is executed. It will make sure that there is issue with IO operations and it was not caused by exhausted CPU.
> \[1\]
> {code}
> 09:45:07,418 WARN [org.apache.activemq.artemis.core.server] (Thread-10 (ActiveMQ-IO-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$4@2646099c-962838060)) AMQ222010: Critical IO Error, shutting down the server. file=NULL, message=unable to open : ActiveMQIOErrorException[errorType=IO_ERROR message=AMQ149003: File not opened]
> at org.apache.activemq.artemis.core.journal.impl.JournalFilesRepository.openFile(JournalFilesRepository.java:423) [artemis-journal-1.5.3.002-redhat-1.jar:1.5.3.002-redhat-1]
> at org.apache.activemq.artemis.core.journal.impl.JournalImpl.moveNextFile(JournalImpl.java:2885) [artemis-journal-1.5.3.002-redhat-1.jar:1.5.3.002-redhat-1]
> at org.apache.activemq.artemis.core.journal.impl.JournalImpl.switchFileIfNecessary(JournalImpl.java:2842) [artemis-journal-1.5.3.002-redhat-1.jar:1.5.3.002-redhat-1]
> at org.apache.activemq.artemis.core.journal.impl.JournalImpl.appendRecord(JournalImpl.java:2568) [artemis-journal-1.5.3.002-redhat-1.jar:1.5.3.002-redhat-1]
> at org.apache.activemq.artemis.core.journal.impl.JournalImpl.access$200(JournalImpl.java:87) [artemis-journal-1.5.3.002-redhat-1.jar:1.5.3.002-redhat-1]
> at org.apache.activemq.artemis.core.journal.impl.JournalImpl$4.run(JournalImpl.java:889) [artemis-journal-1.5.3.002-redhat-1.jar:1.5.3.002-redhat-1]
> at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:101) [artemis-commons-1.5.3.002-redhat-1.jar:1.5.3.002-redhat-1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_111]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_111]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_111]
> {code}
> \[2\]
> {code}
> public JournalFile openFile() throws InterruptedException, ActiveMQIOErrorException {
> if (logger.isTraceEnabled()) {
> logger.trace("enqueueOpenFile with openedFiles.size=" + openedFiles.size());
> }
> if (openFilesExecutor == null) {
> pushOpenRunnable.run();
> } else {
> openFilesExecutor.execute(pushOpenRunnable);
> }
> JournalFile nextFile = openedFiles.poll(5, TimeUnit.SECONDS);
> if (nextFile == null) {
> fileFactory.onIOError(ActiveMQJournalBundle.BUNDLE.fileNotOpened(), "unable to open ", null);
> // We need to reconnect the current file with the timed buffer as we were not able to roll the file forward
> // If you don't do this you will get a NPE in TimedBuffer::checkSize where it uses the bufferobserver
> fileFactory.activateBuffer(journal.getCurrentFile().getFile());
> throw ActiveMQJournalBundle.BUNDLE.fileNotOpened();
> }
> if (logger.isTraceEnabled()) {
> logger.trace("Returning file " + nextFile);
> }
> return nextFile;
> }
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 5 months