[JBoss JIRA] (DROOLS-3869) ServiceDiscovery doesn't work with Fuse
by Anton Giertli (Jira)
[ https://issues.jboss.org/browse/DROOLS-3869?page=com.atlassian.jira.plugi... ]
Anton Giertli edited comment on DROOLS-3869 at 4/10/19 5:32 AM:
----------------------------------------------------------------
More details:
- Camel on EAP (Fuse 7.2.0 + EAP 7.1.x)
- RHDM 7.0.0 - 7.3.0 (I've tried all the versions)
Drools API is invoked in a Bean, which is part of the camel route. The bean includes following code:
{code:java}
KieServices ks = KieServices.Factory.get();
{code}
KieServices are entry point to the Drools API. Unfortunately, this code, as is, returns null - which means any further API calls are not possible from this point on.
There are two workarounds to this issue:
# Instantiate KieServices using 'new' keyword
{code:java}
KieServices ksDirect = new KieServicesImpl();
{code}
However, this breaks the contract since KieServices should really be a singleton.
# Change thread context classloader (TCCL):
{code:java}
// Workaround due to classloading issues
ClassLoader prevTCL = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(RuleRepository.class.getClassLoader());
KieServices ks = KieServices.Factory.get();
ReleaseId releaseId = ks.newReleaseId(groupId, artifactid, version);
container = ks.newKieContainer(releaseId);
scanner = ks.newKieScanner(container);
Thread.currentThread().setContextClassLoader(prevTCL); // end of workaround
{code}
This works fine, but it's considered as a hack.
Reproducer is attached. Instructions are these:
{code}
- Install Fuse 7.2 on EAP - no further changes to installation are needed
https://access.redhat.com/documentation/en-us/red_hat_fuse/7.2/html/insta...
- Start the instance
- Extract my app and execute 'mvn clean install' - this will automatically deploy it onto eap/wildfly
- GET http://127.0.0.1:8080/rest/reproducer/execute
{code}
You should see following response in the server.log:
{code}
18:30:26,409 INFO [stdout] (default task-2) KS is null
{code}
Which means KieServices are null, hence I cannot proceed with operations such as loading the KJAR etc.
In reproducer, the app flow goes from:
RESTBuilder -> Hello.java -> sampleMethod
was (Author: anton.giertli):
More details:
- Camel on EAP (Fuse 7.2.0 + EAP 7.1.x)
- RHDM 7.0.0 - 7.3.0 (I've tried all the versions)
Drools API is invoked in a Bean, which is part of the camel route. The bean includes following code:
~~~
KieServices ks = KieServices.Factory.get();
~~~
KieServices are entry point to the Drools API. Unfortunately, this code, as is, returns null - which means any further API calls are not possible from this point on.
There are two workarounds to this issue:
# Instantiate KieServices using 'new' keyword
#
KieServices ksDirect = new KieServicesImpl();
However, this breaks the contract since KieServices should really be a singleton.
# Change thread context classloader (TCCL):
~~~
// Workaround due to classloading issues
ClassLoader prevTCL = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(RuleRepository.class.getClassLoader());
KieServices ks = KieServices.Factory.get();
ReleaseId releaseId = ks.newReleaseId(groupId, artifactid, version);
container = ks.newKieContainer(releaseId);
scanner = ks.newKieScanner(container);
Thread.currentThread().setContextClassLoader(prevTCL); // end of workaround
~~~
This works fine, but it's considered as a hack.
Reproducer is attached. Instructions are these:
~~~
- Install Fuse 7.2 on EAP - no further changes to installation are needed
https://access.redhat.com/documentation/en-us/red_hat_fuse/7.2/html/insta...
- Start the instance
- Extract my app and execute 'mvn clean install' - this will automatically deploy it onto eap/wildfly
- GET http://127.0.0.1:8080/rest/reproducer/execute
You should see following response in the server.log:
18:30:26,409 INFO [stdout] (default task-2) KS is null
Which means KieServices are null, hence I cannot proceed with operations such as loading the KJAR etc.
In reproducer, the app flow goes from:
RESTBuilder -> Hello.java -> sampleMethod
~~~
> ServiceDiscovery doesn't work with Fuse
> ---------------------------------------
>
> Key: DROOLS-3869
> URL: https://issues.jboss.org/browse/DROOLS-3869
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Reporter: Mario Fusco
> Assignee: Mario Fusco
> Priority: Major
> Attachments: reproducer.zip
>
>
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 1 month
[JBoss JIRA] (DROOLS-3869) ServiceDiscovery doesn't work with Fuse
by Anton Giertli (Jira)
[ https://issues.jboss.org/browse/DROOLS-3869?page=com.atlassian.jira.plugi... ]
Anton Giertli commented on DROOLS-3869:
---------------------------------------
More details:
- Camel on EAP (Fuse 7.2.0 + EAP 7.1.x)
- RHDM 7.0.0 - 7.3.0 (I've tried all the versions)
Drools API is invoked in a Bean, which is part of the camel route. The bean includes following code:
~~~
KieServices ks = KieServices.Factory.get();
~~~
KieServices are entry point to the Drools API. Unfortunately, this code, as is, returns null - which means any further API calls are not possible from this point on.
There are two workarounds to this issue:
# Instantiate KieServices using 'new' keyword
#
KieServices ksDirect = new KieServicesImpl();
However, this breaks the contract since KieServices should really be a singleton.
# Change thread context classloader (TCCL):
~~~
// Workaround due to classloading issues
ClassLoader prevTCL = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(RuleRepository.class.getClassLoader());
KieServices ks = KieServices.Factory.get();
ReleaseId releaseId = ks.newReleaseId(groupId, artifactid, version);
container = ks.newKieContainer(releaseId);
scanner = ks.newKieScanner(container);
Thread.currentThread().setContextClassLoader(prevTCL); // end of workaround
~~~
This works fine, but it's considered as a hack.
Reproducer is attached. Instructions are these:
~~~
- Install Fuse 7.2 on EAP - no further changes to installation are needed
https://access.redhat.com/documentation/en-us/red_hat_fuse/7.2/html/insta...
- Start the instance
- Extract my app and execute 'mvn clean install' - this will automatically deploy it onto eap/wildfly
- GET http://127.0.0.1:8080/rest/reproducer/execute
You should see following response in the server.log:
18:30:26,409 INFO [stdout] (default task-2) KS is null
Which means KieServices are null, hence I cannot proceed with operations such as loading the KJAR etc.
In reproducer, the app flow goes from:
RESTBuilder -> Hello.java -> sampleMethod
~~~
> ServiceDiscovery doesn't work with Fuse
> ---------------------------------------
>
> Key: DROOLS-3869
> URL: https://issues.jboss.org/browse/DROOLS-3869
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Reporter: Mario Fusco
> Assignee: Mario Fusco
> Priority: Major
> Attachments: reproducer.zip
>
>
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 1 month
[JBoss JIRA] (DROOLS-3674) UX proposal for error reporting after test run
by Michael Anstis (Jira)
[ https://issues.jboss.org/browse/DROOLS-3674?page=com.atlassian.jira.plugi... ]
Michael Anstis commented on DROOLS-3674:
----------------------------------------
[~gabriolo] There's nothing stopping you adding a click listener to an additional {{Shape}} rendered _in_ a cell.
In your columns' {{GridColumnRenderer.renderCell(..)}} method simply add a {{Shape}} to the {{Group}} that is returned. It _should_ work!
Alternatively, if you don't want to attach lots of {{NodeMouseClickHandler}} to the grid (for potential performance reasons) you could look at {{GridWidget.onGroupingToggle(..)}} that handles clicking on a _control_ in cells too. This is used for collapsing/expanding merged cells (IDK if _scesim_ supports that). You could eithe re-purpose it or implement something similar for _scesim_ (or even make {{onGroupingToggle(..)}} completely generic on the base classes!)
> UX proposal for error reporting after test run
> ----------------------------------------------
>
> Key: DROOLS-3674
> URL: https://issues.jboss.org/browse/DROOLS-3674
> Project: Drools
> Issue Type: Task
> Components: Scenario Simulation and Testing
> Reporter: Daniele Zonca
> Assignee: Tao Zhu
> Priority: Major
> Labels: ScenarioSimulation, UXTeam
> Attachments: Error reporting after test run-different kinds.png, Error reporting after test run-different kinds2.png, Error reporting after test run-popup.png, Error reporting after test run-popup.png, Error reporting after test run.png
>
>
> As user after a test run, I want see not only the cell that are not correct (red background) but also the reason.
> For instance have the possibility to see the actual value that is different from the expected or the error message.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 1 month
[JBoss JIRA] (WFLY-11116) Wildfly 12.0.0 Final Delay in Getting the Value Attributes of the Session Variables (Result in Null Pointer Exception)
by ziad saade (Jira)
[ https://issues.jboss.org/browse/WFLY-11116?page=com.atlassian.jira.plugin... ]
ziad saade commented on WFLY-11116:
-----------------------------------
unfortunately both proposed fixes didn't work.
> Wildfly 12.0.0 Final Delay in Getting the Value Attributes of the Session Variables (Result in Null Pointer Exception)
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: WFLY-11116
> URL: https://issues.jboss.org/browse/WFLY-11116
> Project: WildFly
> Issue Type: Bug
> Components: Clustering
> Affects Versions: 14.0.1.Final, 12.0.0.Final, 13.0.0.Final, 15.0.0.Final
> Reporter: ziad saade
> Assignee: Paul Ferraro
> Priority: Critical
>
> I have two Servlets Book and BookPreview the attribute is set in Book Servlet as follow:
>
> Book.java
> TestBean testBean=null;
> if(session.getAttribute("testBean")!=null)
> testBean = (TestBean)session.getAttribute("testBean");
> else{
> testBean=new TestBean();
> session.setAttribute("testBean",testBean);
> }
> testBean.setAmount("10");
>
> response.sendRedirect("BookPreview");
>
>
> The session attribute can be retrieved and the page is loaded normally and the Amount value is displayed however when submitting the form (Post Action in BookPreview.java) Null Pointer exception is generated.
>
> BookPreview.java
>
> TestBean testBean = (TestBean)session.getAttribute("testBean");
> String amount = testBean.getAmount; //Null pointer exception when submitting the form
>
> <form method="Post" action="BookPreview">
>
> </form>
>
> TestBean.java
>
> public class TestBean implements java.io.Serializable {
>
> private static final long serialVersionUID = 1L;
> private String amount;
>
> public String getAmount() {
> return amount;
> }
>
> public void setAmount(String amount) {
> this.amount = amount;
> }
> }
>
> Kindly advice how to fix the problem at the level of the server configuration.
> PS: I am not getting the exception when deploying the same application under other J EE application servers (Tomcat....)
>
> Thanks and Best Regards
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 1 month
[JBoss JIRA] (DROOLS-3674) UX proposal for error reporting after test run
by Gabriele Cardosi (Jira)
[ https://issues.jboss.org/browse/DROOLS-3674?page=com.atlassian.jira.plugi... ]
Gabriele Cardosi edited comment on DROOLS-3674 at 4/10/19 3:11 AM:
-------------------------------------------------------------------
[~zhutaojiajia]
In theory we could. I just have to find out how a clean solution to implement that. I'll let you know the result
was (Author: gabriolo):
[~zhutaojiajia]
Ok, I'll do with "hover" and see how it will work
> UX proposal for error reporting after test run
> ----------------------------------------------
>
> Key: DROOLS-3674
> URL: https://issues.jboss.org/browse/DROOLS-3674
> Project: Drools
> Issue Type: Task
> Components: Scenario Simulation and Testing
> Reporter: Daniele Zonca
> Assignee: Tao Zhu
> Priority: Major
> Labels: ScenarioSimulation, UXTeam
> Attachments: Error reporting after test run-different kinds.png, Error reporting after test run-different kinds2.png, Error reporting after test run-popup.png, Error reporting after test run-popup.png, Error reporting after test run.png
>
>
> As user after a test run, I want see not only the cell that are not correct (red background) but also the reason.
> For instance have the possibility to see the actual value that is different from the expected or the error message.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
7 years, 1 month