[XSQL] Paging delivers XSQL-017

I am trying to get to work the Paging action handler but I get the following error. Any hint ?
XSQL-017: Unexpected Error Occurred
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1480)
at oracle.xml.xsql.Res.subst(Res.java:289)
at oracle.xml.xsql.Res.format(Res.java:280)
at oracle.xml.xsql.actions.XSQLExtensionActionHandler.handleAction(XSQLExtensionActionHandler.java:64)
at oracle.xml.xsql.XSQLDocHandler.getDocument(XSQLDocHandler.java:149)
at oracle.xml.xsql.XSQLPageProcessor.process(XSQLPageProcessor.java:140)
at oracle.xml.xsql.XSQLServlet.doGet(XSQLServlet.java:60)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)

Please ignore my previous posting. The reason for that error was that I did not register the ActionHandler in the appropriate config of the apache ...
As soon as I did it and reloaded the servlet, everything worked fine.
Thankyou again and compliments Steve !

Similar Messages

  • XSQL-017: Unexpected Error Occurred with fo:list-block

    I will create a list in a pdf-file. I'm using:
    <fo:list-block>
    <fo:list-item>
    <fo:list-item-label>
    <fo:block>&bull;</fo:block>
    </fo:list-item-label>
    <fo:list-item-body>
    <xsl:apply-templates select="PARAGRAPH"/>
    </fo:list-item-body>
    </fo:list-item>
    </fo:list-block>
    This makes following error:
    Oracle XSQL Servlet Page Processor 9.0.2.0.0 (Beta)
    XSQL-017: Unexpected Error Occurred
    java.lang.RuntimeException: java.lang.NullPointerException
    at oracle.xml.xsql.serializers.XSQLFOPSerializer.serialize(XSQLFOPSerializer.java:80)
    at oracle.xml.xsql.XSQLPageProcessor.process(XSQLPageProcessor.java:273)
    at oracle.xml.xsql.XSQLServlet.doGet(XSQLServlet.java:60)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
    at org.apache.tomcat.core.Handler.service(Handler.java:287)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
    at org.apache.tomcat.service.connector.Ajp13ConnectionHandler.processConnection(Ajp13ConnectionHandler.java:160)
    at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
    at java.lang.Thread.run(Thread.java:484)
    If I create the list without the xsl:apply-templates, works it fine.
    If I only use the xsl:apply-templates without fo:list, works it fine.
    Is this a bug in the servlet?

    Forget about it. I found the error: I forgot to use the fo:block tag surrounding the xsl:apply-templates-tag.
    Sorry!

  • Xsql CURSOR XSQL-017

    Hi everybody.
    I have a problem when I try to run a xsql with my browser.
    I type: http://hostaix433/TremaDesa/XSQL/SEst1.xsql and I get the next message :
    Oracle XDK Java 9.2.0.6.0 Production
    XSQL-017: Unexpected Error Occurred
    java.lang.NoClassDefFoundError: java/util/Map
    at
    at oracle.jdbc.driver.OracleConnection.addClassMapEntry(OracleConnection.java:2849)
    at oracle.jdbc.driver.OracleConnection.addDefaultClassMapEntriesTo(OracleConnection.java:2843)
    at oracle.jdbc.driver.OracleConnection.initializeClassMap(OracleConnection.java:2529)
    at oracle.jdbc.driver.OracleConnection.ensureClassMapExists(OracleConnection.java:2523)
    at oracle.jdbc.driver.OracleConnection.getTypeMap(OracleConnection.java:2829)
    at oracle.jdbc.driver.OracleStatement.getObjectValue(OracleStatement.java:5849)
    at oracle.jdbc.driver.OracleResultSetImpl.getObject(OracleResultSetImpl.java:765)
    at oracle.xml.sql.dataset.OracleXMLDataSetExtJdbc.getColumnTypeObject(OracleXMLDataSetExtJdbc.java:494)
    at oracle.xml.sql.core.OracleXMLConvert.createColNames(OracleXMLConvert.java:1100)
    at oracle.xml.sql.core.OracleXMLConvert.getXML(OracleXMLConvert.java:848)
    at oracle.xml.sql.query.OracleXMLQuery.getXMLDOM(OracleXMLQuery.java:361)
    at oracle.xml.sql.query.OracleXMLQuery.getXMLDOM(OracleXMLQuery.java:308)
    at oracle.xml.xsql.actions.XSQLQueryHandler.handleAction(XSQLQueryHandler.java:246)
    at oracle.xml.xsql.XSQLDocHandler.getDocument(XSQLDocHandler.java:149)
    at oracle.xml.xsql.XSQLPageProcessor.process(XSQLPageProcessor.java:140)
    at oracle.xml.xsql.XSQLServlet.doGet(XSQLServlet.java:60)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:499)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
    at org.apache.jserv.JServConnection.processRequest(JServConnection.java:456)
    at org.apache.jserv.JServConnection.run(JServConnection.java:294)
    at java.lang.Thread.run(Thread.java)
    My xsql file :
    <xsql:query connection="bddesa2_trema" xmlns:xsql="urn:oracle-xsql">
    SELECT idse, nombre, modoacceso, nombrepc,
    CURSOR ( SELECT idbus, nombre, puerto, dirdatos, idse
    FROM bus
    WHERE bus.idse = subestacion.idse ) as buses
    FROM subestacion WHERE subestacion.nombre = 'SubTrema'
    </xsql:query>
    I get the error message ONLY when I use de CURSOR statement.
    Somebody could help me?
    Thanks in advanced
    Diego Robatto

    Please refer to the section:Using the CURSOR Operator for Nested Rowsets
    https://myswat.swarthmore.edu/xsql/java/xsql/relnotes.html#ID2602

  • Error XSQL-017 Running XML Document Demo

    Environment: Oracle 8.1.6 (NT 4.0)
    XSQL 1.0.4.1
    JDK 1.1.8
    While running the XML Document Demo, I enter the Author, Title, Stylesheet and XML Document fields, and click the "Validate and Insert" button. Then I get the messages shown below. Any ideas? Thanks.
    ===== ===== Start Of Messages ===== =====
    XSQL-017: Unexpected Error Occurred
    java.lang.NoClassDefFoundError: java/sql/Clob
    at
    oracle.jdbc.driver.OracleStatement.get_clob_value(OracleStatement.java:4447)
    at
    oracle.jdbc.driver.OracleStatement.getCLOBValue(OracleStatement.java:3025)
    at
    oracle.jdbc.driver.OracleCallableStatement.getCLOB(OracleCallableStatement.java:439)
    at
    oracle.xml.sql.dml.OracleXMLSave.createTempCLOBFromString(Compiled
    Code)
    at
    oracle.xml.sql.dml.OracleXMLSave.getLobVal(OracleXMLSave.java:765)
    at
    oracle.xml.sql.dml.OracleXMLSave.getObjectVal(OracleXMLSave.java:690)
    at oracle.xml.sql.dml.OracleXMLSave.getStructVal(Compiled
    Code)
    at
    oracle.xml.sql.dml.OracleXMLSave.setBindValue(OracleXMLSave.java:1206)
    at oracle.xml.sql.dml.OracleXMLSave.saveNodeVal(Compiled
    Code)
    at
    oracle.xml.sql.dml.OracleXMLSave.saveNode(OracleXMLSave.java:2146)
    at oracle.xml.sql.dml.OracleXMLSave.saveNodes(Compiled
    Code)
    at
    oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:1954)
    at
    oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:1060)
    at
    oracle.xml.xsql.actions.XSQLInsertRequestHandler.handleAction(XSQLInsertRequestHandler.java:126)
    at oracle.xml.xsql.XSQLDocHandler.getDocument(Compiled
    Code)
    at oracle.xml.xsql.XSQLPageProcessor.process(Compiled Code)
    at oracle.xml.xsql.XSQLServlet.doGet(XSQLServlet.java:60)
    at oracle.xml.xsql.XSQLServlet.doPost(XSQLServlet.java:81)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at
    javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at oracle.lite.web.JupServlet.service(JupServlet.java:186)
    at oracle.lite.web.MimeServletHandler.handle(Compiled Code)
    at oracle.lite.web.JupApplication.service(Compiled Code)
    at oracle.lite.web.JupHandler.handle(Compiled Code)
    at oracle.lite.web.HTTPServer.process(Compiled Code)
    at oracle.lite.web.HTTPServer.handleRequest(Compiled Code)
    at oracle.lite.web.JupServer.handle(Compiled Code)
    at oracle.lite.web.SocketListener.process(Compiled Code)
    at oracle.lite.web.SocketListener$ReqHandler.run(Compiled
    Code)
    ===== ===== End Of Messages ===== =====
    null

    Using JDK 1.1.8 you must use the JDBC 1.x driver in classes111.zip and the companion version of the XML SQL Utility xsu111.jar.
    You'll need to download these from OTN from http://otn.oracle.com/tech/xml and then replace them in your classpath for the classes12.zip and xsu12.jar that you're using.

  • Oracle XSQL not working : XSQL-017

    Hi XML Experts,
    I have installed 9iAS 1.0.2.2 on Sun Solaris 2.6 (DB-8.1.7.0.0)
    and have configured XDK. But I am not able to run XSQL pages.
    When I try to access
    http://machinename:port/xsql/java/xsql/demo/emp/emp.xsql the
    following error message is displayed:
    XSQL-017: Unexpected Error Occurred
    java.lang.NullPointerException
    at oracle.xml.xsql.XSQLConfigManager.getNamedConnection(Compiled
    Code)
    at oracle.xml.xsql.XSQLConnectionManager.getPool(Compiled Code)
    at oracle.xml.xsql.XSQLConnectionManager.getConnection(Compiled
    Code)
    at oracle.xml.xsql.XSQLPageRequestImpl.setConnectionName
    (Compiled Code)
    at oracle.xml.xsql.XSQLPageProcessor.process(Compiled Code)
    at oracle.xml.xsql.XSQLServlet.doGet(Compiled Code)
    at javax.servlet.http.HttpServlet.service(Compiled Code)
    at javax.servlet.http.HttpServlet.service(Compiled Code)
    at org.apache.jserv.JServConnection.processRequest(Compiled Code)
    at org.apache.jserv.JServConnection.run(Compiled Code)
    at java.lang.Thread.run(Compiled Code)
    I checked the xml.properties file and also the XSQLConfig.xml
    and all the configuration seems to be OK. I also added the path
    to XSQLConfig.xml file in jserv.properties but still this error
    persists.
    Java version on our machine is 1.1.3. Does it matters? We tried
    to install jdk1.2 and also set the PATH variable still the
    version remains the same.
    Any tips or workaround for this problem.
    Thanks in advance.

    I have installed Java 1.2 and set the PATH variable. I also
    changed the wrapper.bin pointing to the new JDK.
    Still the error persists. Any Solution ???

  • Object types return hex characters with xsql:query

    How do I use xsql servlet to return an object which contains street address etc. as a character string and not a hexadecimal string. If I use the following ddl and implement the following xsql, I get the following results.
    CREATE TYPE address_objtyp AS object
    (street VARCHAR(30),city VARCHAR(30),state VARCHAR(2));
    CREATE SEQUENCE employees_seq START WITH 105 INCREMENT BY 1;
    CREATE TABLE employees(
    id NUMBER(4) CONSTRAINT emp_pkId PRIMARY KEY,
    first_name VARCHAR(30),
    last_name VARCHAR(30),
    address address_objtyp);
    INSERT INTO employees VALUES (
    103, 'Fred', 'Couples',
    address_objtyp('9201 Park St', 'Alexandria', 'VA'));
    <?xml version="1.0"?>
    <xsql:query null-indicator="yes" connection="demo"
    allow-client-style="yes" xmlns:xsql="urn:oracle-xsql">
    select * from employees
    </xsql:query>
    <?xml version="1.0" ?>
    - <ROWSET xsql-timing="20">
    - <ROW num="1">
    <ID>103</ID>
    <FIRST_NAME>Fred</FIRST_NAME>
    <LAST_NAME>Couples</LAST_NAME>
    - <ADDRESS>
    <STREET>0x39323031205061726B205374</STREET>
    <CITY>0x416C6578616E64726961</CITY>
    <STATE>0x5641</STATE>
    </ADDRESS>
    </ROW>
    </ROWSET>
    I'm using the most recent jdbc thin driver (ojdbc14.jar) that is for jdk 1.4. I'm using a 9.0.1 db, and I'm using xdk for java 9.2.0.3. So I thought that the thin driver is not capable, so I tried the oci driver, and find another set of problems.
    I get the following error:
    Oracle XDK Java 9.2.0.3.0 Production
    XSQL-017: Unexpected Error Occurred
    java.lang.UnsatisfiedLinkError: no ocijdbc8 in java.library.path
    Now why does XDK insist to look for ocijdbc8 if I only have ocijdbc9.dll installed on my client? The config file only allows oci8 in the dburl specification, which is probably why XDK insists to look for ocijdbc8, but I CANNOT specify oci9, which would make sense to me, although it's most likely not a valid specification.
    <connection name="9ic">
    <username>scott</username>
    <password>tiger</password>
    <dburl>jdbc:oracle:oci8:@</dburl>
    <driver>oracle.jdbc.OracleDriver</driver>
    <autocommit>true</autocommit>
    </connection>
    And lastly documentation that comes with ojdbc14.jar indicates to now use a different specification for the jdbc thin driver. Instead of the usual
    <dburl>jdbc:oracle:thin:@host:port:sid</dburl>
    it recommends
    <dburl>jdbc:oracle:thin:@//host:port/service</dburl>
    however this does not work with XDK 9.2.0.3. Any ideas why not?
    By the way if I use SQL*Plus and select * from employees, I get the desired result in SQL*Plus, which suggests to me that I DO need the oci driver for XSQL Servlet. So how do I get XSQL Servlet 9.2.0.3 to use the oci 9 driver. I know how to set wrapper.path in the servlet config file to find ocijdbc9.dll, but XSQL Servlet still wants to find ocijdbc8.
    I sense that there is a bug hidden somewhere in the XDK kit.
    Steve.

    How do I use xsql servlet to return an object which contains street address etc. as a character string and not a hexadecimal string. If I use the following ddl and implement the following xsql, I get the following results.
    CREATE TYPE address_objtyp AS object
    (street VARCHAR(30),city VARCHAR(30),state VARCHAR(2));
    CREATE SEQUENCE employees_seq START WITH 105 INCREMENT BY 1;
    CREATE TABLE employees(
    id NUMBER(4) CONSTRAINT emp_pkId PRIMARY KEY,
    first_name VARCHAR(30),
    last_name VARCHAR(30),
    address address_objtyp);
    INSERT INTO employees VALUES (
    103, 'Fred', 'Couples',
    address_objtyp('9201 Park St', 'Alexandria', 'VA'));
    <?xml version="1.0"?>
    <xsql:query null-indicator="yes" connection="demo"
    allow-client-style="yes" xmlns:xsql="urn:oracle-xsql">
    select * from employees
    </xsql:query>
    <?xml version="1.0" ?>
    - <ROWSET xsql-timing="20">
    - <ROW num="1">
    <ID>103</ID>
    <FIRST_NAME>Fred</FIRST_NAME>
    <LAST_NAME>Couples</LAST_NAME>
    - <ADDRESS>
    <STREET>0x39323031205061726B205374</STREET>
    <CITY>0x416C6578616E64726961</CITY>
    <STATE>0x5641</STATE>
    </ADDRESS>
    </ROW>
    </ROWSET>
    I'm using the most recent jdbc thin driver (ojdbc14.jar) that is for jdk 1.4. I'm using a 9.0.1 db, and I'm using xdk for java 9.2.0.3. So I thought that the thin driver is not capable, so I tried the oci driver, and find another set of problems.
    I get the following error:
    Oracle XDK Java 9.2.0.3.0 Production
    XSQL-017: Unexpected Error Occurred
    java.lang.UnsatisfiedLinkError: no ocijdbc8 in java.library.path
    Now why does XDK insist to look for ocijdbc8 if I only have ocijdbc9.dll installed on my client? The config file only allows oci8 in the dburl specification, which is probably why XDK insists to look for ocijdbc8, but I CANNOT specify oci9, which would make sense to me, although it's most likely not a valid specification.
    <connection name="9ic">
    <username>scott</username>
    <password>tiger</password>
    <dburl>jdbc:oracle:oci8:@</dburl>
    <driver>oracle.jdbc.OracleDriver</driver>
    <autocommit>true</autocommit>
    </connection>
    And lastly documentation that comes with ojdbc14.jar indicates to now use a different specification for the jdbc thin driver. Instead of the usual
    <dburl>jdbc:oracle:thin:@host:port:sid</dburl>
    it recommends
    <dburl>jdbc:oracle:thin:@//host:port/service</dburl>
    however this does not work with XDK 9.2.0.3. Any ideas why not?
    By the way if I use SQL*Plus and select * from employees, I get the desired result in SQL*Plus, which suggests to me that I DO need the oci driver for XSQL Servlet. So how do I get XSQL Servlet 9.2.0.3 to use the oci 9 driver. I know how to set wrapper.path in the servlet config file to find ocijdbc9.dll, but XSQL Servlet still wants to find ocijdbc8.
    I sense that there is a bug hidden somewhere in the XDK kit.
    Steve.

  • XSQL-007 and list of XSQL error codes.

    I have a situation where I need to replay a request if I cannot acquire a database connection, and to not replay a request otherwise. Is the XSQL-007 code the only code that deals with database connections?
    XSQL-007: Cannot acquire a database connection to process page.
    Do you have a published list of XSQL codes? Is there a method in java code to generate the full list of XSQL codes? For example to get a list of database error codes, one can in PL/SQL use:
    set serveroutput on size 2000
    begin
    for i in 1..9999 loop
    dbms_output.put_line ( sqlerrm(-i) ) ;
    end loop ;
    end ;
    Steve.

    There's not a way to loop through the errors in Java. Here's the list.
    XSQL-001: Cannot locate requested XSQL file. Check the name.
    XSQL-002: Cannot acquire database connection from pool: {0}
    XSQL-003: Failed to find 'XSQLConfig.xml' file in server CLASSPATH.
    XSQL-004: Could not acquire a database connection named: {0}
    XSQL-005: XSQL page is not well-formed.
    XSQL-006: XSLT stylesheet is not well-formed: {0}
    XSQL-007: Cannot acquire a database connection to process page.
    XSQL-008: Cannot find XSLT Stylesheet: {0}
    XSQL-009: Missing arguments on command line
    XSQL-010: Error creating: {0}\nUsing standard output.
    XSQL-011: Error processing XSLT stylesheet: {0}
    XSQL-012: Cannot Read XSQL Page
    XSQL-013: XSQL Page URI is null or has an invalid format.
    XSQL-014: Resulting page is an empty document or had multiple document elements.
    XSQL-015: Error inserting XML Document
    XSQL-016: Error parsing posted XML Document
    XSQL-017: Unexpected Error Occurred
    XSQL-018: Unexpected Error Occurred processing stylesheet {0}
    XSQL-019: Unexpected Error Occurred reading stylesheet {0}
    XSQL-020: XSQLConfig.xml file is not well-formed.
    XSQL-021: Serializer {0} is not defined in XSQLConfig.xml
    XSQL-022: Cannot load serializer class {0}
    XSQL-023: Class {0} is not an XSQL Serializer
    XSQL-024: Attempted to get response Writer after getting OutputStream
    XSQL-025: Attempted to get response OutputStream after getting Writer

  • XSQL-022 error

    Hi,
    I try to create a pdf with the xsql -servlet (v1.0.4) and FOP 0.14.
    When I don't use the serializer="FOP" in my <?xml-stylesheet?> processing instruction, I get an XML-file with <fo-root> as the root-element. Looks fine.
    When I include the serializer="FOP" in my <?xml-stylesheet?> processing instruction i get the following error:
    "XSQL-022: cannot load serializer class oracle.xml.xsql.serializers.XSQLFOPSerializer"
    I have used a default installation of the xsql-servlet in c:\xsql, Java in c:\jdk1.3, Apaches FOP in c:\xml\fop. The file xsql-wtg.bat is changed to this configuration.
    Everything else is working fine, so what is wrong with the set-up.
    Steve,
    if you read this I also have a request: could you publish all xsql-error messages on OTN? Your book only lists xsql-errors up to XSQL-017, the xsql-servlet documentation doesn't describe the errors at all.
    Thanks to all,
    Bart

    Did you uncomment the line in the xsql-wtg.bat that includes the:
    .\xsql\lib\xsqlserializers.jar
    FOP_HOME\fopXXX.jar
    FOP_HOME\lib\w3c.jar
    in your classpath?
    I'll post the error messages.

  • How do I get XSQL Servlet to work with OCI 9i

    I'm using the most recent jdbc driver (ojdbc14.jar) that works with jdk 1.4. I'm using a 9.0.1 db, and I'm using xdk for java 9.2.0.3. If I specify an oci driver in the XSQLConfig.xml file, I get the following error with a xsql:query request:
    Oracle XDK Java 9.2.0.3.0 Production
    XSQL-017: Unexpected Error Occurred
    java.lang.UnsatisfiedLinkError: no ocijdbc8 in java.library.path
    Now why does XDK insist to look for ocijdbc8 if I only have ocijdbc9.dll installed on my client? The config file only allows oci8 in the dburl specification, which is probably why XDK insists to look for ocijdbc8, but I CANNOT specify oci9, which would make sense to me, although it's most likely not a valid specification.
    <connection name="9ic">
    <username>scott</username>
    <password>tiger</password>
    <dburl>jdbc:oracle:oci8:@</dburl>
    <driver>oracle.jdbc.OracleDriver</driver>
    <autocommit>true</autocommit>
    </connection>
    So how do get XSQL Servlet to work with OCI 9i?

    If you are using the latest Oracle9i JDBC driver, which you should be able to get from OTN, it should look for the DLL with 9 in the name.
    Perhaps you have a "stale" JDBC driver somewhere earlier on the classpath?
    Steve Muench
    JDeveloper/BC4J Development Team
    Author, Building Oracle XML Applications

  • FOP and XSQL

    Hi,
    i'm trying to use fop with xsql.
    When i execute the sample emptable.xsql i receive the following error message :
    XSQL-017: Unexpected Error Occurred
    java.lang.NoClassDefFoundError: org/xml/sax/helpers/DefaultHandler
    at oracle.xml.xsql.serializers.XSQLFOPSerializer.serialize(XSQLFOPSerializer.java:50)
    at oracle.xml.xsql.XSQLPageProcessor.process(XSQLPageProcessor.java, Compiled Code)
    at oracle.xml.xsql.XSQLServlet.doGet(XSQLServlet.java:60)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:499)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
    at org.apache.jserv.JServConnection.processRequest(JServConnection.java:435)
    at org.apache.jserv.JServConnection.run(JServConnection.java:290)
    at java.lang.Thread.run(Thread.java:479)
    i work with the 0.18.1 version of fop, the db is the 9i version and the xsqlserializer is take from the release candidate 1 of jdeveloper. I try with all version of fop, but i don't have success.
    Which is the right configuration of all components to work correctly with fop ?
    Thanks,
    Stefano.

    I'm using the XSQL servlet 9.2.0.2.0 and FOP 0.20.3. But you have to write your own FOPSerializer. I foun this source here in the forum:
    import org.w3c.dom.Document;
    import java.io.PrintWriter;
    import oracle.xml.xsql.*;
    import org.apache.fop.apps.*;
    import org.apache.log.*;
    import org.apache.log.format.*;
    import org.apache.log.output.io.*;
    import org.apache.avalon.*;
    import java.io.*;
    public class XSQLFOP203Serializer implements XSQLDocumentSerializer {
    private static final String PDFMIME = "application/pdf";
    private static final String CONFPATH = "/usr/local/fop/conf/userconfig.xml";
    public void serialize(Document doc, XSQLPageRequest env) throws Throwable {
    try {
    // Open user config file
    File userConfigFile = new File(CONFPATH);
    Options options = new Options(userConfigFile);
    // First make sure we can load the driver
    Driver FOPDriver = new Driver();
    // Setup logging
    Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
    PatternFormatter formatter = new PatternFormatter("[%{priority}]: %{message}\n%{throwable}" );
    LogTarget target = null;
    target = new StreamTarget(System.out, formatter);
    hierarchy.setDefaultLogTarget(target);
    Logger log = hierarchy.getLoggerFor("fop");
    log.setPriority(Priority.INFO);
    FOPDriver.setLogger(log);
    // Then set the content type before getting the reader/
    env.setContentType(PDFMIME);
    FOPDriver.setRenderer(FOPDriver.RENDER_PDF);
    FOPDriver.setOutputStream(env.getOutputStream());
    FOPDriver.render(doc);
    catch (Exception e) {
    // Cannot write PDF output for the error anyway.
    // So maybe this stack trace will be useful info
    e.printStackTrace(System.err);
    Hope this helps.
    Uwe

  • Getting error when I request for an XSQL page

    Hi,
    I have loaded XDK 9.0.2.0.0 on Oracle 9i J2EE Container (oc4j). Whenever I request for a XSQL page, I get the following error,
    Oracle XSQL Servlet Page Processor 9.0.2.0.0 (Production)
    XSQL-017: Unexpected Error Occurred
    java.lang.NoClassDefFoundError: oracle/xml/sql/OracleXMLSQLNoRowsException
    at java.lang.Class.newInstance0(Native Method)
    at java.lang.Class.newInstance(Unknown Source)
    at oracle.xml.xsql.XSQLDocHandler.handlerForAction(XSQLDocHandler.java:279)
    at oracle.xml.xsql.XSQLDocHandler.getDocument(XSQLDocHandler.java:137)
    at oracle.xml.xsql.XSQLPageProcessor.process(XSQLPageProcessor.java:146)
    at oracle.xml.xsql.XSQLServlet.doGet(XSQLServlet.java:60)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:244)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
    at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:59)
    at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:523)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
    at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:735)
    at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:243)
    at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
    The XSQL file contains the code (Example which comes along with the XDK),
    <?xml version="1.0"?>
    <xsql:query connection="demo" xmlns:xsql="urn:oracle-xsql">
    SELECT 'Hello World' AS greeting FROM DUAL
    </xsql:query>
    <!--
    | $Author: kkarun $
    | $Date: 20-apr-00.23:50:36 $
    | $Source: /vobs/oracore3/demo/xdk/java/xsql/demo/helloworld/helloworld.xsql.mkelem $
    | $Revision: /main/0 $
    +-->
    Can any one tell me what may be the problem and what could be the solution..
    Thanks in advance,
    Kiran K.

    Hi,
    Make sure that you have in included xsu12.jar in the classpath. 'OracleXMLSQLNoRowsException' class is found in xsu12.jar and is bundled with XDK.
    Hope that helps.
    Savitha.

  • SetClob error, when putting XML doc to CLOB col via XSQL

    Hi,
    When I am trying to put an XML to a VARCHAR2 column, it works fine.
    However,
    when I am trying to put it to a CLOB column,
    the Apache Server generates an Internal Server Error.
    And the error_log of the Apache contains following error message:
    java.lang.NoSuchMethodError: oracle.jdbc.driver.OraclePreparedStatement: method setClob(ILjava/sql/Clob;)V not found
    at org.apache.jserv.JServConnection.processRequest(JServConnection.java:320)
    at org.apache.jserv.JServConnection.run(JServConnection.java:188)
    at java.lang.Thread.run(Thread.java)
    I am running Oracle8i (8.1.7) on Linux 2.2.16-3.
    Please give me a help.
    Thanks,
    Joseph
    The Table:
    SQL> desc XML_TEST;
    Name Null? Type
    CLOBTEST CLOB
    SQL>
    The XSQL File, test.xsql:
    <?xml version="1.0"?>
    <test connection="xxxx" xmlns:xsql="urn:oracle-xsql">
    <xsql:insert-request table="XML_TEST"
    transform="test.xsl"/>
    </test>
    The XSL File, test.xsl:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml" cdata-section-elements="CLOBTEST"/>
    <xsl:template match="/">
    <ROWSET>
    <xsl:for-each select="request/parameters">
    <ROW>
    <CLOBTEST><xsl:value-of disable-output-escaping="yes" select="txtTest"/></CLOBTEST>
    </ROW>
    </xsl:for-each>
    </ROWSET>
    </xsl:template>
    </xsl:stylesheet>
    The HTML File, test.html:
    <HTML>
    <HEAD>
    </HEAD>
    <BODY>
    <FORM name="frmTest" action="test.xsql" method="POST">
    <B>Type in an XML Document:</B><BR>
    <TEXTAREA rows="10" style="width:100%" cols="70" name="txtTest"></TEXTAREA>
    <INPUT type="submit" value="Post XML Document">
    </FORM>
    </BODY>
    </HTML>
    null

    Steve,
    Your guess was right!!! Thank You.
    In my jserv.properties file,
    there were "classess111.zip" and "xsu12.jar" for the "wrapper.classpath".
    So, I modified the file to include only:
    "classess12.zip" and "xsu12.jar".
    After that, Internal Server Error was disappeared,
    but I got new errors for the response, as following:
    Oracle XSQL Servlet Page Processor 1.0.4.1 (Production)
    XSQL-017: Unexpected Error Occurred
    java.lang.NoClassDefFoundError: java/sql/Clob
    at oracle.jdbc.driver.OracleStatement.get_clob_value(OracleStatement.java:4447)
    at oracle.jdbc.driver.OracleStatement.getCLOBValue(OracleStatement.java:3025)
    at oracle.jdbc.driver.OracleCallableStatement.getCLOB(OracleCallableStatement.java:439)
    at oracle.xml.sql.dml.OracleXMLSave.createTempCLOBFromString(OracleXMLSave.java:2283)
    at oracle.xml.sql.dml.OracleXMLSave.setBindValue(OracleXMLSave.java:1218)
    at oracle.xml.sql.dml.OracleXMLSave.saveNodeVal(OracleXMLSave.java:2259)
    at oracle.xml.sql.dml.OracleXMLSave.saveNode(OracleXMLSave.java:2146)
    at oracle.xml.sql.dml.OracleXMLSave.saveNodes(OracleXMLSave.java:2061)
    at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:1954)
    at oracle.xml.sql.dml.OracleXMLSave.insertXML(OracleXMLSave.java:1060)
    at oracle.xml.xsql.actions.XSQLInsertRequestHandler.handleAction(XSQLInsertRequestHandler.java:126)
    at oracle.xml.xsql.XSQLDocHandler.getDocument(XSQLDocHandler.java:132)
    at oracle.xml.xsql.XSQLPageProcessor.process(XSQLPageProcessor.java:131)
    at oracle.xml.xsql.XSQLServlet.doGet(XSQLServlet.java:60)
    at oracle.xml.xsql.XSQLServlet.doPost(XSQLServlet.java:81)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:521)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
    at org.apache.jserv.JServConnection.processRequest(JServConnection.java:314)
    at org.apache.jserv.JServConnection.run(JServConnection.java:188)
    at java.lang.Thread.run(Thread.java)
    I am wondering if there are other mismatches.
    Thanks again,
    Joseph

  • XSQL and FOP 0.20.x

    Hi,
    Trying to use the latest XSQL with FOP 0.20.3. The error message:
    XSQL-017: Unexpected Error Occurred
    java.lang.NoSuchMethodError: org.apache.fop.apps.Driver: method buildFOTree(Lorg/w3c/dom/Document;)V not found
    buildFOTree method does not exist anymore (it existed until FOP 0.19.x), instead Driver.run is doing all the parsing and building the document tree.
    When can we expect a working version of XSQL with current FOP versions.
    Many thanks,
    Ashkan.

    the file xsqlserializers.jar contains the FOP serializer. In the XSQL documentation you can find the versions of FOP for which it can be used.
    You can adapt this serializer to work with the latest version of FOP.

  • XSQL setup woes continued

    I finally persuaded Apache/Tomcat to pass my xsql page to the servlet, & now get the following:
    Oracle XSQL Servlet Page Processor 9.0.1.0.0 (Production)
    XSQL-017: Unexpected Error Occurred
    java.lang.NoClassDefFoundError: oracle/xml/sql/query/OracleXMLQuery
    at oracle.xml.xsql.actions.XSQLQueryHandler.handleAction(XSQLQueryHandler.java:154)
    at oracle.xml.xsql.XSQLDocHandler.getDocument(XSQLDocHandler.java:132)
    at oracle.xml.xsql.XSQLPageProcessor.process(XSQLPageProcessor.java:134)
    at oracle.xml.xsql.XSQLServlet.doGet(XSQLServlet.java:60)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java)
    at org.apache.tomcat.core.Handler.service(Handler.java)
    at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java)
    at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java)
    at org.apache.tomcat.core.ContextManager.service(ContextManager.java)
    at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java)
    at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java)
    at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java)
    at java.lang.Thread.run(Thread.java)
    I am attempting to access an 8.1.6 db on an NT 4.0 machine from my Apache/Tomcat on my linux box, using xsu111_816.jar with the classes111.zip from the db - is the NT classes111.zip file OK in linux?

    Use xsu12.jar and classes12.zip if you are running Apache with a 1.2 JVM or later.
    Use xsu111.jar and classes111.zip if you are running Apache with a 1.1.8 JVM.
    The _816 version is for loading into the 8.1.6 database.

  • Problems installing latest XSQL Servlet

    After following the instructions for installing XSQL servlet for Apache with Jserv, I get the following error with a simple sql query.
    Oracle XSQL Servlet Page Processor 9.0.1.0.0 (Production)
    XSQL-017: Unexpected Error Occurred
    java.lang.AbstractMethodError: oracle/jdbc/driver/OracleResultSet.getStatement
    at oracle.xml.sql.dataset.OracleXMLDataSetExtJdbc.(OracleXMLDataSetExtJdbc.java:117)
    at oracle.xml.sql.core.OracleXMLConvert.initObject(OracleXMLConvert.java:345)
    at oracle.xml.sql.core.OracleXMLConvert.getXML(OracleXMLConvert.java:823)
    at oracle.xml.sql.query.OracleXMLQuery.getXMLDOM(OracleXMLQuery.java:364)
    at oracle.xml.sql.query.OracleXMLQuery.getXMLDOM(OracleXMLQuery.java:312)
    at oracle.xml.xsql.actions.XSQLQueryHandler.handleAction(XSQLQueryHandler.java:240)
    at oracle.xml.xsql.XSQLDocHandler.getDocument(XSQLDocHandler.java:132)
    at oracle.xml.xsql.XSQLPageProcessor.process(XSQLPageProcessor.java:134)
    at oracle.xml.xsql.XSQLServlet.doGet(XSQLServlet.java:60)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:499)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
    at org.apache.jserv.JServConnection.processRequest(JServConnection.java:314)
    at org.apache.jserv.JServConnection.run(JServConnection.java:188)
    at java.lang.Thread.run(Thread.java:475)
    Can anyone help

    I have included the following libs as described in the installation notes
    ie in the jserv.properties file I have
    # Oracle XSQL
    # Oracle XML SQL Utility (XSU)
    wrapper.classpath=C:\xsql\lib\sax2.jar
    wrapper.classpath=/usr/local/src/xdk/lib/xsu12.jar
    # Oracle XSQL Servlet
    wrapper.classpath=/usr/local/src/xdk/lib/oraclexsql.jar
    # Oracle JDBC (8.1.6) -- JDBC 2.0 driver
    wrapper.classpath=/usr/local/src/xdk/lib/classes12.zip
    # Oracle XML Parser V2 (with XSLT Engine)
    wrapper.classpath=/usr/local/src/xdk/lib/xmlparserv2.jar
    # XSQLConfig.xml File location
    wrapper.classpath=/usr/local/src/xdk/xdk/admin
    # FOR Apache FOP Generation, Add
    # wrapper.classpath=C:\xsql\lib\xsqlserializers.jar
    # wrapper.classpath=FOPHOME/fop_bin_0_14_0.jar
    # wrapper.classpath=FOPHOME/lib/w3c.jar
    And in the httpd.conf file I have
    Alias /xsql/ "/usr/local/src/xdk/xdk/"
    Also in the xml config file
    <connection name="promptl">
    <username>******</username>
    <password>******</password>
    <dburl>jdbc:oracle:thin:@192.****:1521:8C</dburl>
    <driver>oracle.jdbc.driver.OracleDriver</driver>
    </connection>
    I think the problem may be with my jdbc file???
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Jinyu Wang ([email protected]):
    Have include all the libs like:
    # Oracle XSQL Servlet
    wrapper.classpath=/private/orahome/lib/oraclexsql.jar
    # Oracle JDBC
    wrapper.classpath=/private/orahome/jdbc/lib/classes12.zip
    # Oracle XML Parser V2 (with XSLT Engine)
    wrapper.classpath=/private/orahome/lib/xmlparserv2.jar
    # Oracle XML SQL Components for Java
    wrapper.classpath=/private/orahome/rdbms/jlib/xsu12.jar
    Especially xsu12.jar?<HR></BLOCKQUOTE>
    null

Maybe you are looking for

  • Error when i try to connect with blogger from firefox

    when i try to connect with blogger.com and i enter my password the firefox is loading me as it should and then it returns to the blogger page... it doesn t say that i put the password wrong it does not say anything its like i m stuck there...i can co

  • Time capsule from hard disk to router?

    Hi, I have had my time capsule set up as a hard disk, and has been accessing it through a USB cable. I would like to set it up as a router and wireless hard disk. The problem is Airport Utility cannot find my time capsule, and the time capsule is sho

  • VGA No Signal

    What does it mean when i get the message that says "VGA No Signal"?  Do I need to replace something? This question was solved. View Solution.

  • Wifi on CanonSZ280

    Despite following all instructions from the Canon manual that came with my CanonSZ 280 I cannot get the WiFi function to work. Any help would be appreciated.

  • SOAP header problem

    I have just started looking into Oracle BPM, and have come across a problem, to which I can't find an answer in this forum or elsewhere on the net. I have created a very simple process with one automatic activity which should just call a web service