cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Answer <A.Nuzh...@ftc.ru>
Subject Re[3]: XIncludeTransformer still not working
Date Mon, 01 Oct 2001 11:02:45 GMT
At your computer all working, but for me not???
Listen to me.
Now i'm work Win2000 SP2, resin 2.0.1 (without caching)(for testing, 2.0.2 is better), c2
rc1a.
I.e. is a same configuration.
I build my own webapp called "mysite" & place it into Resin webapps dir.
See my files:

mysite\docs\index.xsp:
<?xml version="1.0" encoding="UTF-8"?>
<xsp:page 
 xmlns:xsp="http://apache.org/xsp"
 xmlns:xinclude="http://www.w3.org/2001/XInclude">
<page>
 <xinclude:include parse="xml" href="menu"/>
</page>
</xsp:page>

mysite\docs\menu (no extension for simplification):
<?xml version="1.0" encoding="UTF-8"?>
<block title="main">
<menu>
 <menu-item title="a" link="index.xml"/>
</menu>
</block>

mysite\stylesheets\index.xsl (copy-template):
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:template match="@*|node()">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
  </xsl:copy>
 </xsl:template>
</xsl:stylesheet>
  
mysite\sitemap.xmap:
...
 <map:pipelines>
  <map:pipeline>
   <map:match pattern="**.xsp">
    <map:generate type="serverpages" src="docs/{1}.xsp"/>
    <map:transform type="xinclude"/>
    <map:transform src="stylesheets/index.xsl"/>
    <map:serialize/>
   </map:match>
   <map:match pattern="**.xml">
    <map:generate src="docs/{1}.xsp"/>
    <map:transform type="xinclude"/>
    <map:transform src="stylesheets/index.xsl"/>
    <map:serialize/>
   </map:match>
   <map:handle-errors>
    <map:transform src="stylesheets/error2html.xsl"/>
    <map:serialize status-code="500"/>
   </map:handle-errors>
  </map:pipeline>
 </map:pipelines>
...

conf\resin.conf:
<caucho.com>
<java compiler="internal" compiler-args="" work-dir='work'/>
<jsp precompile='true' static-encoding='true' recompile-on-error='true'/>
<http-server>
  <app-dir>doc</app-dir>
  <http port='80'/>
  <srun host='127.0.0.1' port='6802'/>
  <class-update-interval>2</class-update-interval>
  <!--
     - Select an error page to display when the connection fails.
     -
     - <error-page location='connection' location='/my-error-page.html'/>
    -->
  <caucho-status>true</caucho-status>
  <thread-max>150</thread-max>
  <thread-keepalive id='100'/>
  <request-timeout id='30s'/>
  <accept-buffer-size id='256'/>
  <thread-min id='5'/>
  <ignore-client-disconnect>true</ignore-client-disconnect>
  <cache dir='cache' size='1024' entries='8192' enable='false'/> 
  <host id=''>
    <war-dir id='webapps'/>
    <web-app id='/'>
      <!-- how often to check servlets for changes (id used for brevity) -->
      <class-update-interval id='2'/>
      <!--
         - The classpath directive may be repeated.  Source is optional
         - Servlets and beans generally belong in WEB-INF/classes
        -->
      <classpath id='WEB-INF/classes'
                 source='WEB-INF/classes'
                 compile='true'/>
      <!--
         - Expires time for a cacheable file.  Production sites will
         - normally change this to '15m'
        -->
      <!-- <cache-mapping url-pattern='/' expires='2s'/> -->
      <welcome-file-list>index.xml, index.xtp, index.jsp, index.html</welcome-file-list>
      <session-config>
        <session-max>4096</session-max>
        <session-timeout>30</session-timeout>
        <enable-cookies>true</enable-cookies>
        <enable-url-rewriting>true</enable-url-rewriting>
      </session-config>
    </web-app>
  </host>
</http-server>
</caucho.com>

mysite\WEB-INF\lib list:
avalon-excalibur-4.0.jar
avalon-framework-4.0.jar
cocoon-2.0rc1.jar
hsqldb-1.61.jar
jakarta-regexp-1.2.jar
jstyle.jar
logkit-1.0b5.jar
maybeupload.jar
resolver.jar
xalan-2.2.0-dev.jar
xerces_1_4_3.jar

If i use XInclude in xml-files, all working. Errors appears only when i process xsp-files.
Now error caching-independent. If even Resin cache disabled and NonCachingEvent/StreamPipeline
used, XInclude not work.
[
org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate(): java.lang.NullPointerException
        at org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:187)

        at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:214)

        at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:364)

        at org.apache.cocoon.www.sitemap_xmap.wildcardMatchN4000E3(sitemap_xmap.java) 
        at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java) 
        at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java) 
        at org.apache.cocoon.sitemap.Handler.process(Handler.java:163) 
        at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:116) 
        at org.apache.cocoon.Cocoon.process(Cocoon.java:495) 
        at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:534) 
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:103) 
        at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:82)

        at com.caucho.server.http.Invocation.service(Invocation.java:272) 
        at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:216) 
        at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158) 
        at com.caucho.server.TcpConnection.run(TcpConnection.java:140) 
        at java.lang.Thread.run(Thread.java:484) 
java.lang.NullPointerException 
        at org.apache.cocoon.transformation.XIncludeTransformer.processXIncludeElement(XIncludeTransformer.java:201)

        at org.apache.cocoon.transformation.XIncludeTransformer.startElement(XIncludeTransformer.java:116)

        at org.apache.cocoon.generation.ServerPagesGenerator.startElement(ServerPagesGenerator.java:316)

        at org.apache.cocoon.www.docs.index2_xsp.generate(index2_xsp.java) 
        at org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:175)

        at org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:214)

        at org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:364)

        at org.apache.cocoon.www.sitemap_xmap.wildcardMatchN4000E3(sitemap_xmap.java) 
        at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java) 
        at org.apache.cocoon.www.sitemap_xmap.process(sitemap_xmap.java) 
        at org.apache.cocoon.sitemap.Handler.process(Handler.java:163) 
        at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:116) 
        at org.apache.cocoon.Cocoon.process(Cocoon.java:495) 
        at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:534) 
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:103) 
        at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:82)

        at com.caucho.server.http.Invocation.service(Invocation.java:272) 
        at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:216) 
        at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:158) 
        at com.caucho.server.TcpConnection.run(TcpConnection.java:140) 
        at java.lang.Thread.run(Thread.java:484) 
]

But why your app work whereas my app not?

Best regards,
  Andrew Answer               A.Nuzhdov@ftc.ru

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


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


Mime
View raw message