You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by CURRAN Chad / FTR&D / ATFREEDOM <ch...@rd.francetelecom.com> on 2001/03/09 03:05:57 UTC
Help with taglibs - nullpointer exception
I am sorry to post when there are several messages on this subject, but I've
read them and I can't figure out what I'm doing wrong. I'm using cocoon
1.7.4 with tomcat-3.2-b7. I'm trying to do a really simple taglib, but
getting a NullPointerException. Thanks in advance for your help!
Chad
Here are my files:
**********************
junk.xml
<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<xsp:page language="java"
xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns:junk="http://somejunk/stuff"
>
<page>
<message>
stuff
<junk:mainsection>stuff2</junk:mainsection>
</message>
</page>
</xsp:page>
**************************
junk.xsl
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
mlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns:junk="http://somejunk/stuff"
>
<xsl:template match="junk:mainsection">
<page>
<message>
stuff5
</message>
</page>
</xsl:template>
</xsl:stylesheet>
************************
cocoon.properties (this doesn't work with either declaration of junk.xsl
...
processor.xsp.logicsheet.util.java =
resource://org/apache/cocoon/processor/xsp/library/java/util.xsl
processor.xsp.logicsheet.sql.java =
resource://org/apache/cocoon/processor/xsp/library/java/sql.xsl
# processor.xsp.logicsheet.junk.java =
resource://org/apache/cocoon/processor/xsp/library/java/junk.xsl
processor.xsp.logicsheet.junk.java =
file:///d:/cocoon/src/org/apache/cocoon/processor/xsp/library/java/junk.xsl
...
************************
my classpath (I changed the order in tomcat.bat so that xerces came at the
beginning of the classpath)
Using CLASSPATH:
.;d:\jdk1.2.2\lib\xerces.jar;\d:\jdk1.2.2\lib\xalan.jar;D:\Java\Tools\Depend
ency
Checker\com\mattwelsh\tools\dependency;d:\jakarta-tomcat-3.2.1\classes;d:\ja
karta-tomcat-3.2.1\lib\ant.jar;d:\jakarta-tomcat-3.2.1\lib\cocoon.jar;d:\jak
arta-tomcat-3.2.1\lib\fop_0_12_1.jar;d:\jakarta-tomcat-3.2.1\lib\jasper.jar;
d:\jakarta-tomcat-3.2.1\lib\jaxp.jar;d:\jakarta-tomcat-3.2.1\lib\parser.jar;
d:\jakarta-tomcat-3.2.1\lib\servlet.jar;d:\jakarta-tomcat-3.2.1\lib\servlet_
2_2.jar;d:\jakarta-tomcat-3.2.1\lib\stylebook-1.0-b2.jar;d:\jakarta-tomcat-3
.2.1\lib\webserver.jar;d:\jakarta-tomcat-3.2.1\lib\xalan_1_0_1.jar;d:\jakart
a-tomcat-3.2.1\lib\xerces_1_0_3.jar;d:\jdk1.2.2\lib\tools.jar
Re: Help with taglibs - nullpointer exception
Posted by "Piroumian, Konstantin" <KP...@flagship.ru>.
NullPointerException is thrown when Cocoon could not find your taglib.
Check the path the your xsl file, maybe it is not correct.
From: CURRAN Chad / FTR <ma...@rd.francetelecom.com> &D /
ATFREEDOM
To: 'cocoon-users@xml.apache.org' <mailto:'cocoon-users@xml.apache.org'>
Sent: Friday, March 09, 2001 5:05 AM
Subject: Help with taglibs - nullpointer exception
I am sorry to post when there are several messages on this subject, but
I've read them and I can't figure out what I'm doing wrong. I'm using
cocoon 1.7.4 with tomcat-3.2-b7. I'm trying to do a really simple
taglib, but getting a NullPointerException. Thanks in advance for your
help!
Chad
Here are my files:
**********************
junk.xml
<?xml version="1.0"?>
<?cocoon-process type="xsp"?>
<xsp:page language="java"
xmlns:xsp=" http://www.apache.org/1999/XSP/Core
<http://www.apache.org/1999/XSP/Core> "
xmlns:junk=" http://somejunk/stuff <http://somejunk/stuff> "
>
<page>
<message>
stuff
<junk:mainsection>stuff2</junk:mainsection>
</message>
</page>
</xsp:page>
**************************
junk.xsl
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
mlns:xsl=" http://www.w3.org/1999/XSL/Transform
<http://www.w3.org/1999/XSL/Transform> "
xmlns:xsp=" http://www.apache.org/1999/XSP/Core
<http://www.apache.org/1999/XSP/Core> "
xmlns:junk=" http://somejunk/stuff <http://somejunk/stuff> "
>
<xsl:template match="junk:mainsection">
<page>
<message>
stuff5
</message>
</page>
</xsl:template>
</xsl:stylesheet>
************************
cocoon.properties (this doesn't work with either declaration of junk.xsl
...
processor.xsp.logicsheet.util.java =
resource://org/apache/cocoon/processor/xsp/library/java/util.xsl
processor.xsp.logicsheet.sql.java =
resource://org/apache/cocoon/processor/xsp/library/java/sql.xsl
# processor.xsp.logicsheet.junk.java =
resource://org/apache/cocoon/processor/xsp/library/java/junk.xsl
processor.xsp.logicsheet.junk.java =
file:///d:/cocoon/src/org/apache/cocoon/processor/xsp/library/java/junk.
xsl
<file:///d:/cocoon/src/org/apache/cocoon/processor/xsp/library/java/junk
.xsl>
...
************************
my classpath (I changed the order in tomcat.bat so that xerces came at
the beginning of the classpath)
Using CLASSPATH:
.;d:\jdk1.2.2\lib\xerces.jar;\d:\jdk1.2.2\lib\xalan.jar;D:\Java\Tools\De
pendency
Checker\com\mattwelsh\tools\dependency;d:\jakarta-tomcat-3.2.1\classes;d
:\jakarta-tomcat-3.2.1\lib\ant.jar;d:\jakarta-tomcat-3.2.1\lib\cocoon.ja
r;d:\jakarta-tomcat-3.2.1\lib\fop_0_12_1.jar;d:\jakarta-tomcat-3.2.1\lib
\jasper.jar;d:\jakarta-tomcat-3.2.1\lib\jaxp.jar;d:\jakarta-tomcat-3.2.1
\lib\parser.jar;d:\jakarta-tomcat-3.2.1\lib\servlet.jar;d:\jakarta-tomca
t-3.2.1\lib\servlet_2_2.jar;d:\jakarta-tomcat-3.2.1\lib\stylebook-1.0-b2
.jar;d:\jakarta-tomcat-3.2.1\lib\webserver.jar;d:\jakarta-tomcat-3.2.1\l
ib\xalan_1_0_1.jar;d:\jakarta-tomcat-3.2.1\lib\xerces_1_0_3.jar;d:\jdk1.
2.2\lib\tools.jar