cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James.Aggrey-Orle...@ubsw.com
Subject RE: RE: RE: RE: XSP question
Date Tue, 10 Oct 2000 22:37:35 GMT
cheers I-Chung....

Now i have the following problem:-

However, the 1st line suggests its an xsl problem...am i right?
What could the prob be?

James
===================== Error msg start ==========================
org.apache.xalan.xslt.XSLProcessorException: Warning: can't output text
before document element!  Ignoring...
      at java.lang.Throwable.fillInStackTrace(Native Method)
      at java.lang.Throwable.(Throwable.java:94)
      at java.lang.Exception.(Exception.java:42)
      at org.xml.sax.SAXException.(SAXException.java:45)
      at org.apache.xalan.xpath.XPathException.(XPathException.java:92)
      at
org.apache.xalan.xslt.XSLProcessorException.(XSLProcessorException.java:
90)
      at
org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1630)
      at
org.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1594)
      at
org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:655)
      at
org.apache.cocoon.transformer.XalanTransformer.transform(XalanTransforme
r.java:101)
      at
org.apache.cocoon.processor.xslt.XSLTProcessor.process(XSLTProcessor.jav
a:110)
      at org.apache.cocoon.Engine.handle(Engine.java:305)
      at org.apache.cocoon.Cocoon.service(Cocoon.java:167)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
      at com.livesoftware.jrun.JRun.runServlet(JRun.java:321)
      at
com.livesoftware.jrun.JRunGeneric.handleConnection(JRunGeneric.java:116)
      at
com.livesoftware.jrun.service.proxy.JRunProxyServiceHandler.handleReques
t(JRunProxyServiceHandler.java:130)
      at
com.livesoftware.jrun.service.ThreadConfigHandler.run(ThreadConfigHandle
r.java:96)
---------
org.xml.sax.SAXException: Warning: can't output text before document
element!  Ignoring...
      at java.lang.Throwable.fillInStackTrace(Native Method)
      at java.lang.Throwable.(Throwable.java:94)
      at java.lang.Exception.(Exception.java:42)
      at org.xml.sax.SAXException.(SAXException.java:45)
      at
org.apache.xalan.xpath.xml.FormatterToDOM.append(FormatterToDOM.java:147
)
      at
org.apache.xalan.xpath.xml.FormatterToDOM.characters(FormatterToDOM.java
:330)
      at
org.apache.xalan.xslt.XSLTEngineImpl$ResultTreeHandler.characters(XSLTEn
gineImpl.java:3921)
      at
org.apache.xalan.xslt.XSLTEngineImpl.cloneToResultTree(XSLTEngineImpl.ja
va:1998)
      at
org.apache.xalan.xslt.ElemTemplateElement.transformChild(ElemTemplateEle
ment.java:1173)
      at
org.apache.xalan.xslt.ElemTemplateElement.processLocatedNode(ElemTemplat
eElement.java:1057)
      at
org.apache.xalan.xpath.SimpleNodeLocator.findChildren(SimpleNodeLocator.
java:772)
      at
org.apache.xalan.xpath.SimpleNodeLocator.step(SimpleNodeLocator.java:427
)
      at
org.apache.xalan.xpath.SimpleNodeLocator.locationPath(SimpleNodeLocator.
java:320)
      at org.apache.xalan.xpath.XPath.locationPath(XPath.java:964)
      at org.apache.xalan.xpath.XPath.execute(XPath.java:1385)
      at org.apache.xalan.xpath.XPath.execute(XPath.java:1354)
      at org.apache.xalan.xpath.XPath.execute(XPath.java:311)
      at
org.apache.xalan.xslt.ElemTemplateElement.transformSelectedChildren(Elem
TemplateElement.java:894)
      at
org.apache.xalan.xslt.ElemApplyTemplates.execute(ElemApplyTemplates.java
:176)
      at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateEl
ement.java:659)
      at
org.apache.xalan.xslt.ElemTemplateElement.transformChild(ElemTemplateEle
ment.java:1195)
      at
org.apache.xalan.xslt.ElemTemplateElement.processLocatedNode(ElemTemplat
eElement.java:1057)
      at
org.apache.xalan.xpath.SimpleNodeLocator.findChildren(SimpleNodeLocator.
java:772)
      at
org.apache.xalan.xpath.SimpleNodeLocator.step(SimpleNodeLocator.java:427
)
      at
org.apache.xalan.xpath.SimpleNodeLocator.locationPath(SimpleNodeLocator.
java:320)
      at org.apache.xalan.xpath.XPath.locationPath(XPath.java:964)
      at org.apache.xalan.xpath.XPath.execute(XPath.java:1385)
      at org.apache.xalan.xpath.XPath.execute(XPath.java:1354)
      at org.apache.xalan.xpath.XPath.execute(XPath.java:311)
      at
org.apache.xalan.xslt.ElemTemplateElement.transformSelectedChildren(Elem
TemplateElement.java:894)
      at
org.apache.xalan.xslt.ElemApplyTemplates.execute(ElemApplyTemplates.java
:176)
      at
org.apache.xalan.xslt.ElemTemplateElement.executeChildren(ElemTemplateEl
ement.java:659)
      at
org.apache.xalan.xslt.ElemTemplate.execute(ElemTemplate.java:145)
      at
org.apache.xalan.xslt.StylesheetRoot.process(StylesheetRoot.java:443)
      at
org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:631)
      at
org.apache.cocoon.transformer.XalanTransformer.transform(XalanTransforme
r.java:101)
      at
org.apache.cocoon.processor.xslt.XSLTProcessor.process(XSLTProcessor.jav
a:110)
      at org.apache.cocoon.Engine.handle(Engine.java:305)
      at org.apache.cocoon.Cocoon.service(Cocoon.java:167)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:840)
      at com.livesoftware.jrun.JRun.runServlet(JRun.java:321)
      at
com.livesoftware.jrun.JRunGeneric.handleConnection(JRunGeneric.java:116)
      at
com.livesoftware.jrun.service.proxy.JRunProxyServiceHandler.handleReques
t(JRunProxyServiceHandler.java:130)
      at
com.livesoftware.jrun.service.ThreadConfigHandler.run(ThreadConfigHandle
r.java:96)
===================== Error msg end ==========================





-----Original Message-----
From: ichung  
Sent: Tuesday, October 10, 2000 5:47 PM
To: cocoon-users
Cc: ichung
Subject: FW: RE: RE: RE: XSP question



On Tue, 10 Oct 2000 James.Aggrey-Orleans@ubsw.com wrote:

> ok, I've changed all the dodgy characters...
> i still get the following msg:-
>  
> ps i've got the code to work with
> <util:include-file name="xxx.xml"/>   
>  
> ============================== msg start
> ================================
> java.lang.Exception: XSP Java Compiler: Compilation failed for
> _DynVerityDocs2.java
> 95: ')' expected.
>             e.getMessage()
>                           ^
> 1 error
>  

This is a known bug in util:include-file in Cocoon 1.7.4.
Basically, you need to upgrade to 1.8 or fix it by yourself
(only one character in the source code) and recompile the
cocoon.jar. You can search the archive for detail.

I also attached one post from the mailing list before:

-------- Original Message --------
Subject: Re: How to include other XML files in XSP page?
Date: Fri, 18 Aug 2000 11:16:56 -0400
From: "Ilya A. Kriveshko" <ilya@infoinsomniax.com>
Reply-To: cocoon-users@xml.apache.org
Organization: InfoI Insomniax, Inc.
To: cocoon-users@xml.apache.org
References: <NDBBIKLOLMEELKELLPFIKELLCLAA.per@onclave.com>

Fix-it-yourself instructions below:

Per Kreipke wrote:

> > This bug was recently fixed (thanks Matthias!). Please download
> > the latest version from the CVS. That should fix the problem
>
> That's great news, but I'm sorry, [newbie warning] I don't know how to
do
> that.
>
> - Do you mean get a version > 1.7.4?
> - Or specific .java files? Where would I look for info on doing this?

You can either fix it yourself or download the new version of util.xsl,
and then stuff the correct util.xsl into the cocoon.jar file.

To fix it yourself:
1) use your favorite editor to open this file:
   
/usr/local/cocoon/src/org/apache/cocoon/processor/xsp/library/java/util.
xsl
2) search for "getMessage"
3) add "+" sign after "getMessage()":
....
          document.createTextNode(
            "{" +
              __name + ": \n" +
              e.getMessage() +  // <-- Here
            "}"
          )
....
4) save the file
5) back up your original cocoon.jar file (IMPORTANT! I don't want to be
held responsible...)
5) run the following command:
jar -uvf /usr/local/cocoon/bin/cocoon.jar \
     -C /usr/local/cocoon/src \
     org/apache/cocoon/processor/xsp/library/java/util.xsl
6) restart your web-server so it reloads the jar.

I was assuming that your cocoon lives under /usr/local/cocoon. If it
doesn't,
use different path names.
---
Ilya.



Thanks.
------------
I-Chung Young
ichung@puma.mt.att.com

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



Visit our website at http://www.ubswarburg.com

This message contains confidential information and is intended only 
for the individual named.  If you are not the named addressee you 
should not disseminate, distribute or copy this e-mail.  Please 
notify the sender immediately by e-mail if you have received this 
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free 
as information could be intercepted, corrupted, lost, destroyed, 
arrive late or incomplete, or contain viruses.  The sender therefore 
does not accept liability for any errors or omissions in the contents 
of this message which arise as a result of e-mail transmission.  If 
verification is required please request a hard-copy version.  This 
message is provided for informational purposes and should not be 
construed as a solicitation or offer to buy or sell any securities or 
related financial instruments.

Mime
View raw message