We are having libxm2 version 2.6.16-12.9 and perl-5.8.5-57.We are getting following errors intermittently when calling a perl script through a C program.

Can't locate object method "new" via package "XML::LibXML::SAX" at /us +r/lib/perl5/vendor_perl/5.8.5/XML/SAX/ParserFactory.pm line 43. Compilation failed in require at /app/base_lib/mycommon_mod1.pm line 8 +8. BEGIN failed--compilation aborted at /app/base_lib/common_mod1.pm line + 88. Compilation failed in require at /app/base_lib/cpath1/common_mod2.pm l +ine 6. BEGIN failed--compilation aborted at /app/base_lib/cpath1/common_mod2. +pm line 6. .. Compilation failed in require at /app/base_lib/cpath1/common_mod2.pm l +ine 20. BEGIN failed--compilation aborted at /app/base_lib//cpath1/common_mod2 +.pm line 20. Compilation failed in require at /Apps/bin/my_script.pl line 18. BEGIN failed--compilation aborted at /Apps/bin/my_script.pl line 18.

We are calling the perl script multiple times with the same parameter but sometimes we see this error. As a workaround for this problem, many of the links on web suggested altering  the order of modules SAX and ParserFactorey names in ParaserDetails.ini. We changed it and moved SAX before SAX::Parser, but still get an error although a different one -

Can't locate object method "new" via package "XML::LibXML::SAX::Parser +" at /usr/lib/perl5/vendor_perl/5.8.5/XML/SAX/ParserFactory.pm line 4 +3. Compilation failed in require at /app/base_lib/mycommon_mod1.pm line 8 +8. BEGIN failed--compilation aborted at /app/base_lib/common_mod1.pm line + 88. Compilation failed in require at /app/base_lib/cpath1/common_mod2.pm l +ine 6. BEGIN failed--compilation aborted at /app/base_lib/cpath1/common_mod2. +pm line 6.

Our product is running on RHEL 4.7.  Along with libxm2 version 2.6.16-12.9 and perl-5.8.5-57.We we are having following perl-XML packages -

perl-XML-Encoding-1.01-26  perl-XML-Twig-3.13-6 perl-XML-NamespaceSupport-1.08-6 perl-XML-Dumper-0.71-2 perl-XML-Grove-0.46alpha-27  perl-XML-LibXML-Common-0.13-8.el4 perl-XML-Parser-2.34-5  perl-libxml-perl-0.07-30 perl-XML-SAX-0.12-7  perl-XML-LibXML-1.58-3.el4 perl-libxml-enno-1.02-31

is this is a known issue with perl ? Also if any of the higher versions resolve this ?


In reply to Can't locate object method "new" via package "XML::LibXML::SAX" by rupesht

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.