Xsql:set-session-param

I experience a problem with exception arising when I try to set session parameter and then to post to a page with insert-request.
Here is exception message:
XSQL-018: Unexpected Error Occurred processing stylesheet null
oracle.xml.parser.v2.XMLDOMException: Node of this type cannot be added.
at oracle.xml.parser.v2.XMLDocument.checkChildType(XMLDocument.java, Compiled Code)
at oracle.xml.parser.v2.XMLNode.appendChild(XMLNode.java, Compiled Code)
at oracle.xml.parser.v2.XMLDocument.appendChild(XMLDocument.java, Compiled Code)
at oracle.xml.parser.v2.XMLNode.appendChild(XMLNode.java, Compiled Code)
at oracle.xml.parser.v2.XMLDocument.appendChild(XMLDocument.java, Compiled Code)
at oracle.xml.parser.v2.XMLNode.appendChild(XMLNode.java, Compiled Code)
at oracle.xml.xsql.XSQLStylesheetProcessor.processToDocument(XSQLStylesheetProcessor.java:66)
at oracle.xml.xsql.actions.XSQLInsertRequestHandler.handleAction(XSQLInsertRequestHandler.java:82)
at oracle.xml.xsql.XSQLDocHandler.getDocument(XSQLDocHandler.java, Compiled Code)
at oracle.xml.xsql.XSQLPageProcessor.process(XSQLPageProcessor.java, Compiled Code)
at oracle.xml.xsql.XSQLServlet.doGet(XSQLServlet.java, Compiled Code)
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, Compiled Code)
at org.apache.jserv.JServConnection.run(JServConnection.java, Compiled Code)
at java.lang.Thread.run(Thread.java:479)
Using 1.0.4.1 production xsql servlet.
Code to set param:
<xsql:set-session-param name="issuethesid" value="aaa" only-if-unset="yes"/>
Code for the page producing error
<?xml version="1.0"?>
<!--?xml-stylesheet type="text/xsl" href="coastbasepost.xsl"?-->
<page connection="coastbase" xmlns:xsql="urn:oracle-xsql">
<xsql:include-request-params/>
<xsql:insert-request
table="domain"
transform="coastbaseinsert.xsl"/>
<xsql:set-page-param name="CURRENTID">
SELECT ID_SEQ.CURRVAL FROM DUAL
</xsql:set-page-param>
<xsql:include-param name="CURRENTID"/>
</page>
Works everything but insert-request.

This error usually occurs when your transformation produces an illegal XML fragment.
If you temporarily rename the transform attribute to transformXXX so that the inbound XSLT transformation is not performed, does the stack trace go away?

Similar Messages

  • Question about xsql:set-page-param

    Hi!
    I have construction like this:
    <xsql:set-page-param name="ptk1" value="{@some_value}">
    where {@some_value} contains national characters. And in ptk1 I have only question marks. If I use {@some_value} directly, for example <xsql:query ...> <![CDATA select ... where field={@some_value} ]]> </xsql:query> it works fine. I have
    <?xml version="1.0" encoding="windows-1251" ?> in my xsql page.
    Is it possible to get set-page-param working with national chars?
    Thank you very much.

    You've identified a bug in how parameter values are retrieved. I've filed Bug#1920676 to get this fixed.
    Currently character set conversion is done between the servlet engine's default character set and the character set of the XSQL page template. The bug occurs because the character set conversion is being done in certain circumstances when it is not actually required.
    Will post a status update when we've identified a fix.

  • Xsql:set-page-param from multirow select into array variable

    I'd like to set an XSQL page array variable to the result of a query that returns multiple rows.
    Can I do something like this:
    <xsql:set-page-param name="users[]">
    select username from all_users
    </xsql:set-page-param>
    The documentation only mentions usage like
    <xsql:set-page-param name="users[]" value="SCOTT SYS SYSTEM"/>

    The set page param is only designed to look at the first column of the first row of its query results.
    If you supplied a PL/SQL function that would return the list of users as a space-or-comma-separated string, then you could use:
    select your_function() as user_list from dual
    and then add the treat-list-as-array="yes" attribute to achieve this.

  • XSQL to XSL params passing problem

    I'm trying to pass some parameters from XSQL to processing XSL, but I am unable to pass string constants. To make it clear:
    XSQL:
    <?xml version="1.0" ?>
    <?xml-stylesheet type="text/xsl" href="some.xsl" ?>
    <qry xmlns:xsql="urn:oracle-xsql" connection="orcl8">
    <xsql:set-stylesheet-param name="from" value="{@f}" />
    <xsql:set-stylesheet-param name="where" value="{@w}" />
    <xsql:set-stylesheet-param name="orderby" value="{@o}" />
    <xsql:query max-rows="{@mr}" skip-rows="{@sr}" null-indicator="yes">
    <![CDATA[
    select * from {@f} where {@w} order by {@o}
    ]]>
    </xsql:query>
    </qry>
    XSL (most of code omitted to save space):
    SELECT * FROM <xsl:value-of select="$from"/>
    WHERE <xsl:value-of select="$where"/>
    ORDER BY <xsl:value-of select="$orderby"/>
    If I pass w=FIELD='some string' (and even when I use &apos; ) all parameters passed to the XSL come empty. Everything without apostrophes comes in just fine, but appearance of apostrophes or their escaped equivalents causes all parameters to get in empty. Query is executed correctly though.
    Am I doing something wrong or there's a bug in XSQL processor (or maybe what I'm trying to do is simply impossible - I just started to learn XML/XSLT and not sure I'm getting everything right...)?
    regards,
    Bob.
    null

    In my xsql I run various SQL statements. Some of these select configuration type details for that user/session. So the returned XML includes business data and some configuration data.
    My main XSL uses these values to determine which templates to process. I use xsl:choose.
    It does mean a big choose statement but it works fine.
    Matt

  • XSQL set-cookie

    When I write an XSQL cookie, it won't actually do it until i refresh the login screen, i.e.:
    1) Enter username and password into XHTML page
    2) Post to auth.xsql
    3) auth.xsql reads the username and password and authenticates
    4) all user information for that username and password is pulled out of the database
    5) attempt at writing cookie fails.
    6) when i refresh the page, the cookie then has a value and shows up.
    Why is this? And also, is there any way of deleting the cookie, like with a logout button, using XSQL? Maybe like XSQL:delete-cookie ?
    Thanks!
    Here's the code:
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="/dvd/dvd.xsl"?>
    <database connection="dvd" xmlns:xsql="urn:oracle-xsql">
    <xsql:query id-attribute="" tag-case="lower" rowset-element="allusers" row-element="userinfo" bind-params="username password">
    SELECT *
    FROM LKUP_USER
    WHERE USERNAME = ? AND PASSWORD = ? /* AND ACCESSLEVEL = 1 */
    ORDER BY USER_ID
    </xsql:query>
    <xsql:set-cookie name="authuser" only-if-unset="no" ignore-empty-value="yes" bind-params="username password">
    SELECT USERNAME
    FROM LKUP_USER
    WHERE USERNAME = ? AND PASSWORD = ? /* AND ACCESSLEVEL = 1 */
    </xsql:set-cookie>
    <xsql:include-request-params/>
    </database>--
    Malik Graves-Pryor

    This the flat XML result when the page is first loaded:
    <?xml version="1.0" ?>
    - <!-- <?xml-stylesheet type="text/xsl" href="/dvd/dvd.xsl"?>
    -->
    - <database>
    - <allusers>
    - <userinfo>
    <user_id>1</user_id>
    <firstname>Malik</firstname>
    <lastname>Graves-Pryor</lastname>
    <username>malik</username>
    <password>malik</password>
    <email>[email protected]</email>
    <accesslevel>0</accesslevel>
    </userinfo>
    </allusers>
    - <request>
    - <parameters>
    <password>malik</password>
    <username>malik</username>
    </parameters>
    <session />
    <cookies />
    </request>
    </database>and here is what it looks like when I refresh the page, doing nothing else:
    <?xml version="1.0" ?>
    - <!-- <?xml-stylesheet type="text/xsl" href="/dvd/dvd.xsl"?>
    -->
    - <database>
    - <allusers>
    - <userinfo>
    <user_id>1</user_id>
    <firstname>Malik</firstname>
    <lastname>Graves-Pryor</lastname>
    <username>malik</username>
    <password>malik</password>
    <email>[email protected]</email>
    <accesslevel>0</accesslevel>
    </userinfo>
    </allusers>
    - <request>
    - <parameters>
    <password>malik</password>
    <username>malik</username>
    </parameters>
    <session />
    - <cookies>
    <authuser>malik</authuser>
    </cookies>
    </request>
    </database>As you can see, the cookie "authuser" is written, but only after I refresh the page. Any clues to that, and also how to delete the "authuser" cookie later on using XSQL so that one can log out of the app?
    p.s.: Steven, are you going to release an updated "Building Oracle XML Applications" book anytime within the near future, i.e., next 1-3 months?
    Malik Graves-Pryor

  • Javascript to JSP question...Can javascript function set session attributes

    hello,
    i have a web app that, on one of its pages, displays "tabbed pane" as an image map at the top (a la amazon.com). my problem is this: each "logical" page contains separate forms that all use the same javabean. in other words, imagine that the tabs represent an account maintenance web ui for an on-line record store. the first tab might be labeled "General," the second "Contact info," the third "Shipping Info." Each uses the same account bean and displays portions of its properties relevant to the tab at hand. what i want to do is allow a user to enter the account maintenance ui, update info on the first tab, click on tab two and have the request with the changes sent to a processing jsp. yet, since each "tab" is actually a separate URL to another page, how do i get the updated info on the first tabe without adding some sort of "SAVE" button on each tab. ive considered using javascript, but dont know how to get the request params out of the first tab whn i click on another tab. is it possible to include an "onClick" function in each URL that "grabs" the updated form fields off the preceeding tab? can a javacript function set session attributes in jsp?

    hello there,
    wow, you've created one big mammy-jammy tool.
    first, javascript cannot access, set values to the session, without having to post to another JSP. javascript is great for manipulating objects, layers, form values, etc.
    you have 2 issues [if i understand correctly]:
    1) you need to able to save user info for a specific tab without having to reloading the page.
    ---you can create a form for EACH of your tabs and POST all the information to a hidden IFRAME or LAYER for NN4. that hidden IFRAME / LAYER will load a JSP page which with all the parameters you posted to it. or you can build a FRAMESET and target that document["frame-name"].src with that same JSP.
    2) handling when the SAVE INFO action should happen: hence some javascript event handler: onMouseOver, onClick, etc
    ---i don't know the dynamics of your tabs, but if store which tab was clicked on last, then if the user clicks on some other tab, javascript can submit that FORM to a JSP [see condition above]
    you have an interesting tool. can i see?
    i hope i wasn't too confusing, but your problem is sooo interesting. =)
    -WJP

  • Setting session timeout in OracleWeblogic Server

    Hi All,
    I have doubt in setting session time out in Oracle WLS server 12c. Please suggest,
    There are two ways as i know editing the below files.
    1) weblogic.xml
    2) web.xml
    But when I open the weblogic.xml it has the below code, if we edit the value in
    <timeout-secs>3600</timeout-secs>
    the value implied for the admin console only as i know, the admin console will ask the user to re-login if the session is idle for morethan 6 mins.
    But If there is an application deployed like a bank.war file and customer is accessing the application. I want to set the user session time out to 2 mins i.e 120 seconds. How to set this in the server level ?
    Oracle Webogic server level ?
    <session-descriptor>
        <timeout-secs>3600</timeout-secs>
        <invalidation-interval-secs>60</invalidation-interval-secs>
        <cookie-name>ADMINCONSOLESESSION</cookie-name>
        <cookie-max-age-secs>-1</cookie-max-age-secs>
        <url-rewriting-enabled>false</url-rewriting-enabled>
    </session-descriptor>
    In the default web,xml  there is no param called timeout..
    Thanks
    Venkat

    Hello Venkat,
    I have implemented the same in my Application(OBIEE).Check it may helpful for you.
    Sasi Nagireddy: HOW TO CONFIGURE SESSION TIMEOUT IN OBIEE-11G..
    Thanks,
    Sasi Nagireddy..

  • Session Params from Java

    Does anyone know how to set an xsql session parameter from within a custom java handler? I looked through the xsql java api and couldn't find anything that would accomplish this.
    Thanks
    null

    XSQL does not have its own API for setting session level parameters. To do this, you should get hold of the HttpServletRequest object, get the Http Session from there, and set the session parameters in the way you would from any servlet.
    If what you mean is set XSQL page-level private parameter, then the API to use from within your action handler is:
    getPageRequest().setPageParam()

  • How to set session attributes in a bean?

    How do I set a session attribute in a server-side bean?
    I'm not sure if I asked the question the right way. What I meant is, while it's easy to set session attributes in a JSP page (session.setAttribute("sessionname", "sessionvalue")), I'd want to set such an attribute within a server-side bean defined in this web application. But what is the syntax for doing it?

    Here a simple bean that stores something in the session and retrieves something from it.
    import javax.servlet.http.HttpSession;
    public class TestBean {
      private String value;
      public void doSomething(HttpSession session, int a, int b) {
        if (a+b > 0) {
          session.setAttribute("ab",Boolean.TRUE);
        } else {
          session.setAttribute("ab",Boolean.FALSE);
      public void init(HttpSession session) {
        if (session != null) {
          Boolean b = (Boolean)session.getAttribute("ab");
          if (b == Boolean.TRUE) {
            value = "a + b is greater than zero";
          } else {
            value = "a + b is not greater than zero";
        } else {
          value = "no session";
      public String getValue() {
        return value;
    }In your JSP, use something along the lines of :
    <%
      TestBean bean = new TestBean();
      bean.init(session);
      bean.doSomething(session,1,2);
    %>If your bean only lives during one request, you can pass the session to the constructor, which stores it in a private variable. This saves passing the session each time.
    Hope this helps,
    --Arnout                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • NEWBIE: Submit Page to set session state

    I have a form that displays various items to include Popup LOVs (dynamic; based on session variables). If the user displays a page, the session state is not yet set so the Popup LOVs don't function correctly (until the user presses the Apply Changes button to submit the page). Can I automatically submit the page or set session state for those items used in the LOVs on page load? Note that I'm not too familiar with the use of javascript. I'm using Application Express version 2.0

    Yes, I discovered that! Thanks for responding, though. I basically run a process (PL/SQL) under page rendering section that looks like:
    begin
    htmldb_util.set_session_state('P10_MACHINE_TYPE','&P10_MACHINE_TYPE.');
    end;
    Thanks!

  • Set session variables inside a page

    Inside the page "form.cfm" I have this code:
    <form name="report" action="pagestatistic.cfm"
    method="post">
    <INPUT name=ONE size=15 >
    <INPUT name=TWO size=15 >
    <input type="submit" value="Go ON">
    </form>
    I would like to set session variable: ONE and TWO, inside the
    page: pagestatistic.cfm
    IN that way when I will refresh the page "pagestatistic.cfm"
    I will watch have the same results.
    I added this code at the top of "pagestatistic.cfm" but it
    doesn't work.
    <CFSET session.ONE = #ONE#>
    <CFSET session.TWO = #TWO#>
    Could you tell me what goes wrong?
    Thanks
    CFWork

    quote:
    Originally posted by:
    liquid One
    When you say refresh the page, do you mean submit the form by
    clicking on the submit button? Or are you filling out the input
    boxes and hitting refresh?
    I mean I clicked a link that links the same page:
    pagestatistic.cfm
    Then I would like to add to this link 2 get variables
    pagestatistic.cfm?ColorPage=Green&Order=2 to change the
    background color and the order of the results of the page. That it
    is impossible because when i refresh the page it is doesn't work.
    What do you suggest me to do?
    Thanks,
    CfWork

  • Using the Set Session Info to populate Custom Variable

    Hey everybody, I'm trying to setup a Set Session Info step so when a caller presses 1 for instance to go to a specific department I can go into the database and see how many callers pressed a certain button.
    Here's what I've done so far, I've setup a Session called session_info with the value of null.  At the very beginning of the script it shows session_info = Get Contact Info --Triggering Contact--, Session)
    Then in the menu field when a caller presses 1 I have the Set Session Info step with the Session being session_info and then in the Context tab I have "_ccdrVar3" for the name and "1" for the value.
    The script doesn't fail it's just not populating any Custom Variable with any data. 
    Also I've tried using the Set Enterprise Call Info and using a value of 1 and then Call.PeripheralVariable3 for the name.  Not sure what the proper way to do this is.  Anybody have any ideas?

    Hi
    You don't need a session var.
    You just need to use 'set enterprise data' to set a call.peripheralvariable to what you like.
    The data goes straight into the contactcalldetail table.. You can check it by doing:
    run uccx sql db_cra select * from contactcalldetail where customvariableX = 'yoursetting'
    Where 'yoursetting' is what you set the ent data to, and customvariableX is the var you use (e.g. customvariable3 if you use call.peripheralvariable3)
    Regards
    Aaron
    Please rate helpful posts..

  • URL to set session properties?

    Is there a URL to SET session properties?  I know I can get a list of them by calling "/XMII/PropertyAccessServlet?mode=list&Content-Type=text/xml", but is there a way to set them in a similar manner?

    Hi all,   If you want me to start a new thread let me know...
    I'm having funky, although repeatable, results using the URL to set a session parameter via AJAX call,
    which always gets a Successful message.
    /XMII/PropertyAccessServlet?mode=Store&PropName=plantId&PropValue=60
    I am verifying the session parameter 2 ways:
    1.  Refresh the page and view source  (I took the lt and gt out)
    ...............span id="savedPlantId" style="visibility:hidden;"
    2.  AJAX call to /XMII/PropertyAccessServlet?mode=List
    Quirk #1:   I see the value in the span.  I do not see it in the servlet list.
    Quirk #2:   I can change the value a couple (2 or 3 times) then it doesn't change after that
    Quirk #3:   When it stops changing via the AJAX call, I can still change it with a browser URL
    http://<server>:50000/XMII/PropertyAccessServlet?mode=Store&PropName=plantId&PropValue=199
    Any hints or ideas? 
    Yes, I am trying to use a single pixel applet, but having trouble with that too!  See a different post. 
    I really would prefer to use the URL as there is no visual indication to the user
    and an applet (and JVM) doesn't have to load.
    --Amy Smith
    --Haworth
    Oh, and P.S.   Is there a mode=Delete to remove the session parameter?

  • Setting session value

    hi one & all..
    i've a problem with session.setAttribute()
    I've two folders in my web-apps.....namely.....ONE ...TWO ...
    am setting session value from the folder ONE...and i redirect a page from folder ONE to folder TWO using response.sendRedirect()....
    when i getting session value from folder TWO it shows null...
    how can i get tat session value from folder ONE to folder TWO
    can any1 help me????????/

    Each web app effectively has it's own session normally. Generally you separate your functionality between web-apps to provide some isolation of object classes etc..
    How about putting the value you want to forward in the sendRedirect URL as a query string parameter?

  • How to set session timeout per user

    Hi,
    Ho do I set the session timeout per User in the
    Application.cfm File??
    I tried using
    <cfif SESSION.UID EQ 1>
    <CFAPPLICATION NAME="appControl" SESSIONMANAGEMENT="Yes"
    sessiontimeout="#CreateTimeSpan(0,0,20,0)#">
    </cfelse>
    <CFAPPLICATION NAME="appControl" SESSIONMANAGEMENT="Yes"
    sessiontimeout="#CreateTimeSpan(1,0,0,0)#">
    </cfif>
    But this didnt work because the cfapplication seems to have
    to be at the top before I call the variable SESSION.UID which
    I set on my login page..
    Someone know how to do this??
    Regards
    Martin

    Martin,
    Your code example cannot work because the "session" scope
    doesn't exist until your application scope is defined. So you have
    to handle this manually. Here's how you can get it done. First,
    define your application to the maximum sessiontimeout you want to
    have.
    <CFAPPLICATION NAME="appControl" SESSIONMANAGEMENT="Yes"
    SESSIONTIMEOUT="#CreateTimeSpan(1,0,0,0)#">
    Then, I don't know how you are doing your login
    authentication but when you have authenticated the user, you need
    to define the userid and the most recent activity in the session.
    Also determine your timeout value based on the userid. See example:
    <CFIF IS_AUTHENTICATED>
    <CFSET session.user.uid = form.userid>
    <CFSET session.user.most_recent_activity = now()>
    <CFIF session.user.id eq 1>
    <CFSET session.user.timeout_mins = 20>
    <CFELSE>
    <CFSET session.user.timeout_mins = 1440>
    </CFIF>
    </CFIF>
    Now, all you have to do is check whether the user has been
    idle for too long and kill the session by purging all session
    variables. For example:
    <!--- if user id is defined, this means user is logged in
    --->
    <CFIF structKeyExists(session, "user") and
    structKeyExists(session.user, "id")>
    <!--- check if timeout has expired --->
    <CFIF datediff("n", session.user.most_recent_activity,
    now()) gt session.user.timeout_mins>
    <!--- timeout has expired, kill the session and log the
    user out --->
    <CFSET StructClear(session)>
    <!--- insert your logout code here --->
    <CFELSE>
    <!--- user hasn't timed out, so reset the most recent
    activity to now --->
    <CFSET session.user.most_recent_activity = now()>
    </CFIF>
    </CFIF>

Maybe you are looking for