[JBoss JIRA] (JBRULES-3338) Accuracy lost when comparing numbers
by Miles Wen (Created) (JIRA)
Accuracy lost when comparing numbers
------------------------------------
Key: JBRULES-3338
URL: https://issues.jboss.org/browse/JBRULES-3338
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core (expert)
Affects Versions: 5.3.0.Final
Environment: sun jdk 1.6u27, drools 5.3.0 final
Reporter: Miles Wen
Assignee: Mark Proctor
Accuracy lost when comparing two numbers which has different number types. for example:
I have a pojo fact class 'Msg.java', and it has a int field named 'intVal', which value is inited 5.
And I write down this rule and run with default settings:
rule "out"
when
Msg(intVal == 5.5)
then
end
this rule would fire! but it shouldn't, cause 5 != 5.5.
It seems that drools converts the second operand of a comparison to the type of the first, no matter what the first number's type is. This definitely caused some accuracy lost in many cases.
if I wrote Msg(5.5 == intVal), the code behaves correctly.
--
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
14 years, 3 months
[JBoss JIRA] (AS7-3222) RESTEasy: Ambiguity constructors of Resource aren't reported
by Weinan Li (Commented) (JIRA)
[ https://issues.jboss.org/browse/AS7-3222?page=com.atlassian.jira.plugin.s... ]
Weinan Li commented on AS7-3222:
--------------------------------
Hi Pavel, could you please paste your java class with the ambiguous constructors so I could investigate on this one? Thanks!
> RESTEasy: Ambiguity constructors of Resource aren't reported
> ------------------------------------------------------------
>
> Key: AS7-3222
> URL: https://issues.jboss.org/browse/AS7-3222
> Project: Application Server 7
> Issue Type: Bug
> Components: REST
> Affects Versions: 7.1.0.CR1b
> Reporter: Pavel Janousek
> Assignee: Weinan Li
> Priority: Blocker
>
> Section 3.1.2. of JAX-RS specs says:
> <cite>
> A public constructor MAY include parameters annotated with one of the following: @Context, @Header-Param, @CookieParam, @MatrixParam, @QueryParam or @PathParam. However, depending on the resource class lifecycle and concurrency, per-request information may not make sense in a constructor. If more than one public constructor is suitable then an implementation MUST use the one with the most parameters. +Choosing amongst suitable constructors with the same number of parameters is implementation specific, implementations SHOULD generate a warning about such ambiguity.+
> <cite>
> Actual behavior is that none of warning is generated and some of suitable constructor is chosen silently. This is against implemented specs.
--
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
14 years, 3 months
[JBoss JIRA] (AS7-3222) RESTEasy: Ambiguity constructors of Resource aren't reported
by Pavel Janousek (Moved) (JIRA)
[ https://issues.jboss.org/browse/AS7-3222?page=com.atlassian.jira.plugin.s... ]
Pavel Janousek moved JBPAPP-7878 to AS7-3222:
---------------------------------------------
Project: Application Server 7 (was: JBoss Enterprise Application Platform)
Key: AS7-3222 (was: JBPAPP-7878)
Workflow: GIT Pull Request workflow (was: jira)
Affects Version/s: 7.1.0.CR1b
(was: EAP 6.0.0 DR 9)
Component/s: REST
(was: RESTEasy)
Security: (was: JBoss Internal)
Docs QE Status: (was: NEW)
> RESTEasy: Ambiguity constructors of Resource aren't reported
> ------------------------------------------------------------
>
> Key: AS7-3222
> URL: https://issues.jboss.org/browse/AS7-3222
> Project: Application Server 7
> Issue Type: Bug
> Components: REST
> Affects Versions: 7.1.0.CR1b
> Reporter: Pavel Janousek
> Assignee: Weinan Li
> Priority: Blocker
>
> Section 3.1.2. of JAX-RS specs says:
> <cite>
> A public constructor MAY include parameters annotated with one of the following: @Context, @Header-Param, @CookieParam, @MatrixParam, @QueryParam or @PathParam. However, depending on the resource class lifecycle and concurrency, per-request information may not make sense in a constructor. If more than one public constructor is suitable then an implementation MUST use the one with the most parameters. +Choosing amongst suitable constructors with the same number of parameters is implementation specific, implementations SHOULD generate a warning about such ambiguity.+
> <cite>
> Actual behavior is that none of warning is generated and some of suitable constructor is chosen silently. This is against implemented specs.
--
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
14 years, 3 months
[JBoss JIRA] (AS7-1338) Remote JNDI support for AS7
by Tobias Frech (Commented) (JIRA)
[ https://issues.jboss.org/browse/AS7-1338?page=com.atlassian.jira.plugin.s... ]
Tobias Frech commented on AS7-1338:
-----------------------------------
If the jndi.properties file on the client needs to be adapted for AS 7 (I guess so), it also could be discussed if the port 1099 is changed. On one hand this port maybe be already open on firewalls for remote clients to access the AS. On the other hand on Windows you could experience problems with this port because it is already used by a mounted share.
Also it would be nice if the implementation would allow to securely expose JNDI to the internet without risking someone unauthorized accessing and changing anything in it.
> Remote JNDI support for AS7
> ---------------------------
>
> Key: AS7-1338
> URL: https://issues.jboss.org/browse/AS7-1338
> Project: Application Server 7
> Issue Type: Task
> Components: Naming
> Reporter: Richard Opalka
> Assignee: John Bailey
> Priority: Critical
> Labels: eap6-req
> Fix For: 7.1.0.Final
>
>
> Add support for remote JNDI after all. It was agreed that:
> * Remote JNDI would run over Remoting
> * Remote JNDI for EJB is strictly a legacy access protocol, deprecated in favor of "ejb:"
> * The Remote JNDI service would proxy to a specific Context of the server JNDI tree - maybe "java:jboss/shared", maybe something else
> * Server-side services would opt-in to Remote JNDI; initially we'd only support:
> ** Remote EJB interfaces
> ** HornetQ connection factories
> * In the future we may support:
> ** User bindings, so long as they're serializable
> * In the future we will never support:
> ** Proxied DataSources
> ** Proxied JMS invocations
> Initial project tree is at https://github.com/dmlloyd/jboss-remote-jndi for now.
--
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
14 years, 3 months
[JBoss JIRA] (AS7-3198) Cannot call external OSGI bundle from EAR package - NullPointerException
by Peter Penzov (Created) (JIRA)
Cannot call external OSGI bundle from EAR package - NullPointerException
-------------------------------------------------------------------------
Key: AS7-3198
URL: https://issues.jboss.org/browse/AS7-3198
Project: Application Server 7
Issue Type: Bug
Components: OSGi
Affects Versions: 7.1.0.CR1b
Environment: Centos 5.6 JVM 1.7
Reporter: Peter Penzov
Assignee: Thomas Diesler
Priority: Blocker
I downloaded this basic example: https://github.com/bosschaert/coderthoughts/tree/master/WebAppOSGiService
I created simple EAR package with Netbeans 7.1. I configure the EAR package to call service from the OSGI bundle in the WebAppOSGiService example. I successfully compiled the sources and I uploaded them into JBoss. When I opened the web browser and type the applet into the EAR package I get this error:
Obtaining stock quote for @@@@@@@@ use proper data type! 'ACME'
java.lang.NullPointerException at org.coderthoughts.demo.web.osgi.DemoServlet.doGet(DemoServlet.java:21) at javax.servlet.http.HttpServlet.service(HttpServlet.java:734) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:151) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:897) at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:626) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2033) at java.lang.Thread.run(Thread.java:722)
This is the source code that I have tested
http://www.mediafire.com/?gzy43y69cga5gas
Please write me is this a bug in JBoss 7.1.0 application server or I have made a mistake.
Regards
--
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
14 years, 3 months
[JBoss JIRA] (AS7-672) HostController status
by Kabir Khan (Commented) (JIRA)
[ https://issues.jboss.org/browse/AS7-672?page=com.atlassian.jira.plugin.sy... ]
Kabir Khan commented on AS7-672:
--------------------------------
Is this similar to:
{code}
[standalone@localhost:9999 /] :read-resource(recursive-depth=2,include-runtime=true)
{
"outcome" => "success",
"result" => {
...
"server-state" => "running",
{code}
and
{code}
[domain@localhost:9999 /] /host=master/server=server-one:read-resource(recursive-depth=2,include-runtime=true)
{
"outcome" => "success",
"result" => {
...
"server-state" => "running",
{code}
I take it this should be per host entry, and the main aim is to check whether a slave is out of sync with the master HC?
> HostController status
> ---------------------
>
> Key: AS7-672
> URL: https://issues.jboss.org/browse/AS7-672
> Project: Application Server 7
> Issue Type: Task
> Components: Domain Management
> Reporter: Brian Stansberry
> Assignee: Kabir Khan
> Fix For: 7.1.0.Final
>
>
> Analogous to a server's status, but for a HostController.
--
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
14 years, 3 months
[JBoss JIRA] Created: (JBRULES-3100) Long.MAX_VALUE duration for "A and not(B after A)" type rules causes invalid session clock time in rule RHS when running with pseudo clock
by Richard Calmbach (JIRA)
Long.MAX_VALUE duration for "A and not(B after A)" type rules causes invalid session clock time in rule RHS when running with pseudo clock
------------------------------------------------------------------------------------------------------------------------------------------
Key: JBRULES-3100
URL: https://issues.jboss.org/browse/JBRULES-3100
Project: Drools
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: drools-core, drools-core (fusion)
Affects Versions: 5.2.0.Final
Reporter: Richard Calmbach
Assignee: Mark Proctor
Ok, this is a subtle one. How did I run into this one? I need dynamic timers that are started in the RHS because Drools LHS syntax does not support dynamic timers. In order to be able to unit test my rules even with dynamic timers, I rely on the session clock (aka TimerService) to schedule and execute these manually defined jobs. Works beautifully with the real-time clock for all my rules, and also works with the pseudo clock for rules that don't have a negated unbounded "after" clause. However, the pseudo clock breaks the timers that are scheduled in the RHS of rules that have a LHS of type "A and not(B after A)". The reason is extremely subtle, and understanding it required an excursion into the inner workings of the rule engine, in particular its mechanism for scheduling activations of rules with non-zero duration. (Good thing that javadoc and sources are now available via Maven repositories for all Drools artifacts. Thank you, Drools team and the m2eclipse "Download Artifact Sources" checkbox!)
In PseudoClockScheduler.runCallBacks(), the pseudo clock checks whether any scheduled jobs need to be executed by comparing their trigger times to the current time (this.timer). For every job that is due, e.g., a scheduled rule activation, the pseudo clock saves this.timer to a local variable (savedTimer) and sets this.timer temporarily to the trigger time of the job (keeping this.timer at that value for the duration of the job execution, e.g., the firing of the scheduled activation). Now, for rules with a bounded duration (e.g., "A and not(B after[0s, 10s] A"), this trigger time is a reasonable value (current time + duration), and everything works out. However, rules of type "A and not(B after A)" (i.e., with negated unbounded after) have a duration value of Long.MAX_VALUE. When DurationTimer.createTrigger() constructs a new PointInTimeTrigger object, it sets the trigger time to "current time + duration", and with a post-epoch current time (i.e., greater than zero) and duration == Long.MAX_VALUE, this causes wrap-around and sets the trigger time to a very large negative number. Up to this point, I think the behavior of the code is intentional (albeit hacky), to ensure that "negated unbounded after" type rules get activated right away (as they should). However, this approach has unintended, buggy consequences as we shall see. When such a scheduled rule fires, then for the duration of its RHS execution, the session clock has an invalid value (very large negative number). The only way how you would know that is if you queried the session clock, say because you're trying to schedule a dynamic timer because Drools LHS syntax only supports static timers. The upshot is that the dynamic timer job is scheduled with "very large negative number + my trigger delay" as the trigger time, which PseudoClockScheduler.runCallBacks() promptly interprets as a job that is due for execution, causing premature and therefore incorrect triggering of my dynamic timer, thereby breaking my unit tests, while the real-time clock does not exhibit this problem. And that's how I spent my Friday.
I can work around this bug by rewriting the "A and not(B after A)" construct so that I'm explicitly comparing the timestamp fields instead of using "after". However, the current Drools implementation is broken in more than one way: Say, you're simulating the events at the original Woodstock (or any other events pre-dating the Unix epoch), and you're setting the pseudo clock to a negative value so that Date.toString() gives you the actual dates of the simulated events. As long as current time is a non-positive value, adding duration == Long.MAX_VALUE will yield a time much, much later than current time. This means that "A and not(B after A)" type rules will not fire when they should because their trigger time is in a future far, far away that will never be reached during the simulation. If I interpret this correctly, this also affects rule activation with the real-time clock if it is set to a negative value (there goes your time traveler market share...).
I'm not sure what the best fix for these bugs is. A real fix probably has to rework how "negated unbounded after" type rule activations get scheduled. The duration == Long.MAX_VALUE hack isn't going to cut it. Maybe these rules don't need scheduling at all since their activations should be created right away? Anyway, tricky stuff.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 3 months
[JBoss JIRA] (AS7-3162) RESTEasy: Unknown servet name javax.ws.rs.core.Application when javax.ws.rs.core.Application subclass is on classpath
by Weinan Li (Commented) (JIRA)
[ https://issues.jboss.org/browse/AS7-3162?page=com.atlassian.jira.plugin.s... ]
Weinan Li commented on AS7-3162:
--------------------------------
https://github.com/liweinan/jboss-as/commit/dcfbe826b50dd5ab35adc7b7ca6da... - anyway, the error log is improved in this situation.
> RESTEasy: Unknown servet name javax.ws.rs.core.Application when javax.ws.rs.core.Application subclass is on classpath
> ----------------------------------------------------------------------------------------------------------------------
>
> Key: AS7-3162
> URL: https://issues.jboss.org/browse/AS7-3162
> Project: Application Server 7
> Issue Type: Bug
> Components: REST
> Affects Versions: 7.1.0.CR1b
> Reporter: Pavel Janousek
> Assignee: Weinan Li
> Priority: Blocker
>
> I've deployment like this:
> {code}
> @Deployment
> public static Archive<?> deploy() {
> WebArchive war = ShrinkWrap.create(WebArchive.class, "jaxrsnoap.war");
> war.addPackage(HttpRequest.class.getPackage());
> war.addClasses(ApplicationTestCase.class, ApplicationInvalid1.class);
> war.addAsWebInfResource(
> WebXml.get("<servlet-mapping>\n"
> + " <servlet-name>javax.ws.rs.core.Application</servlet-name>\n"
> + " <url-pattern>/myjaxrs/*</url-pattern>\n"
> + "</servlet-mapping>\n" + "\n"), "web.xml");
> return war;
> }
> {code}
> This deployment fails during deploying because of "Context [/jaxrsnoap] startup failed due to previous errors: java.lang.IllegalArgumentException: Servlet mapping specifies an unknown servlet name javax.ws.rs.core.Application"
> ApplicationInvalid1 is empty subclass of javax.ws.rs.core.Application like:
> {code}
> public class ApplicationInvalid1 extends Application {
> private Set<Class<?>> classes = new HashSet<Class<?>>();
> public ApplicationInvalid1() {
> }
> @Override
> public Set<Class<?>> getClasses() {
> return classes;
> }
> }
> {code}
> There isn't any reference to this class in web.xml or somewhere else. Only class is placed on classpath. If I remove this class from deployment (= change appropriate line to "war.addClasses(ApplicationTestCase.class);", everything will be OK.
--
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
14 years, 3 months