RE: [rules-users] Rules with Lookup Tables...

2007-03-02 Thread Francisco Brum
I also need to make a rule with a lookup tables, and I have found that the new 
version of rules support 'from'.

 

The syntaxe it's something like:


'from'


*   http://jira.jboss.com/jira/browse/JBRULES-341 

'from' allows the engine to reason over data not inside the engine, this can be 
used with global variables to interact with data providing services, such as 
hibernate. MVEL provides the scripting language capabilities for this, any 
previously bound variable can be used in the MVEL expression. The following 
example shows a hibernate named query with some dummy properties that returns a 
list of Restaurants. Restaurant() is a standard pattern, and can have its own 
field constraint and bindings like any other pattern. 

$r : Restaurant( $postCode ) from hbSession.getNamedQuery( "some query" 
).setProperties( [ key1 : value2, key2 : value ] ).list()

 

I haven't tried it yet, and I have some questions also. But go ahead! :-)

__

Francisco Brum - [EMAIL PROTECTED]

Link Consulting - http://www.link.pt/

Tel.: 213 100 031

Av. Duque D'Ávila, 23 4º Esq.

1000-138 Lisboa

 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anstis, Michael 
(M.)
Sent: sexta-feira, 2 de Março de 2007 9:16
To: Rules Users List
Subject: RE: [rules-users] Rules with Lookup Tables...

 

I don't have the syntax at hand but Edson has previously posted about

using "from" in similar circumstances.

 

This would allow you to access a lookup table on a database as part of

the LHS of a rule.

 

-Original Message-

From: [EMAIL PROTECTED]

[mailto:[EMAIL PROTECTED] On Behalf Of jdepaul

Sent: 01 March 2007 19:35

To: rules-users@lists.jboss.org

Subject: [rules-users] Rules with Lookup Tables...

 

 

I need to evaluate a set of Rules with some of the operators comparing

values

from Facts against a changing Lookup Table - for instance:

 

Some Partners may have several lookup tables defined like this:

 

NISSAN has partner_ids = {, , , 6} and port_locations =

{ABC, EFG, GEE, FDD...}  - these values are stored in the database and

need

to be evaluated at run-time.

 

I suppose one way I could do this is to write a rule like this (sorry,

syntax probably off a bit)...:

 

rule "partner and port match"

  when

$shipment: Shipment(customerName== "NISSAN", partnerID== ""

 || customerName=="NISSAN",

partnerID==""

 || customerName=="NISSAN",

parternID=="")

 

 || customerName=="NISSAN",

portLocation=="ABC"

 || customerName=="NISSAN",

portLocation=="EFG"

 || customerName=="NISSAN",

partLocation=="FDD")

  then

System.out.println("Found the right one!");

end

 

Trouble is that the values in these lookup tables change frequently, so

I

would like to create a rule that references a lookup table that does a

DB

lookup to evaluate the values at run-time - something like this:

 

rule "partner and port with lookup-table" 

  when

$shipment: Shipment(customerName== "NISSAN", partnerID in

$(partner_ids

) )  <-- db lookup here

 

 || customerName=="NISSAN", portLocation

in

$(port_locations))  <-- db lookup here

  then

System.out.println("Found the right one!");

end

 

 

I know this is probably a stretch in this case - just wondering if

anyone

else was able to solve such a problem?!  If so, how - 

 

Thanks,

James

 

-- 

View this message in context:

http://www.nabble.com/Rules-with-Lookup-Tables...-tf3329159.html#a925682

5

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

 

___

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] accessing the data base

2007-02-27 Thread Francisco Brum
Hi believe that I have found the answer, but it is only available in the new 
3.1M1 release, right?

 

Answer:


'from'


*   http://jira.jboss.com/jira/browse/JBRULES-341 

'from' allows the engine to reason over data not inside the engine, this can be 
used with global variables to interact with data providing services, such as 
hibernate. MVEL provides the scripting language capabilities for this, any 
previously bound variable can be used in the MVEL expression. The following 
example shows a hibernate named query with some dummy properties that returns a 
list of Restaurants. Restaurant() is a standard pattern, and can have its own 
field constraint and bindings like any other pattern. 

$r : Restaurant( $postCode ) from hbSession.getNamedQuery( "some query" 
).setProperties( [ key1 : value2, key2 : value ] ).list()

 

 

 

______

Francisco Brum - [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Link Consulting - http://www.link.pt/ <http://www.link.pt/> 

Tel.: 213 100 031
Av. Duque D'Ávila, 23 4º Esq.
1000-138 Lisboa

 



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Francisco Brum
Sent: terça-feira, 27 de Fevereiro de 2007 15:03
To: Rules Users List
Subject: [rules-users] accessing the data base

 

Hi everybody!

 

I would like to be able to access the data base during the execution of a rule. 

The reason it's because instead of asserting in the working memory information 
as a global, it would be easy to make a SQL query using hibernate to consult 
the information.

 

Can I implement this in a function of my global fact or there is another way?

 

Thanks in advance for your attention!

__

Francisco Brum - [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Link Consulting - http://www.link.pt/ <http://www.link.pt/> 

Tel.: 213 100 031
Av. Duque D'Ávila, 23 4º Esq.
1000-138 Lisboa

 

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


[rules-users] accessing the data base

2007-02-27 Thread Francisco Brum
Hi everybody!

 

I would like to be able to access the data base during the execution of a rule. 

The reason it's because instead of asserting in the working memory information 
as a global, it would be easy to make a SQL query using hibernate to consult 
the information.

 

Can I implement this in a function of my global fact or there is another way?

 

Thanks in advance for your attention!

______

Francisco Brum - [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Link Consulting - http://www.link.pt/ <http://www.link.pt/> 

Tel.: 213 100 031
Av. Duque D'Ávila, 23 4º Esq.
1000-138 Lisboa

 

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


RE: [rules-users] debugging with 3.1M1 IDE?

2007-02-22 Thread Francisco Brum
I'm using 3.0.5, but I think I don't have the debug feature installed!

I can create a drools project or rule or etc, but there is nothing about drools 
debug. Am I missing something

__
Francisco Brum - [EMAIL PROTECTED]
Link Consulting - http://www.link.pt/
Tel.: 213 100 031
Av. Duque D'Ávila, 23 4º Esq.
1000-138 Lisboa

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mark Proctor
Sent: quinta-feira, 22 de Fevereiro de 2007 0:24
To: Rules Users List
Subject: Re: [rules-users] debugging with 3.1M1 IDE?

Hey there Barry, great to hear from you.

It's still drools too :) all the R&D project stuff is "drools". anything 
that is released and supported is jboss rules.

I'm using 3.2.1 and it's fine, you need to turn on the caching stuff in  
the preferences, it uses that for debugging. You also need to run it as 
a drools debug session, not a standard java one. So you'll need to go 
into the launcher configuration to create new drools debug sessions.

We'll start docs once towards the end, when everything has stabalised.

Mark
Barry Kaplan wrote:
> I'm ready to get back into drools... whoops, I meant jboss rules. I 
> installed 3.1M1 into eclipse 3.2.1 and added the examples project. I 
> set a breakpoint in all RHS of an example and debugged the 
> corresponding java. I get no breaks hit and I get no updates in any of 
> the views.
>
> I couldn't find any help in the docs. Does the IDE still work in 3.1M1?
>
> -barry
> ___
> 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] Adding DROOLS/JBoss Rules to classpath WITH LINE NUMBERS

2007-02-21 Thread Francisco Brum
Hi everybody!

 

I have added the JBoss rules - drools 3.0.5 to an existing eclipse project.

I have already solved the problem of adding the source code of drools to the 
debugging of eclipse, using the first indication of Kris, witch is quoted in 
the end!

 

Now the problem it's being able to debugging using the source of drools, but 
having the line number, so that eclipse can follow the exact actions of the 
source.

Can anybody help me?!

 

 

Yes, the drools jars do not contain any source by default (to limit the size of 
the jars).
There are two ways to use the source of these classes though:
 * When you are trying to debug an application in eclipse, and you open the 
debug dialog (right click your Java main class, select Debug As -> Debug ...), 
there is a tab there you can use to add sources.  If you download the sources 
from svn and import these as Java projects in eclipse, you can just add those 
projects to the source lookup path.  I added a screenshot to help you out with 
that.
 * If you add the sources to the drools jars directly (in the same dir as the 
corresponding class files, so not in a separate src dir or something like 
that), those sources will be found automatically as well.  So rebuilding those 
jars and adding the sources should do the trick for all your projects at once.
 
Kris

 

Thanks in advance for the attention of this problem.

__

Francisco Brum - [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Link Consulting - http://www.link.pt/ <http://www.link.pt/> 

Tel.: 213 100 031
Av. Duque D'Ávila, 23 4º Esq.
1000-138 Lisboa

 

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


RE: [rules-users] Use of a static variable on rules

2007-02-16 Thread Francisco Brum
Still having problems, but this time the error is;

Rule Compilation error Expression "[EMAIL PROTECTED]" is not a type Exception

__
Francisco Brum - [EMAIL PROTECTED]
Link Consulting - http://www.link.pt/
Tel.: 213 100 031
Av. Duque D'Ávila, 23 4º Esq.
1000-138 Lisboa


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Anstis, Michael 
(M.)
Sent: sexta-feira, 16 de Fevereiro de 2007 15:04
To: Rules Users List
Subject: RE: [rules-users] Use of a static variable on rules

I've successfully used constant strings in rules like this.

Public class Types {
Public static final String SMURF = "SMURF";
}

Rule "A"
When
$s : Person ( type == Types.SMURF )
Then
stopGargamel($s);
End

Cheers,

Mike

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Francisco Brum
Sent: 16 February 2007 14:52
To: Rules Users List
Subject: [rules-users] Use of a static variable on rules

Hello everybody!

I'm using a global class in my rules, and tried to compare a fact field with a 
static variable.

This is the rule

Rule "A"
When 
Service(state == ((plannerAux).SCHEDULE))
Then
Dosomething()
End

This is the declaration of the static variable from plannerAux.

public static String SCHEDULE = "SCHEDULE";

But I'm having this error:

Rule Compilation error Expression "(plannerAux)" is not a type Exception:1 
errors while compiling unit Rule_A.java"

M'I doing something wrong or this is not possible to do?

__
Francisco Brum - [EMAIL PROTECTED]
Link Consulting - http://www.link.pt/
Tel.: 213 100 031
Av. Duque D'Ávila, 23 4º Esq.
1000-138 Lisboa

___
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] Use of a static variable on rules

2007-02-16 Thread Francisco Brum
Hello everybody!

I'm using a global class in my rules, and tried to compare a fact field with a 
static variable.

This is the rule

Rule "A"
When 
Service(state == ((plannerAux).SCHEDULE))
Then
Dosomething()
End

This is the declaration of the static variable from plannerAux.

public static String SCHEDULE = "SCHEDULE";

But I'm having this error:

Rule Compilation error Expression "(plannerAux)" is not a type Exception:1 
errors while compiling unit Rule_A.java"

M'I doing something wrong or this is not possible to do?

__
Francisco Brum - [EMAIL PROTECTED]
Link Consulting - http://www.link.pt/
Tel.: 213 100 031
Av. Duque D'Ávila, 23 4º Esq.
1000-138 Lisboa

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


RE: [rules-users] java.lang.NoSuchMethodError:org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[

2007-02-15 Thread Francisco Brum
Hi  there Nagabhushanam!!

 

I had the same problem with drools and JBoss Server application.

 

I believe that my solution will be the same for you.

The solution for this problem is on this site:

http://wiki.jboss.org/wiki/Wiki.jsp?page=RulesTomcat

 

I used the code solution, but after that I had to review the jar dependencies. 

 

Good Luck

 

__

Francisco Brum - [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Link Consulting - http://www.link.pt/ <http://www.link.pt/> 

Tel.: 213 100 031
Av. Duque D'Ávila, 23 4º Esq.
1000-138 Lisboa

 



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nagabhushanam B
Sent: quinta-feira, 15 de Fevereiro de 2007 13:21
To: rules-users@lists.jboss.org
Subject: [rules-users] 
java.lang.NoSuchMethodError:org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[

 



Hi ,

I have installed Eclipse 3.2 and tomcat 5.5, when I am trying to jboss rule I 
am getting the following exception 

Even though I added org.eclipse.jdt.core_3.2.0.v_671.jar in to my class path 

Guys help me out from this... urgent

 

java.lang.NoSuchMethodError:org.eclipse.jdt.internal.compiler.CompilationResult.getProblems
 ()[Lorg/eclipse/jdt/core/compiler/IProblem;

  at org.apache.jasper.compiler.JDTCompiler$2.acceptResult( 
JDTCompiler.java:341) 

  at org.eclipse.jdt.internal.compiler.Compiler.compile( Compiler.java:417) 

  at org.apache.jasper.compiler.JDTCompiler.generateClass( 
JDTCompiler.java:399) 

  at org.apache.jasper.compiler.Compiler.compile( Compiler.java:288) 

  at org.apache.jasper.compiler.Compiler.compile( Compiler.java:267) 

  at org.apache.jasper.compiler.Compiler.compile( Compiler.java:255) 

  at org.apache.jasper.JspCompilationContext.compile( 
JspCompilationContext.java:556 )

  at org.apache.jasper.servlet.JspServletWrapper.service( 
JspServletWrapper.java:293 )

  at org.apache.jasper.servlet.JspServlet.serviceJspFile( 
JspServlet.java:314) 

  at org.apache.jasper.servlet.JspServlet.service( JspServlet.java:264) 

  at javax.servlet.http.HttpServlet.service( HttpServlet.java:802) 

  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( 
ApplicationFilterChain.java:252 )

  at org.apache.catalina.core.ApplicationFilterChain.doFilter( 
ApplicationFilterChain.java:173 )

  at org.apache.catalina.core.StandardWrapperValve.invoke( 
StandardWrapperValve.java:213 )

  at org.apache.catalina.core.StandardContextValve.invoke( 
StandardContextValve.java:178 )

  at org.apache.catalina.core.StandardHostValve.invoke( 
StandardHostValve.java:126 )

  at org.apache.catalina.valves.ErrorReportValve.invoke( 
ErrorReportValve.java:105 )

  at org.apache.catalina.core.StandardEngineValve.invoke( 
StandardEngineValve.java:107 )

  at org.apache.catalina.connector.CoyoteAdapter.service( 
CoyoteAdapter.java:148) 

  at org.apache.coyote.http11.Http11Processor.process( 
Http11Processor.java:868 )

  at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection
 (Http11Protocol.java:744 )

  at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket( 
PoolTcpEndpoint.java:527 )

  at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( 
LeaderFollowerWorkerThread.java:80 )

  at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( 
ThreadPool.java:684 )

  at java.lang.Thread.run( Thread.java:534) 

 

 

Thanks & Regards 

Nagabhushanam Bheemisetty 

 

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


RE: [rules-users] How to inovke a Service...

2007-02-09 Thread Francisco Brum
Hello!

I'm a newbie, but I believe you have to write eval on functions.


__
Francisco Brum - [EMAIL PROTECTED]
Link Consulting - http://www.link.pt/
Tel.: 213 100 031
Av. Duque D'Ávila, 23 4º Esq.
1000-138 Lisboa

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of jdepaul
Sent: sexta-feira, 9 de Fevereiro de 2007 17:53
To: rules-users@lists.jboss.org
Subject: Re: [rules-users] How to inovke a Service...


Thanks for a great example - I was able to invoke myService from the
 block in my rules, but NOT from a Function that I define...  
is this a limitation, or is there some other syntax when invoking from a
function?


rule "Shipper Match"
salience 90
when
shipperGI : GateIn ( customerId == "NISSAN", primaryShipperId 
== "yellow"
) 
then
myService.sendNotification(shipperGI, Constants.SHIPPER_MATCH); 
 <-- This
Works
// notifyPartNer(shipperGI, COnstants.SHIPPER_MATCH);  <-- This 
DOESN'T
WORK!  
end


// Match found - notify customer
function void notifyPartner(GateIn _event, String _action ) {
System.out.println("Invoking Service for action = " + _action );
//myService.sendNotification(_event, _action);  <-- Never gets to 
here...
crashes...
}





Edson Tirelli-3 wrote:
> 
>>   So, for exaple, you can have a helper class that has the actual code
>> to call the service you want and set it as a global for your rulebase.
>> Then in the consequence you call this class method with the given
>> paramenters.
> ...
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-inovke-a-Service...-tf3189882.html#a8890381
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

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


RE: [rules-users] java.lang.NoSuchMethodError

2007-02-08 Thread Francisco Brum
The solution for this problem is on this site:

http://wiki.jboss.org/wiki/Wiki.jsp?page=RulesTomcat

 

 

__

Francisco Brum - [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Link Consulting - http://www.link.pt/ <http://www.link.pt/> 

Tel.: 213 100 031
Av. Duque D'Ávila, 23 4º Esq.
1000-138 Lisboa

 



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Francisco Brum
Sent: quinta-feira, 8 de Fevereiro de 2007 11:24
To: Rules Users List
Subject: RE: [rules-users] java.lang.NoSuchMethodError

 

I have runned the small rule that I have created on a test example on eclipse, 
and it works fine.

 

The problem is when I try to use the rule on a JBoss Portal. From what I’ve 
getter, the problem lies on conflict.

Meaning that when I satisfy the Drools dependency with 
org.eclipse.jdt.core_3.2.0.v_642.jar or with ecj.jar, the portal gets unstable, 
because some times works fine and other times it gives the same error as the 
one bellow, but from a different origin.

I believe the JBoss portal uses the same class, because I have found on the 
deploy file of the server the jar jasper-compiler-jdt.jar, which contains the 
same class. 

Some how, it gets on conflict with the other jar for the drools.

 

I’m still trying to solve this. :-(

 



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Williams
Sent: quarta-feira, 7 de Fevereiro de 2007 23:20
To: Rules Users List
Subject: Re: [rules-users] java.lang.NoSuchMethodError

 

Hi FBrum,

You will find the org.eclipse.jdt.core_3.2.0.v_642.jar in your eclipse\plugins 
directory. 

cheers
Steve

On 2/7/07, Francisco Brum <[EMAIL PROTECTED]> wrote:

Hello everybody!

 

I'm having the same problem that you had, but when I run the project from the 
JBoss Server and try do run the code with the JBoss rules, I get the error:

 

java.lang.NoSuchMethodError: 
org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[Lorg/eclipse/jdt/core/compiler/CategorizedProblem;

at 
org.apache.commons.jci.compilers.EclipseJavaCompiler$2.acceptResult(EclipseJavaCompiler.java:237)

at 
org.eclipse.jdt.internal.compiler.Compiler.handleInternalException(Compiler.java:415)

at 
org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:352)

at 
org.apache.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:268)

at org.drools.compiler.PackageBuilder.compileAll(Unknown Source)

at org.drools.compiler.PackageBuilder.addPackage(Unknown Source)

at org.drools.compiler.PackageBuilder.addPackageFromDrl(Unknown 
Source)

 

I've downloaded the ecj.jar, which haves the 
org\eclipse\jdt\internal\compiler\CompilationResult.class 

with the getProblems() method, to the \lib folder of the server!

But it seems that this ecj.jar haves some conflict, because there are times 
that it works and others it doesn't.

 

So I have tried do look for the org.eclipse.jdt.core_3.2.0.v_642.jar

In my org.drools.ide_3.0.5, but didn't found it. Don't know where to!!

 

What should I do?

 

Thanks in advanced for your attention

FBrum.

 

History of a similar problem solved in this mailing list:

shilpa.raghavendra
Sun, 28 Jan 2007 23:38:14 -0800

Thank you very much Steve its working fine.

 

-Original Message-
From: [EMAIL PROTECTED]
[ <mailto:%5BEMAIL> 
mailto:[EMAIL <mailto:%5BEMAIL>  PROTECTED] On Behalf Of Steven
Williams
 
Sent: Monday, January 29, 2007 10:20 AM
To: Rules Users List
Subject: Re: [rules-users] java.lang.NoSuchMethodError
 
 
 
Sorry Shilpa - I was looking at 
3.0.5. What I said still holds true though -
make sure the v642 jar is at the top of your runtime classpath.
 
On 1/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
 
 
 
 
  I am using org.drools.ide_3.0.4 as eclipse plug-in it's having
org.eclipse.jdt.core_3.2.0.v_642.jar
 
 
 
Still I have to use higher version
 
 
 
Regards
 
 
Shilpa

 

 

__

Francisco Brum - [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Link Consulting - http://www.link.pt/ <http://www.link.pt/> 

Tel.: 213 100 031
Av. Duque D'�vila, 23 4� Esq.
1000-138 Lisboa

 


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




-- 
Steven Williams

Supervising Consultant

Object Consulting
Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501 
[EMAIL PROTECTED]
www.objectconsulting.com.au

consulting | development | training | support 
our experience makes the difference 

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


RE: [rules-users] java.lang.NoSuchMethodError

2007-02-08 Thread Francisco Brum
I have runned the small rule that I have created on a test example on eclipse, 
and it works fine.

 

The problem is when I try to use the rule on a JBoss Portal. From what I’ve 
getter, the problem lies on conflict.

Meaning that when I satisfy the Drools dependency with 
org.eclipse.jdt.core_3.2.0.v_642.jar or with ecj.jar, the portal gets unstable, 
because some times works fine and other times it gives the same error as the 
one bellow, but from a different origin.

I believe the JBoss portal uses the same class, because I have found on the 
deploy file of the server the jar jasper-compiler-jdt.jar, which contains the 
same class. 

Some how, it gets on conflict with the other jar for the drools.

 

I’m still trying to solve this. :-(

 



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Steven Williams
Sent: quarta-feira, 7 de Fevereiro de 2007 23:20
To: Rules Users List
Subject: Re: [rules-users] java.lang.NoSuchMethodError

 

Hi FBrum,

You will find the org.eclipse.jdt.core_3.2.0.v_642.jar in your eclipse\plugins 
directory. 

cheers
Steve

On 2/7/07, Francisco Brum <[EMAIL PROTECTED]> wrote:

Hello everybody!

 

I'm having the same problem that you had, but when I run the project from the 
JBoss Server and try do run the code with the JBoss rules, I get the error:

 

java.lang.NoSuchMethodError: 
org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[Lorg/eclipse/jdt/core/compiler/CategorizedProblem;

at 
org.apache.commons.jci.compilers.EclipseJavaCompiler$2.acceptResult(EclipseJavaCompiler.java:237)

at 
org.eclipse.jdt.internal.compiler.Compiler.handleInternalException(Compiler.java:415)

at 
org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:352)

at 
org.apache.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:268)

at org.drools.compiler.PackageBuilder.compileAll(Unknown Source)

at org.drools.compiler.PackageBuilder.addPackage(Unknown Source)

at org.drools.compiler.PackageBuilder.addPackageFromDrl(Unknown 
Source)

 

I've downloaded the ecj.jar, which haves the 
org\eclipse\jdt\internal\compiler\CompilationResult.class 

with the getProblems() method, to the \lib folder of the server!

But it seems that this ecj.jar haves some conflict, because there are times 
that it works and others it doesn't.

 

So I have tried do look for the org.eclipse.jdt.core_3.2.0.v_642.jar

In my org.drools.ide_3.0.5, but didn't found it. Don't know where to!!

 

What should I do?

 

Thanks in advanced for your attention

FBrum.

 

History of a similar problem solved in this mailing list:

shilpa.raghavendra
Sun, 28 Jan 2007 23:38:14 -0800

Thank you very much Steve its working fine.

 

-Original Message-
From: [EMAIL PROTECTED]
[ <mailto:%5BEMAIL> 
mailto:[EMAIL <mailto:%5BEMAIL>  PROTECTED] On Behalf Of Steven
Williams
 
Sent: Monday, January 29, 2007 10:20 AM
To: Rules Users List
Subject: Re: [rules-users] java.lang.NoSuchMethodError
 
 
 
Sorry Shilpa - I was looking at 
3.0.5. What I said still holds true though -
make sure the v642 jar is at the top of your runtime classpath.
 
On 1/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
 
 
 
 
  I am using org.drools.ide_3.0.4 as eclipse plug-in it's having
org.eclipse.jdt.core_3.2.0.v_642.jar
 
 
 
Still I have to use higher version
 
 
 
Regards
 
 
Shilpa

 

 

__

Francisco Brum - [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Link Consulting - http://www.link.pt/ <http://www.link.pt/> 

Tel.: 213 100 031
Av. Duque D'�vila, 23 4� Esq.
1000-138 Lisboa

 


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




-- 
Steven Williams

Supervising Consultant

Object Consulting
Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501 
[EMAIL PROTECTED]
www.objectconsulting.com.au

consulting | development | training | support 
our experience makes the difference 

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


RE: [rules-users] rule chaining problem?

2007-02-07 Thread Francisco Brum
What you cold do it's before deleting a node, first you will remove it arcs!

Maybe using a flag identifying future node to delete, and all the arcs from a 
node with that flag is deleted. And then delete the node. To do that, use the 
term salient.

I'm just a beginner in rules, but this seams right.

__
Francisco Brum - [EMAIL PROTECTED]
Link Consulting - http://www.link.pt/
Tel.: 213 100 031
Av. Duque D'Ávila, 23 4º Esq.
1000-138 Lisboa

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gerardo
Sent: quarta-feira, 7 de Fevereiro de 2007 18:03
To: rules-users@lists.jboss.org
Subject: [rules-users] rule chaining problem?

Hi everyone,
I have this scenario:   
A diagram with nodes and arcs between them.
I'm willing to control the visual elements with rules.
Nodes are asserted at the moment of insertion.  
Object node = new AnyObject() ;
FactHandle hNode = workingMemory.assertObject( node ) ;

Nodes are retracted from working memory when are deleted from the diagram.
workingMemory.retractObject( hNode ) ;

Arcs can not exist in the diagram if any of the related nodes no longer 
exists.
So I must have a rule that keeps consistency in the diagram, something like:


## to illustrate the problem just checking source
rule "Delete no longer valid arcs"
when
a : Arc(s: source, tag, t: target)
not s: Object()
then
retract(a) ;
end

But the rule is not working, help is much appreciated
Regards,
Gerardo Segura

___
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] java.lang.NoSuchMethodError

2007-02-07 Thread Francisco Brum
Hello everybody!

 

I'm having the same problem that you had, but when I run the project from the 
JBoss Server and try do run the code with the JBoss rules, I get the error:

 

java.lang.NoSuchMethodError: 
org.eclipse.jdt.internal.compiler.CompilationResult.getProblems()[Lorg/eclipse/jdt/core/compiler/CategorizedProblem;

at 
org.apache.commons.jci.compilers.EclipseJavaCompiler$2.acceptResult(EclipseJavaCompiler.java:237)

at 
org.eclipse.jdt.internal.compiler.Compiler.handleInternalException(Compiler.java:415)

at 
org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:352)

at 
org.apache.commons.jci.compilers.EclipseJavaCompiler.compile(EclipseJavaCompiler.java:268)

at org.drools.compiler.PackageBuilder.compileAll(Unknown Source)

at org.drools.compiler.PackageBuilder.addPackage(Unknown Source)

at org.drools.compiler.PackageBuilder.addPackageFromDrl(Unknown 
Source)

 

I've downloaded the ecj.jar, which haves the 
org\eclipse\jdt\internal\compiler\CompilationResult.class 

with the getProblems() method, to the \lib folder of the server!

But it seems that this ecj.jar haves some conflict, because there are times 
that it works and others it doesn't.

 

So I have tried do look for the org.eclipse.jdt.core_3.2.0.v_642.jar

In my org.drools.ide_3.0.5, but didn't found it. Don't know where to!!

 

What should I do?

 

Thanks in advanced for your attention

FBrum.

 

History of a similar problem solved in this mailing list:

shilpa.raghavendra
Sun, 28 Jan 2007 23:38:14 -0800

Thank you very much Steve its working fine.

 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL <mailto:%5BEMAIL>  PROTECTED] On Behalf Of Steven
Williams
Sent: Monday, January 29, 2007 10:20 AM
To: Rules Users List
Subject: Re: [rules-users] java.lang.NoSuchMethodError
 
 
Sorry Shilpa - I was looking at 3.0.5. What I said still holds true though -
make sure the v642 jar is at the top of your runtime classpath.
 
On 1/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]>
wrote:
 
 
 
  I am using org.drools.ide_3.0.4 as eclipse plug-in it's having
org.eclipse.jdt.core_3.2.0.v_642.jar
 
 
 
Still I have to use higher version
 
 
 
Regards
 
Shilpa

 

 

______

Francisco Brum - [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> 
Link Consulting - http://www.link.pt/ <http://www.link.pt/> 

Tel.: 213 100 031
Av. Duque D'Ávila, 23 4º Esq.
1000-138 Lisboa

 

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