Hello Everybody
I have a java class that looks like this.
package Event;
public class EventInfo {
private String eventName;
private String stage;
private String[] userData;
/** Creates new EventInfo */
public EventInfo(String eventName, String[] userData) {
this.eventName = eventName;
this.userData = userData;
}
public String getUserData(int i){
if ( i >= userData.length ){
System.out.println("Index out of range");
return null;
}
return userData[i];
}
}
-------------------------------------------------------------------------------------------------------------------
I have set the classpath accordingly and I am trying to create the object in JESS using the following
Jess> (bind ?ht (new Event.EventInfo "DatabaseOverload" {"1" "2" "3" "4"}))
I get the following error
--------------------------------------------------------------------------------------------
Jess reported an error in routine new
while executing (new Event.EventInfo "DatabaseOverload" "1" "2" "3")
while executing (bind ?ht (new Event.EventInfo "DatabaseOverload" "1" "2
" "3")).
Message: Constructor not found: (new Event.EventInfo "DatabaseOverload" "1" "2
" "3").
Program text: ( bind ?ht ( new Event.EventInfo "DatabaseOverload" "1" "2" "3"
) ) at line 5.
Nested exception is:
Event.EventInfo
java.lang.NoSuchMethodException: Event.EventInfo
at jess.c2.call(Unknown Source)
at jess.ei.a(Unknown Source)
at jess.Funcall.execute(Unknown Source)
&nb!
sp; at jess.FuncallValue.resolveValue(Unknown Source)
at jess.cy.call(Unknown Source)
at jess.ei.a(Unknown Source)
at jess.Funcall.execute(Unknown Source)
at jess.Jesp.a(Unknown Source)
at jess.Jesp.case(Unknown Source)
at jess.Jesp.parse(Unknown Source)
at jess.Main.execute(Unknown Source)
at jess.Main.main(Unknown Source)
--------------------------------------------------------------------------------------------
Could someone please tell me what I am doing wrong
This is another question
If I want to create and Array of String (any object for that matter) in JESS how do I do it.
thanks
Richard.
Do you Yahoo!?
Faith Hill - Exclusive Performances, Videos, & more
faith.yahoo.com
