[ 
https://issues.apache.org/jira/browse/XERCESJ-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hardy Loppmann closed XERCESJ-1263.
-----------------------------------


I have used the jvm -D parameter "-Djava.endorsed.dirs=xerxeslib", it works fine

> 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.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to