Application servers can be very tricky, because there are often
multiple class loaders in use. Traditionally, Jess uses the class
loader its own classdes were loaded by to load user classes, but in an
app server this might not work.
Jess 6.1a3 has a new feature: a Rete coconstructor that takes an
arbitrary object as a constructor argument. If you use this constructor,
then Jess will use that objct's class loader instaed. This is often
exactly what you need in an app server environment. Construct the Rete
object with a Session as a constructor argument, and this might fix
your problem.
I think Alexander Lamb wrote:
[Charset iso-8859-1 unsupported, filtering to ASCII...]
> Hello list,
>
> This is my first post, so please forgive my lack of knowledge!
>
> To set the context, we are currently evaluating Jess for use in an
> application server (WebObjects from Apple, ex NeXT) to handle the logic
> behind a prescription system for physicians and nurses in a hospital. The
> idea is to have Jess pilot the concept of what is "orderable" in the
> institution as well as the generation of the user interface, integrated with
> the component system of WebObjects.
>
> Well, short question:
>
> To allow strong interraction, I would like to use a defclass to identify the
> session of the user (Session class in WebObjects).
> Unfortunately, the following code returns an exception:
>
> rete = new Rete();
>
> try
> {
> rete.defclass("userSession", "Session", null);
> }
> catch(Exception e)
> {
> System.out.println("ERROR IN DEFCLASS: " + e.toString());
> }
>
> The error is:
>
> Jess reported an error in routine defclass. Message: Class not found:.
>
> But the class does exist! It is NOT in a package but even putting it in a
> package it fails. Session is a subclass of WOSession which implements
> Serializable. Even if I wait for after the class having been loaded, I still
> get this error (I tried doing the defclass IN the constructor of the Session
> class!).
> How does Jess find classes?
>
> Thanks,
>
> Alexander
> --
> Alexander Lamb
> Groupe Serveurs Applicatifs
> Division d'Informatique Midicale
> Htpitaux Universitaires de Genhve
> 21 rue Micheli-du-Crest
> CH-1211 Genhve 4 / Switzerland
> Tel: +41-22 372.48.46 Fax: +41-22 372.61.98
> [EMAIL PROTECTED] / http://www.hcuge.ch
>
> --------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the list
> (use your own address!) List problems? Notify [EMAIL PROTECTED]
> --------------------------------------------------------------------
>
---------------------------------------------------------
Ernest Friedman-Hill
Distributed Systems Research Phone: (925) 294-2154
Sandia National Labs FAX: (925) 294-2234
Org. 8920, MS 9012 [EMAIL PROTECTED]
PO Box 969 http://herzberg.ca.sandia.gov
Livermore, CA 94550
--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------