logo       

[jira] Resolved: (XERCESJ-1263) Couldn´t reset SAXParser on AIX: msg#00018

Subject: [jira] Resolved: (XERCESJ-1263) Couldn´t reset SAXParser on AIX
     [ 
https://issues.apache.org/jira/browse/XERCESJ-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Michael Glavassevich resolved XERCESJ-1263.
-------------------------------------------

    Resolution: Invalid

This happens when you haven't properly overridden the version of Xerces (XML4J 
in this case) in the JDK.  You need to use the Endorsed Standards Override 
Mechanism.  See this FAQ [1] for more information.

[1] http://xerces.apache.org/xerces2-j/faq-general.html#faq-4

> Couldn´t reset SAXParser on AIX
> -------------------------------
>
>                 Key: XERCESJ-1263
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1263
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: SAX
>    Affects Versions: 2.9.0
>         Environment: Classic VM (build 1.4.2, J2RE 1.4.2 IBM AIX build 
> ca142-20060421 (SR5) (JIT enabled: jitc)) 
> AIX Version 5.3
> AIX Kernel Version  5.3.0.54
> Processor - PowerPC_POWER5 64 bit
>            Reporter: Hardy Loppmann
>
> On AIX I get this Error:
> java -jar xerctest.jar /bea/wls/IPMRS_FFMS_BMD_000001_01.20070424105446
> Exception in thread "main" java.lang.NoSuchMethodError: 
> org.apache.xerces.parsers.XML11Configuration: method 
> getFeature0(Ljava/lang/String;)Z not found
>         at 
> org.apache.xerces.parsers.XIncludeAwareParserConfiguration.getFeature(Unknown 
> Source)
>         at org.apache.xerces.parsers.AbstractSAXParser.reset(Unknown Source)
>         at xerc.XercTest.doSyntaxCheck(XercTest.java:50)
>         at xerc.XercTest.main(XercTest.java:30)
> On another machine, like Suse Linux Enterprise Server 9 the code works fine, 
> here is the snipplet that doesn´t work
> package xerc;
> import java.io.File;
> import java.io.IOException;
> import java.net.URL;
> import org.apache.xerces.parsers.SAXParser;
> import org.apache.xerces.parsers.XIncludeAwareParserConfiguration;
> import org.apache.xerces.xni.parser.XMLInputSource;
> import org.xml.sax.SAXException;
> public class XercTest {
>         
>       private XIncludeAwareParserConfiguration parserConfig;
>       private SAXParser parser;
>       public static void main( String [] args ) {
>               XercTest tBmd = new XercTest();
>               tBmd.doSyntaxCheck(args[0]);
>       }
>       public void doSyntaxCheck(String filename ) {                
>               try {
>                       parserConfig = new XIncludeAwareParserConfiguration();
>                       parser = new SAXParser(parserConfig);
>                       parserConfig.setInputSource(new XMLInputSource(null, 
> filename, null));
>               
>                       
>                       
> parser.setFeature("http://xml.org/sax/features/validation";, true);
>               
>                       
> parser.setFeature("http://apache.org/xml/features/validation/schema";, true);
>                       
> parser.setFeature("http://apache.org/xml/features/validation/schema-full-checking",true);
>                       
>                       URL schemaUrl = 
> this.getClass().getResource("IPMRS_FFMS_Schema.xsd");
>                       String url = schemaUrl.toString().replaceAll(" ", 
> "%20");
>                       
> parser.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation";,
>  url);    
>               
>                       parser.reset();
>                       // .....        
>               } catch(IOException e) {
>                       e.printStackTrace();
>               } catch(SAXException e) {
>                       e.printStackTrace();
>               }
>               // .....        
>               File file = new File(filename);
>               String fileName = file.getName();
>               String source, target, dataType, seqStr, pnStr, dtmStr;
>               long seq = -1;
>               int pn = -1;
>               source = fileName.substring(0, 5);
>               target = fileName.substring(6, 10);
>               dataType = fileName.substring(11, 14);
>               seqStr = fileName.substring(15, 21);
>               pnStr = fileName.substring(22, 24);
>               dtmStr = fileName.substring(25, fileName.length()); 
>               try {
>                       parserConfig.parse(true);
>               } catch(IOException e) {
>                       e.printStackTrace();
>               }
>               System.out.println("XercTest.doSyntaxCheck()");
>       }                                                                       
>                 
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe