You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jon Brisbin <br...@ipa.net> on 2001/03/03 03:06:53 UTC

problems with custom logicsheets/documentation

Hi :-)

I'm getting VERY frustrated with tyring to install a custom logicsheet into
cocoon!!!!  I've tried every suggestion I was able to glean from the
documentation on this topic, but when I put my tag *inside* tags within my
page, cocoon either gives me an exception saying it can't find the .class
file for the page in the repository (the _stuff.java file has size 0) or it
says i'm trying to output something before the document! ...but I'm
not...the following example currently gives a NullPointerException...

my test sytlesheet is below...notice *i'm not outputting anything* and it
still gives me the error...i used as examples the other logicsheets, and i
can't tell any difference between my sheet and theirs...cocoon.properties is
updated correctly and the stylesheet file is in the tomcat/classes directory
and cocoon can find it...

any help on specific examples of using logicsheets to add content to the
calling xml page would be appreciated!

i would also be willing to aid in producing documentation, since one of my
other 12 jobs is as a freelance writer...i'm trying to get this logicsheet
stuff going so i can create a databased archive of this list with options to
"file" specific messages in certain categories as you read the message...it
will also have a basic howto functionality where authors can submit their
howtos, with comments below, etc...

yes, i know there are other packages out there that already do this, but
this is how i'm learning cocoon...besides, i'm not going to complain about
lack of documentation without offering some help to cure it ;-)

jb

----------------
<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-sytlesheet href="admin.xsl" type="text/xsl"?>

<xsp:page
    language="java"
    xmlns:xsp="http://www.apache.org/1999/XSP/Core"
    xmlns:sqlutil="http://www.jbrisbin.net/2001/XSP/SQLUtil"
>

    <page>
        <info><sqlutil:sql-from-request pool="default"/></info>
    </page>


</xsp:page>
----------------
<?xml version="1.0"?>
<xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xsp="http://www.apache.org/1999/XSP/Core"
    xmlns:sqlutil="http://www.jbrisbin.net/2001/XSP/SQLUtil"
    version="1.0"
>

    <xsl:template match="sqlutil:sql-from-request">
        <xsl:variable name="pool"><xsl:value-of
select="@pool"/></xsl:variable>
    </xsl:template>

</xsl:stylesheet>
----------------
java.lang.NullPointerException
	at
org.apache.cocoon.processor.xsp.language.java.XSPJavaPreprocessor.preprocess
(XSPJavaPreprocessor.java:78)
	at
org.apache.cocoon.processor.xsp.XSPLogicsheet.apply(XSPLogicsheet.java:99)
	at
org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:456)
	at org.apache.cocoon.Engine.handle(Engine.java:384)
	at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
	at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
	at org.apache.tomcat.core.Handler.service(Handler.java:286)
	at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
	at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
	at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
	at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection
(Ajp12ConnectionHandler.java:166)
	at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
	at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
	at java.lang.Thread.run(Thread.java:484)