Generating javascript from method ...getting unterminated string literal er

Hello all,
I am attempting to generate several links on a jsp that are generated by a method in my class file. Each link has an onmouseover event that will display a popup box that I got from dynamicdrive.com.
                sb.append("<a href='#' onclick=openChatWindow('");
                sb.append(roomName.getName()+"')  onMouseover=showmenu(event,"+getRoomOccupants(connx,roomName.getName())+") onMouseout=delayhidemenu()>");
                sb.append(roomName.getName());
                sb.append("</a><br><br>");The above code generates an "invalid xml syntax" error, the resultant html code viewed in firefox's js dubug window is:
<p align="left">
69 <h5>Available Chat Rooms</h5><br><a href='#' onclick=openChatWindow('aroom') onMouseover=showmenu(event,<p align=left><b>Empty</b></p>) onMouseout=delayhidemenu()>aroom</a><br><br><a href='#' onclick=openChatWindow('room2') onMouseover=showmenu(event,<p align=left><b>Empty</b></p>) onMouseout=delayhidemenu()>room2</a><br><br>
70 </p>I also tried to add apostrophes within the mouseover event like so:
                sb.append("<a href='#' onclick=openChatWindow('");
                sb.append(roomName.getName()+"') onMouseover=showmenu(event,'"+getRoomOccupants(connx,roomName.getName())+"') onMouseout=delayhidemenu()>");
                sb.append(roomName.getName());
                sb.append("</a><br><br>");Now I get an "unterminated string literal" error and the resultant html code is:
<p align="left">
69 <h5>Available Chat Rooms</h5><br><a href='#' onclick=openChatWindow('aroom') onMouseover=showmenu(event,'<p align=left><b>Empty</b></p>') onMouseout=delayhidemenu()>aroom</a><br><br><a href='#' onclick=openChatWindow('room2') onMouseover=showmenu(event,'<p align=left><b>Empty</b></p>') onMouseout=delayhidemenu()>room2</a><br><br>
70 </p>I know this is a syntax error but I cant figure it out.
TIA!

Try adding double quotes around the handler bodies. Example
onMouseOver="showmenu(event, '....');"The forum syntax highlighter does not show any single quote mismatches.

Similar Messages

  • Build a querystring within class file throws js unterminated string literal

    Hello all,
    I have a page that is partially built from within a method.
    String theLink ="FeedFilePusher";//My servlet
                        itemGeoLink = "<a href='#' onclick=top.alertMe('"+theLink+"')>CLICK</a>";The above works fine.
    The problem is that I need to pass a querystring to this servlet.
                        String theLink ="FeedFilePusher?title=" + itemTitle + "&summary=" + itemDesc + "&link=" + entry.getLink() + "&updated=" + itemDate;
                        itemGeoLink = "<a href='#' onclick=top.alertMe('"+theLink+"')>CLICK</a>";When I add the querystring values it throws a unterminated string literal error from within firefox.
    I tried to encode the ? and the & but that didnt work.
    Any ideas on how to do this?
    Here is the simple javascript function called alertMe.
    function alertMe(url)
        document.getElementById('mapframe').src = url;
        closeBubble();
    }TIA!

    Check if the resulting link has any ' or accented letters (����). That sometimes causes that error (at least i've seen it like.. 1000000 times writing spanish applications lol)
    Also, the URL.encode() method might help.

  • Target="_blank  Error unterminated string literal

    Hello,
    I have used a example from Patrick Wolf and it won't work.
    http://www.inside-oracle-apex.com/opening-url-in-new-window/
    I need a pop_up window after pushing the button:
    Target is a: URL
    1- URL Target: http://www.google.nl/" target="_blank -- Don't work (Error unterminated string literal)
    2- URL Target: http://www.google.nl/ -- Works
    What is wrong(see number 1)?
    Thanks at advance.
    Walter

    Jari,
    It didn't work.
    On the rightside from my button I have now the next text : Google')">
    With Error- pointer on ' before <a:
    Fout: unterminated string literal
    Bronbestand: http://apex-o/pls/apex/f?p=160:190:8048856061349970::::FSESSION,FORMID:10752014578,
    Regel: 1, Kolom: 20
    Broncode:
    javascript:redirect('<a href=
    when I change 'Optional URL Redirect' field 'URL Target' to
    <a href=http://www.google.nl/ target=_blank'></a>
    I have the next Error:
    Fout: syntax error
    Bronbestand: http://apex-o/pls/apex/f?p=160:190:8048856061349970::::FSESSION,FORMID:10752014578,
    Regel: 1, Kolom: 66
    Broncode:
    javascript:redirect('<a href=http://www.google.nl/ target=_blank'></a>')
    It still not work. Do you have a solution.
    Walter

  • Unterminated String Literal..?

    I am receiving an error message "unterminated string literal" in my custom calculation script and not sure why or how to fix it.
    There error seems to occur on one of the last two lines on the code below...my code is about 4 times this length, but I can only make it to this point when the error occurs...the problem is not with the particular code, because if I remove some code before it, it works fine....maybe it has to do with the legth of the code? Are there any limits or restrictions that may be affecting this?
    if (this.getField("TICKET1").value =="-") {event.value = 0.00}
    if (this.getField("TICKET1").value =="GENERAL (2011-2012 Season TIcket)" && this.getField("TYPE1").value == "ADULT") {event.value = 814.00;}
    if (this.getField("TICKET1").value =="GENERAL (2011-2012 Season TIcket)" && this.getField("TYPE1").value == "STU/SEN") {event.value = 740.00;}
    if (this.getField("TICKET1").value =="GENERAL (2011-2012 Season TIcket)" && this.getField("TYPE1").value == "CHILD") {event.value = 555.00;}
    if (this.getField("TICKET1").value =="GENERAL (2011-2012 Season TIcket Early Bird)" && this.getField("TYPE1").value == "ADULT") {event.value = 580.00;}
    if (this.getField("TICKET1").value =="GENERAL (2011-2012 Season TIcket Early Bird)" && this.getField("TYPE1").value == "STU/SEN") {event.value = 515.00;}
    if (this.getField("TICKET1").value =="GENERAL (2011-2012 Season TIcket Early Bird)" && this.getField("TYPE1").value == "CHILD") {event.value = 366.00;}
    if (this.getField("TICKET1").value =="GENERAL (2010-2011 Playoffs - 16 game pack)" && this.getField("TYPE1").value == "ADULT") {event.value = 384.00;}
    if (this.getField("TICKET1").value =="GENERAL (2010-2011 Playoffs - 16 game pack)" && this.getField("TYPE1").value == "STU/SEN") {event.value = 352.00;}
    if (this.getField("TICKET1").value =="GENERAL (2010-2011 Playoffs - 16 game pack)" && this.getField("TYPE1").value == "CHILD") {event.value = 272.00;}
    if (this.getField("TICKET1").value =="GENERAL (2010-2011 Playoffs - Round 1)" && this.getField("TYPE1").value == "ADULT") {event.value = 88.00;}
    if (this.getField("TICKET1").value =="GENERAL (2010-2011 Playoffs - Round 1)" && this.getField("TYPE1").value == "STU/SEN") {event.value = 80.00;}
    if (this.getField("TICKET1").value =="GENERAL (2010-2011 Playoffs - Round 1)" && this.getField("TYPE1").value == "CHILD") {event.value = 60.00;}
    if (this.getField("TICKET1").value =="GENERAL (2010-2011 Playoffs - Round 2)" && this.getField("TYPE1").value == "ADULT") {event.value = 96.00;}
    if (this.getField("TICKET1").value =="GENERAL (2010-2011 Playoffs - Round 2)" && this.getField("TYPE1").value == "STU/SEN") {event.value = 88.00;}
    if (this.getField("TICKET1").value =="GENERAL (2010-2011 Playoffs - Round 2)" && this.getField("TYPE1").value == "CHILD") {event.value = 68.00;}

    Just to mention I'm having a similar problem in Acrobat X on Mac of mysterious errors which alternate seemingly randomly between "unterminated string literal", or "missing ) in parenthetical", or "missing } in compound statement", or "missing : after property id".There seems to be some kind of bug here, or at the very least, non-standard behaviour.
    They always occur at the end of the code and seem unrelated to what the code actually says.
    Here's one example, giving "unterminated string literal" on the this.extractPages... line:
    if(isInt(pagesPerRecord)) {
        for( var i = 0; i < this.numPages; i+pagesPerRecord ) {
            var filename = csvData.getRowAndColumn(i, 'filename') + '.pdf';
            var end = i+pagesPerRecord-1;
            app.alert(filename);
            filename = filename ? filename : 'file-'+((i+pagesPerRecord)/pagesPerRecord)+'.pdf';
            this.extractPages({ nStart: i, nEnd: end, icPath: filename });
    If I make a minor, cosmetic change so the code reads like this (not defining end as a variable), the error changes to "missing ) in parenthetical":
    if(isInt(pagesPerRecord)) {
        for( var i = 0; i < this.numPages; i+pagesPerRecord ) {
            var filename = csvData.getRowAndColumn(i, 'filename') + '.pdf';
            app.alert(filename);
            filename = filename ? filename : 'file-'+((i+pagesPerRecord)/pagesPerRecord)+'.pdf';
            this.extractPages({ nStart: i, nEnd: i+pagesPerRecord-1, icPath: filename });
    If I make a minor, cosmetic change so the code reads like this (using a different form of if logic on the check for a filename), the error changes to "missing } in compound statement":
    if(isInt(pagesPerRecord)) {
        for( var i = 0; i < this.numPages; i+pagesPerRecord ) {
            var filename = csvData.getRowAndColumn(i, 'filename') + '.pdf';
            app.alert(filename);
            filename = filename || 'file-'+((i+pagesPerRecord)/pagesPerRecord)+'.pdf';
            this.extractPages({ nStart: i, nEnd: i+pagesPerRecord-1, icPath: filename });
    There have been times where I've had errors like this for valid code, and I've deleted and re-typed all the + signs, and it's worked again. Really don't understand this, as the error messages seem unrelated to the code. The rest of the code that ends with this hasn't changed since an earlier version that worked.
    There are definitely definitely no unclosed brackets, parenthesies or quotes. I've checked manually and with text editor tools (and by copying and pasting directly from an earlier version that worked).
    I'm sure there's a bug in error reporting or syntax checking that explains the original problem and mine.
    Edit: Weirder  and weirder, I changed an unrelated line earlier in the code, in the section that is unchanged from an earlier version that worked fine, from:
    app.alert("5 - "+pagesPerRecord+" pages per record (isInt=="+isInt(pagesPerRecord)+")");
    ...to...
    app.alert("5 - "+pagesPerRecord+" pages per record");
    ...on the basis that another time I had this problem, just deleting lines that involved string concaternation seemed to fix it, and the error message changed yet again to "missing : after property id", while still pointing at the same line (the penultimate }  ). Odd, very odd.

  • Unterminated string literal error every time firefox opens a page.

    Every time firefox opens a new page, the error pops up. It says Javascript error at the top of the error window - and the error is "unterminated string literal. It very annoying, some pages have multiple instances of the error window popping up on top of each other. I reloaded the program, no changes. I am ready to give up and go to Chrome (which does not have the error)

    This issue can be caused by an extension that isn't working properly.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    If it works in Safe Mode and in normal mode with all extensions (Firefox/Tools > Add-ons > Extensions) disabled then try to find which extension is causing it by enabling one extension at a time until the problem reappears.
    Close and restart Firefox after each change via "Firefox > Exit" (Windows: Firefox/File > Exit; Mac: Firefox > Quit Firefox; Linux: Firefox/File > Quit)
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • [svn:bz-trunk] 23023: Fix unterminated string literal.

    Revision: 23023
    Revision: 23023
    Author:   [email protected]
    Date:     2011-10-17 08:00:07 -0700 (Mon, 17 Oct 2011)
    Log Message:
    Fix unterminated string literal.
    Modified Paths:
        blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/remotingService/dataTypes/DeferI nstantiationTest.mxml

  • Everytime I open a tab I get the message - SyntaxError: unterminated string literal

    I installed Firefox 3.6.12 and kept getting this message so I uninstalled it and reinstalled it and it does the same thing. Any idea why it would do that? Could there be something missing in the root files that would cause an error message like that? The reason I ask a question like that is I just had a nasty virus removed from my computer and it had attacked the root files. I have used Firefox for years and never previously had problems using it. I'm using Windows XP The repair guy's solution was to use IE, but .... no way! I want my Firefox

    Start Firefox in [[Safe Mode]] to check if one of your add-ons is causing your problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See [[Troubleshooting extensions and themes]] and [[Troubleshooting plugins]]
    If it does work in Safe-mode then disable all your extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
    * Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
    * Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit")
    >In Firefox 4 Safe mode also disables plugins (Tools > Add-ons > Plugins) and hardware acceleration (Tools > Options > Advanced > General)

  • Unclosed string literal

    I am having a problem compliling the below:
    public class Name
    public static void main (String[] args)
    char name,bday,hobby,book,movie;
    name = 'Brian ';
    bday = 'March 15th 1975';
    hobby = 'Video Games';
    book = '\"Lord of the Rings\"';
    movie = '\"Star Wars\"';
    System.out.println ("My name is:" + name);
    System.out.println ("I was born on:" + bday);
    System.out.println ("My hobbies include:" +hobby);
    System.out.println ("My foavorite book is:" + book);
    System.out.println ("Also, my favorite movie of all time is:" + movie);
    I keep getting unclosed string literal errors but I am closing them off w/ a ' not a " as I thought the char primative should be handled. Any help for someone starting out would be appreciated.
    Thanks

    A character can only hold one character.
    Brian, for example, is more than one letter, and therefore more than one character. Therefore, 'Brian' is not a valid character. "Brian" is, however, a valid String.
    In other words, change all your char variables to Strings.

  • Unterminated  string error

    I get unterminated string error and not ideal how to fix it <p><form>
                            <c:forEach var="year" items="${sessionScope.studentUpdate}">
    <input type="button" value="show information" onclick="openNewInsert('PaymentInfor?search=<c:out value="${year.student_id}"/>')">
                      </c:forEach></p></form>

    if I only have <input type="button" value="show information" onClick="openNewInsert('')"> it did not show the Unterminate error , even I just use
    <input type="button" value="show information" onClick="openNewInsert('Hello.jsp')">, but when I add PaymentInfor?search=<c:out value="${year.student_id}"/> it get error
    ...I still don't get it

  • Htmlconvertor gives "unterminated string" in generated Javascript?

    The code generated by the htmlconvertor.exe program gives the following:
    however, IE says "unterminated string or constant on this line, particularly the NAME="VirtualVisIR" [the culprit]. Has anyone else had this problem - what is the solution?
    Thanks
    <SCRIPT LANGUAGE="JavaScript"><!--
        if (_ie == true) document.writeln('<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH = 976 HEIGHT = 520 NAME="VirtualVisIR"           codebase="http://java.sun.com/products/plugin/autodl/jinstall-1_4-windows-i586.cab#Version=1,4,0,0"><NOEMBED><XMP>');
        else if (_ns == true && _ns6 == false) document.writeln('<EMBED
             type="application/x-java-applet;version=1.4"
                CODE = "VirtualVisIR_Main.class"
                ARCHIVE = "virtualvisir.jar"
                NAME = "VirtualVisIR"
                WIDTH = 976
                HEIGHT = 520
                scriptable ="true"
             scriptable=false
             pluginspage="http://java.sun.com/products/plugin/index.html#download"><NOEMBED><XMP>');
    //--></SCRIPT>

    you need to remove all the line breaks after the EMBED tag... in other words it needs to be one long line like the document.writeln is for the OBJECT tag... i guess it's a bug in the htmlconverter...
    cheers!

  • Getting error while generating report from Siebel (Siebel/BI Publisher)

    Dear,
    I have completed the integration of siebel and BIP according to the oracle document, I successfully upload the sample template from siebel application to BIP server.
    But now I am facing two issues,
    I am getting error "Unauthorized access, Please contact the administrator."  when I open report on BIP which I have uploaded from siebel.
    When I try to generate report from siebel=>application=>Tables=>S_Contact I am getting the below error when click on table report from Report button.
    (httptransport.cpp (1635)) SBL-EAI-04117: HTTP Request error during 'Submitting Data SendHTTP request': 'Status code - 500'
    (httptransport.cpp (983)) SBL-EAI-04117: HTTP Request error during 'Submitting Data Send HTTP request': 'Status code - 500'
    (soapbinding.cpp (675)) SBL-EAI-04304: Unknown Part ':oracle.xdo.webservice.exception.InvalidParametersException'  for operation 'runReport' exists in SOAP message.
    (outdisp.cpp (247)) SBL-EAI-04308: Operation 'runReport' of Web Service 'http://xmlns.oracle.com/oxp/service/PublicReportService.PublicReportServiceService' at port 'PublicReportService' failed with the following explanation: "oracle.xdo.webservice.
    Invalid User Name and Password for BIP Server
    (xmlpadaptersvc.cpp (2287)) SBL-RPT-50529: Verify BI Publisher Server Userid and Password.
    Error in generating Report Output file /siebel8/sea81/siebsrvr/siebel8/sea81/siebsrvr/xmlp/reports/Rept11-3U7M403.PDF in the XMLP Engine
    (xmlpadaptersvc.cpp (2983)) SBL-RPT-50524: BI Publisher engine failed to generate report.
    Object manager error: ([0] BI Publisher engine failed to generate report.(SBL-RPT-50524) (0x95c55c))
    ( (0) err=2818155 sys=9815388) SBL-OMS-00107: Object manager error: ([0] BI Publisher engine failed to generate report.(SBL-RPT-50524) (0x95c55c))
    (bsvcmgr.cpp (1392) err=2818251 sys=0) SBL-OMS-00203: Error 9815388 invoking method "GenerateReport" for Business Service "XMLP Driver Service"
    (bsvcmgr.cpp (1236) err=2818251 sys=0) SBL-OMS-00203: Error 9815388 invoking method "GenerateReport" for Business Service "XMLP Driver Service"
    (smireq.cpp (425) err=2818251 sys=0) SBL-OMS-00203: Error 9815388 invoking method "GenerateReport" for Business Service "XMLP Driver Service"
    Please help to resolve this issue.
    Regards,
    Soahil

    This specifically means that the destinations have not been configured in the Crystal Job Server.  If you're running 4.x, this may be part of the "Adaptive Job Server" instead of or in addition to a Crystal Job Server.  If you're using 3.1 or earlier, you'll also have to set up the destination in the Destination Job Server.
    You'll have to log in to the CMC, go to Servers, right-click on the correct job server and go to "Destinations".  You'll then add something like "File" or "Unmanaged Disk" to the available destinations and save.  Stop the job server, start it again, and your error should go away.
    Please be aware that unless you're using specific credentials to schedule the report or you're saving to the server where BO is installed, you'll need to make sure that the BO services are running under a network "Services" account that has access to the folder you're scheduling the report to. By default during installation it's set to run under the "Local Services" account that doesn't have access to the network.
    -Dell

  • While trying to invoke the method java.lang.String.length() of an object loaded from local variable 'payload'

    Hi,
    Our PI is getting data from WebSphere MQ and pushing to SAP. So our sender CC is JMS and receiver is Proxy. Our PI version is 7.31.
    Our connectivity between the MQ is success but getting the following error while trying to read the payload.
    Text: TxManagerFilter received an error:
    [EXCEPTION]
    java.lang.NullPointerException: while trying to invoke the method java.lang.String.length() of an object loaded from local variable 'payload'
           at com.sap.aii.adapter.jms.core.channel.filter.ConvertJmsMessageToBinaryFilter.filter(ConvertJmsMessageToBinaryFilter.java:73)
           at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:204)
           at com.sap.aii.adapter.jms.core.channel.filter.InboundDuplicateCheckFilter.filter(InboundDuplicateCheckFilter.java:348)
           at com.sap.aii.adapter.jms.core.channel.filter.MessageFilterContextImpl.callNext(MessageFilterContextImpl.java:204)
    I have searched SDN but couldn't fix it. Please provide your suggestion.
    With Regards
    Amarnath M

    Hi Amarnath,
    Where exactly you are getting this error?
    If you are getting at JMS Sender communication channel, try to stop and start the JMS communication channel and see the status, also use XPI Inspector to get the exact error log.
    for reference follow below blogs:
    Michal's PI tips: ActiveMQ - JMS - topics with SAP PI 7.3
    Michal's PI tips: XPI inspector - help OSS and yourself
    XPI Inspector

  • I never used LabView but need to generate a RS-233 serial output string that contains an IRIG timestamp based on a contact closure. Is LabView an appropriate tool to do this? How much does it cost to get started with the product?

    I never used LabView but need to generate a RS-233 serial output string that contains an IRIG timestamp based on a contact closure. Is LabView an appropriate tool to do this? How much does it cost to get started with the product?

    Labview isn't cheap, but it would certainly allow you to build a program (set of vi's - virtual instruments) that would do what you describe. Where would the timecode information come from? Your vi, or program, would: Start up, initialize the serial port, loop until a trigger happened, read the timecode (from where?), output that timecode out the serial port in a loop until you pressed the stop button. There is a free evaluation of Labview software available from NI - the base product itself runs about $995.
    - Dave

  • Keep getting string literal when using CLOBs

    Hi, I am using Oracle 11.2.0.3 on Windows 2003 R2 and I have a procedure to extract various bits of XML and GML from an XMLType column. The GML for a record can be one or more geometries and I need to derive a single SDO_GEOMETRY from and convert to WGS84. I created a function called MULTI_GML_TO_SDOGEOM in which I parse my GML as a CLOB. I then add it to a SQL_STMT variable which is also a CLOB. In processing 10,000 records, this function worked fine for 8000 but then failed when it hit a record that had over 4000 characters in the GML (seven geometries) with a ORA-01704 string literal too long. I entered debug on every line of the function and found the function failed on the open cursor statement
    OPEN c_geoms FOR sql_stmt;I can't understand why I am getting this error as the total length of sql_stmt for the record that failed was about 7500 characters and I am using CLOBs which should be able handle that length. I am not sure if I have not used the CLOBs correctly or perhaps I need to use something from DBMS_LOB package but I cannot find any decent examples and I am not really sure why this doesn't work anyway.
    Here is the function:
    CREATE OR REPLACE FUNCTION MULTI_GML_TO_SDOGEOM (
       geometry_components IN CLOB)
       RETURN sdo_geometry
    IS
    v_count             NUMBER;
    v_gml               XMLType;
    v_gml_rec           XMLType;
    v_gml_clob          CLOB;
    v_gml_clob_rec      CLOB;
    sql_stmt            CLOB;
    v_sdogeom           SDO_GEOMETRY;
    v_sdogeom_all       SDO_GEOMETRY;
    varray_sdogeom      SDO_GEOMETRY_ARRAY;
    TYPE t_ref_cursor  IS REF CURSOR;
    c_geoms         t_ref_cursor;
    BEGIN
    varray_sdogeom := SDO_GEOMETRY_ARRAY();
    IF geometry_components is not null THEN
      v_gml := XMLType ('<GeometryComponents xmlns:gml="http://www.opengis.net/gml/3.2">'||geometry_components||'</GeometryComponents>');
      v_gml_clob := v_gml.getClobVal();
      SELECT count(*) INTO v_count FROM XMLTable ('declare namespace gml="http://www.opengis.net/gml/3.2"; (: :)
                                                 //polygon' PASSING v_gml);
      If v_count > 0 THEN
        sql_stmt := 'WITH gml_input AS (SELECT XMLType ('''||v_gml_clob||''') as gmldata from dual)
                     select poly.spatial_location from gml_input,
                                                     xmltable (xmlnamespaces (''http://www.opengis.net/gml/3.2'' as "gml"),
                                                              ''GeometryComponents/polygon/gml:Polygon''
                                                               PASSING gmldata
                                                               COLUMNS
                                                               spatial_location XMLTYPE PATH ''//gml:Polygon'') poly
                     UNION ALL
                     select point.spatial_location from gml_input,
                                                     xmltable (xmlnamespaces (''http://www.opengis.net/gml/3.2'' as "gml"),
                                                              ''GeometryComponents/polygon/gml:Point''
                                                               PASSING gmldata
                                                               COLUMNS
                                                               spatial_location XMLTYPE PATH ''//gml:Point'') point';
    --    dbms_output.put_line (sql_stmt);
        OPEN c_geoms FOR sql_stmt;
        LOOP
          FETCH c_geoms INTO v_gml_rec;
          EXIT WHEN c_geoms%NOTFOUND;
          v_gml_clob_rec := v_gml_rec.getClobVal;
          sql_stmt := 'SELECT SDO_CS.TRANSFORM(SDO_UTIL.FROM_GML311GEOMETRY ('''||v_gml_clob_rec||'''), 8307) FROM dual';
          EXECUTE IMMEDIATE sql_stmt INTO v_sdogeom;
          varray_sdogeom.EXTEND;
          varray_sdogeom(varray_sdogeom.COUNT) := v_sdogeom;
        END LOOP;   -- c_geoms fetch
        CLOSE c_geoms;
        select SDO_AGGR_SET_UNION(varray_sdogeom, 0.005) INTO v_sdogeom_all from dual;
      END IF;  -- v_count > 0
    RETURN v_sdogeom_all;
    END IF;
    END MULTI_GML_TO_SDOGEOM;
    show errorsUnfortunately I cannot add the data I am processing as it is classified but here is a dummy sample of the type of GML I am parsing though this is short enough that it works:
    <GeometryComponents xmlns:gml="http://www.opengis.net/gml/3.2">
    <polygon xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:srv="http://www.isotc211.org/2005/srv"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:mgmp="http://www.mod.uk/mgmp" xmlns:smr="http://www.mod.uk/smr"
    xmlns:xlink="http://www.w3.org/1999/xlink"><gml:Polygon gml:id="bp2" srsName="EPSG:4326">
    <gml:exterior>
    <gml:LinearRing>
    <gml:posList srsDimension="2">175 -40 176 -40 176 -39 175 -39 175 -40</gml:posList>
    </gml:LinearRing>
    </gml:exterior>
    </gml:Polygon>
    </polygon>
    </GeometryComponents>And although this function is normally called from a procedure, here is a call from dual
    select MULTI_GML_TO_SDOGEOM ('<GeometryComponents xmlns:gml="http://www.opengis.net/gml/3.2">
    <polygon xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:srv="http://www.isotc211.org/2005/srv"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:mgmp="http://www.mod.uk/mgmp" xmlns:smr="http://www.mod.uk/smr"
    xmlns:xlink="http://www.w3.org/1999/xlink"><gml:Polygon gml:id="bp2" srsName="EPSG:4326">
    <gml:exterior>
    <gml:LinearRing>
    <gml:posList srsDimension="2">175 -40 176 -40 176 -39 175 -39 175 -40</gml:posList>
    </gml:LinearRing>
    </gml:exterior>
    </gml:Polygon>
    </polygon>
    </GeometryComponents>') from dual;Thanks in advance.

    Hi,
    I fail to see why you use dynamic SQL here.
    As said above, you're doing a lot of bad and unnecessary stuff, first of which being not using bind variables.
    Then I see a lot serializing/constructing on XMLType which just adds more overhead.
    Basically, the function can be simplified down to :
    create or replace function multi_gml_to_sdogeom (
      geometry_components in clob
    return sdo_geometry
    is
      v_sdogeom_all       SDO_GEOMETRY;
    begin
      select SDO_AGGR_SET_UNION(
               cast(
                 collect(
                   SDO_CS.TRANSFORM(SDO_UTIL.FROM_GML311GEOMETRY(spatial_location), 8307)
                 as sdo_geometry_array
             , .005
      into v_sdogeom_all
      from (
        select xmlserialize(content x.column_value) as spatial_location
        from xmltable(
               xmlnamespaces ('http://www.opengis.net/gml/3.2' as "gml")
             , '/GeometryComponents/polygon/(gml:Polygon|gml:Point)'
               passing xmlparse(document geometry_components)
             ) x
      return v_sdogeom_all;
    end;
    SQL> select multi_gml_to_sdogeom('<GeometryComponents xmlns:gml="http://www.opengis.net/gml/3.2">
      2  <polygon xmlns:gmd="http://www.isotc211.org/2005/gmd" xmlns:srv="http://www.isotc211.org/2005/srv"
      3  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gco="http://www.isotc211.org/2005/gco" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:mgmp="http://www.mod.uk/mgmp" xmlns:smr="http://www.mod.uk/smr"
      4  xmlns:xlink="http://www.w3.org/1999/xlink"><gml:Polygon gml:id="bp2" srsName="EPSG:4326">
      5  <gml:exterior>
      6  <gml:LinearRing>
      7  <gml:posList srsDimension="2">175 -40 176 -40 176 -39 175 -39 175 -40</gml:posList>
      8  </gml:LinearRing>
      9  </gml:exterior>
    10  </gml:Polygon>
    11  <gml:Point gml:id="p21" srsName="EPSG:4326">
    12      <gml:coordinates>45.67, 88.56</gml:coordinates>
    13    </gml:Point>
    14  </polygon>
    15  </GeometryComponents>')
    16  from dual ;
    MULTI_GML_TO_SDOGEOM('<GEOMETR
    <Object>
    Edited by: odie_63 on 8 janv. 2013 18:02

  • Approval task SP09: Evaluation of approvalid failed with Exception: while trying to invoke the method java.lang.String.length() of an object loaded from local variable 'aValue'

    Hi everyone,
    I just installed SP09 and i was testing the solution. And I found a problem with the approvals tasks.
    I configured a simple ROLE approval task for validate add event. And when the runtime executes the task, the dispatcher log shows a error:
    ERROR: Evaluation of approvalid failed with Exception: while trying to invoke the method java.lang.String.length() of an object loaded from local variable 'aValue'
    And the notifications configured on approval task does not start either.
    The approval goes to the ToDO tab of the approver, but when approved, also the ROLE stays in "Pending" State.
    I downgraded the Runtime components to SP08 to test, and the approvals tasks works correctly.
    Has anyone passed trough this situation in SP09?
    I think there is an issue with the runtime components delivered with this initial package of SP09.
    Suggestions?

    Hi Kelvin,2016081
    The issue is caused by a program error in the Dispatcher component. A fix will be provided in Identity Management SP9 Patch 2 for the Runtime component. I expect the patch will be delivered within a week or two.
    For more info about the issue and the patch please refer to SAPNote 2016081.
    @Michael Penn - I might be able to assist if you provide the ticket number
    Cheers,
    Kristiyan
    IdM Development

Maybe you are looking for