× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi
After applying the PTF i get the following error,
although the program works great when i call it from
CL, and does not work when i call from RPG
I am going to post the java code also
How can i find out which line the error occured

 Cause . . . . . :   RPG procedure CALLJAVA in program
CXASH/CALLJAVA received
   Java exception
"javax.xml.transform.TransformerConfigurationException:
    
   javax.xml.transform.TransformerConfigurationE" when
calling method         
   "convertXML2PDF" with signature "()V" in class
"XML2PDF".                  

public void convertXML2PDF()
                throws IOException, FOPException,
TransformerException {
  File baseDir = new File("/CXASH/fop");
  File xml = new File(baseDir, "PO.xml");
  File xslt = new File(baseDir, "popdf.xsl");
  File pdf = new File(baseDir, "ResultXML2PDF.pdf");
        //Construct driver
        Driver driver = new Driver();

        //Setup logger
Logger logger = new
ConsoleLogger(ConsoleLogger.LEVEL_INFO);
        driver.setLogger(logger);
   
        driver.setRenderer(Driver.RENDER_PDF);

        //Setup output
 OutputStream out = new java.io.FileOutputStream(pdf);
  out = new java.io.BufferedOutputStream(out);
     try {
            driver.setOutputStream(out);
           //Setup XSLT
     TransformerFactory factory =
TransformerFactory.newInstance();
            Transformer transformer =
factory.newTransformer(new StreamSource(xslt));

            //Setup input for XSLT transformation
            Source src = new StreamSource(xml);

            //Resulting SAX events (the generated FO)
must be piped through to FOP
            Result res = new
SAXResult(driver.getContentHandler());

            //Start XSLT transformation and FOP
processing
            transformer.transform(src, res);
        } finally {
            out.close();
        }
    }

--- Barbara Morris <bmorris@xxxxxxxxxx> wrote:
> Ashish Kulkarni wrote:
> > 
> > Hi,
> > I am trying to call a java program from RPGLE, but
> i
> > get method not found error
> > javax/xml/parsers/SAXParserFactory
> > 
> > I have jdk1.4.1 installed on AS400 and the program
> > works fine when i call it from QSH, i have set
> > java.version=1.4 in SystemDefault.properties in
> > QIBM/UserData/Java400 folder on AS400
> > But i guess when i call the program from RPG it is
> > setting to JDK version 1.3 which is also present
> on
> > this machine
> > What else setting do i have to modify to look in
> to
> > make it work
> > Ashish
> > 
> 
> Ashish, if you are calling from RPG using the
> EXTPROC(*JAVA) support,
> you are using JNI.  JNI doesn't use the java.version
> property from
> SystemDefault.properties (although as far as I know,
> it uses all the
> other properties.)
> 
> To get around this, apply an ILE RPG runtime PTF
>   V5R1 PTF SI10069
>   V5R2 PTF SI10101
> and set an environment variable:
> 
> ===> ADDENVVAR QIBM_RPG_JAVA_PROPERTIES
> VALUE('-Djava.version=1.4;')
> 
> Don't forget the terminating semicolon.
> 
> The coverletter of the PTF explains more about this
> environment
> variable.
> 
> _______________________________________________
> This is the Java Programming on and around the
> iSeries / AS400 (JAVA400-L) mailing list
> To post a message email: JAVA400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit:
> http://lists.midrange.com/mailman/listinfo/java400-l
> or email: JAVA400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the
> archives
> at http://archive.midrange.com/java400-l.
> 


=====
A$HI$H

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.