Document Parsing and Exceptions

I'm working on an application that accesses an Oracle database that goes down for a few hours each night for backups. If the application is accessed during this period an SQLException is thrown that is displayed at the top of my page, but the rest of the form is still displayed. I want to redirect them to a system maintenance message if this occurs, but a response.redirect does not work within my catch block.
The form template text is after the Java code and I thought that an exception would prevent it from being displayed.
Any suggestions on how to handle this?

Hmm... I tried redirecting in the catch and it did not work before. I just tried it again and it did redirect. I don't believe I commented the e.printStackTrace(); method before though.

Similar Messages

  • Parse and output XML document while preserving attribute order

    QUESTION: How can I take in an element with attributes from an XML and output the same element and attributes while preserving the order of those attributes?
    The following code will parse and XML document and generate (practically) unchanged output. However, all attributes are ordered a-z
    Example: The following element
    <work_item_type work_item_db_site="0000000000000000" work_item_db_id="0" work_item_type_code="3" user_tag_ident="Step" name="Work Step" gmt_last_updated="2008-12-31T18:00:00.000000000" last_upd_db_site="0000000000000000" last_upd_db_id="0" rstat_type_code="1">
    </work_item_type>is output as:
    <work_item_type gmt_last_updated="2008-12-31T18:00:00.000000000" last_upd_db_id="0" last_upd_db_site="0000000000000000" name="Work Step" rstat_type_code="1" user_tag_ident="Step" work_item_db_id="0" work_item_db_site="0000000000000000" work_item_type_code="3">
    </work_item_type>As you may notice, there is no difference in these besides order of the attributes!
    I am convened that the problem is not in the stylesheet.xslt but if you are not then it is posted bellow.
    Please, someone help me out with this! I have a feeling the solution is simple
    The following take the XML from source.xml and outputs it to DEST_filename with attributes in a-z order
    Code:
    private void OutputFile(String DEST_filename, String style_filename){
         //StreamSource stylesheet = new StreamSource(style_filename);
         try{
              File dest_file = new File(DEST_filename);
              if(!dest_file.exists())
                  dest_file.createNewFile();
              TransformerFactory tranFactory = TransformerFactory.newInstance();
              Transformer aTransformer = tranFactory.newTransformer();
              aTransformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
              Source src = new DOMSource("source.xml");
              Result dest = new StreamResult(dest_file);
              aTransformer.transform(src, dest);
              System.out.println("Finished");
         catch(Exception e){
              System.err.print(e);
              System.exit(-1);
        }

    You can't. The reason is, the XML Recommendation explicitly says the order of attributes is not significant. Therefore conforming XML serializers won't treat it as if it were significant.
    If you have an environment where you think that the order of attributes is significant, your first step should be to reconsider. Possibly it isn't really significant and you are over-reaching in some way. Or possibly someone writing requirements is ignorant of this fact and the requirement can be discarded.
    Or possibly your output is being given to somebody else who has a defective parser which expects the attributes to be in a particular order. You could quote the XML Recommendation to those people but often XML bozos are resistant to change. If you're stuck writing for that parser then you'll have to apply some non-XML processing to your output to fix it up on their behalf.

  • Oracle XML parser and IBM jdk bug

    Hello,
    From a few messages found in the XML forum it seems that IBM jvm could cause problems with oracle XML parser. ( see http://technet.oracle.com:89/ubb/Forum11/HTML/003823.html )
    I am using IBM jvm (jdk 1.3) on a linux box, and problems are starting to arise:
    I have
    - 1 BC4J based jsp app which works fine.
    - 2 XML parsing BC4J apps which cause strange errors (like parsing 40 documents fine and failing on the 41st for no apparent reason)
    Hopefully, Steven Muench provided precious advice on this (basically, disabling the JIT), however some issues are still open:
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>You should file a bug with IBM to get this fixed, using your stylesheet as a testcase. Lots of people have hit this problem.<HR></BLOCKQUOTE>
    Has anyone (from oracle or else) done this yet? I have gone (quickly) through IBM website but I didn't find any bug report utility or the like...
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Disable your JIT compiler (or switch JVM's) and you won't have the error.<HR></BLOCKQUOTE>
    Turning off the JIT indeed made the errors vanish, thanks a lot for the tip!
    I have a few more questions though :
    * As the BC4J framework uses the xml parser, It is fairly possible that the ibm jvm bug will affect it...
    I haven't had any problems (yet?) with the BC4J part of my applications, but I'm a bit concerned about having random bugs lurking around (I have more than enough of my own :) )
    Has anyone stumbled upon IBM JVM vs oracle parser issues in BC4J? (oracle.xml.parser.v2.XXXXXX exceptions...)
    * If BC4J is indeed affected, what's the solution?
    - Disable the JIT? (And forget about performance?... hmmm... no)
    - Switch parsers? (oracle parser is too tightly integrated in the BC4J Framework isn't it?.. hmm... not possible either)
    - Wait for a patch from IBM (and use another one in the meantime) / switch JVM :
    In either case, I'd really like to know what is the JVM that oracle people use / would advise.
    Thanks for your help
    null

    For those interested,
    last week i reported this bug in the ibm jvm news forum.
    They said that the problem had been investigated and would be fixed in their next service release.
    FYI: the current release (SR7, labeled "build cx130-20010329) still has various problems wih oracle XML parser.
    Remi
    null

  • XML Parser and Content-type/encoding problem

    I've write a little and simple XML parser and a simple "trasformer" that recive an XML file and an XSL one and return HTML, here is the code:
    public static String toHTML(Document doc, String xslSource){
            ByteArrayOutputStream testo = new ByteArrayOutputStream();
            try{
                DOMSource source = new DOMSource(doc);
                TransformerFactory tFactory = TransformerFactory.newInstance();
                System.out.println("----> " + xslSource);
                Transformer transformer = tFactory.newTransformer(new StreamSource(xslSource));
                transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "2");
                transformer.setOutputProperty(OutputKeys.METHOD, "html");
             transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
             transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
                transformer.transform(source, new StreamResult(testo));
            }catch(Exception ioe){
                System.out.println("2 XMLTool.toHTML " + new java.util.Date());
                System.out.println(ioe);        
            return testo.toString();
        }the problem is that I would like to put the HTML code its return into a JEditorPane; now I'm trying with this code:
    JEditorPane jep1 = new JEditorPane();
    jep1.setContentType("text/html");
    jep1.setText(v);
    // 'v' is the string returned by the code posted up (the XML/XSL transformer)but I can't see anything in my JEditorPane.
    I think that the problem is this line of code that the transformer add automaticaly ad HTML code:
    <META http-equiv="Content-Type" content="text/html; charset=UTF-8">Infact if I try to delete this line from the code I can see what I want but is'n good delete a line of code without understend where is the problem.
    So, can anyone help me?

    good.
    when u set ur output properties to html , transformer
    searches for all entity references and converts accordingly.
    if u r using xalan these files will be used for conversion of
    Character entity references for markup-significant
    output_html.properties
    (this should be in templates package)
    and HTMLEntities.res(should be in serialize package)
    vasanth-ct

  • Distributed Document Capture and UCM commit issue: 302 Moved Temporarily

    I am installing and configuring Oracle Document Capture and Oracle Distributed Document Capture to commit documents to Oracle UCM.
    I am unable to commit documents to UCM because of the following error: "302 Moved Temporarily". What can be wrong with my configuration?
    Error log from the ODDC:
    Wed Dec 15 10:20:14 CET 2010 INFO Document file name is D:\oracle\Document Capture\Batches\001\00000001\00000001_1.
    Wed Dec 15 10:20:14 CET 2010 INFO Begin Check In Process.
    Wed Dec 15 10:20:14 CET 2010 INFO Idc service = CHECKIN_UNIVERSAL.
    Wed Dec 15 10:20:14 CET 2010 INFO Parsing xml to obtain fields data.
    Wed Dec 15 10:20:14 CET 2010 INFO dDocTitle: oddc.
    Wed Dec 15 10:20:14 CET 2010 INFO dDocType: Application.
    Wed Dec 15 10:20:14 CET 2010 INFO Field DocAuthor: weblogic.
    Wed Dec 15 10:20:14 CET 2010 INFO dSecurityGroup: Public.
    Wed Dec 15 10:20:14 CET 2010 INFO dDocAuthor: weblogic.
    Wed Dec 15 10:20:14 CET 2010 INFO dDocAccount: .
    Wed Dec 15 10:20:14 CET 2010 INFO primaryFile: D:\oracle\Document Capture\Batches\001\00000001\00000001.1.
    Wed Dec 15 10:20:15 CET 2010 SEVERE Failed to check in document. Exception: {0}. Error is: oracle.stellent.ridc.protocol.http.HttpProtocolException: HTTP/1.1 302 Moved Temporarily
         at oracle.stellent.ridc.protocol.http.IdcHttpProtocol.writeRequest(IdcHttpProtocol.java:171)
         at oracle.stellent.ridc.IdcClient.sendRequest(IdcClient.java:140)
         at com.oracle.capture.UCM11g.Driver.checkIn(Driver.java:192)
         at com.oracle.capture.UCM11g.ComDriver.checkIn(ComDriver.java:42)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.jniwrapper.win32.com.server.IDispatchServer.invoke(SourceFile:209)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.jniwrapper.win32.com.server.CoInterfaceVTBL$VirtualMethodCallback.b(SourceFile:232)
         at com.jniwrapper.win32.com.server.CoInterfaceVTBL$VirtualMethodCallback.callback(SourceFile:135)
         at com.jniwrapper.Callback.enterPoint(SourceFile:222)
         at com.jniwrapper.Function.invokeCFunc(Native Method)
         at com.jniwrapper.FunctionCall.a(SourceFile:126)
         at com.jniwrapper.FunctionCall.call(SourceFile:34)
         at com.jniwrapper.Function.invoke(SourceFile:188)
         at com.jniwrapper.Function.invoke(SourceFile:212)
         at com.jniwrapper.win32.MessageLoopThread$LoopThread.run(MessageLoopThread.java:489)
    Error log from the WLS - UCM_server1:
    ####<2010-12-15 10:23:52 CET> <Info> <ServletContext-> <???> <UCM_server1> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <8857620d73b0a621:-7e6d4fca:12ce951b643:-7ffd-0000000000000045> <1292405032703> <BEA-000000> <Failed access to redirected secure URL>
    I am using Oracle Distributed Document Capture Release 10gR3 and Content Server 11g Release 1.
    I configured the Oracle UCM 11g Commit Driver:
    user: my_user, password: my_password, Server URL: http://localhost:16200/cs
    When I am trying to commit a batch I am getting the following response:
    HTTP/1.1 200 OK
    Cache-Control: no-cache
    Date: Wed, 15 Dec 2010 09:33:06 GMT
    Content-Length: 664
    Content-Type: text/plain; charset=utf-8
    Set-Cookie: IDCCS_SESSIONID=yycVNLLSL1hJ3P2mQkQrjss7XLZY23r8vFbt2n4wTj7VJ2c9xQ01!-1355344816; path=/; HttpOnly
    X-ORACLE-DMS-ECID: 0000IndO3b39_aW5Pzw0yd1D28UE00000t
    X-Powered-By: Servlet/2.5 JSP/2.1
    <?hda version="11gR1-11.1.1.3.0-idcprod1-100505T121221" jcharset=UTF8 encoding=utf-8?>
    @Properties LocalData
    IdcService=PING_SERVER
    ClientEncoding=UTF8
    UserTimeZone=UTC
    UserDateFormat=iso8601
    addAlert=1
    ActAsAnonymous=1
    dUser=anonymous
    blDateFormat=yyyy-MM-dd HH:mm:ssZ!tUTC!mAM,PM
    refreshSubjects=
    refreshMonikers=
    changedSubjects=
    refreshSubMonikers=
    blFieldTypes=StatusMessage message
    RedirectUrl=/cs/
    changedMonikers=
    idcToken=
    IsJava=1
    @end
    @ResultSet USER_ALERTS
    3
    alertId
    alertMsg
    alertUrl
    csWeblayout8dot3Error
    <$lcMessage('!csWeblayout8dot3Error')$>
    @end
    @ResultSet UserAttribInfo
    2
    dUserName
    AttributeInfo
    anonymous
    account,#none,15,role,guest,15
    @end
    HTTP/1.1 302 Moved Temporarily
    Date: Wed, 15 Dec 2010 09:33:06 GMT
    Transfer-Encoding: chunked
    Location: http://localhost:16200/cs/login/login.htm
    X-ORACLE-DMS-ECID: 0000IndO3c19_aW5Pzw0yd1D28UE00000u
    X-Powered-By: Servlet/2.5 JSP/2.1
    0113
    <html><head><title>302 Moved Temporarily</title></head>
    <body bgcolor="#FFFFFF">
    <p>This document you requested has moved temporarily.</p>
    <p>It's now at http://localhost:16200/cs/login/login.htm.</p>
    </body></html>
    0000
    The Request:
    POST /cs HTTP/1.1
    User-Agent: Java; Stellent CIS 11g
    IdcVersion: 11.1.1
    Host: 127.0.0.1:16200
    Content-Length: 124
    Content-Type: text/hda; charset=UTF-8
    IsJava=1
    <?hda jcharset=UTF-8?>
    @Properties LocalData
    IdcService=PING_SERVER
    UserTimeZone=UTC
    UserDateFormat=iso8601
    @end
    POST /cs HTTP/1.1
    User-Agent: Java; Stellent CIS 11g
    IdcVersion: 11.1.1
    Authorization: Basic d2VibG9naWM6d2VibG9naWMx
    Host: localhost:16200
    Cookie: $Version=0; IDCCS_SESSIONID=Z2ZpNLQbKchmg2tVB5fpQLL2pPphT4BFX18GJPbkqkxMxLVMhbLZ!-1355344816; $Path=/
    Content-Length: 28963
    Content-Type: multipart/form-data; boundary=67xMPN-krvICaGSzKNTkd02u8MLyarA
    --67xMPN-krvICaGSzKNTkd02u8MLyarA
    Content-Disposition: form-data; name="IsJava"
    Content-Type: text/plain; charset=US-ASCII
    1
    --67xMPN-krvICaGSzKNTkd02u8MLyarA
    Content-Disposition: form-data; name="ClientEncoding"
    Content-Type: text/plain; charset=US-ASCII
    UTF-8
    --67xMPN-krvICaGSzKNTkd02u8MLyarA
    Content-Disposition: form-data; name="IdcService"
    Content-Type: text/plain; charset=UTF-8
    CHECKIN_UNIVERSAL
    --67xMPN-krvICaGSzKNTkd02u8MLyarA
    Content-Disposition: form-data; name="UserTimeZone"
    Content-Type: text/plain; charset=UTF-8
    UTC
    --67xMPN-krvICaGSzKNTkd02u8MLyarA
    Content-Disposition: form-data; name="UserDateFormat"
    Content-Type: text/plain; charset=UTF-8
    iso8601
    --67xMPN-krvICaGSzKNTkd02u8MLyarA
    Content-Disposition: form-data; name="dSecurityGroup"
    Content-Type: text/plain; charset=UTF-8
    Public
    --67xMPN-krvICaGSzKNTkd02u8MLyarA
    Content-Disposition: form-data; name="dDocAccount"
    Content-Type: text/plain; charset=UTF-8
    --67xMPN-krvICaGSzKNTkd02u8MLyarA
    Content-Disposition: form-data; name="dDocAuthor"
    Content-Type: text/plain; charset=UTF-8
    weblogic
    --67xMPN-krvICaGSzKNTkd02u8MLyarA
    Content-Disposition: form-data; name="dDocType"
    Content-Type: text/plain; charset=UTF-8
    Application
    --67xMPN-krvICaGSzKNTkd02u8MLyarA
    Content-Disposition: form-data; name="dDocTitle"
    Content-Type: text/plain; charset=UTF-8
    oddc
    --67xMPN-krvICaGSzKNTkd02u8MLyarA
    Content-Disposition: form-data; name="DocAuthor"
    Content-Type: text/plain; charset=UTF-8
    weblogic
    --67xMPN-krvICaGSzKNTkd02u8MLyarA
    Content-Disposition: form-data; name="primaryFile"; filename="00000002.1"
    Content-Type: application/octet-stream; charset=ISO-8859-1
    ˙Ř˙ŕ<file content....>

    "302 Moved Temporarily" is a web server error (I googled it - see e.g. http://www.checkupdown.com/status/E302.html)
    Two recommendations that you can try:
    - do not use 'localhost' - use computer assigned name, or at worst IP address
    - in my system, Server URL is set to http://ecm-base:16200/cs/idcplg (from ODC). Try to modify yours accordingly.

  • Regarding : Material document data and PO data do not match (Plant)

    Hi Gurus,
    Please go through this BAPI program.
    While uploading it is giving an error ' Material document data and PO data do not match (Plant) '.
    Please help regarding this issue.For all Other moment types it is working fine except this 351 moment type.
    dATA: i_excel TYPE truxs_t_text_data. "work table for excel upload
    DATA: BEGIN OF it_itab OCCURS 100,
          docdate(10),
          postdate(10),
          mvt_type(3), "Movement Type
          plant(4), "Plant
          lgort(4),
          pur_doc(10), "Purchase Document No
          po_item(3), "Purchase Document Item No
          material(18), "Material Number
         delnote(16),
          erfmg(13),
          uom(3),
         lfmng(13), "Quantity
          batch(10) TYPE c,
          vfdat TYPE vfdat,
          END OF it_itab.
    DATA: it_goodsmvt_head TYPE TABLE OF bapi2017_gm_head_01      INITIAL SIZE 100,
          it_goodsmvt_code TYPE TABLE OF bapi2017_gm_code         INITIAL SIZE 100,
          it_goodsmvt_item TYPE TABLE OF bapi2017_gm_item_create  INITIAL SIZE 100.
    DATA: wa_goodsmvt_head LIKE LINE OF it_goodsmvt_head,
          wa_goodsmvt_code LIKE LINE OF it_goodsmvt_code,
          wa_goodsmvt_item LIKE LINE OF it_goodsmvt_item.
    DATA: w_mat_doc  TYPE bapi2017_gm_head_ret-mat_doc,
          w_year     TYPE bapi2017_gm_head_ret-doc_year.
    DATA: BEGIN OF it_errmsg_goodsmvt OCCURS 10.
            INCLUDE STRUCTURE bapiret2.
    DATA: END OF it_errmsg_goodsmvt.
    DATA : obj_type LIKE bapiache09-obj_type,
           obj_key  LIKE bapiache09-obj_key,
           obj_sys  LIKE bapiache09-obj_sys.
    DATA: v_date1 TYPE sy-datum.
    DATA: v_date2 TYPE sy-datum.
    DATA: w_lines TYPE i.
    DATA: errflag.
    SELECTION-SCREEN BEGIN OF BLOCK bk1 WITH FRAME TITLE text-100.
    PARAMETERS: p_file TYPE  rlgrap-filename.
    SELECTION-SCREEN END OF BLOCK bk1.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
      CALL FUNCTION 'F4_FILENAME'
        EXPORTING
          field_name = 'P_FILE'
        IMPORTING
          file_name  = p_file.
    Start-of-selection processing
    START-OF-SELECTION.
      CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'
        EXPORTING
          i_line_header        = 'X'
          i_tab_raw_data       = i_excel
          i_filename           = p_file
        TABLES
          i_tab_converted_data = it_itab[]
        EXCEPTIONS
          conversion_failed    = 1
          OTHERS               = 2.
      IF sy-subrc <> 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
      LOOP AT it_itab.
        REFRESH it_goodsmvt_head.
        REFRESH it_goodsmvt_item.
        CONCATENATE it_itab-docdate6(4) it_itab-docdate3(2) it_itab-docdate+0(2) INTO v_date1.
        CONCATENATE it_itab-postdate6(4) it_itab-postdate3(2) it_itab-postdate+0(2) INTO v_date2.
        wa_goodsmvt_head-pstng_date = v_date2.
        wa_goodsmvt_head-doc_date   = v_date1.
       wa_goodsmvt_head-ref_doc_no = it_itab-delnote.
    wa_goodsmvt_head-pr_uname   = sy-uname.
        APPEND wa_goodsmvt_head TO it_goodsmvt_head.
    Maintain it_goodsmvt_code
        wa_goodsmvt_code-gm_code    = '04'.
    Maintain it_goodsmvt_item
    *LOOP AT it_itab.
    IF wa_goodsmvt_item-po_number IS INITIAL.
        wa_goodsmvt_item-po_number    = it_itab-pur_doc.
        wa_goodsmvt_item-move_type    = it_itab-mvt_type.
        wa_goodsmvt_item-MOVE_PLANT      = it_itab-plant.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            input  = it_itab-material
          IMPORTING
            output = it_itab-material.
        wa_goodsmvt_item-material     = it_itab-material.
        wa_goodsmvt_item-stge_loc     = it_itab-lgort.
        wa_goodsmvt_item-po_item      = it_itab-po_item.
        wa_goodsmvt_item-entry_qnt    = it_itab-erfmg.
        wa_goodsmvt_item-ENTRY_UOM_ISO    = it_itab-uom.
       wa_goodsmvt_item-po_pr_qnt    = it_itab-lfmng.
        wa_goodsmvt_item-batch        = it_itab-batch.
        wa_goodsmvt_item-expirydate   = it_itab-vfdat.
       wa_goodsmvt_item-NO_MORE_GR   = 'X'.
        wa_goodsmvt_item-mvt_ind      = 'B'.
        APPEND wa_goodsmvt_item TO it_goodsmvt_item.
        CALL FUNCTION 'BAPI_GOODSMVT_CREATE'
          EXPORTING
            goodsmvt_header  = wa_goodsmvt_head
            goodsmvt_code    = wa_goodsmvt_code
          IMPORTING
            materialdocument = w_mat_doc
          TABLES
            goodsmvt_item    = it_goodsmvt_item
            return           = it_errmsg_goodsmvt.
    Process of commit work
        IF it_goodsmvt_head[] IS NOT INITIAL.
          DESCRIBE TABLE it_goodsmvt_head LINES w_lines.
        ENDIF.
        IF it_goodsmvt_item[] IS NOT INITIAL.
          DESCRIBE TABLE it_goodsmvt_item LINES w_lines.
          CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
            EXPORTING
              wait = 'X'.
        IMPORTING
        RETURN        =
          CLEAR errflag.
          READ TABLE it_errmsg_goodsmvt INDEX 1.
          IF it_errmsg_goodsmvt-type EQ 'E'.
            WRITE:/'Error in function', it_errmsg_goodsmvt-message.
            errflag = 'X'.
          ELSE.
            WRITE:/ it_errmsg_goodsmvt-message.
          ENDIF.
          IF errflag IS INITIAL.
            COMMIT WORK AND WAIT.
            IF sy-subrc NE 0.
              WRITE:/ 'Error in updating'.
              EXIT.
            ELSE.
              WRITE:/ 'Material Document created successfully and the Document Number for the Material',
                      wa_goodsmvt_item-material,'is:', w_mat_doc, w_year.
            ENDIF.
          ENDIF.
        ENDIF.
      ENDLOOP.

    Hey,
    Just wanted to post that in my case this was the error of MVT_IND field in item table. When I made it from 'B' to blank then it worked.
    Mine is solved....
    Thanks

  • Can I use ExtendScript to store info about an Illustrator document externally and recover it later?

    What I want to do is this:
    1. Iterate through all the layers in a document (recursively) and discover each layer's NAME, VISIBLE, and LOCKED properties.
    2. Create an object that contains those properties.
    3. Push the object onto a second array.
    4. Store that second array somewhere, preferably in a file (text?) in the same directory as the AI document.
    5. Load that file at a later date as an object array.
    6. Use the object array to iterate through the illustrator document to conform the current state of that document to the stored states in the array.
    Ideally I would like to be able to store a number of separate states in the same document and refer to them somehow.
    As you may have guessed by now, this is my attempt to make a LayerComps feature for Illustrator that I could use to turn visibilities on and off and then export the result, moving on from one state to the next until all the states I am interested in would be exported. I would settle for being able to do it one at a time.
    I can already do steps 1-3 (shown in blue).
    var doc = app.activeDocument;
    var docName = doc.name;
    var layerStates = [];
    var layerCount = doc.layers.length;
    var count = 0;
    function addLayers(layerArray) {
            for (var i=0; i<layerArray.length; i++) {
                // create an object representing a layer state
                var o = {};
                o.name = layerArray[i].name;
                o.visible = layerArray[i].visible;
                o.locked = layerArray[i].locked;
                layerStates[count] = o;
                count++;
                // if this layer has layers of its own, iterate through those
                if (layerArray[i].layers.length > 0) {
                        addLayers(layerArray[i].layers);
    addLayers(doc.layers);
    // show that we did something, incomplete though it is
    var s = "";
    for (var i=0; i < layerStates.length; i++) {
            s += layerStates[i].name + ": ";
            s += (layerStates[i].visible ) ? "visible" : "invisible";
            s += ", ";
            s += (layerStates[i].locked ) ? "locked" : "unlocked";
            s += "\n";
    alert(s);
    I don't know if it is possible to export that data as XML or even a text string and save it as a file on the file system for later parsing. Anyone have any thoughts about this? Is it possible?
    Currently I am using a restrictive version of a LayerComps script I created, which iterates through a top layer's sublayers, turning each on and exporting as PDF, then turning it off and moving to the next. This is more convenient than doing it by hand, but it really forces me to compartmentalize all "views" of a document in a way that does not lend it self to efficiency and forces redundant copying of pathItems between layers.
    Thoughts?

    Also good, and thanks again for your help. I wasn't sure if ExtendScript implemented the eval() method, necessary to re-objectify a JSON string, because I can't find it in the documentation, but I do see it used in some examples elsewhere. I've successfully written XML files at this point, and when I get a few minutes I'll work on the reading/modifying/exporting part. In the long run, XML files are easier to read, manipulate and maintain, so I'll probably go that route.
    var doc = app.activeDocument;
    var docName = doc.name;
    var xml = new XML("<root></root>");
    var layerStates = [];
    var layerCount = doc.layers.length;
    var count = 0;
    function addLayers(layerArray, xmlObj) {
        for (var i=0; i<layerArray.length; i++) {
            // create an object representing a layer state
            var lay = layerArray[i];
            var x = new XML("<layer/>");
            x.@name = lay.name;
            x.@visible = lay.visible;
            x.@locked = lay.locked;
            xmlObj.appendChild(x);
            layerStates[count] = x.toXMLString();
            count++;
            // if this layer has layers of its own, iterate through those
            if (lay.layers.length > 0) {
                addLayers(lay.layers, x);
    addLayers(doc.layers, xml);
    var xmlFile = new File();
    xmlFile.open('w');
    xmlFile.write(xml);
    xmlFile.copy ('C:/Program Files (x86)/Adobe/Adobe Illustrator CS4/Presets/en_US/Scripts/data.xml');
    xmlFile.close();
    All in all, the documentation for this stuff leaves a little something to be desired. My original question had more to do with how file read and write text streams was handled. The answer was actually much simpler than I anticipated. All this stuff is, once you get a handle on it, but the docs are so stingy on particulars — does it really help us to know about the XML class merely that it "wraps XML into an object" or that XML.attribute(name) "returns a list containing all attribute elements matching the given name"? I finally worked it out for myself that the XML object may be manipulated using dot syntax (x.name, x.@name), but that was certainly not mentioned anywhere.
    Ah, well. The journey is the reward, right?

  • Java WSDP 1.4 is not parsing SOAP Exceptions

    We used Java WSDP 1.4 toolkit to generate stubs for webservices. We used Tomcat 5.1 as the web container. When methods of the webservice are invoked which do not return SOAP exception responses, WSDP is able to properly parse the response and display the resutls correctly. But when the responses contains SOAP exceptions, WSDP always returns
    "java.rmi.RemoteException: Runtime exception; nested exception is: trailing block elements must have an id attribute".
    But other toolkits like Axis 1.1,.Net,ColdFusionMX,Glue are returning proper exceptions messages. The following is the exception message received from the other toolkits for the same method invocation.
    "Exception has been thrown by the target of an invocation. '1000:Invalid data source name 'invalid_String'"
    Apart from Java WSDP all the other toolkits that we mentioned are able to parse the exception message properly and display the same.
    Any ideas why the toolkit is behaving like this. All the versions of Java WSDP that have come till date have a similar problem. We would be happy to hear any responses for the problem the we are facing in Java WSDP 1.4. At present we have decided not to use the toolkit for any web service development.

    Am specifying the URL of the WSDL file for which we are unable to get proper SOAP Exceptions, whenever they are generated. Whenever we give valid values while invoking the methods, the response is properly parsed, but when a SOAP Exception is supposed to be generated, it generally returns the Runtime exception that we mentioned. Can you please look into it and identify the reason about why it is failing. In case you are able to run it through properly, please attach the code that would make it work properly.
    The URL is :
    http://arcweb.esri.com/services/v2/PlaceFinderSample.wsdl

  • Parse failed: Exception DBD, The supplied XML is not valid[Measures].[SAP_OBJECT_NAME] State:N/A error for hidden KFs when migrated to HANA

    Hi All
    Please help me with the following query. We are migrating SAP BW 7.4 on Oracle to HANA. We have few WEBI report's universes built on BEx queries. In one of those reports there are some hidden RKFs, these works perfectly fine in reports based on oracle. Now we migrated to HANA in development system and when i refresh the universe structure they started giving errors like "Parse failed: Exception DBD, The supplied XML is not valid[Measures].[SAP_OBJECT_NAME] State:N/A". The object giving this error is in hidden state. I tried to unhide it and run the report then it runs fine but that not the client want as there might be so many hidden KFs in other reports also. BO version is 4.1 SP 2. We are on SAPKW74006 support package on BW side. Is there any notes to correct this error. Please pass me the relevant links. Highly appreciate your help.
    Thanks
    Dwaraka

    DCA-40012: The Web Service call failed. A connection to the target Web Service could not be created.
    First of all test the web service you have created in model project. Right click the web service name and select "Test WebService". If you see any issue(s) while testing fix it first before you run the jspx page.
    Check the port number in the URL and connections.xml, it have to be same.

  • SAX-parser and mapping on the XI

    Helllo everybody,
    I'm trying to map an xml-document using the SAX-parser.
    I'm reading the data using an impustream. the problem is, while testing on the XI, the following message comes :
    Creating Java mapping xmlDataExchangeSAPSample/XMLValidation
    Loaded class xmlDataExchangeSAPSample.XMLValidation
    Loaded class xmlDataExchangeSAPSample.myErrorHandler
    Call method execute of the application Java mapping xmlDataExchangeSAPSample.XMLValidation
    START APPLICATION TRACE ***
    xxx implementierende Klasse Parserscom.sap.engine.lib.jaxp.SAXParserFactoryImpl
    erstelltes Dokument aus in EDIFACTINTERCHANGE
    Beginn Parsenjava.io.ByteArrayInputStream@1aa342a3
    SAXException when parsing Generic Exception:
    com.sap.engine.lib.xml.util.NestedException -> com.sap.engine.lib.xml.parser.ParserException -> java.io.IOException: Parsing an empty source. Root element expected!
    END APPLICATION TRACE ***
    Java mapping xmlDataExchangeSAPSample/XMLValidation completed. (execute() of xmlDataExchangeSAPSample.XMLValidation
    Ausführung war erfolgreich.
    10:18:14 Testende
    the the Document ist generated :
    "...erstelltes Dokument aus in EDIFACTINTERCHANGE.."
    but the parser find an empty source.
    do you have an idea what could be happening here?
    Kind regards

    Hi,
      <<
    xxx implementierende Klasse Parserscom.sap.engine.lib.jaxp.SAXParserFactoryImpl
    erstelltes Dokument aus in EDIFACTINTERCHANGE
    Beginn Parsenjava.io.ByteArrayInputStream@1aa342a3
    SAXException when parsing Generic Exception:
    com.sap.engine.lib.xml.util.NestedException -> com.sap.engine.lib.xml.parser.ParserException -> java.io.IOException: Parsing an empty source. Root element expected!
    >>
    This seems that u r trying parse a file rather than valid XML document..
    Usually you will notice this problem when u r trying to parse a payload which is in txt format usually when u r using File Adapter message protocol as "FILE" instead of "FCC".
    Usually SAX is an API Desinged to parse Valid XML Documents only.
    If you want to do manipulations on NON XML data better to use Java.io.InputStream & OutputStream.
    Regards,
    Rao.Mallikarjuna

  • Question About Xerces Parser and Java  JAXP

    Hi,
    I have confusion about both of these API Xerces Parser and Java JAXP ,
    Please tell me both are used for same purpose like parsing xml document and one is by Apache and one is by sun ?
    And both can parse in SAX, or DOM model ?
    Is there any difference in performane if i use xerces in my program rather then JAXP, or is ther any other glance at all.
    Please suggest some thing i have and xml document and i want to parse it.
    Thanks

    Hi
    Xerces is Apaches implementation of W3C Dom specifiacation.
    JAXP is a API for XML parsing its not implementation.
    Sun ships a default implementation for JAXP.
    you have factory methods for selecting a parser at run time or you can set in some config file about what is the implementaion class for the SAXParser is to be chosen (typically you give give the class file of xerces sax parser or dom parser etc..)
    go to IBM Developerworks site and serch for Xerces parser config. which have a good explination of how to do it.
    and browse through j2ee api .may find how to do it.

  • Parsing and Indexing

    I am writing a PL/SQL routine to parse, identify individual words from a string (NVARCHAR2/NCLOB) and store them as individual words in an "index" table so they can be searched upon later. My lack of experience in NLS shows here. My question is...When parsing the NVARCHAR2/NCLOB strings how do I identify which characters should be part of a word and which are expendable (punctuation, etc). Do I have to store and manage characters from each locale and then identify the local prior to parsing and indexing? This seems like an incredible amount of work not to mention needing somebody that understands each locale. Any help is appreciated.
    Thanks,
    Greg
    null

    This seems like an incredible amount of work not to mention needing somebody that understands each localeYes it is. Thats why Oracle has a product called Oracle Text. Oracle Text uses standard SQL to index, search, and analyze text and documents stored in Oracle8i, in files and on the Web. It also indexes metadata extracted from image, audio, and video media by Oracle interMedia. It supports 39 langauges.
    Check out http://technet.oracle.com/products/intermedia/ and click Oracle Text for more information
    null

  • File not found and exception during commit of transaction

    Hi All,<p></p>
    We are using weblogic 8.1 sp5 and oracle 9.2. In a business process (jpd), I am getting this message and exception immediately after publishing a request document(xml) to a channel and goes to the next process node and the process aborts. Any thoughts are appreciated. Please let me know soon.
    <p></p>
    Thanks in advance!<p></p>
    Prashant
    <p></P>
    <u>Message:</u>
    Could not find a file for class oracle.jdbc.driver.T4CXAConnection
    <p></P>
    If I hit continue while debugging then I get this <u>exception:</u><p></P>
    <Error> <EJB> <BEA-010026> <Exception occurred during commit of transaction Xid=BEA1-0049BFC11227BCBD651D(24359063),Status=Rolled back. [Reason=javax.ejb.EJBException: Exception on insert: java.lang.RuntimeException: Unable to serialize invocable],numRepliesOwedMe=0,numR
    epliesOwedOthers=0,seconds since begin=645,seconds left=60,XAServerResourceInfo[JMS_cgJMSStore]=(ServerResourceInfo[JMS_cgJMSStore]=(state=rolledback,assigned=qbAdmin),xar=JMS_cgJMSStore,re-Registered = false),XAServerResourceInfo[cgPool]=(ServerResourceInfo[cgPool]=(state=rolledback,assigned=qbAdmi
    n),xar=cgPool,re-Registered = false),SCInfo[qbDomain+qbAdmin]=(state=rolledback),SCInfo[current+qprocwlp1]=(state=rolledback),properties=({}),local properties=({modifiedListeners=[weblogic.ejb20.internal.TxManager$TxListener@397bfb], weblogic.jdbc.jta.cgPool=weblogic.jdbc.wrapper.TxInfo@4eb65b}),Own
    erTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=qbAdmin+10.1.130.38:7003+qbDomain+t3+, XAResources={JMS_FileStore, JMS_QProcureFileStore, cgPool, JMS_cgJMSStore, bpmArchPool},NonXAResources={})],CoordinatorURL=qbAdmin+10.1.130.38:7003+qbDomain+t3+): javax.ejb.EJBException:
    Exception on insert: java.lang.RuntimeException: Unable to serialize invocable at com.bea.wlw.runtime.core.bean.BMPContainerBean.ejbStore(BMPContainerBean.java:1837) at com.bea.wli.bpm.runtime.ProcessContainerBean.ejbStore(ProcessContainerBean.java:193) at com.bea.wli.bpm.runtime.ProcessContainerBean.ejbStore(ProcessContainerBean.java:171) at com.bea.wlwgen.PersistentContainer_bajz39_Impl.ejbStore(PersistentContainer_bajz39_Impl.java:149)at weblogic.ejb20.manager.ExclusiveEntityManager.beforeCompletion(ExclusiveEntityManager.java:593) at weblogic.ejb20.internal.TxManager$TxListener.beforeCompletion(TxManager.java:737) at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1026) at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:116) at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1202) at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1974) at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:257) at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:228) at weblogic.ejb20.internal.MDListener.execute(MDListener.java:430) at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:333) at weblogic.ejb20.internal.MDListener.onMessage(MDListener.java:298) at weblogic.jms.client.JMSSession.onMessage(JMSSession.java:2686) at weblogic.jms.client.JMSSession.execute(JMSSession.java:2598) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    Caused by: java.lang.Exception: Exception on insert: java.lang.RuntimeException: Unable to serialize invocable
    at .bea.wlw.runtime.core.bean.BMPContainerBean.doInsert(BMPContainerBean.java:1909) at com.bea.wlw.runtime.core.bean.BMPContainerBean.ejbStore(BMPContainerBean.java:1817)... 18 more
    Caused by: java.lang.RuntimeException: Unable to serialize invocable at com.bea.wlw.runtime.core.container.Invocable.toByteArray(Invocable.java:812) at com.bea.wlw.runtime.core.bean.BMPContainerBean.doInsert(BMPContainerBean.java:1859)... 19 more
    Caused by: java.io.NotSerializableException: java.util.AbstractList$ListItr at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1054)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
    at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1332)
    at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1304)
    at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1247)
    at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1052)
    at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:278)
    at com.bea.wlw.runtime.core.container.Invocable.toByteArray(Invocable.java:803)
    ... 20 more
    --------------- nested within: ------------------
    weblogic.transaction.RollbackException: Unexpected exception in beforeCompletion: sync=weblogic.ejb20.internal.TxManager$TxListener@397bfb
    Exception on insert: java.lang.RuntimeException: Unable to serialize invocable - with nested exception:
    [javax.ejb.EJBException: Exception on insert: java.lang.RuntimeException: Unable to serialize invocable] at weblogic.transaction.internal.TransactionImpl.throwRollbackException(TransactionImpl.java:1684) at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:311) at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:228) at weblogic.ejb20.internal.MDListener.execute(MDListener.java:430) at weblogic.ejb20.internal.MDListener.transactionalOnMessage(MDListener.java:333)

    One possible cause of this issue is that your JPD may have some non-transient field(s) which is/are not Serializable. Check for the warnings in the Workshop, that may point you to such fields.
    ~Balwinder

  • Example IFS parser and renderer

    Hi
    I was wondering if someone could provide me with some sample code of a very simple parser and renderer to get me going on my java for this.
    In 9ifs there already is an example of a parser called SimplestParser which extracts information from between the <title>...</title> tags from a html document. The example then lets you apply this to html documents for which the extension .html is changed to .cus (for custom). The XML is given to create a custom class and associate the extension with that parser.
    What is not there is a renderer that displays this information back to the user (of what is between the <title>...</title> tags). I assume a renderer would display this in the IFS web interface when you go to Edit -> Properties.
    Would enyone be able to provide me with sample code for such a renderer, or alternatively a complete parser/renderer complementary set, extracting and displaying simple custom attibute(s) for a particular file type?
    That would greatly help me out.
    Thanks very much.
    Hugo

    I have another problem with custom parser. It doesn't work with versioned documents:
    I have versioned file in iFS, if I parse and upload new version of that file I get Error: File already exists. I think that I should somehow set the family of doument which I want to parse & upload. But I don't know how.
    null

  • Memory Leakage while parsing and schema validation

    It seems there is some kind of memory leakage. I was using xdk 9.2.0.2.0. Later i found that from this forum which contain a Topic on this and they (oracle ) claim they have memory leakage. And they have fixes this bugs in 9.2.0.6.0 xdk. When i used truss command, for each call to parser and schame validation, it was opening file descriptor for lpxus and lsxus file. And this connections were not close. And keep on openning it with each call to parser. I was able to diagonise this using truss command on on solaris. After making many calls, i was error message could not open file Result.xsd (0202). I am using one instance of Parser and Schema. And i am doing clean up for parser after each parse.
    Later i downloaded, 9.2.0.6.0,
    Above problem for the parser was solvedm but still the problem continued for schema validation. And even i tried with latest beta release 10.
    And this has caused great troubles to us. Please can u look whether there is come sort of leakage. Please advice if u have any solution.
    Code---
    This below code is called multiple times
    char* APIParser::execute(const char* xmlInput) {
              char* parseResult = parseDocument(xmlInput);
              //if(strcmp(parseResult,(const char*)"")==0) {
    if(parseResult == NULL) {
                   parseResult = getResult();
    parser.xmlclean();
         return parseResult;
              } else {
                   return parseResult;
    Parser and schema are intialised in Construtor and terminated in Destructor.

    Hi, here is the complete test case
    #include<iostream>
    #ifndef ORAXML_CPP_ORACLE
    # include <oraxml.hpp>
    #endif
    using namespace std;
    #define FAIL { cout << "Failed!\n"; return ; }
    void mytest(int count)
         uword ecode;
         XMLParser parser;
         Document *doc;
         Element root, elem;
         if (ecode = parser.xmlinit())
              cout << "Failed to initialze XML parser, error " << ecode << "\n";
              return ;
         cout << "\nCreating new document...\n";
         if (!(doc = parser.createDocument((oratext *) 0, (oratext *) 0,(DocumentType *) 0)))
         FAIL
         if (!(elem = doc->createElement((oratext *) "ROOT")))
                   FAIL
         string test="Elem";
         for(int i=0;i<count;i++)
              //test="Elem"+string(ltoa(i));
              if (!(elem = doc->createElement((oratext *) "element")))
                   FAIL
              if (!doc->appendChild(elem))
                   FAIL
         //doc ->print();
         //parser.xmlclean();
         parser.xmlterm();
    int main(int argc,char* argv[])
         int count=atol(argv[1]);
         mytest(count);
         char c;
         cout<<"check memory usage n press any key"<<endl;
         cin>>c;
         return 0;
    -------------------------------------------cut here-----
    Now, i cant use the xdk 10g because i work on a hpux machine. I have tried the above program with a count of 1000000. the memory usage at the end was around 2 gigabytes.
    Could someone please please help me? :(
    Thank you.

Maybe you are looking for