Re: [rules-users] drools licensing question from springsource

2008-05-08 Thread ekke

thx - I gave your remarks to springsource
ekke

Mark Proctor wrote:
> 
> Mark Proctor wrote:
>> ekke wrote:
>>> SpringSource is just creating an EnterpriseBundleRepository for 
>>> OpenSource
>>> Software -
>>> they bundle the jars as OSGI bundle which is very helpful if you're
>>> developing
>>> an eclipse equinox OSGI application
>>>
>>> http://www.springsource.com/repository/app/bundle
>>>
>>> I've requested a bundle for Drools
>>> they have a question regarding licensing
>>>   
>> I'm not really suited to giving SpringSource legal advice, as I'm not 
>> a lawyer, best they speak to their own legal department. The JSR94 
>> license is on the sun download page, and the drools implementation 
>> part of this is under the Apache Software License.
> However I would urge springsource to please ignore the blight that is
> JSR94.
>>> https://issuetracker.springsource.com/browse/BRITS-4
>>>
>>> perhaps someone can help them
>>> thx
>>> ekke
>>>   
>>
>>
> 
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> 
> 

-- 
View this message in context: 
http://www.nabble.com/drools-licensing-question-from-springsource-tp17127700p17141334.html
Sent from the drools - user mailing list archive at Nabble.com.

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] drools licensing question from springsource

2008-05-08 Thread Mark Proctor

Mark Proctor wrote:

ekke wrote:
SpringSource is just creating an EnterpriseBundleRepository for 
OpenSource

Software -
they bundle the jars as OSGI bundle which is very helpful if you're
developing
an eclipse equinox OSGI application

http://www.springsource.com/repository/app/bundle

I've requested a bundle for Drools
they have a question regarding licensing
  
I'm not really suited to giving SpringSource legal advice, as I'm not 
a lawyer, best they speak to their own legal department. The JSR94 
license is on the sun download page, and the drools implementation 
part of this is under the Apache Software License.

However I would urge springsource to please ignore the blight that is JSR94.

https://issuetracker.springsource.com/browse/BRITS-4

perhaps someone can help them
thx
ekke
  





___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] drools licensing question from springsource

2008-05-08 Thread Mark Proctor

ekke wrote:

SpringSource is just creating an EnterpriseBundleRepository for OpenSource
Software -
they bundle the jars as OSGI bundle which is very helpful if you're
developing
an eclipse equinox OSGI application

http://www.springsource.com/repository/app/bundle

I've requested a bundle for Drools
they have a question regarding licensing
  
I'm not really suited to giving SpringSource legal advice, as I'm not a 
lawyer, best they speak to their own legal department. The JSR94 license 
is on the sun download page, and the drools implementation part of this 
is under the Apache Software License.

https://issuetracker.springsource.com/browse/BRITS-4

perhaps someone can help them
thx
ekke
  


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Multiple Action

2008-05-08 Thread Cabou, Carl
All

 

I'm trying set up multiple action in a decision table.

 

RuleTable setCalculateRate

 

 

CONDITION

ACTION

ACTION

myData:CalcData

myData

comboboxPPTAL1 == "$1"

setCalculatedRate("$1")


setCalculatedPremium( myData.getTotalUnits() * $1 )

Radius input

Calculated Rate

Calculated Rate

A

18

18

B

50

50

C

100

100

 

But validation fails with :

 

unknown:1:9 mismatched token '[EMAIL PROTECTED],9:9='<',<79>,1:9]' expecting 
set null

unknown:1:33 mismatched token: [EMAIL PROTECTED],33:33='<',<79>,1:33]; 
expecting type
RIGHT_PAREN 

 

Any help would be appreciated.

 

Carl.

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Problems with drools update site?

2008-05-08 Thread Mark Proctor

We haven't updated the update site with 4.0.7 yet, will do that tomorrow.

Mark
Bagwell, Allen F wrote:
 
I'm wondering if anyone else has had problems updating Drools within 
Eclipse? I have no problems with other plugins, but with Drools I've 
never been able to use the update site. After making sure that Drools 
is uninstalled from Eclipse and attempting to add it via the remote 
site, I always get an Eclipse message stating:
 
"No features found on the selected site(s). Choose a different site or 
site category."
 
In addition, several of the developers on my team who did manage to 
get the update site to work cannot get it to recognize that 4.0.7 is 
now available. The "search for updates of the currently installed 
features" doesn't return 4.0.7 as ready to upload when they have 4.0.4 
installed. If they try to detect 4.0.7 as a new feature, they get the 
same message above that I've been getting about no features found.
 
I've re-checked the URL and re-copied-n-pasted it several times from 
the web site. We are all using Europa and trying to use the "Drools 
4.0.7 Eclipse Workbench for Europa 3.3" URL.
 
Any suggestions?
 
-A
 
 
 
 



___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
  


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Problems with drools update site?

2008-05-08 Thread Edson Tirelli
   Allen,

   The update site was updated :) this afternoon... so it may still have a
synch/cache/whatever problem. I will take a look. I also asked Kris to take
a look.
   I will let you know.

[]s
   Edson

2008/5/8 Bagwell, Allen F <[EMAIL PROTECTED]>:

>
> I'm wondering if anyone else has had problems updating Drools within
> Eclipse? I have no problems with other plugins, but with Drools I've never
> been able to use the update site. After making sure that Drools is
> uninstalled from Eclipse and attempting to add it via the remote site, I
> always get an Eclipse message stating:
>
> "No features found on the selected site(s). Choose a different site or site
> category."
>
> In addition, several of the developers on my team who did manage to get the
> update site to work cannot get it to recognize that 4.0.7 is now available.
> The "search for updates of the currently installed features" doesn't return
> 4.0.7 as ready to upload when they have 4.0.4 installed. If they try to
> detect 4.0.7 as a new feature, they get the same message above that I've
> been getting about no features found.
>
> I've re-checked the URL and re-copied-n-pasted it several times from the
> web site. We are all using Europa and trying to use the "Drools 4.0.7
> Eclipse Workbench for Europa 3.3" URL.
>
> Any suggestions?
>
> -A
>
>
>
>
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
Edson Tirelli
JBoss Drools Core Development
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Problems with drools update site?

2008-05-08 Thread Bagwell, Allen F

I'm wondering if anyone else has had problems updating Drools within Eclipse? I 
have no problems with other plugins, but with Drools I've never been able to 
use the update site. After making sure that Drools is uninstalled from Eclipse 
and attempting to add it via the remote site, I always get an Eclipse message 
stating:

"No features found on the selected site(s). Choose a different site or site 
category."

In addition, several of the developers on my team who did manage to get the 
update site to work cannot get it to recognize that 4.0.7 is now available. The 
"search for updates of the currently installed features" doesn't return 4.0.7 
as ready to upload when they have 4.0.4 installed. If they try to detect 4.0.7 
as a new feature, they get the same message above that I've been getting about 
no features found.

I've re-checked the URL and re-copied-n-pasted it several times from the web 
site. We are all using Europa and trying to use the "Drools 4.0.7 Eclipse 
Workbench for Europa 3.3" URL.

Any suggestions?

-A
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Question about insertLogical

2008-05-08 Thread Edson Tirelli
  Sounds like a bug to me. The order of the statements should not cause any
change in the behavior.
  Can you please open a JIRA for it attaching your test case?

  Thanks
Edson

2008/5/8 Gras, Patrick <[EMAIL PROTECTED]>:

>  Hello,
>
> I have a question because insertLogical does not behave as I expected.
>
> Here is the example I use; I have a class 'cat' that is dynamic (JavaBean
> with PropertyChangeSupport ) with only a 'name' attribute.
>
> Then I have following rule:
>
> *rule* "test"
>* when*
> $cat:Cat( name == "tom" )
>* then*
> $cat.setName("cat");
>* insertLogical*(*new* String("test"));
>
> *end*
>
> When I test the rule against a cat named tom, the logical inserted fact is
> not retracted. (So the fact is inserted because the rule matches, but is not
> retracted even if the rule is no more matching at the end.)
>
> If I change the order of the RHS, it works fine. The fact is inserted and
> then retracted.
>
> *rule* "test"
>* when*
> $cat:Cat( name == "tom" )
>* then*
>* insertLogical*(*new* String("test"));
> $cat.setName("cat");
> *end*
>
> Is that the normal behavior ?
>
> -Patrick
>
> *Patrick Gras*
> *GENERALI Assurances*
> Service Informatique
> Avenue Perdtemps 23
> 1260 Nyon 1
> Tél. direct: +41 58 471 05 87
> *>*
> P* Please consider the environment before printing this E-Mail!***
>
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
Edson Tirelli
JBoss Drools Core Development
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Facts - can they be non Java Beans

2008-05-08 Thread Edson Tirelli
 Drools does not look at the class attributes. All he cares are the
methods. In your example:

rule "Some Rule"
 when
   $MyFact :A( $first : first )
  then

Will work just fine, because when drools see "first", he will look for a
method called either "getFirst()" or "isFirst()" or in last case "first()".

[]s
Edson



2008/5/8 sridhar123 <[EMAIL PROTECTED]>:

>
> I am trying to access Fact objects that are not always java beans. Example:
>
> Class A {
>  Arraylist  Class B b
>
>  getFirst() { return b.first() }
>
>  }
>
> In above Class i dont have any variable called "first" - but returning
> first
> element of the list.
>
> Now following DRL throws compilation errors.
>
> rule "Some Rule"
>  when
>$MyFact :A()
>$first : $myFact.getFirst()
>   then
>   
>   
> end
>
> Is there any way to execute the above - or i should have class variable
> "first" and access that?
>
> thank you
> Sridhar
> --
> View this message in context:
> http://www.nabble.com/Facts---can-they-be-non-Java-Beans-tp17130130p17130130.html
> Sent from the drools - user mailing list archive at Nabble.com.
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
Edson Tirelli
JBoss Drools Core Development
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Facts - can they be non Java Beans

2008-05-08 Thread sridhar123

I am trying to access Fact objects that are not always java beans. Example:

Class A {
  Arraylist  Class B b

  getFirst() { return b.first() }

  }

In above Class i dont have any variable called "first" - but returning first
element of the list.

Now following DRL throws compilation errors. 

rule "Some Rule"
  when
$MyFact :A()
$first : $myFact.getFirst() 
   then
   
   
end

Is there any way to execute the above - or i should have class variable
"first" and access that?

thank you
Sridhar 
-- 
View this message in context: 
http://www.nabble.com/Facts---can-they-be-non-Java-Beans-tp17130130p17130130.html
Sent from the drools - user mailing list archive at Nabble.com.

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Newbie question / NoSuchMethodError error

2008-05-08 Thread Edson Tirelli
   Carl,

   Drools 4.0.x is indeed JDK 1.4+ compatible.

   Can you please share your complete stack trace?
   The snippet you showed:

Caused by: java.lang.NoSuchMethodError: java.lang.Integer.valueOf(I
)Ljava/lang/Integer;
   at AL_Calculation.Rule_ setSelecte_10_0.consequence(Unknown Source)

   Says that the problem is happening the consequence of a rule called
something like:

"setSelecte_10_0"

   Where _ is any non-valid character for classnames.

   That is not the rule you showed before.

   []s
   Edson


2008/5/8 Cabou, Carl <[EMAIL PROTECTED]>:

> So Does anybody know how I can make Drools 4 API works in JAVA1.4 ??
>
> Carl
>
> -Message d'origine-
> De : [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] De la part de Cabou, Carl
> Envoyé : jeudi 8 mai 2008 10:41
> À : Rules Users List
> Objet : RE: [rules-users] Newbie question / NoSuchMethodError error
>
> Thomas,
>
> I can not move the headings since I do receive "0 - 50" as a String and
> then I have to return an Integer.
>
> I've made a little program beside this to test my rule, I've launched it
> using java5, it worked fine, but it does crash using java1.4.
> I just found out the Integer.valueOf(int) is a new feature of java5.
>
> So I guess I must try to run my web application using java5.
>
> Carl.
>
> -Message d'origine-
> De : [EMAIL PROTECTED] [mailto:
> [EMAIL PROTECTED] De la part de Hehl, Thomas
> Envoyé : jeudi 8 mai 2008 10:20
> À : 'Rules Users List'
> Objet : RE: [rules-users] Newbie question / NoSuchMethodError error
>
> No, really, java uses the valueOf methods internally to try to convert the
> object specified (a String) into an Integer so it can do the comparison.
> You
> can't do selected == "0 - 50" because "0 - 50" is a String and you cant
> compare it to an Integer.
>
> So what are you trying to do? If you want selected to be in the range
> between 0 and 50 inclusive, then you need to change the heading in your
> decision table. Here's an example:
>
> daysBeforeSummons >= $1, daysBeforeSummons <= $2
>
> and then you specify the data in your column as 0,50.
>
> Good luck!
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Cabou, Carl
> Sent: Thursday, May 08, 2008 10:12 AM
> To: Rules Users List
> Subject: RE: [rules-users] Newbie question / NoSuchMethodError error
>
> Thank you for answering Thomas.
>
> Here is the code below, nothing fancy:
>
>
> public void setSelected (Integer calculatedSetSelected)
> {
>this. calculatedSetSelected = calculatedSetSelected;
> }
>
> In fact, the problem IS that it is taking an Integer and some Drools
> Internal method want to convert it using Integer.valueOf, but there is no
> Integer.valueOf taking Integer.
>
> There is something weird, in the stack trace, I get :
>
> Caused by: java.lang.NoSuchMethodError:
> java.lang.Integer.valueOf(I)Ljava/lang/Integer;
>at AL_Calculation.Rule_ setSelecte_10_0.consequence(Unknown Source)
>
> There is a missing "d" before "_10" ...
>
> Carl
>
>
> -Message d'origine-
> De : [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] De la part de Hehl, Thomas
> Envoyé : jeudi 8 mai 2008 09:35
> À : 'Rules Users List'
> Objet : RE: [rules-users] Newbie question / NoSuchMethodError error
>
> Yep. Post the code for setSelected(). I'm guessing it takes an Integer or
> int and you're passing it a String.
>
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Cabou, Carl
> Sent: Thursday, May 08, 2008 9:23 AM
> To: rules-users@lists.jboss.org
> Subject: [rules-users] Newbie question / NoSuchMethodError error
>
> Greetings,
>
> I'm new to Drools and I've written a decision table based rule using excel.
> The rule validates ok and I've deployed my package fine.
>
> I've written a piece of code to test my rules, I want to set the
> calculatedRate to 125 when I get selected field equal to "0 - 50" :
>
> ...
> StatelessSession statelessSession = rb.newStatelessSession(); Data data=new
> Data(); data.setSelected("0 - 50"); statelessSession.execute(data); // set
> private Integer field ...
>
> When I run the code I get a exeption :
>
> java.lang.NoSuchMethodError:
> java.lang.Integer.valueOf(I)Ljava/lang/Integer;
>
> I don't understand why Drools tries to convert to Integer something which
> is
> already Integer 
>
> ---
> Here is the rules code.
>
>
> rule "setCalculateRate_11"
>
>salience 65525
>when
>Data(selected == "0 - 50")
>then
>object.setCalculatedRate(125);
> end
>
>
> --
> The CalculatedRate field is a java.lang.Integer object.
>
> Does anybody has an idea ??
>
> Regards,
> Carl.
>
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> http

Re: [rules-users] 4.0.7 Maven Repo?

2008-05-08 Thread Edson Tirelli
  It was updated during the release. Check it out:

http://repository.jboss.com/maven2/org/drools/

   []s
   Edson

2008/5/8 Ingomar Otter <[EMAIL PROTECTED]>:

> As 4.0.7 seems to be GA, will repository.jboss.com/maven2 also be
> updated?
> --I
>
> --
> Ingomar Otter
> Chief Technology Officer
> mailto:[EMAIL PROTECTED]
> Mobile: +49 172 2367867
>
> Valtech GmbH
> Bahnstraße 16
> 40212 Düsseldorf
> Germany
>
> Phone: +49 (0)211 179237-0
> Fax: +49 211 179237-19
>
> http://www.valtech.de
>
> Geschäftsführer: Ingo Kriescher
> Amtsgericht Düsseldorf HRB48672
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
Edson Tirelli
JBoss Drools Core Development
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools 4.0.7 released

2008-05-08 Thread Edson Tirelli
   All,

   We just released Drools v4.0.7.
   This is an important bugfix release because it has the cumulative fixes
from the version 4.0.5 and 4.0.6 that were rolled back. We strongly advise
you all to update.

   We would like to thank all the people that helped us, testing,
developing, providing patches, ideas and recommendation, and special to the
ones that answered our call for tests.

   Bellow you can find the cumulative release notes for Drools version
4.0.5, 4.0.6 and 4.0.7.

   Happy drooling,
   Edson

-- 
Edson Tirelli
JBoss Drools Core Development
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com


Release Notes for JBoss Drools Includes versions: 4.0.5 4.0.6 4.0.7
--
Feature Request

   - [ JBRULES-1307  ]
   Update and expand documentation for decision tables to show actual uses for
   all keywords
   - [ JBRULES-1338  ]
   DirectoryScanner should only take into account relevant files
   - [ JBRULES-1473  ] Add a
   configuration parameter to allow Drools to dump all generated java source
   code
   - [ JBRULES-1532  ]
   Import decision table into jBRMS application
   - [ JBRULES-1577  ]
   BeforeActivationFireEvent.toString() should print out activation number
   - [ JBRULES-1590  ]
   ShadowProxuUtils and org.hibernate.collection.PersistentSet

Bug

   - [ JBRULES-  ] Final
   methods of POJO's aer never evaluated
   - [ JBRULES-1216  ]
   log4j.xml contained in drools-repository.jar
   - [ JBRULES-1286  ]
   Incorrect information in section 2.5.7.3. Agenda Filters
   - [ JBRULES-1315  ] Rule
   that uses a 'collect' and 'from' clause together causes problem
   - [ JBRULES-1327  ]
   drools-ant task and java.lang.ClassCastException:
   org.drools.reteoo.ReteooRuleBase
   - [ JBRULES-1329  ]
   RuleBase.removeRule() prevents other rules from being applied
   - [ JBRULES-1330  ] Using
   RuleBase in multithread application server environment
   - [ JBRULES-1357  ]
   RuleBuildContext does not initialize package of rule
   - [ JBRULES-1388  ] Eval
   error when using multiple declarations
   - [ JBRULES-1389  ] using
   eval after using or causes ClassCastException
   - [ JBRULES-1392  ] Rules
   behave incorrectly (randomly) in multi-threaded environment
   - [ JBRULES-1414  ]
   Cannot build from source -- missing directory or pom file
   - [ JBRULES-1415  ]
   Certain uses of from causes NullPointerException in WorkingMemoryLogger
   - [ JBRULES-1423  ]
   ObjectFactory$ObjectEqualsComparator.equals throws NPE if second arg is null

   - [ JBRULES-1426  ] NPE
   in ObjectFactory$ObjectEqualsComparator
   - [ JBRULES-1428  ]
   ClassCastException when comparing BigDecimal fields
   - [ JBRULES-1429  ] NPE
   in ObjectEqualsComparator
   - [ JBRULES-1435  ] NPE
   if rule checks a Long field for null, and a fact is passed in with Long
   field that is NOT null.
   - [ JBRULES-1436  ]
   Filescanner throws NPE when there's a compile error.
   - [ JBRULES-1438  ]
   FactTemplate Property Access leads to RuleBuilder Exception
   - [ JBRULES-1443  ]
   retract of Fact Template leads to NPE
   - [ JBRULES-1446  ]
   ClassCastException when iterating over an array using "from"
   - [ JBRULES-1447  ]
   Parser error when using keyword operators
   - [ JBRULES-1448  ]
   MVELDataProver throws nullpointer on null return value from expression
   - [ JBRULES-1451  ] LHS
   expression comparing a Boolean to a String does not fail but always returns
   true
   - 

[rules-users] 4.0.7 Maven Repo?

2008-05-08 Thread Ingomar Otter

As 4.0.7 seems to be GA, will repository.jboss.com/maven2 also be
updated?
--I

--
Ingomar Otter
Chief Technology Officer
mailto:[EMAIL PROTECTED]
Mobile: +49 172 2367867

Valtech GmbH
Bahnstraße 16
40212 Düsseldorf
Germany

Phone: +49 (0)211 179237-0
Fax: +49 211 179237-19

http://www.valtech.de

Geschäftsführer: Ingo Kriescher
Amtsgericht Düsseldorf HRB48672
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] drools licensing question from springsource

2008-05-08 Thread ekke

SpringSource is just creating an EnterpriseBundleRepository for OpenSource
Software -
they bundle the jars as OSGI bundle which is very helpful if you're
developing
an eclipse equinox OSGI application

http://www.springsource.com/repository/app/bundle

I've requested a bundle for Drools
they have a question regarding licensing

https://issuetracker.springsource.com/browse/BRITS-4

perhaps someone can help them
thx
ekke
-- 
View this message in context: 
http://www.nabble.com/drools-licensing-question-from-springsource-tp17127700p17127700.html
Sent from the drools - user mailing list archive at Nabble.com.

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


RE: [rules-users] Newbie question / NoSuchMethodError error

2008-05-08 Thread Cabou, Carl
I'am using Drools in a web app running under JBoss with JDK1.4, and I MUST stay 
in jdk1.4.
That's why I get these issues because for some reason Drools want to use 
java.lang.Integer.valueOf(int) which is available only in java5 !!! (drools is 
supposed to work on jdk1.4 + ...)

Carl

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Hehl, Thomas
Envoyé : jeudi 8 mai 2008 10:59
À : 'Rules Users List'
Objet : RE: [rules-users] Newbie question / NoSuchMethodError error

I'm not entirely sure I understand what you're saying, but you could write a
new property that stores the int value and takes and returns a String.

Anyway, glad you figured it out.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cabou, Carl
Sent: Thursday, May 08, 2008 10:41 AM
To: Rules Users List
Subject: RE: [rules-users] Newbie question / NoSuchMethodError error

Thomas, 

I can not move the headings since I do receive "0 - 50" as a String and then
I have to return an Integer.

I've made a little program beside this to test my rule, I've launched it
using java5, it worked fine, but it does crash using java1.4.
I just found out the Integer.valueOf(int) is a new feature of java5.

So I guess I must try to run my web application using java5.

Carl.

-Message d'origine-
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] De la part de Hehl, Thomas
Envoyé : jeudi 8 mai 2008 10:20
À : 'Rules Users List'
Objet : RE: [rules-users] Newbie question / NoSuchMethodError error

No, really, java uses the valueOf methods internally to try to convert the
object specified (a String) into an Integer so it can do the comparison. You
can't do selected == "0 - 50" because "0 - 50" is a String and you cant
compare it to an Integer.

So what are you trying to do? If you want selected to be in the range
between 0 and 50 inclusive, then you need to change the heading in your
decision table. Here's an example:

daysBeforeSummons >= $1, daysBeforeSummons <= $2

and then you specify the data in your column as 0,50.

Good luck!

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cabou, Carl
Sent: Thursday, May 08, 2008 10:12 AM
To: Rules Users List
Subject: RE: [rules-users] Newbie question / NoSuchMethodError error

Thank you for answering Thomas.

Here is the code below, nothing fancy:  


public void setSelected (Integer calculatedSetSelected) 
{
this. calculatedSetSelected = calculatedSetSelected;
}

In fact, the problem IS that it is taking an Integer and some Drools
Internal method want to convert it using Integer.valueOf, but there is no
Integer.valueOf taking Integer.

There is something weird, in the stack trace, I get :

Caused by: java.lang.NoSuchMethodError:
java.lang.Integer.valueOf(I)Ljava/lang/Integer;
at AL_Calculation.Rule_ setSelecte_10_0.consequence(Unknown Source)

There is a missing "d" before "_10" ...

Carl


-Message d'origine-
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] De la part de Hehl, Thomas
Envoyé : jeudi 8 mai 2008 09:35
À : 'Rules Users List'
Objet : RE: [rules-users] Newbie question / NoSuchMethodError error

Yep. Post the code for setSelected(). I'm guessing it takes an Integer or
int and you're passing it a String.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cabou, Carl
Sent: Thursday, May 08, 2008 9:23 AM
To: rules-users@lists.jboss.org
Subject: [rules-users] Newbie question / NoSuchMethodError error

Greetings, 

I'm new to Drools and I've written a decision table based rule using excel.
The rule validates ok and I've deployed my package fine.

I've written a piece of code to test my rules, I want to set the
calculatedRate to 125 when I get selected field equal to "0 - 50" : 

...
StatelessSession statelessSession = rb.newStatelessSession(); Data data=new
Data(); data.setSelected("0 - 50"); statelessSession.execute(data); // set
private Integer field ...

When I run the code I get a exeption : 

java.lang.NoSuchMethodError: java.lang.Integer.valueOf(I)Ljava/lang/Integer;

I don't understand why Drools tries to convert to Integer something which is
already Integer 

---
Here is the rules code.


rule "setCalculateRate_11"

salience 65525
when
Data(selected == "0 - 50")
then
object.setCalculatedRate(125);
end


--
The CalculatedRate field is a java.lang.Integer object.

Does anybody has an idea ??

Regards,
Carl.


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.

RE: [rules-users] Newbie question / NoSuchMethodError error

2008-05-08 Thread Cabou, Carl
So Does anybody know how I can make Drools 4 API works in JAVA1.4 ??

Carl

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Cabou, Carl
Envoyé : jeudi 8 mai 2008 10:41
À : Rules Users List
Objet : RE: [rules-users] Newbie question / NoSuchMethodError error

Thomas, 

I can not move the headings since I do receive "0 - 50" as a String and then I 
have to return an Integer.

I've made a little program beside this to test my rule, I've launched it using 
java5, it worked fine, but it does crash using java1.4.
I just found out the Integer.valueOf(int) is a new feature of java5.

So I guess I must try to run my web application using java5.

Carl.

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Hehl, Thomas
Envoyé : jeudi 8 mai 2008 10:20
À : 'Rules Users List'
Objet : RE: [rules-users] Newbie question / NoSuchMethodError error

No, really, java uses the valueOf methods internally to try to convert the
object specified (a String) into an Integer so it can do the comparison. You
can't do selected == "0 - 50" because "0 - 50" is a String and you cant
compare it to an Integer.

So what are you trying to do? If you want selected to be in the range
between 0 and 50 inclusive, then you need to change the heading in your
decision table. Here's an example:

daysBeforeSummons >= $1, daysBeforeSummons <= $2

and then you specify the data in your column as 0,50.

Good luck!

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cabou, Carl
Sent: Thursday, May 08, 2008 10:12 AM
To: Rules Users List
Subject: RE: [rules-users] Newbie question / NoSuchMethodError error

Thank you for answering Thomas.

Here is the code below, nothing fancy:  


public void setSelected (Integer calculatedSetSelected) 
{
this. calculatedSetSelected = calculatedSetSelected;
}

In fact, the problem IS that it is taking an Integer and some Drools
Internal method want to convert it using Integer.valueOf, but there is no
Integer.valueOf taking Integer.

There is something weird, in the stack trace, I get :

Caused by: java.lang.NoSuchMethodError:
java.lang.Integer.valueOf(I)Ljava/lang/Integer;
at AL_Calculation.Rule_ setSelecte_10_0.consequence(Unknown Source)

There is a missing "d" before "_10" ...

Carl


-Message d'origine-
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] De la part de Hehl, Thomas
Envoyé : jeudi 8 mai 2008 09:35
À : 'Rules Users List'
Objet : RE: [rules-users] Newbie question / NoSuchMethodError error

Yep. Post the code for setSelected(). I'm guessing it takes an Integer or
int and you're passing it a String.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cabou, Carl
Sent: Thursday, May 08, 2008 9:23 AM
To: rules-users@lists.jboss.org
Subject: [rules-users] Newbie question / NoSuchMethodError error

Greetings, 

I'm new to Drools and I've written a decision table based rule using excel.
The rule validates ok and I've deployed my package fine.

I've written a piece of code to test my rules, I want to set the
calculatedRate to 125 when I get selected field equal to "0 - 50" : 

...
StatelessSession statelessSession = rb.newStatelessSession(); Data data=new
Data(); data.setSelected("0 - 50"); statelessSession.execute(data); // set
private Integer field ...

When I run the code I get a exeption : 

java.lang.NoSuchMethodError: java.lang.Integer.valueOf(I)Ljava/lang/Integer;

I don't understand why Drools tries to convert to Integer something which is
already Integer 

---
Here is the rules code.


rule "setCalculateRate_11"

salience 65525
when
Data(selected == "0 - 50")
then
object.setCalculatedRate(125);
end


--
The CalculatedRate field is a java.lang.Integer object.

Does anybody has an idea ??

Regards,
Carl.


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


RE: [rules-users] Newbie question / NoSuchMethodError error

2008-05-08 Thread Hehl, Thomas
I'm not entirely sure I understand what you're saying, but you could write a
new property that stores the int value and takes and returns a String.

Anyway, glad you figured it out.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cabou, Carl
Sent: Thursday, May 08, 2008 10:41 AM
To: Rules Users List
Subject: RE: [rules-users] Newbie question / NoSuchMethodError error

Thomas, 

I can not move the headings since I do receive "0 - 50" as a String and then
I have to return an Integer.

I've made a little program beside this to test my rule, I've launched it
using java5, it worked fine, but it does crash using java1.4.
I just found out the Integer.valueOf(int) is a new feature of java5.

So I guess I must try to run my web application using java5.

Carl.

-Message d'origine-
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] De la part de Hehl, Thomas
Envoyé : jeudi 8 mai 2008 10:20
À : 'Rules Users List'
Objet : RE: [rules-users] Newbie question / NoSuchMethodError error

No, really, java uses the valueOf methods internally to try to convert the
object specified (a String) into an Integer so it can do the comparison. You
can't do selected == "0 - 50" because "0 - 50" is a String and you cant
compare it to an Integer.

So what are you trying to do? If you want selected to be in the range
between 0 and 50 inclusive, then you need to change the heading in your
decision table. Here's an example:

daysBeforeSummons >= $1, daysBeforeSummons <= $2

and then you specify the data in your column as 0,50.

Good luck!

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cabou, Carl
Sent: Thursday, May 08, 2008 10:12 AM
To: Rules Users List
Subject: RE: [rules-users] Newbie question / NoSuchMethodError error

Thank you for answering Thomas.

Here is the code below, nothing fancy:  


public void setSelected (Integer calculatedSetSelected) 
{
this. calculatedSetSelected = calculatedSetSelected;
}

In fact, the problem IS that it is taking an Integer and some Drools
Internal method want to convert it using Integer.valueOf, but there is no
Integer.valueOf taking Integer.

There is something weird, in the stack trace, I get :

Caused by: java.lang.NoSuchMethodError:
java.lang.Integer.valueOf(I)Ljava/lang/Integer;
at AL_Calculation.Rule_ setSelecte_10_0.consequence(Unknown Source)

There is a missing "d" before "_10" ...

Carl


-Message d'origine-
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] De la part de Hehl, Thomas
Envoyé : jeudi 8 mai 2008 09:35
À : 'Rules Users List'
Objet : RE: [rules-users] Newbie question / NoSuchMethodError error

Yep. Post the code for setSelected(). I'm guessing it takes an Integer or
int and you're passing it a String.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cabou, Carl
Sent: Thursday, May 08, 2008 9:23 AM
To: rules-users@lists.jboss.org
Subject: [rules-users] Newbie question / NoSuchMethodError error

Greetings, 

I'm new to Drools and I've written a decision table based rule using excel.
The rule validates ok and I've deployed my package fine.

I've written a piece of code to test my rules, I want to set the
calculatedRate to 125 when I get selected field equal to "0 - 50" : 

...
StatelessSession statelessSession = rb.newStatelessSession(); Data data=new
Data(); data.setSelected("0 - 50"); statelessSession.execute(data); // set
private Integer field ...

When I run the code I get a exeption : 

java.lang.NoSuchMethodError: java.lang.Integer.valueOf(I)Ljava/lang/Integer;

I don't understand why Drools tries to convert to Integer something which is
already Integer 

---
Here is the rules code.


rule "setCalculateRate_11"

salience 65525
when
Data(selected == "0 - 50")
then
object.setCalculatedRate(125);
end


--
The CalculatedRate field is a java.lang.Integer object.

Does anybody has an idea ??

Regards,
Carl.


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


RE: [rules-users] Newbie question / NoSuchMethodError error

2008-05-08 Thread Cabou, Carl
Thomas, 

I can not move the headings since I do receive "0 - 50" as a String and then I 
have to return an Integer.

I've made a little program beside this to test my rule, I've launched it using 
java5, it worked fine, but it does crash using java1.4.
I just found out the Integer.valueOf(int) is a new feature of java5.

So I guess I must try to run my web application using java5.

Carl.

-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Hehl, Thomas
Envoyé : jeudi 8 mai 2008 10:20
À : 'Rules Users List'
Objet : RE: [rules-users] Newbie question / NoSuchMethodError error

No, really, java uses the valueOf methods internally to try to convert the
object specified (a String) into an Integer so it can do the comparison. You
can't do selected == "0 - 50" because "0 - 50" is a String and you cant
compare it to an Integer.

So what are you trying to do? If you want selected to be in the range
between 0 and 50 inclusive, then you need to change the heading in your
decision table. Here's an example:

daysBeforeSummons >= $1, daysBeforeSummons <= $2

and then you specify the data in your column as 0,50.

Good luck!

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cabou, Carl
Sent: Thursday, May 08, 2008 10:12 AM
To: Rules Users List
Subject: RE: [rules-users] Newbie question / NoSuchMethodError error

Thank you for answering Thomas.

Here is the code below, nothing fancy:  


public void setSelected (Integer calculatedSetSelected) 
{
this. calculatedSetSelected = calculatedSetSelected;
}

In fact, the problem IS that it is taking an Integer and some Drools
Internal method want to convert it using Integer.valueOf, but there is no
Integer.valueOf taking Integer.

There is something weird, in the stack trace, I get :

Caused by: java.lang.NoSuchMethodError:
java.lang.Integer.valueOf(I)Ljava/lang/Integer;
at AL_Calculation.Rule_ setSelecte_10_0.consequence(Unknown Source)

There is a missing "d" before "_10" ...

Carl


-Message d'origine-
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] De la part de Hehl, Thomas
Envoyé : jeudi 8 mai 2008 09:35
À : 'Rules Users List'
Objet : RE: [rules-users] Newbie question / NoSuchMethodError error

Yep. Post the code for setSelected(). I'm guessing it takes an Integer or
int and you're passing it a String.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cabou, Carl
Sent: Thursday, May 08, 2008 9:23 AM
To: rules-users@lists.jboss.org
Subject: [rules-users] Newbie question / NoSuchMethodError error

Greetings, 

I'm new to Drools and I've written a decision table based rule using excel.
The rule validates ok and I've deployed my package fine.

I've written a piece of code to test my rules, I want to set the
calculatedRate to 125 when I get selected field equal to "0 - 50" : 

...
StatelessSession statelessSession = rb.newStatelessSession(); Data data=new
Data(); data.setSelected("0 - 50"); statelessSession.execute(data); // set
private Integer field ...

When I run the code I get a exeption : 

java.lang.NoSuchMethodError: java.lang.Integer.valueOf(I)Ljava/lang/Integer;

I don't understand why Drools tries to convert to Integer something which is
already Integer 

---
Here is the rules code.


rule "setCalculateRate_11"

salience 65525
when
Data(selected == "0 - 50")
then
object.setCalculatedRate(125);
end


--
The CalculatedRate field is a java.lang.Integer object.

Does anybody has an idea ??

Regards,
Carl.


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


RE: [rules-users] Newbie question / NoSuchMethodError error

2008-05-08 Thread Hehl, Thomas
No, really, java uses the valueOf methods internally to try to convert the
object specified (a String) into an Integer so it can do the comparison. You
can't do selected == "0 - 50" because "0 - 50" is a String and you cant
compare it to an Integer.

So what are you trying to do? If you want selected to be in the range
between 0 and 50 inclusive, then you need to change the heading in your
decision table. Here's an example:

daysBeforeSummons >= $1, daysBeforeSummons <= $2

and then you specify the data in your column as 0,50.

Good luck!

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cabou, Carl
Sent: Thursday, May 08, 2008 10:12 AM
To: Rules Users List
Subject: RE: [rules-users] Newbie question / NoSuchMethodError error

Thank you for answering Thomas.

Here is the code below, nothing fancy:  


public void setSelected (Integer calculatedSetSelected) 
{
this. calculatedSetSelected = calculatedSetSelected;
}

In fact, the problem IS that it is taking an Integer and some Drools
Internal method want to convert it using Integer.valueOf, but there is no
Integer.valueOf taking Integer.

There is something weird, in the stack trace, I get :

Caused by: java.lang.NoSuchMethodError:
java.lang.Integer.valueOf(I)Ljava/lang/Integer;
at AL_Calculation.Rule_ setSelecte_10_0.consequence(Unknown Source)

There is a missing "d" before "_10" ...

Carl


-Message d'origine-
De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] De la part de Hehl, Thomas
Envoyé : jeudi 8 mai 2008 09:35
À : 'Rules Users List'
Objet : RE: [rules-users] Newbie question / NoSuchMethodError error

Yep. Post the code for setSelected(). I'm guessing it takes an Integer or
int and you're passing it a String.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cabou, Carl
Sent: Thursday, May 08, 2008 9:23 AM
To: rules-users@lists.jboss.org
Subject: [rules-users] Newbie question / NoSuchMethodError error

Greetings, 

I'm new to Drools and I've written a decision table based rule using excel.
The rule validates ok and I've deployed my package fine.

I've written a piece of code to test my rules, I want to set the
calculatedRate to 125 when I get selected field equal to "0 - 50" : 

...
StatelessSession statelessSession = rb.newStatelessSession(); Data data=new
Data(); data.setSelected("0 - 50"); statelessSession.execute(data); // set
private Integer field ...

When I run the code I get a exeption : 

java.lang.NoSuchMethodError: java.lang.Integer.valueOf(I)Ljava/lang/Integer;

I don't understand why Drools tries to convert to Integer something which is
already Integer 

---
Here is the rules code.


rule "setCalculateRate_11"

salience 65525
when
Data(selected == "0 - 50")
then
object.setCalculatedRate(125);
end


--
The CalculatedRate field is a java.lang.Integer object.

Does anybody has an idea ??

Regards,
Carl.


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


RE: [rules-users] Newbie question / NoSuchMethodError error

2008-05-08 Thread Cabou, Carl
Thank you for answering Thomas.

Here is the code below, nothing fancy:  


public void setSelected (Integer calculatedSetSelected) 
{
this. calculatedSetSelected = calculatedSetSelected;
}

In fact, the problem IS that it is taking an Integer and some Drools Internal 
method want to convert it using Integer.valueOf, but there is no 
Integer.valueOf taking Integer.

There is something weird, in the stack trace, I get :

Caused by: java.lang.NoSuchMethodError: 
java.lang.Integer.valueOf(I)Ljava/lang/Integer;
at AL_Calculation.Rule_ setSelecte_10_0.consequence(Unknown Source)

There is a missing "d" before "_10" ...

Carl


-Message d'origine-
De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Hehl, Thomas
Envoyé : jeudi 8 mai 2008 09:35
À : 'Rules Users List'
Objet : RE: [rules-users] Newbie question / NoSuchMethodError error

Yep. Post the code for setSelected(). I'm guessing it takes an Integer or
int and you're passing it a String.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cabou, Carl
Sent: Thursday, May 08, 2008 9:23 AM
To: rules-users@lists.jboss.org
Subject: [rules-users] Newbie question / NoSuchMethodError error

Greetings, 

I'm new to Drools and I've written a decision table based rule using excel.
The rule validates ok and I've deployed my package fine.

I've written a piece of code to test my rules, I want to set the
calculatedRate to 125 when I get selected field equal to "0 - 50" : 

...
StatelessSession statelessSession = rb.newStatelessSession(); Data data=new
Data(); data.setSelected("0 - 50"); statelessSession.execute(data); // set
private Integer field ...

When I run the code I get a exeption : 

java.lang.NoSuchMethodError: java.lang.Integer.valueOf(I)Ljava/lang/Integer;

I don't understand why Drools tries to convert to Integer something which is
already Integer 

---
Here is the rules code.


rule "setCalculateRate_11"

salience 65525
when
Data(selected == "0 - 50")
then
object.setCalculatedRate(125);
end


--
The CalculatedRate field is a java.lang.Integer object.

Does anybody has an idea ??

Regards,
Carl.


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


RE: [rules-users] Newbie question / NoSuchMethodError error

2008-05-08 Thread Hehl, Thomas
Yep. Post the code for setSelected(). I'm guessing it takes an Integer or
int and you're passing it a String.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Cabou, Carl
Sent: Thursday, May 08, 2008 9:23 AM
To: rules-users@lists.jboss.org
Subject: [rules-users] Newbie question / NoSuchMethodError error

Greetings, 

I'm new to Drools and I've written a decision table based rule using excel.
The rule validates ok and I've deployed my package fine.

I've written a piece of code to test my rules, I want to set the
calculatedRate to 125 when I get selected field equal to "0 - 50" : 

...
StatelessSession statelessSession = rb.newStatelessSession(); Data data=new
Data(); data.setSelected("0 - 50"); statelessSession.execute(data); // set
private Integer field ...

When I run the code I get a exeption : 

java.lang.NoSuchMethodError: java.lang.Integer.valueOf(I)Ljava/lang/Integer;

I don't understand why Drools tries to convert to Integer something which is
already Integer 

---
Here is the rules code.


rule "setCalculateRate_11"

salience 65525
when
Data(selected == "0 - 50")
then
object.setCalculatedRate(125);
end


--
The CalculatedRate field is a java.lang.Integer object.

Does anybody has an idea ??

Regards,
Carl.


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Newbie question / NoSuchMethodError error

2008-05-08 Thread Cabou, Carl
Greetings, 

I'm new to Drools and I've written a decision table based rule using excel.
The rule validates ok and I've deployed my package fine.

I've written a piece of code to test my rules, I want to set the calculatedRate 
to 125 when I get selected field equal to "0 - 50" : 

...
StatelessSession statelessSession = rb.newStatelessSession(); Data data=new 
Data(); data.setSelected("0 - 50"); statelessSession.execute(data); // set 
private Integer field ...

When I run the code I get a exeption : 

java.lang.NoSuchMethodError: java.lang.Integer.valueOf(I)Ljava/lang/Integer;

I don't understand why Drools tries to convert to Integer something which is 
already Integer 

---
Here is the rules code.


rule "setCalculateRate_11"

salience 65525
when
Data(selected == "0 - 50")
then
object.setCalculatedRate(125);
end


--
The CalculatedRate field is a java.lang.Integer object.

Does anybody has an idea ??

Regards,
Carl.


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Question about insertLogical

2008-05-08 Thread Gras, Patrick
Hello,

I have a question because insertLogical does not behave as I expected.

Here is the example I use; I have a class 'cat' that is dynamic (JavaBean with 
PropertyChangeSupport ) with only a 'name' attribute.

Then I have following rule:

rule "test"
when
$cat:Cat( name == "tom" )
then 
$cat.setName("cat");
insertLogical(new String("test"));

end

When I test the rule against a cat named tom, the logical inserted fact is not 
retracted. (So the fact is inserted because the rule matches, but is not 
retracted even if the rule is no more matching at the end.)

If I change the order of the RHS, it works fine. The fact is inserted and then 
retracted.

rule "test"
when
$cat:Cat( name == "tom" )
then 
insertLogical(new String("test"));
$cat.setName("cat");
end

Is that the normal behavior ?

-Patrick

Patrick Gras
GENERALI Assurances 
Service Informatique
Avenue Perdtemps 23
1260 Nyon 1
Tél. direct: +41 58 471 05 87

P Please consider the environment before printing this E-Mail!


___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


RE: [rules-users] Help in using drools

2008-05-08 Thread Hehl, Thomas
That would be one way to accomplish this. For your situation, though, I
would use a stateless session since your servlets are stateless.

One of the things I'd like to see changed in drools is that, while it does
complicated processing and returns complex answers very well, it's difficult
to return simple answers. I would like to see methods like
fireRulesReturningBoolean kind of thing, but it would require a paradigm
shift in the rules themselves. Alas!

Anyway, I think that's how I'd handle it. I also construct wrappers around
the basic data types to receive these answers. I wish Sun would implement
the bean interface for Integer, Long, Character, String, etc. It would
certainly be simple enough for them to do, and then we could just use those
to hold the values coming back from our rules.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Stelarinc
Sent: Thursday, May 08, 2008 6:03 AM
To: rules-users@lists.jboss.org
Subject: [rules-users] Help in using drools

Hi,

I would like to use drools in my application.  However, there are a few
things that I do not quite understand and whether it can fit my
requirements.  I have tried to search through the documentation and mailing
list, but to no avail.

Here is my situation.  I am creating a web-based application which requires
me to run certain rules for certain page.  What I need is to pass all the
information accumulated from the pages and pass it through a rule engine.
Each rule will check the information and return string message(s) to the
caller.  Does drools fit in this requirements?

>From what I understand, I can create a stateful session, passing the
information to the rule engine.  But when I need to return the result, how
do I do that?  Do I pass an empty String List into the rule engine, and each
rule will add the message to the List if there is an error?

Thank you.



Regards,

Leonard Soetedjo



 


Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Help in using drools

2008-05-08 Thread Stelarinc
Hi,

I would like to use drools in my application.  However, there are a few things 
that I do not quite understand and whether it can fit my requirements.  I have 
tried to search through the documentation and mailing list, but to no avail.

Here is my situation.  I am creating a web-based application which requires me 
to run certain rules for certain page.  What I need is to pass all the 
information accumulated from the pages and pass it through a rule engine.  Each 
rule will check the information and return string message(s) to the caller.  
Does drools fit in this requirements?

>From what I understand, I can create a stateful session, passing the 
>information to the rule engine.  But when I need to return the result, how do 
>I do that?  Do I pass an empty String List into the rule engine, and each rule 
>will add the message to the List if there is an error?

Thank you.



Regards,

Leonard Soetedjo



  

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Define a time event

2008-05-08 Thread Christine

> All the above, just to tell you all users that time is not a simple
> concept to support.

With a few limitations, it shouldn't be that difficult. Of course,
re-running a rule base with the same results can't be done if you
incorporate time, but other than that, I don't see the difficulty.

Christine

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users