Loading ...
Sorry, an error occurred while loading the content.

Re: [XSL-FO] tutalii error??

Expand Messages
  • Glen Mazza
    In the Fop sample [1], a StreamSource object is used for the stylesheet, but you are just using a Source object for it ( Source xslSrc . I m unsure if this is
    Message 1 of 10 , Jul 21 8:25 AM
    • 0 Attachment
      In the Fop sample [1], a StreamSource object is used
      for the stylesheet, but you are just using a Source
      object for it ("Source xslSrc". I'm unsure if this is
      the problem, however.

      [1]
      http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/embedding/java/embedding/ExampleXML2PDF.java?rev=1.10

      Glen

      --- Glen Mazza <grm7793@...> wrote:
      > BTW, what's a tutalii?
      >
      > --- Ra�l_Herranz_Serrano <herranzr@...> wrote:
      > > I'm sorry, I forgot to say that I'm using FOP
      > > (version 0.20.5) in a oc4j server...
      > >
      > > Thanks a lot again!!
      > >
      > > Raul (Spain)
      > > ----- Original Message -----
      > > From: Ra�l Herranz Serrano
      > > To: XSL-FO@yahoogroups.com
      > > Sent: Wednesday, July 21, 2004 4:50 PM
      > > Subject: [XSL-FO] tutalii error??
      > >
      > >
      > > What is the problem with this piece of code? I'm
      > > getting a java.lang.NullPointerException after the
      > > following tutalii message:
      > >
      > > Tutalii:
      > >
      >
      C:\desarrollo\java\install\oc4j\j2ee\home\applications\QuemasFOP\QuemasFOP\WEB-INF\lib/fop.jar
      > > [INFO] [1]
      > >
      > >
      > > The code that is generating this 'error':
      > >
      > > public ByteArrayOutputStream transform(Source
      > > xmlSrc, Source xslSrc) throws
      > > TransformerConfigurationException,
      > > TransformerException {
      > > ByteArrayOutputStream out = new
      > > ByteArrayOutputStream();
      > >
      > >
      >
      org.apache.fop.configuration.Configuration.put("baseDir","C:/desarrollo/java/install/oc4j/j2ee/home/applications/QuemasFOP/QuemasFOP/pages/baseDir");
      > > Driver driver = new Driver();
      > > Logger logger = new
      > > ConsoleLogger(ConsoleLogger.LEVEL_INFO);
      > > MessageHandler.setScreenLogger(logger);
      > > driver.setLogger(logger);
      > > driver.setRenderer(Driver.RENDER_PDF);
      > > driver.setOutputStream(out);
      > > TransformerFactory transformerFactory =
      > > TransformerFactory.newInstance();
      > > Transformer transformer =
      > > transformerFactory.newTransformer(xslSrc);
      > > Result res = new
      > > SAXResult(driver.getContentHandler());
      > > transformer.transform(xmlSrc, res); //this
      > is
      > > the point where I get the tutalii error!!!!
      > > return out;
      > > }
      > >
      > >
      > > Thanks a lot!
      > >
      > > Raul Herranz (Spain)
      > >
      > > [Non-text portions of this message have been
      > > removed]
      > >
      > >
      > > Yahoo! Groups Sponsor
      > > ADVERTISEMENT
      > >
      > >
      > >
      > >
      > >
      > >
      >
      ------------------------------------------------------------------------------
      > > Yahoo! Groups Links
      > >
      > > a.. To visit your group on the web, go to:
      > > http://groups.yahoo.com/group/XSL-FO/
      > >
      > > b.. To unsubscribe from this group, send an
      > > email to:
      > > XSL-FO-unsubscribe@yahoogroups.com
      > >
      > > c.. Your use of Yahoo! Groups is subject to
      > the
      > > Yahoo! Terms of Service.
      > >
      > >
      > >
      > > [Non-text portions of this message have been
      > > removed]
      > >
      > >
      > >
      > > ------------------------ Yahoo! Groups Sponsor
      > > --------------------~-->
      > > Make a clean sweep of pop-up ads. Yahoo! Companion
      > > Toolbar.
      > > Now with Pop-Up Blocker. Get it for free!
      > >
      >
      http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/9rHolB/TM
      > >
      >
      --------------------------------------------------------------------~->
      > >
      > >
      > >
      > > Yahoo! Groups Links
      > >
      > >
      > > XSL-FO-unsubscribe@yahoogroups.com
      > >
      > >
      > >
      > >
      >
      >
      >
      > ------------------------ Yahoo! Groups Sponsor
      > --------------------~-->
      > Make a clean sweep of pop-up ads. Yahoo! Companion
      > Toolbar.
      > Now with Pop-Up Blocker. Get it for free!
      >
      http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/9rHolB/TM
      >
      --------------------------------------------------------------------~->
      >
      >
      >
      > Yahoo! Groups Links
      >
      >
      > XSL-FO-unsubscribe@yahoogroups.com
      >
      >
      >
      >
    • Raúl Herranz Serrano
      I have change the logger level as you have told to me, but it just say the same thing, nothing new... :(( Raul (Spain) ... From: Chris Bowditch To:
      Message 2 of 10 , Jul 21 8:30 AM
      • 0 Attachment
        I have change the logger level as you have told to me, but it just say the same thing, nothing new... :((

        Raul (Spain)
        ----- Original Message -----
        From: Chris Bowditch
        To: XSL-FO@yahoogroups.com
        Sent: Wednesday, July 21, 2004 5:23 PM
        Subject: Re: [XSL-FO] tutalii error??


        Raúl Herranz Serrano wrote:
        > What is the problem with this piece of code? I'm getting a
        > java.lang.NullPointerException after the following tutalii message:

        Change the line that constructs the logger to:

        Logger logger = new ConsoleLogger(ConsoleLogger.LEVEL_DEBUG);

        this should result in a stack trace being output with the
        NullPointerException. Please post the trace stack trace back to the list.

        NPE can occur in FOP if there are certain oddities in your XSL-FO. The stack
        trace will help me to identify what is wrong in your FO.

        BTW, FOP specific questions will usually receive a better response on the
        fop-user list: http://xml.apache.org/fop/maillist.html#fop-user

        <snip/>

        Chris



        Yahoo! Groups Sponsor
        ADVERTISEMENT





        ------------------------------------------------------------------------------
        Yahoo! Groups Links

        a.. To visit your group on the web, go to:
        http://groups.yahoo.com/group/XSL-FO/

        b.. To unsubscribe from this group, send an email to:
        XSL-FO-unsubscribe@yahoogroups.com

        c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



        [Non-text portions of this message have been removed]
      • Raúl Herranz Serrano
        I m creating the Source with a StreamSource: Source xslSrc = new StreamSource(new File( C:/ + xslFileName)); ... From: Glen Mazza To:
        Message 3 of 10 , Jul 21 8:39 AM
        • 0 Attachment
          I'm creating the Source with a StreamSource:

          Source xslSrc = new StreamSource(new File("C:/" + xslFileName));

          ----- Original Message -----
          From: "Glen Mazza" <grm7793@...>
          To: <XSL-FO@yahoogroups.com>
          Sent: Wednesday, July 21, 2004 5:25 PM
          Subject: Re: [XSL-FO] tutalii error??


          > In the Fop sample [1], a StreamSource object is used
          > for the stylesheet, but you are just using a Source
          > object for it ("Source xslSrc". I'm unsure if this is
          > the problem, however.
          >
          > [1]
          >
          http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/embedding/java/embedding/ExampleXML2PDF.java?rev=1.10
          >
          > Glen
          >
          > --- Glen Mazza <grm7793@...> wrote:
          > > BTW, what's a tutalii?
          > >
          > > --- Raúl_Herranz_Serrano <herranzr@...> wrote:
          > > > I'm sorry, I forgot to say that I'm using FOP
          > > > (version 0.20.5) in a oc4j server...
          > > >
          > > > Thanks a lot again!!
          > > >
          > > > Raul (Spain)
          > > > ----- Original Message -----
          > > > From: Raúl Herranz Serrano
          > > > To: XSL-FO@yahoogroups.com
          > > > Sent: Wednesday, July 21, 2004 4:50 PM
          > > > Subject: [XSL-FO] tutalii error??
          > > >
          > > >
          > > > What is the problem with this piece of code? I'm
          > > > getting a java.lang.NullPointerException after the
          > > > following tutalii message:
          > > >
          > > > Tutalii:
          > > >
          > >
          >
          C:\desarrollo\java\install\oc4j\j2ee\home\applications\QuemasFOP\QuemasFOP\W
          EB-INF\lib/fop.jar
          > > > [INFO] [1]
          > > >
          > > >
          > > > The code that is generating this 'error':
          > > >
          > > > public ByteArrayOutputStream transform(Source
          > > > xmlSrc, Source xslSrc) throws
          > > > TransformerConfigurationException,
          > > > TransformerException {
          > > > ByteArrayOutputStream out = new
          > > > ByteArrayOutputStream();
          > > >
          > > >
          > >
          >
          org.apache.fop.configuration.Configuration.put("baseDir","C:/desarrollo/java
          /install/oc4j/j2ee/home/applications/QuemasFOP/QuemasFOP/pages/baseDir");
          > > > Driver driver = new Driver();
          > > > Logger logger = new
          > > > ConsoleLogger(ConsoleLogger.LEVEL_INFO);
          > > > MessageHandler.setScreenLogger(logger);
          > > > driver.setLogger(logger);
          > > > driver.setRenderer(Driver.RENDER_PDF);
          > > > driver.setOutputStream(out);
          > > > TransformerFactory transformerFactory =
          > > > TransformerFactory.newInstance();
          > > > Transformer transformer =
          > > > transformerFactory.newTransformer(xslSrc);
          > > > Result res = new
          > > > SAXResult(driver.getContentHandler());
          > > > transformer.transform(xmlSrc, res); //this
          > > is
          > > > the point where I get the tutalii error!!!!
          > > > return out;
          > > > }
          > > >
          > > >
          > > > Thanks a lot!
          > > >
          > > > Raul Herranz (Spain)
          > > >
          > > > [Non-text portions of this message have been
          > > > removed]
          > > >
          > > >
          > > > Yahoo! Groups Sponsor
          > > > ADVERTISEMENT
          > > >
          > > >
          > > >
          > > >
          > > >
          > > >
          > >
          > --------------------------------------------------------------------------
          ----
          > > > Yahoo! Groups Links
          > > >
          > > > a.. To visit your group on the web, go to:
          > > > http://groups.yahoo.com/group/XSL-FO/
          > > >
          > > > b.. To unsubscribe from this group, send an
          > > > email to:
          > > > XSL-FO-unsubscribe@yahoogroups.com
          > > >
          > > > c.. Your use of Yahoo! Groups is subject to
          > > the
          > > > Yahoo! Terms of Service.
          > > >
          > > >
          > > >
          > > > [Non-text portions of this message have been
          > > > removed]
          > > >
          > > >
          > > >
          > > > ------------------------ Yahoo! Groups Sponsor
          > > >
          > > >
          > > >
          > > > Yahoo! Groups Links
          > > >
          > > >
          > > > XSL-FO-unsubscribe@yahoogroups.com
          > > >
          > > >
          > > >
          > > >
          > >
          > >
          > >
          > > ------------------------ Yahoo! Groups Sponsor
          > >
          > >
          > >
          > > Yahoo! Groups Links
          > >
          > >
          > > XSL-FO-unsubscribe@yahoogroups.com
          > >
          > >
          > >
          > >
          >
          >
          >
          >
          >
          > Yahoo! Groups Links
          >
          >
          >
          >
          >
        • Glen Mazza
          I think it s still a Source object though, i.e., Source xslSrc = new StreamSource(new File( C:/ + xslFileName)); makes xslSrc a Source object, while:
          Message 4 of 10 , Jul 21 8:56 AM
          • 0 Attachment
            I think it's still a Source object though, i.e.,

            Source xslSrc = new StreamSource(new File("C:/" +
            xslFileName));

            makes xslSrc a Source object, while:

            StreamSource xslSrc = new StreamSource(new File("C:/"
            + xslFileName));

            would make it a StreamSource. But I may be wrong
            here.

            Glen

            --- Ra�l_Herranz_Serrano <herranzr@...> wrote:
            > I'm creating the Source with a StreamSource:
            >
            > Source xslSrc = new StreamSource(new File("C:/" +
            > xslFileName));
            >
            > ----- Original Message -----
            > From: "Glen Mazza" <grm7793@...>
            > To: <XSL-FO@yahoogroups.com>
            > Sent: Wednesday, July 21, 2004 5:25 PM
            > Subject: Re: [XSL-FO] tutalii error??
            >
            >
            > > In the Fop sample [1], a StreamSource object is
            > used
            > > for the stylesheet, but you are just using a
            > Source
            > > object for it ("Source xslSrc". I'm unsure if
            > this is
            > > the problem, however.
            > >
            > > [1]
            > >
            >
            http://cvs.apache.org/viewcvs.cgi/xml-fop/examples/embedding/java/embedding/ExampleXML2PDF.java?rev=1.10
            > >
            > > Glen
            > >
            > > --- Glen Mazza <grm7793@...> wrote:
            > > > BTW, what's a tutalii?
            > > >
            > > > --- Ra�l_Herranz_Serrano <herranzr@...>
            > wrote:
            > > > > I'm sorry, I forgot to say that I'm using FOP
            > > > > (version 0.20.5) in a oc4j server...
            > > > >
            > > > > Thanks a lot again!!
            > > > >
            > > > > Raul (Spain)
            > > > > ----- Original Message -----
            > > > > From: Ra�l Herranz Serrano
            > > > > To: XSL-FO@yahoogroups.com
            > > > > Sent: Wednesday, July 21, 2004 4:50 PM
            > > > > Subject: [XSL-FO] tutalii error??
            > > > >
            > > > >
            > > > > What is the problem with this piece of code?
            > I'm
            > > > > getting a java.lang.NullPointerException after
            > the
            > > > > following tutalii message:
            > > > >
            > > > > Tutalii:
            > > > >
            > > >
            > >
            >
            C:\desarrollo\java\install\oc4j\j2ee\home\applications\QuemasFOP\QuemasFOP\W
            > EB-INF\lib/fop.jar
            > > > > [INFO] [1]
            > > > >
            > > > >
            > > > > The code that is generating this 'error':
            > > > >
            > > > > public ByteArrayOutputStream
            > transform(Source
            > > > > xmlSrc, Source xslSrc) throws
            > > > > TransformerConfigurationException,
            > > > > TransformerException {
            > > > > ByteArrayOutputStream out = new
            > > > > ByteArrayOutputStream();
            > > > >
            > > > >
            > > >
            > >
            >
            org.apache.fop.configuration.Configuration.put("baseDir","C:/desarrollo/java
            >
            /install/oc4j/j2ee/home/applications/QuemasFOP/QuemasFOP/pages/baseDir");
            > > > > Driver driver = new Driver();
            > > > > Logger logger = new
            > > > > ConsoleLogger(ConsoleLogger.LEVEL_INFO);
            > > > > MessageHandler.setScreenLogger(logger);
            > > > > driver.setLogger(logger);
            > > > > driver.setRenderer(Driver.RENDER_PDF);
            > > > > driver.setOutputStream(out);
            > > > > TransformerFactory transformerFactory =
            > > > > TransformerFactory.newInstance();
            > > > > Transformer transformer =
            > > > > transformerFactory.newTransformer(xslSrc);
            > > > > Result res = new
            > > > > SAXResult(driver.getContentHandler());
            > > > > transformer.transform(xmlSrc, res);
            > //this
            > > > is
            > > > > the point where I get the tutalii error!!!!
            > > > > return out;
            > > > > }
            > > > >
            > > > >
            > > > > Thanks a lot!
            > > > >
            > > > > Raul Herranz (Spain)
            > > > >
            > > > > [Non-text portions of this message have been
            > > > > removed]
            > > > >
            > > > >
            > > > > Yahoo! Groups Sponsor
            > > > > ADVERTISEMENT
            > > > >
            > > > >
            > > > >
            > > > >
            > > > >
            > > > >
            > > >
            > >
            >
            --------------------------------------------------------------------------
            > ----
            > > > > Yahoo! Groups Links
            > > > >
            > > > > a.. To visit your group on the web, go to:
            > > > > http://groups.yahoo.com/group/XSL-FO/
            > > > >
            > > > > b.. To unsubscribe from this group, send
            > an
            > > > > email to:
            > > > > XSL-FO-unsubscribe@yahoogroups.com
            > > > >
            > > > > c.. Your use of Yahoo! Groups is subject
            > to
            > > > the
            > > > > Yahoo! Terms of Service.
            > > > >
            > > > >
            > > > >
            > > > > [Non-text portions of this message have been
            > > > > removed]
            > > > >
            > > > >
            > > > >
            > > > > ------------------------ Yahoo! Groups Sponsor
            > > > >
            > > > >
            > > > >
            > > > > Yahoo! Groups Links
            > > > >
            > > > >
            > > > > XSL-FO-unsubscribe@yahoogroups.com
            > > > >
            > > > >
            > > > >
            > > > >
            > > >
            > > >
            > > >
            > > > ------------------------ Yahoo! Groups Sponsor
            > > >
            > > >
            > > >
            > > > Yahoo! Groups Links
            > > >
            > > >
            > > > XSL-FO-unsubscribe@yahoogroups.com
            > > >
            > > >
            > > >
            > > >
            > >
            > >
            > >
            > >
            > >
            > > Yahoo! Groups Links
            > >
            > >
            > >
            > >
            > >
            >
            >
            >
            > ------------------------ Yahoo! Groups Sponsor
            > --------------------~-->
            > Make a clean sweep of pop-up ads. Yahoo! Companion
            > Toolbar.
            > Now with Pop-Up Blocker. Get it for free!
            >
            http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/9rHolB/TM
            >
            --------------------------------------------------------------------~->
            >
            >
            >
            > Yahoo! Groups Links
            >
            >
            > XSL-FO-unsubscribe@yahoogroups.com
            >
            >
            >
            >
          • Raúl Herranz Serrano
            I have found that this is an error with the xml libraries that come with the oc4j... I have to start the oc4j server with the following options:
            Message 5 of 10 , Jul 21 9:15 AM
            • 0 Attachment
              I have found that this is an error with the xml libraries that come with the
              oc4j... I have to start the oc4j server with the following options:

              -Xbootclasspath/a:/<path to xml-apis.jar>
              -Xbootclasspath/a:/<path to xalan-2.4.1.jar>
              -Xbootclasspath/a:/<path to xercesImpl-2.2.1.jar>

              as I said before: amazing!! :)

              Thanks everybody!!

              Raul (Spain)
            Your message has been successfully submitted and would be delivered to recipients shortly.