Parameter Passing w/Comma Issue in APEX 4.1

So I developed and manage a hosted APEX app that was working fine, except there is now a feature since the hosting company upgraded to 4.1.
I have a button on a page (lets call this page 1), that links to another page (lets call this page 2) and passes a parameter. Unfortunately, the value for this parameter has a "comma" in it, so I used the following technique when passing:
set these items: P2_NAME
With these values: *\*&P1_NAME.*\*
Note the use of the back slash *\* before and after.
This worked fine in 4.0, but doesn't seem to be working in 4.1
When I look at the "resolved" URL at run time it appears to be substituting *%255C* instead of the slashes.
Has anyone else noticed this issue? Do you have a solution?
Thanks in advance!
Paul

Hi Paul,
can you provide an example on apex.oracle.com where you can reproduce your problem? I tried but was only able to reproduce that the URL is escaped to
/apex/f?p=887:2:745085782624400::NO::P2_DEPTNO:%5C10%5Cwhich isn't a problem because that will correctly be converted back to
/apex/f?p=887:2:745085782624400::NO::P2_DEPTNO:\10\by the web server.
In your case it appears that a double escaping takes place where the % of the above URL is escaped another time to %25. That's why the web server doesn't convert back the URL to the \ sign.
Regards
Patrick
My Blog: http://www.inside-oracle-apex.com
APEX Plug-Ins: http://apex.oracle.com/plugins
Twitter: http://www.twitter.com/patrickwolf

Similar Messages

  • Parameter passing and forwarding issues with 10.1.4 JSR 168 portlets

    Hi,
    I'm using version 10.1.4 version of Oracle Portal Server, and am trying to move a JSP web application to a JSR 168 compliant portlet.
    I am experiencing these issues:
    1. There are <form> tags in my JSPs. I've set the action attribute to "<portlet:actionURL>". This works okay and I can see the parameters in my processAction properly. However, if I modify the action attribute to "<portlet:renderURL>", I do not see any parameters in my doView(). Is this expected or a known bug?
    2. As a workaround of the issue #1, in my processAction, I'm using response.setRenderParameter(). This works but has a serious side effect: the first set of values set are set permanently for the session. Subsequent submissions of my JSP fail to alter the values. Is this expected? This problem is not there if setRenderParameter() is not used.
    3. My JSPs use request.setAttribute() and request.getSession().setAttribute(). I don't see these attributes in my processAction using request.getAttributeNames(). Is there another way of retrieving them?
    4. In my JSP, I have this code in a method declaration:
    String forwardPage = "hello.jsp";
    RequestDispatcher forwarder = request.getSession().getServletContext().getRequestDispatcher(forwardPage);
    forwarder.forward(request, response);
    This results in an exception on the server:
         06/05/07 00:25:10 AnupamPortlets: JspServlet: unable to dispatch to requested page: java.lang.NullPointerException
         at com.evermind.server.http.HttpApplication.isLegalFileSystemPath(HttpApplication.java:1298)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:502)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
         at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:253)
         at opportunity_detail____contacts__view._Controller.processRequest(_Controller.java:2516)
         at opportunity_detail____contacts__view._Controller._jspService(_Controller.java:2592)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:824)
         at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121)
         at oracle.webdb.wsrp.server.RequestDispatcherImpl.include(Unknown Source)
         at mypackage1.Portlet1.doView(Portlet1.java:158)
    I've tried moving the page around and using request.getContextPath() and getNamedDispatcher(), but same error.
    This is supported, right? I saw some old messages about this being a bug on the PDK side.
    Actually, using forwarder.include() works, but causes other issues
    Any ideas what I can try of any of these will be greatly appreciated. Thanks.

    Hi Anupam,
    I can help you with question #2.
    2. As a workaround of the issue #1, in my processAction, I'm using response.setRenderParameter(). This works but has a serious side effect: the first set of values set are set permanently for the session. Subsequent submissions of my JSP fail to alter the values. Is this expected? This problem is not there if setRenderParameter() is not used.
    I believe that the issue is an artifact of the interpretation of the JSR-168 specification by Oracle. I discovered that the setRenderParameter basically ends up sending a redirect back to the browser with the render parameters in the URL. This raised security concerns as you may have wanted to pass some sort of internal data from your action to your render request. The parameters in the url "hang around" once they are there so your portlet keeps recieving them. Based on this behavior I have decided to not use setRenderParameter in Oracle portal.
    -sean
    Solutions Architect
    www.sagelogix.com

  • Issue with parameter passing in ie7 to php xml

    Hi
    I wondered if anyone could offer a little advice what the issue is here.
    I have a page with xml generated from php in a separte file and presented by a dataset in spry.
    The xml is OK and in firefox it all works but ie seems to barf on it.
    The situation is this:
    I have a jump menu on a front page that provides a url with anumeric parameter passed like this
    platforms.php?platform_id=1
    This parameter is picked up by php on the platforms.php page using the $_GET Array and is passed into the code in my Spry dataset to the file that runs my query and returns my xml- so basically the page displays a dataset filtered on this parameter id.
    It works perfectly in FF.
    In IE if I link straight to the page without a parameter at all- so platforms.php the page loads OK using the default parameter I have set up in the top of this page to send the default id of 1 to the code page so the spry query says platform_sql.php?platform_id=1 and the xml generator is fine with thisiel. ie I do a
    if(isset($_GET['platform_id'])){
                                                                     $platform=$_GET['platform_id'];
    }else{
    $platform=1;
    The dataset loads Ok in IE but when I pass a parameter in the url from my jump menu IE gives a blank SPRY table i- it momentarily appears with just the placeholders for my dataset elements then vanishes. The source code of the page shows the correct id was set in the spry data going to my query file.
    There is an error in ie saying there is a javascript error but its not any help- in ie fashion- FF shown no such errors.
    I thought this might be a data type thing again in the dataset but its not - I have set the elements returned to simple strings but it still does not work.
    Is there a problem passing in a parameter like this to a spry dataset?

    After about half a day of mucking round I found the problem and a solution to this problem.
    What appeared to have happened was that some of the older content in my database used html originally encoded using a WYSWYG editor called ktml.
    Later data uses Tiny MCE. It looks like the character set of the two formats is slightly different and as a result some characters rendered incorrectly when passed through XML parsing where it specifies the character set as utf-8.
    Firefox on the whole seems to ignore the issue though looking at the raw xml output of my php-xml code- where "-" characters were (dashes) there was a question mark character shown. None the less in actual use on my page the xml was produced and the dataset worked out.
    In IE, it barfed at these same characters and failed to return the xml dataset.
    What confused the issue more was some of my smaller datasets if they by chance never had a "-" character in rendered OK in IE- hence my default dataset (platform_id=1) worked in IE. After much experimenting I noticed other ids worked too if there was never such a character.
    How I got round it was to wrap my server side data in the utf8_encode() function, and now all my xml is clean.
    The javascript error being thrown was a red herring though I could not tell until I managed to run my page in ie7 with Visual Studio Express error console running- I had this on a spare machine at work so could debug with it.
    All sorted now- now just need to find away to wrap all my datasets in collapsible panels that work.
    K

  • Parameter passing issue for HTMLDB report page

    Hi,
    I have created a HTMLDB report based on SQL query in which the where clause column needs to takeup dynamic value each time.
    So I have defined a hidden item on the page PUSERID of Source type "Static Assigment".
    And this variable is used in SQL as
    Select Name
    from employees
    where employeeid = :PUSERID
    Now when i try to run this report and pass the parameter thru the URL by edititng the URL to have parameter value as
    http://localhost:33492/pls/htmldb/f?p=104:8:8320056215249064505:::::PUSERID:CPRASAD
    This shows the page with no data found...though when i run the query manually it returns the result.
    Select Name
    from employees
    where employeeid = 'CPRASAD'
    Plz let me know the correct procedure to make this work?
    Thanks
    AJ

    Thanks Serigo..it works!
    But why we need to remove the colon?Was it symbolizing that there was no parameter passed initially on URL and later when I was expecting one which was acting as two parametes in case of my url example(one parameter as nothing and another ad PUSERID)

  • Flexible parameter passing

    Hi all,
    I have a quite large applications of 600 pages and some of them a a bit more sophisticated than APEX can handle... I mean there is no way we can acheive a page like this in APEX but we integrated them in our apex application so we get the best from two worlds.
    We are trying APEXListener for the first time today and we got a major issue. The flexible parameter passing isn't supported by ApexListener. For those who don't know read : http://www.di.unipi.it/~ghelli/didattica/bdldoc/A97329_03/web.902/a90855/feature.htm#1005765.
    The flexible parameter passing mode is really usefull to create complex pages in APEX because if there is something you need apex cannot do out of the box, you can do it in pl/sql and call it from url. But with apexlistener, it's getting impossible.
    Anyone had this problem and solved it? I don't want to keep an ohs server ton handle these urls ApexListener can't handle. I'm sure it will become an major issue for many of us who integrated others products in their applications...
    Thank a lot, Bruno-Pierre

    Hi,
    Which webserver are you using with ApexListener?
    What is the error you are getting?
    BTW, there is a dedicated ApexListener Forum too.
    Just noticed that you have already seen the threads on the Listener Forum.
    Regards
    Edited by: Prabodh on Aug 17, 2010 10:04 AM

  • Getting error Invalid length parameter passed

    Hi,
    I'm getting an error running my query. It say "Invalid length parameter passed to the LEFT or SUBSTRING  function. I will be getting the string in between of hyphen using the code below. May i ask your assistance or idea on how to fix this issue.
    thank you.
     Substring(ins.itemid,11,CHARINDEX('-',ins.itemid+'-',11)-11) AS MODEL
    Msg 537, Level 16,
    State 3, Line 1
    Invalid length parameter passed to the LEFT or SUBSTRING
    function.
    Sample data of Itemid.
    B300-4410-ONEMAX-U
    B300-1725-XWHT-U
    B300-3110-VT981-U
    B300-1720-DRZRKCROBLK-U
    B300-1720-DRDTHN32BLK-U

    That'll cause empty strings to show up into you're result set but shouldn't cause the the SUBSTRING function to fail. 
    The error is the result of the SUBSTRING function trying to bring back a negative number of characters.
    Try running the following and see what comes back...
    SELECT ins.itemid
    FROM dbo.TableName ins
    WHERE LEN(ins.itemid) < 11
    If you don't find any itemids what are less than 11 characters (I'm 99% sure you will), try using a little test script like the following to test suspect values...
    IF OBJECT_ID('tempdb..#temp') IS NOT NULL
    DROP TABLE #temp
    GO
    CREATE TABLE #temp (
    itemid VARCHAR(30)
    INSERT #temp (itemid) VALUES
    ('B300-4410-ONEMAX-U'),
    ('B300-1725- '),
    ('B300- 3110-VT981-U'),
    ('B300-1720-DRZRKCROBLK-U'),
    ('B300- 1720-DRDTHN32BLK-U')
    SELECT ins.itemid
    FROM #temp ins
    WHERE LEN(ins.itemid) < 11
    SELECT
    SUBSTRING(
    ins.itemid, 11, CHARINDEX('-',ins.itemid+'-',11)-11) AS MODEL FROM #temp ins
    HTH,
    Jason
    Jason Long

  • Adding a CM: Invalid length parameter passed to the RIGHT function. (CINF)

    We started seeing this error message a week ago when attempting to add a Credit Memo.  We only see this error message when entering Credit Memos and not any other finacial documents.  I've done some preliminary research and haven't really come up with anything to point to the issue.  Prior to reporting this to my support partner, I wanted to see if anybody here has seen this before or give me some ideas to look into the source of the issue.
    Full error message: Microsoft SQL Native Client SQL Server Invalid length parameter passed to the RIGHT function. (CINF)

    Checking the list of form ID's at [http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/892] shows the A/R Credit Memo as 179 and the A/P Credit Memo as 181.  This also corresponds with what I see when viewing the system information on the form.

  • Invalid length parameter passed to the LEFT or SUBSTRING function, error on INSERT

    I have a stored procedure that does a BULK INSERT of a csv file into myCSVTable then INSERTs records from
    myCSVTable into myTable. The INSERT statement is giving me this error: 
    Invalid length parameter passed to the LEFT or SUBSTRING function.
    CSV File: 
    3,020000007,OR,051,97205,02020005,41075,19470721,2,0,,0,0,0,0,0,1,0,0,,,,,,,,,0,2,,334418,334418,334418,13,,0,,0,0,0,0,0,1,0,0,1,20100217,,,,,20100304,20121030,1,1,,,0,0,0,0,0,,,,,0,0,0,0,9,0,0,0,1,1,0,0,0,3,00,20100304,20100426,20100922,20101011,20100304,20100922,20101011,,20101011,20100819,,20100326,20100326,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0,0,,,1,1,,9,9,1,1,1,1,0,0,111150,111150,111150,999999,5586.25,4714.01,5884.28,7055.89,11097.89,10839.39,0.00,2,,,,,20120617,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,The
    Workforce Investment Board for the City of xxxxxxxx and xxxxxxxxx and W,020005,,mstr: 1000000000000000017  js: 372651          epi: 1,Jane Doe
    4,020000007,OR,051,97205,02020005,41075,19470721,2,0,,0,0,0,0,0,1,0,0,,,,,,,,,0,2,,334418,334418,334418,13,,0,,0,0,0,0,0,1,0,0,1,20100217,,,,,20100304,20121030,1,1,,,0,0,0,0,0,,,,,0,0,0,0,9,0,0,0,1,1,0,0,0,3,00,20100304,20100426,20100922,20101011,20100304,20100922,20101011,,20101011,20100819,,20100326,20100326,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0,0,,,1,1,,9,9,1,1,1,1,0,0,111150,111150,111150,999999,5586.25,4714.01,5884.28,7055.89,11097.89,10839.39,0.00,2,,,,,20120617,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,The
    Workforce Investment Board for the City of xxxxxxxx and xxxxxxxxx and W,020005,,mstr: 1000000000000000017  id: 020000007       epi: 1,Jane Doe
    There is no LEFT or SUBSTRING function used in the procedure and there are no triggers on either table. 
    The procedure had been working fine until today, when I altered one of the CSV fields. The code which triggers the error is this:
    INSERT [myTable]
    SELECT * FROM [myCSVTable]
    The weird thing is, the 1st record containing the changed field (mstr: 1000000000000000017  js: 372651          epi: 1) triggers the error, but the 2nd record containing
    the old field value (mstr: 1000000000000000017  id: 020000007       epi: 1), does not. 
    There are only blank spaces in the 2 strings, no non-printable characters or anything like that. I'm confused.

    A View of myTable was causing the problem.
    Hi LoriCazares,
    Do you mean that you have solved this issue? If so, please close this thread.
    Regards,
    Elvis Long
    TechNet Community Support

  • JRC bug: apostrophe in string parameter passed to Crystal Report with Command datasource to SQL Server

    Post Author: nl11087
    CA Forum: JAVA
    A single quote/apostrophe in string parameter passed to a Crystal Report with Command datasource connecting to a SQL Server database, using sqljdbc driver does not escape the special character correctly. When doing a preview in the Crystal Reports IDE it allows you to escape the input parameter as expected and work correctly, but through the JRC component it fails. For string parameters without special sql server characters I experience no problems at all. When replacing the Command with a direct table there is also no problem.
    Reproduction:
    1. create a database db1, create a table table1 with a String type column col1.
    2. Create new report Report1.rpt, create a connection to above, Add Command using 'SELECT col1, col2, col3 FROM table1 WHERE col1 = '{?Par1}' . Add a parameter field Par1 : String
    3. In your java stand alone application using JRC add the parameter Par1 with a value "Jon Doe's Value" containing a single apostrophe. Export to PDF. (I also tried MSWord and this failed too, similar behavior). Additionally, in another test try to replaceAll("'","''") to escape it, preventing the code to break, but now it does not retrieve the expected row anymore and you end up with an empty report.
    Exception StackTrace:
    com.crystaldecisions.reports.exportinterface.exceptions.ExportException: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
    at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
    at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)
    Caused by: com.crystaldecisions.reports.formatter.formatter.c: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.if(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.l.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.p.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.p.a(Unknown Source)
    at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
    ... 17 more
    Caused by: com.crystaldecisions.reports.dataengine.be: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.nr(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.bn(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.bp(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
    at com.crystaldecisions.reports.dataengine.s.a(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.aa(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
    ... 23 more
    Caused by: com.crystaldecisions.reports.reportdefinition.datainterface.n: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.reportdefinition.datainterface.p.a(Unknown Source)
    ... 35 more
    Caused by: com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.queryengine.driverImpl.o.eC(Unknown Source)
    at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.ea(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.h(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.dV(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ax.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ae.cy(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ae.cz(Unknown Source)
    at com.crystaldecisions.reports.queryengine.b1.bc(Unknown Source)
    ... 36 more
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 's'.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement$StatementExecutionRequest.executeStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(Unknown Source)
    ... 48 more
    - JRCAgent3 detected an exception: An error occured while exporting the report
    at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)

    Post Author: nl11087
    CA Forum: JAVA
    A single quote/apostrophe in string parameter passed to a Crystal Report with Command datasource connecting to a SQL Server database, using sqljdbc driver does not escape the special character correctly. When doing a preview in the Crystal Reports IDE it allows you to escape the input parameter as expected and work correctly, but through the JRC component it fails. For string parameters without special sql server characters I experience no problems at all. When replacing the Command with a direct table there is also no problem.
    Reproduction:
    1. create a database db1, create a table table1 with a String type column col1.
    2. Create new report Report1.rpt, create a connection to above, Add Command using 'SELECT col1, col2, col3 FROM table1 WHERE col1 = '{?Par1}' . Add a parameter field Par1 : String
    3. In your java stand alone application using JRC add the parameter Par1 with a value "Jon Doe's Value" containing a single apostrophe. Export to PDF. (I also tried MSWord and this failed too, similar behavior). Additionally, in another test try to replaceAll("'","''") to escape it, preventing the code to break, but now it does not retrieve the expected row anymore and you end up with an empty report.
    Exception StackTrace:
    com.crystaldecisions.reports.exportinterface.exceptions.ExportException: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
    at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
    at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)
    Caused by: com.crystaldecisions.reports.formatter.formatter.c: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.objectformatter.bv.if(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.l.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.p.<init>(Unknown Source)
    at com.crystaldecisions.reports.formatter.formatter.e.p.a(Unknown Source)
    at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
    ... 17 more
    Caused by: com.crystaldecisions.reports.dataengine.be: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.nr(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.bn(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.bp(Unknown Source)
    at com.crystaldecisions.reports.dataengine.n.else(Unknown Source)
    at com.crystaldecisions.reports.dataengine.s.a(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.aa(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.<init>(Unknown Source)
    at com.crystaldecisions.reports.dataengine.bk.a(Unknown Source)
    ... 23 more
    Caused by: com.crystaldecisions.reports.reportdefinition.datainterface.n: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.reportdefinition.datainterface.p.a(Unknown Source)
    ... 35 more
    Caused by: com.crystaldecisions.reports.queryengine.driverImpl.m: JDBC Error: Incorrect syntax near 's'.
    at com.crystaldecisions.reports.queryengine.driverImpl.o.eC(Unknown Source)
    at com.crystaldecisions.reports.queryengine.driverImpl.o.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.ea(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.h(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ap.dV(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ax.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.if(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
    at com.crystaldecisions.reports.queryengine.bc.do(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ae.cy(Unknown Source)
    at com.crystaldecisions.reports.queryengine.ae.cz(Unknown Source)
    at com.crystaldecisions.reports.queryengine.b1.bc(Unknown Source)
    ... 36 more
    Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near 's'.
    at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
    at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.doExecuteStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement$StatementExecutionRequest.executeStatement(Unknown Source)
    at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
    at com.microsoft.sqlserver.jdbc.SQLServerStatement.execute(Unknown Source)
    ... 48 more
    - JRCAgent3 detected an exception: An error occured while exporting the report
    at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
    at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
    at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(Unknown Source)
    at com.crystaldecisions.reports.sdk.PrintOutputController.export(Unknown Source)

  • How to get each value from a parameter passed like this '(25,23,35,1)'

    Hi
    One of the parameter passed to the function is
    FUNCTION f_main_facility(pi_flag_codes VARCHAR2) return gc_result_set AS
    pi_flag_codes will be passed a value in this way '(25,23,35,1)'
    How to get each value from the string
    like 25 first time
    23 second time
    35 third time
    1 fourth time
    I need to build a select query with each value as shown below:-
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3, code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 25 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q1,
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3,code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 23 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q2,
    (SELECT t2.org_id, RTRIM(xmlagg(xmlelement(e, t4.description || ';')
    ORDER BY t4.description).EXTRACT('//text()'), ';') AS DESCRIPTION
    from org_name t2, ref_org_name t3,code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 35 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date
    group by t2.org_id) q3,
    (SELECT t2.org_id, t4.description
    from org_name t2, ref_org_name t3, code_table t4
    where t2.att_data = t4.code
    and t3.ref_code = t2.att_type
    and t2.att_type = 1 and t3.code_type = t4.code_type
    and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q4
    Please help me with extracting each alue from the parm '(25,23,35,1)' for the above purpose. Thank You.

    chris227 wrote:
    I would propose the usage of regexp for readibiliy purposes and only in the case if this doesnt perform well, look at solutions using substr etc.
    select
    regexp_substr( '(25,23,35,1)', '\d+', 1, 1) s1
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 2) s2
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 3) s3
    ,regexp_substr( '(25,23,35,1)', '\d+', 1, 4) s4
    from dual 
    S1     S2     S3     S4
    "25"     "23"     "35"     "1"In pl/sql you do something like l_val:= regexp_substr( '(25,23,35,1)', '\d+', 1, 1);
    If t2.att_type is type of number you will do:
    t2.att_type= to_number(regexp_substr( '(25,23,35,1)', '\d+', 1, 1))Edited by: chris227 on 01.03.2013 08:00Sir,
    I am using oracle 10g.
    In the process of getting each number from the parm '(25,23,35,1)' , I also need the position of the number
    say 25 is at 1 position.
    23 is at 2
    35 is at 3
    1 is at 4.
    the reason I need that is when I build seperate select for each value, I need to add the query number at the end of the select query.
    Please see the code I wrote for it, But the select query is having error:-
    BEGIN
    IF(pi_flag_codes IS NOT NULL) THEN
    SELECT length(V_CNT) - length(replace(V_CNT,',','')) FROM+ ----> the compiler gives an error for this select query : PLS-00428:
    *(SELECT '(25,23,35,1)' V_CNT  FROM dual);*
    DBMS_OUTPUT.PUT_LINE(V_CNT);
    -- V_CNT := 3;
    FOR L_CNT IN 0..V_CNT LOOP
    if L_CNT=0 then
    V_S_POS:=1;
    V_E_POS:=instr(pi_flag_codes, ',', 1, 1)-1;
    else
    V_S_POS:=instr(pi_flag_codes,',',1,L_CNT)+1;
    V_E_POS:=instr(pi_flag_codes, ',', 1, L_CNT+1)-V_S_POS;
    end if;
    if L_CNT=V_CNT then
    V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS));
    else
    V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS,V_E_POS));
    end if;
    VN_ATYPE := ' t2.att_type = ' || V_ID;
    rec_count := rec_count +1;
    query_no := 'Q' || rec_count;
    Pls help me with fetching each value to build the where cond of the select query along with the query number.
    Thank You.

  • Pocket IE Issues on ApEx 3.0

    The other day I had an issue with the javascript doSubmit() function that's associated with all the buttons in ApEx not working with Pocket IE. That thread can be found here:
    Javascript problem in ApEx 3.0 [Solved]
    Another issue has surfaced over the past two days that is truly puzzling. The logout link on the navigation bar is giving a message "the page you are looking for cannot be found". Again, this works fine in a regular workstation browser. Pocket IE also worked fine when this was running on HTMLDB 2.0.0.00.49. The error only started appearing after the upgrade to ApEx 3.0.
    The logout link on the navigation bar is as follows:
    wwv_flow_custom_auth_std.logout?p_this_flow=&APP_ID.&p_next_flow_page_sess=&APP_ID.:101I know this is very little information to go on, but anyone that has any ideas I would really like to hear them! Thanks.
    Earl

    Hello,
    Cool yeah get in touch with me. I created a new workspace for testing of mobile issues on apex.oracle.com and would definitely like some feed back and help with issues.
    And now that the iPhone is coming out the market could literally explode!Well even though I have an irrational hatred of all things Apple (from the time my neighbor wouldn't let mess with the 2E and then the damn Newton) like I said it isn't rational. But I have to admit the one thing I have ever cared about as a major shortcoming in mobile phones Apple has fixed first which is put a 'FULL' browser on the phone.
    Plus they finally provide Safari for Windows (you do know they only did that for us developers) and I have been testing Apex application against it and most seem to work pretty good and supposedly anything that runs on Safari for windows will run on iPhone so I think we're looking good.
    I can't wait to see the AJAX + Canvas based application on the iPhone hopefully it will push Microsoft along on their mobile platforms.
    Carl

  • Parameter Pass Between Portlets

    Hi,
    I'm trying to get a parameter pass between two portlets on the same page, I've looked at the PDK samples but have not been able to get either working, I'm on 9iAS R2 (9.0.2.0.1.). I've installed the PDK and loaded up the various samples. Any information or guidance appreciated. In a nut shell I'd ideally like to pass a parameter from a report (java or pl/sql) in one portlet to a portlet next to it on the same page which can then run a second report (java or pl/sql).
    Regards
    Stephen

    Hi Peter,
    We have an omniportlet that displays a graph, we want the user to be able to pick a value from this graph and pass it as a parameter to another page containing another omniportlet which would select values based on the parameter value.
    We have 9ias version 9.0.2.6.2. Your help will be greatly appreciated.
    thanks,
    Saranya

  • Parameter passing problem to standard JSP iView

    Hi,
    I'm trying to launch a standard iView with some a parameter directly from the browser by calling the url http://<server>/<iview>?<param>=<value>
    The iView ID is com.sap.pct.hcm.ecmmain.approval and by looking at its details from the content catalog I saw there was a property called CREVI. I would like to fill this in but the iview doesn't respond to the URL params at all. Setting them staticly by editing the iView works perfect.
    I have also checked that the "Parameters to pass from Page Request" property includes * and excludes some other properties than the one I'm testing.
    I thought this was going to be simple but can't just make it work..I guess I'm missing something basic or the property can't be used? Any ideas?
    Thanks,
    Mikko

    Hi Mikko,
    We have found inconsistencies with regards to parameter passing in the URL, sometimes they are read and sometimes not.  I suggest that you try to change the order of the parameters as this can affect if its read.  I also believe other parameters can interfere whether or not it is read so try various scenarios.
    Cheers,
    John

  • JMS - UserTransaction - Commit issue

    Introduction
    I am moving from WebSphere to Weblogic and have counterd an UserTransaction commit issue.
    The code have not been modified, however the logic in Weblogic and Websphere behaves different.
    The messagingsystem is Websphere MQ, in Weblogic I have QCF, destinations, host and port etc. in a .bindings file, and I have configured JMS server and JMS modules with corresponding jndi names.
    I have verified that this configuration is correct throug a custom develop testtool deployed in WL, message is sent successfully to MQ.
    The problem - description
    However in my application i'm using UserTransaction and this is not working as expected.
    I have two classes that communicate with MQ (AbcDAO.java and QueueBroker.java) AbcDAO.java creates a UserTransaction and communicates with Queuebroker throug a method called "SendToAutoS" this method retrives the corrilationId (for the message sendt to MQ) from Queuebroker.
    The SendMessage method creates qcf, queueconnection, queue etc and sends the message to MQ. When i debug this steps (line:queueSender.send(theMessage) I can verify in MQ that a message count is registerted in mq on the correct queue, but it's not shown (since its not commited). However when performing finalize in Queuebroker, which close both session and connection, the messagecount is gone in MQ, and when returing to AbcDAO.java to perform ut.commit(); there is not any message on Queue.
    For me it looks like the message is rolledback when session and connection closes.
    Actions tried
    If I change this line QueueBroker , transacted to false witch i understand sends message without the need to commit:
    boolean transacted = false;
    queueSession = queueConnection.createQueueSession(transacted, QueueSession.AUTO_ACKNOWLEDGE);
    the message is sendt successfully to MQ. However now either commit or rollback on the UserTransaction is working with transacted=false.
    I need the commit and rollback to be done on the UserTransaction for my application.
    Anyone have an idea why this is not working?
    The files - content
    AbcDAO.java - that creates a usertransaction
    ut = ServiceLocator.getInstance().getUserTransaction();
    ut.begin();
    msgCorId = sendToAutoS(userVO, messageSend, transactionQeueSend, transactionQeueFactory);
    ut.commit();
    //SendToAutoS - that calls the Queuebroker method - sendMessage
    private String sendToAutoS(UserVO userVO, String message, String transactionQueue, String transactionQueueFactory) throws DaoException {
    try {
    log.debug("..");
    return QueueBroker.getInstance().sendMessage(message, transactionQueue, transactionQueueFactory);
    } catch (BrokerException be) {
    log.error("BrokerException", be);
    QueueBroker.java - that sends the message to MQ
    public String sendMessage(String message, String transactionQueue, String transactionQueueFactory) throws BrokerException {
    try {
    // Get service locator
    ServiceLocator sl = ServiceLocator.getInstance();
    // Create QueueConnectionFactory with help form service locator
    queueConnectionFactory = (QueueConnectionFactory) sl.getQueueConnectionFactory(transactionQueueFactory);
    // Create QueueConnection
    queueConnection = queueConnectionFactory.createQueueConnection();
    // Create QueueSession, transacted - client has to commit !
    boolean transacted = true;
    queueSession = queueConnection.createQueueSession(transacted, QueueSession.AUTO_ACKNOWLEDGE);
    // Create queue with help from service locator
    queue = (Queue) sl.getQueue(transactionQueue);
    // Create QueueSender
    queueSender = queueSession.createSender(queue);
    // Create message and sent it
    Message theMessage = null;
    theMessage = queueSession.createTextMessage(message);
    // Log time
    long time = System.currentTimeMillis();
    // Set log time on message
    theMessage.setJMSTimestamp(time);
    // Send
    queueSender.send(theMessage);
    queueSender.close();
    // Return unique messageID for message just been sent
    return theMessage.getJMSMessageID();
    } catch (JMSException je) {
    BrokerException ex = new BrokerException();
    ex.setMessageKey("requisition.jms.broker.queue");
    Object[] o = {"SEND", "String to Autosys = " + message};
    ex.setMessageArgs(o);
    ex.setRootCause(je);
    throw ex;
    } catch (ServiceLocatorException e) {
    BrokerException ex = new BrokerException();
    ex.setMessageKey(e.getMessageKey());
    ex.setMessageArgs(e.getMessageArgs());
    ex.setRootCause(e.getRootCause());
    throw ex;
    } finally {
    // Clean up - close connection and session if exist
    if (queueConnection != null) {
    finalize();
    * Finalize queue handling
    * @throws BrokerException e
    protected void finalize() throws BrokerException {
    try {
    // Close connections
    queueSession.close();
    queueConnection.close();
    } catch (JMSException je) {
    BrokerException ex = new BrokerException();
    ex.setMessageKey("requisition.jms.broker.queue");
    Object[] o = {"FINALIZE", "Close connections" };
    ex.setMessageArgs(o);
    ex.setRootCause(je);
    throw ex;
    Edited by: reZer on 14.sep.2011 13:05
    Edited by: reZer on 14.sep.2011 13:06

    I know you are trying to send a JMS message, but just because this is true the generic JMS forum is not automatically the place you should ask questions like this. Your real beef is with the container you are using (Weblogic), UserTransaction and persistent JMS messages in combination with the specific JMS provider you are using.
    You will have far more chance to get help with this problem if you ask it in the Weblogic forum which you can also find on this very website. If you make a new post, be sure to create a link to it here so people can follow it.
    https://forums.oracle.com/forums/category.jspa?categoryID=193
    And perhaps more specific:
    WebLogic Server - JMS

  • NEED PARAMETER PASSING SAMPLE INSTALLATION ZIP FILE...

    Hello All,
    I was viewing the following page:
    http://portalstudio.oracle.com/pls/ops/docs/FOLDER/COMMUNITY/PDK/
    articles/guidelines.parameter.passing.html
    Near the end of the page it reads, "For a detailed PL/SQL portlet
    sample, see the Parameter Passing sample included in the PL/SQL
    section including the Parameter Passing Sample Installation
    article and check out the source code in the downloadable zip
    file."
    The phrase "downloadable zip" near the end of this line is a link
    that is supposed to provide you with the zip file. When I click
    on this link I get the file to save as sample.zip. Files get
    downloaded but when I try to unzip it,
    I encounter error messages :
    Missing 1 bytes in Zip file (attempting to process anyway).
    Cannot open file: it does not appear to be a valid archive.
    If you downloaded this file, try downloading the file again.

    let say i have a code as below:
    public void init()
          String rootDirectory = JOptionPane.showInputDialog( this,
             "Please enter a directory name:" );
          FileTreePanel panel = new FileTreePanel( rootDirectory );
          getContentPane().add( panel );
       }and i use this code to call the batch file:
    import java.io.IOException;
    public class callbatch{
         public static void main(String args[]) {
              try {
                   Runtime runtime=Runtime.getRuntime();
                   Process process=runtime.exec("cmd /c start callnvcc.bat");
                   catch(IOException ioe) {
                        System.out.println(ioe);
         }how can i pass the rootDirectory into my callnvcc.bat?

Maybe you are looking for

  • Why are there 2 thin red vertical lines on the screen of my MBP 15" retina which is only 2 months old!

    I would just like to understand why there a two thin red vertical lines on the screen I suspect I need to bring into an apple store for diagnostics but is anyone aware of the likely cause? thanks v much!

  • Adobe 9.2 won't open pdf file in Firefox 3.5.3.

    No error message, just blank screen. Adobe plug-in is Enabled in Firefox, and Adobe Reader Internet preferences set to display pdf in browser.  Adobe 9.2 does open in IE 8.  I did not have any issues in Firefox until the Adobe upgrade, so I don't bel

  • How can I save a rotated pdf file?

    I have received a pdf file of many pages in landscape orientation that need to be saved in portrait orientation.  I know how to rotate the file, but how can I save the rotated document? [This is my first entry, so apologies if I have got my entries m

  • ICloud iPhoto journals vs Shared Photo stream

    In iPhoto (for iOs Only) you can create photo journals and publish them on iCloud. This is very similar to shared photo streams. However Journals give you quite a few layout options which lack for photo stream. On the other hand shared photo stream a

  • Consume SAP webservices wsdl from Delphi 2007

    am trying to consume SAP webservices from Delphi 2007, but, i was some problems with this task. I used WSDL definition to make the Delphi interface and i´m working with THTTPRIO component to try consume SAP Webservices, but , occurs this error: Conex