First, make sure that you're using 1.3.1, I made some classloader fixes in it. Second, when you stop using the classloader, you'll not be able to use continuations or automatic reloading of elements. So I prefer to track down the real problem and try to fix it so that the classloader can stay on.

Fred Baube wrote:
Quoting Geert Bevin:
You can set "engineclassloader.enabled" to false as a servlet or filter init param in your web.xml. That disables RIFE's classloader. Like that you can check.

GADZOOKS ! Or should I say, ZOWIE ! :) It did seem to fix it !
I'll follow up if I have some useful info.


fred


Further down in this message is a code fragment that tries to set the "lexical-handler" property of a SAX XMLReader, like so:

        reader.setProperty(LEXICAL_HANDLER_PROPERTY,this);

The classes that use this fragment implement SAX's LexcalHandler.

When I execute it inside a simple servlet class like this:

public class HelloWorldExample extends HttpServlet implements ContentHandler, LexicalHandler {
            public void doGet(HttpServletRequest request,
                HttpServletResponse response)
                throws IOException, ServletException

it is able to set the lexical-handler property of the parser.

But when I execute it in class that is called from a Rife Element, like so:

public class WriterLex extends DefaultHandler2 {
it _always_ fails on the call


FWIW I've also tried
        WriterLex implements LexicalHandler {

and a dozen other combinations. I've done my best to narrow it down this problem, I've tried configuring XMLReaderFactory's and SAXParserFactory's, but the call to setProperty(..) consistently fails inside Rife.

Does this sounds like any known problems with classloading ?


fred


the code fragment:

   public static final String SAX_DRIVER_PROPERTY = "org.xml.sax.driver";
   public static final String LEXICAL_HANDLER_PROPERTY =
       "http://xml.org/sax/properties/lexical-handler";;

     try {
       if (System.getProperty(SAX_DRIVER_PROPERTY) == null){
          //The default sax driver is set to xerces's sax driver
System.setProperty(SAX_DRIVER_PROPERTY, "org.apache.xerces.pars\ers.SAXParser");
       }
       reader = XMLReaderFactory.createXMLReader();
// I also tried "com.sun.org.apache.xerces.internal.parsers.SAXParser"

       System.out.println ("Clsnm: " + reader.getClass().getName());
       reader.setContentHandler (this);
       reader.setProperty (LEXICAL_HANDLER_PROPERTY,this);
       System.out.println ("SUCCESS!");
     }
     catch (Exception e) {
       e.printStackTrace();
     }
 }


--
Geert Bevin                       Uwyn bvba
"Use what you need"               Avenue de Scailmont 34
http://www.uwyn.com               7170 Manage, Belgium
gbevin[remove] at uwyn dot com    Tel +32 64 84 80 03

PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net
_______________________________________________
Rife-users mailing list
[email protected]
http://www.uwyn.com/mailman/listinfo/rife-users

Reply via email to