You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Dafang Zhang <da...@wcom.com> on 2000/05/10 00:00:31 UTC

1.7.3 with JRun 2.3.3 Specific Problem

JRun 2.3.3 does not support ServletContext.getResource().  Thus, JRun 2.3.3
users need to modify the Cocoon.java to use file-based approach, instead of
resource-based, in order for Cocoon-1.7.3 to correctly read in
cocoon.properties file.  Otherwise, you get "Publishing engine could not be
initialized." message with exception throwed.

Should we have a choice somehow, without code change?

While dealing with this problem, another question is why "Unable to open
resource: ..." message, which is in the inner catch block, is not show up?


Dafang Zhang


Re: Xalan and StylesheetRoot class

Posted by Berin Loritsch <bl...@infoplanning.com>.
Did you upgrade to Xerces-1.0.4?

The Xalan people extend a class that the Xerces people rearchitected.
While this is a problem that is being worked on, if you use Xerces-1.0.3
the problem should go away.

Matthew Cordes wrote:

> Can anyone explain this error message that xalan is giving me?
>
>         XSL Error: Cannot use a DTMLiaison for a input DOM node... pass a
>         org.apache.xalan.xpath.xdom.XercesLiaison instead!
>
> I am trying to create a StylesheetRoot object from a file, save that
> object in a hash and later pass it an XSLTInputSource ( which starts as a
> DOM tree ), and XSLTResultTarget for processing.  The message occurs
> along with an XSLProcessorException.
>
> Of course I looked at XercesLiason, but that doesn't seem apropriate.
> Additionally, can some one explain after I make the StylesheetRoot
> via
>
>         XSLTProcessor processor = XSLTProcessorFactory
>                 .getProcessor();
>
>         StylesheetRoot stylesheet = processor.processStylesheet( fileName  );
>
>         // Is there something more I need to do before this?
>         Hash.put ( some_key, stylesheet );
>
> what I still need to do with the XSLTProcessor.  If I want to use the
> StylesheetRoot object later ( e.g., another method ) do I need to do
> something that isn't immediately obvious to it or the XSLTProcessor?
>
> -matt
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org


Xalan and StylesheetRoot class

Posted by Matthew Cordes <mc...@maine.edu>.
Can anyone explain this error message that xalan is giving me?

	XSL Error: Cannot use a DTMLiaison for a input DOM node... pass a
	org.apache.xalan.xpath.xdom.XercesLiaison instead!

I am trying to create a StylesheetRoot object from a file, save that
object in a hash and later pass it an XSLTInputSource ( which starts as a
DOM tree ), and XSLTResultTarget for processing.  The message occurs
along with an XSLProcessorException.

Of course I looked at XercesLiason, but that doesn't seem apropriate.
Additionally, can some one explain after I make the StylesheetRoot
via 

	XSLTProcessor processor = XSLTProcessorFactory
		.getProcessor();

	StylesheetRoot stylesheet = processor.processStylesheet( fileName  );	

	// Is there something more I need to do before this?
	Hash.put ( some_key, stylesheet );


what I still need to do with the XSLTProcessor.  If I want to use the
StylesheetRoot object later ( e.g., another method ) do I need to do
something that isn't immediately obvious to it or the XSLTProcessor?

-matt

RE: 1.7.3 with JRun 2.3.3 Specific Problem

Posted by Dafang Zhang <da...@wcom.com>.
Stefano,

The following is just FYI...

> New message has been posted in JRun Conference
>
> Forum:   Servlet Programming
> Thread:  What is the location for servlet context root?
> Author:  Bob Love
> Subject:

> URL:     http://forums.allaire.com/jrunconf/Index.cfm?Message_ID=496040


> Jrun 2.3.3 does not support the ServletContext.getResource() or
ServletContext.getResourceAsStream() methods.  If you need to create a URL
object you can use the java.net.URL class.

> Jrun 3.0 does support both of these methods.


Regards,
Dafang Zhang

-----Original Message-----
From: Stefano Mazzocchi [mailto:stefano@apache.org]
Sent: Wednesday, May 10, 2000 7:42 AM
To: cocoon-users@xml.apache.org
Subject: Re: 1.7.3 with JRun 2.3.3 Specific Problem


Dafang Zhang wrote:
>
> JRun 2.3.3 does not support ServletContext.getResource().  Thus, JRun
2.3.3
> users need to modify the Cocoon.java to use file-based approach, instead
of
> resource-based, in order for Cocoon-1.7.3 to correctly read in
> cocoon.properties file.  Otherwise, you get "Publishing engine could not
be
> initialized." message with exception throwed.

Oh gee, you mean that JRun 2.3.3 indicates itself as a 2.1 compatible
Servlet Engine and then doesn't support getResource()?

No comment.

> Should we have a choice somehow, without code change?

It's a pain in the ass to maintain a servlet that is portable across
servlet engines, it's even worse if they "illegally" claim to be
compliant when they aren't.

What are we supposed to do? check if the servlet engine is JRun and
disable that? and what about weblogic, servletexec, websphere,
paperclips and everyone that has servlet hooks?

I'm _really_ frustrated by all this, expecially when we provide Tomcat
that works on every possible web server, it's stable and, more
important, it's free and open source.

Anyway, I'm open to suggestions on how to make this work if people need
it.

> While dealing with this problem, another question is why "Unable to open
> resource: ..." message, which is in the inner catch block, is not show up?

This is a bug and it was recently fixed in the CVS.

--
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: 1.7.3 with JRun 2.3.3 Specific Problem

Posted by Stefano Mazzocchi <st...@apache.org>.
Dafang Zhang wrote:
> 
> JRun 2.3.3 does not support ServletContext.getResource().  Thus, JRun 2.3.3
> users need to modify the Cocoon.java to use file-based approach, instead of
> resource-based, in order for Cocoon-1.7.3 to correctly read in
> cocoon.properties file.  Otherwise, you get "Publishing engine could not be
> initialized." message with exception throwed.

Oh gee, you mean that JRun 2.3.3 indicates itself as a 2.1 compatible
Servlet Engine and then doesn't support getResource()?

No comment.

> Should we have a choice somehow, without code change?

It's a pain in the ass to maintain a servlet that is portable across
servlet engines, it's even worse if they "illegally" claim to be
compliant when they aren't.

What are we supposed to do? check if the servlet engine is JRun and
disable that? and what about weblogic, servletexec, websphere,
paperclips and everyone that has servlet hooks?

I'm _really_ frustrated by all this, expecially when we provide Tomcat
that works on every possible web server, it's stable and, more
important, it's free and open source.

Anyway, I'm open to suggestions on how to make this work if people need
it.
 
> While dealing with this problem, another question is why "Unable to open
> resource: ..." message, which is in the inner catch block, is not show up?

This is a bug and it was recently fixed in the CVS.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------