Hello all,

I am trying the examples from article XSP, Taglibs and
<http://perl.com/lpt/a/2002/04/16/axkit.html> Pipelines
<http://perl.com/lpt/a/2002/04/16/axkit.html> and got an Internal Error. 

Here's the Module, I copy and pasted from the article:

/home/gwang/myperl/lib/site_perl/5.8.0/My/WeatherTaglib.pm

package My::WeatherTaglib;

    $NS = " http://slaysys.com/axkit_articles/weather/";;
<http://slaysys.com/axkit_articles/weather/> 

    @EXPORT_TAGLIB = ( 'report($zip)' );

    use strict;
    use Apache::AxKit::Language::XSP::TaglibHelper;
    use Geo::Weather;

    sub report { Geo::Weather->new->get_weather( @_ ) }

    1;

Here's the weater1.xsp (also copy and pasted from the article)

  <?xml-stylesheet href="NULL"        type="application/x-xsp"?>
    <?xml-stylesheet href="weather.xsl" type="text/xsl"         ?>
    <?xml-stylesheet href="as_html.xsl" type="text/xsl"         ?>

    <xsp:page
        xmlns:xsp=" http://www.apache.org/1999/XSP/Core
<http://www.apache.org/1999/XSP/Core> "
        xmlns:util=" http://apache.org/xsp/util/v1
<http://apache.org/xsp/util/v1> "
        xmlns:param=" http://axkit.org/NS/xsp/param/v1
<http://axkit.org/NS/xsp/param/v1> "
        xmlns:weather=" http://slaysys.com/axkit_articles/weather/
<http://slaysys.com/axkit_articles/weather/> " >
    <data>
      <title><a name="title"/>My weather report</title>
      <time>
        <util:time format="%H:%M:%S" />
      </time>
      <weather>
        <weather:report>
          <!-- Get the ?zip=12345 from the URI and pass it
               to the weather:report tag as a parameter -->
          <weather:zip><param:zip/></weather:zip>
        </weather:report>
      </weather>

    </data>
    </xsp:page>

Here's configuration for AxKit:

PerlModule AxKit
<Directory "/home/gwang/usr/local/apache/htdocs/viewable">
        Options -All +Indexes +FollowSymLinks
        # Tell mod_dir to translate / to /index.xml or /index.xsp
        DirectoryIndex index.xml index.xsp
        AddHandler AxKit .xml .xsp
        AxDebugLevel 10
        AxGzipOutput Off
        AxAddXSPTaglib AxKit::XSP::Util
        AxAddXSPTaglib AxKit::XSP::Param
        AxAddXSPTaglib My::WeatherTaglib
        AxAddStyleMap application/x-xsp Apache::AxKit::Language::XSP
        AxAddStyleMap text/xsl Apache::AxKit::Language::LibXSLT
</Directory>

My system configuration:

[Sun Sep  1 14:49:28 2002] [notice] Apache/1.3.26 (Unix) AxKit/1.6
mod_perl/1.27 mod_ssl/2.8.10 OpenSSL/0.9.6e
configured -- resuming normal operations

URL: http://devbox.webdi.com:9080/viewable/weather1.xsp?zip=77081
<http://devbox.webdi.com:9080/viewable/weather1.xsp?zip=77081> 

And the complete log with debug level 10.

[Sun Sep  1 14:19:40 2002] [warn] [client 12.109.3.100] [AxKit] fast handler
called for /viewable/weather1.xsp
[Sun Sep  1 14:19:40 2002] [warn] [client 12.109.3.100] [AxKit] Content
Provider Override: Apache::AxKit::Provi
der::File
[Sun Sep  1 14:19:40 2002] [warn] [client 12.109.3.100] [AxKit] [req] File
Provider given $r: /home/gwang/usr/l
ocal/apache/htdocs/viewable/weather1.xsp
[Sun Sep  1 14:19:40 2002] [warn] [client 12.109.3.100] [AxKit] checking if
we process this resource
[Sun Sep  1 14:19:40 2002] [warn] [client 12.109.3.100] [AxKit] media:
screen, preferred style: #default
[Sun Sep  1 14:19:40 2002] [warn] [client 12.109.3.100] [AxKit] Cache: key =
17c06a95a0d761a5c660c75e6b728c65
[Sun Sep  1 14:19:40 2002] [warn] [client 12.109.3.100] [AxKit] getting
styles and external entities from the X
ML
[Sun Sep  1 14:19:40 2002] [warn] [client 12.109.3.100] [AxKit] styles not
cached - calling $provider->get_styl
es()
[Sun Sep  1 14:19:40 2002] [warn] [client 12.109.3.100] [AxKit] get_styles:
creating XML::Parser
[Sun Sep  1 14:19:40 2002] [warn] [client 12.109.3.100] [AxKit] get_styles:
calling XML::Parser->parse('/home/g
wang/usr/local/apache/htdocs/viewable/weather1.xsp')
[Sun Sep  1 14:19:40 2002] [warn] [client 12.109.3.100] [AxKit] parse_pi:
href = NULL
[Sun Sep  1 14:19:40 2002] [warn] [client 12.109.3.100] [AxKit] parse_pi:
type = application/x-xsp
[Sun Sep  1 14:19:40 2002] [warn] [client 12.109.3.100] [AxKit] parse_pi:
href = weather.xsl
[Sun Sep  1 14:19:40 2002] [warn] [client 12.109.3.100] [AxKit] parse_pi:
type = text/xsl
[Sun Sep  1 14:19:40 2002] [warn] [client 12.109.3.100] [AxKit] parse_pi:
href = as_html.xsl
[Sun Sep  1 14:19:40 2002] [warn] [client 12.109.3.100] [AxKit] parse_pi:
type = text/xsl
[Sun Sep  1 14:19:40 2002] [warn] [client 12.109.3.100] [AxKit] get_styles:
parse returned successfully
[Sun Sep  1 14:19:40 2002] [warn] [client 12.109.3.100] [AxKit] Calling
GetMatchingProcessors with (screen, , ,
 , {http://www.apache.org/1999/XSP/Core}page)
[Sun Sep  1 14:19:40 2002] [warn] [client 12.109.3.100] [AxKit] get_styles:
loading style modules
[Sun Sep  1 14:19:40 2002] [warn] [client 12.109.3.100] [AxKit] get_styles:
looking for mapping for style type:
 'application/x-xsp'

[Sun Sep  1 14:19:41 2002] [warn] [client 12.109.3.100] [AxKit] cache
doesn't exist
[Sun Sep  1 14:19:41 2002] [warn] [client 12.109.3.100] [AxKit] some
condition failed. recreating output
[Sun Sep  1 14:19:41 2002] [warn] [client 12.109.3.100] [AxKit] styles:
Apache::AxKit::Language::XSP(NULL)
[Sun Sep  1 14:19:41 2002] [warn] [client 12.109.3.100] [AxKit] styles:
Apache::AxKit::Language::LibXSLT(weathe
r.xsl)
[Sun Sep  1 14:19:41 2002] [warn] [client 12.109.3.100] [AxKit] styles:
Apache::AxKit::Language::LibXSLT(as_htm
l.xsl)
[Sun Sep  1 14:19:41 2002] [warn] [client 12.109.3.100] [AxKit] Style
Provider Override: Apache::AxKit::Provide
r::File
[Sun Sep  1 14:19:41 2002] [warn] [client 12.109.3.100] [AxKit] [uri] File
Provider looking up uri NULL
[Sun Sep  1 14:19:41 2002] [warn] [client 12.109.3.100] [AxKit] [uri] File
Provider set filename to /home/gwang
/usr/local/apache/htdocs/viewable/NULL
[Sun Sep  1 14:19:41 2002] [warn] [client 12.109.3.100] [AxKit] about to
execute: Apache::AxKit::Language::XSP:
:handler


[Sun Sep  1 14:19:41 2002] [warn] [client 12.109.3.100] [AxKit] Caught an
exception
[Sun Sep  1 14:19:41 2002] [error] [client 12.109.3.100] [AxKit] [Error]
Can't locate object method "register"
via package "My::WeatherTaglib" at
/home/gwang/myperl/lib/site_perl/5.8.0/i686-linux/Apache/AxKit/Language/XSP.
pm line 168.

[Sun Sep  1 14:19:41 2002] [error] [client 12.109.3.100] [AxKit] From:
/home/gwang/myperl/lib/site_perl/5.8.0/i
686-linux/Apache/AxKit/Exception.pm : 9
[Sun Sep  1 14:19:41 2002] [error] [client 12.109.3.100] [AxKit] [Backtrace]
Can't locate object method "regist
er" via package "My::WeatherTaglib" at
/home/gwang/myperl/lib/site_perl/5.8.0/i686-linux/Apache/AxKit/Language/
XSP.pm line 168.
 
Apache::AxKit::Exception::new('Apache::AxKit::Exception::Error','-text','Can
\'t locate object method "regist
er" via package "My::Weath...') called at
/home/gwang/myperl/lib/site_perl/5.8.0/i686-linux/AxKit.pm line 839
   AxKit::prep_exception('Can\'t locate object method "register" via package
"My::Weath...') called at /home/gw
ang/myperl/lib/site_perl/5.8.0/i686-linux/AxKit.pm line 141
   AxKit::__ANON__('Can\'t locate object method "register" via package
"My::Weath...') called at /home/gwang/my
perl/lib/site_perl/5.8.0/i686-linux/Apache/AxKit/Language/XSP.pm line 168
   Apache::AxKit::Language::XSP::_register_me_and_others() called at
/home/gwang/myperl/lib/site_perl/5.8.0/i68
6-linux/Apache/AxKit/Language/XSP.pm line 40   

Apache::AxKit::Language::XSP::handler('Apache::AxKit::Language::XSP','AxKit:
:Apache=SCALAR(0x84c0ad4)','Apac
he::AxKit::Provider::File=HASH(0x84b5108)','Apache::AxKit::Provider::File=HA
SH(0x872b364)','') called at /home/
gwang/myperl/lib/site_perl/5.8.0/i686-linux/AxKit.pm line 623
 
AxKit::process_request('AxKit::Apache=SCALAR(0x84c0ad4)','Apache::AxKit::Pro
vider::File=HASH(0x84b5108)','AR
RAY(0x849aea0)') called at
/home/gwang/myperl/lib/site_perl/5.8.0/i686-linux/AxKit.pm line 437
 
AxKit::run_axkit_engine('AxKit::Apache=SCALAR(0x84c0ad4)','Apache::AxKit::Pr
ovider::File=HASH(0x84b5108)') c
alled at /home/gwang/myperl/lib/site_perl/5.8.0/i686-linux/AxKit.pm line 264
   eval {...} called at
/home/gwang/myperl/lib/site_perl/5.8.0/i686-linux/AxKit.pm line 255
 
AxKit::main_handler('AxKit::Apache=SCALAR(0x84c0ad4)','Apache::AxKit::Provid
er::File=HASH(0x84b5108)') calle
d at /home/gwang/myperl/lib/site_perl/5.8.0/i686-linux/AxKit.pm line 172
   AxKit::fast_handler('AxKit::Apache=SCALAR(0x84c0ad4)') called at
/dev/null line 0
   eval {...} called at /dev/null line 0

   

I did search the archive of list and found some similar ones, but the
solutions proposed won't help me much, I tried PerlModule, it's the same.

Any help would be highly appreciated.

Thanks a lot.

Guangzu

Reply via email to