Throws validation errors to NWPM

Hi All,
I am working on a proxy to jdbc scenario in which we have to throw validation errors to NWPM(Net Weaver Process Monitor Tool)
I am following the below steps,
step 1 - In message mapping a UDF is created to catch errors and store them in a variable using dynamic configuration
step 2 - writing abap mapping for handling this thrown exception and im reading the dynamic configuration in the abap class and raising exception. The exception format expected is
SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SAP:Category>XIServer</SAP:Category>
<SAP:Code area="RCVR_DETERMINATION">NO_RECEIVER_CASE_ASYNC</SAP:Code>
<SAP:P1>ZPI_THROW_EXCEPTION</SAP:P1>
<SAP:P2>001</SAP:P2/>
<SAP:P3>Mandatory field is missingBUKRS </SAP:P3>
<SAP:AdditionalText />
<SAP:Stack>No receiver could be determined</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
but while i am trying to  test the data in message mapping it will show one error.
and with out using abap code it works successfully but while i am adding Abap code in interface mapping it will show the following error.
"Runtime exception when processing target-field mapping /ns0:MT_DB2_SourcePlant/Record/SourcePlant; root message: Exception:[java.lang.NullPointerException: while trying to invoke the method com.sap.aii.mapping.api.DynamicConfiguration.put(com.sap.aii.mapping.api.DynamicConfigurationKey, java.lang.String) of an object loaded from local variable '<9>'] in class CHRYSLER_com_test_scenario.ErrorHandling method testingError[, 4, , com.sap.aii.mappingtool.tf7.rt.Context@749119e6]"
I have written the following ABAP code to achieve this:
method IF_MAPPING~EXECUTE.
DATA l_record type mpp_dynamic.
DATA error type String.
getting dynamic configuration value
filled in by any previous mapping
CALL METHOD DYNAMIC_CONFIGURATION->GET_RECORD
EXPORTING
NAMESPACE = 'http://sap.com/xi/XI/System/ERROR'
NAME = 'ERROR'
RECEIVING
RECORD = l_record.
error = l_record-value.
*raising exception with our message
RAISE EXCEPTION TYPE CX_MAPPING_FAULT
EXPORTING
TEXTID =
PREVIOUS =
ERROR_CODE = '001'
ERROR_TEXT = error .
RAISE EXCEPTION TYPE CX_MAPPING_FAULT
EXPORTING
TEXTID =
PREVIOUS =
ERROR_CODE = '003'
ERROR_TEXT = error .
endmethod.
I am gettign the following message for our code:
SAP:Error SOAP:mustUnderstand="" xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SAP:Category>XIServer</SAP:Category>
<SAP:Code area="RCVR_DETERMINATION">NO_RECEIVER_CASE_ASYNC</SAP:Code>
<SAP:P1 />
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText />
<SAP:Stack>No receiver could be determined</SAP:Stack>
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
Could you please help in finding the solution for getting currect error message from ABAP class?

Hello,
The ABAP code looks ok except the missing if error != null statement.
Please check the similar code for raising exception provided in the below blog:
/people/ravi.gupta4/blog/2010/02/04/automating-cancellation-of-a-failed-message-in-xi
Also, Can you check whether exception is raised using Dynamic config UDF and a call to abap mapping is made.
Check the other approach of raising an exception:
/people/alessandro.guarneri/blog/2006/01/26/throwing-smart-exceptions-in-xi-graphical-mapping
-Rahul

Similar Messages

  • Call to ALDP 3.2 dataservice using  Mediator API throwing validation error

    Hi,
    Call to ALDP 3.2 dataservice using Mediator API with request doc having xsi:type (eg: <ns1:searchBy xsi:type="ns2:ImplXXXIDType">) is throwing validation saying that it is unable to resolve the namespace ns2 .The namespace ns2 is defined at root level. If the namespace ns2 is defined at the element level like this
    <ns1:searchBy xsi:type="ns2:ImplXXXIDType" xmlns:ns2="http://www.xxx.com/xyz/datastructure/1/"> it is working fine. We never had this issue with ALDSP 2.5 Mediator API.
    Any suggestions or help would be most welcome!
    Thanks,
    Gkumar

    Ok. Now you need to put enough information on the case for someone to investigate. Please attach instructions on how to create a data space that will show this problem. Since customer support will not have your database etc. , if you just create an empty ds function in the same ds as the one that has the problem, like so...
    function dummyFunction() as element(....)* {
    and then replace the () with the output from the Test View so it looks like...
    function dummyFunction() as element(....)* {
    <myElement ....>
    <otherElement ...>
    </myElement>
    Once you have a dummy function like that which demonstrates the problem, export your dataspace and attach it to the case.
    If you anticipate some of the questions that customer support is going ot ask you (including providing a reproducer), you will save yourself many days (or weeks) of time.

  • Component not throwing validation error even if there is required in .jsff

    I have component in my jsff page which has required validation however it still allows user to proceed without entering values following is my code
    <panelLabelAndMessage id="plam1"
    visible="true"
    label="Label"
    binding="#{backingBeanScope.MyClass.plam1}">
    <inputListOfValues id="ilovDataEntryBranch"
    readOnly="#{pageFlowScope.MyClassHelper.taskflowReadOnly}"
    required="true"/>
    <panelLabelAndMessage>
    Still this component doesnt throw error of required field validation.
    Please help.

    Dear,
    Check is there any pending STO and delivery for this material in system because if there are some pending document means your material is block there. So, kindly delete this pending delivery and STO then only you are able to do PGI for material.
    For check pending delivery use T.Code VL06O --- > List outbound delivery --> in material data tab ---> enter material ---> then in Status : Outb. Delivs. ---> Total gds mvt stat. = A. ---> Execute.
    May be it will help you.
    Regards,
    Sandip

  • Validation error for non-null throws false error condition

    I am trying to perform a DML (INSERT) with a form element (textbox) that has been disabled on the form.
    The objective is to allow the user to:
    1) disable a form element using javascript when a radio element is selected - works OK using an onclick event
    2) user clicks a button to ENTER (perform a INSERT DML) - here the validation throws an error but I have enabled the previously disabled form element and I have used $x_Value() to input a value into the form element by onsubmit event on button.
    If I remove the validation error trap the DML saves the appropriate value.
    I can create two buttons and it works:
    1 button to enable fields that were previously disabled
    2 button to perform DML. (works if after button 1 I set focus on any form field with my mouse.)
    Any help would be appreciated.
    marshall

    Knight,
    Thanks for your interest in helping.
    I am trying not to create a situation w/bugs and such. I think I can devise a work around but I would like a more "correct" solution. ;-)
    To explain what I am doing I have a form that a person can use to enter a complaint. The person can give their last - middle - first name but they can also decide to be anonymous. If anonymous they click checkbox. Onclick of checkbox I fire javascript to disable name fields and place "Anonymous" in the last_name disabled field. The user can enter other data and when the user clicks ENTER I want to insert into the DB but the validation error trap of APEX sees a disabled field as a null. I want to place "Anonymous" in the last name field and then save the record with other data besides name.
    To add to it - I can create two buttons 1-button enables and 2-button inserts and the same code works if I touch( give focus) to a field in between enabling and inserting into the DB
    Does that help explain better.
    Thanks again - hope you or someone can help - best regards.

  • Calendar Component and validation errors

    Hi,
    For the first time I am trying to use the Calendar component to insert a date field in my SQL Server db.
    The problem: I can insert a date column only if its of type java.sql.Timestamp.
    As Timestamp extends the date object..
    I tried to bind the selectedDate field as <Timestamp> Object[refractored in my class file] and when i tried to update by DB it throwing a Validation error.
    If I bind it as a Date Object directly I am getting an EvaluvationException
    as date objects cannot be inserted directly
    Am i missing something here or is there a proper way of implementing it.

    Its a fairly direct question about object conversion problem in creator
    Basically the selectedDate parameter of the JSC Calendar component
    needs to be pointed to a Date Object
    If we need to insert that date information to a SQL Server column the equivalent data type should be java.sql.Timestamp which extends Date.
    So if we point the selectedDate parameter as a Timestamp object the creator throws an illegal argument exception.
    Can some one clarify how to resolve this issue?

  • Validation error message in a confirmation box.

    To provide any validation error messages i am using the throw OAException, but that displays at the top of the page where many times users dont even notice it. i want to be able to instead display the error msg in a confirmation box that has just the OK button to make sure user has seen the message......
    how do i do that ? (i do not want to use the DialogPage becos that takes me to another page and also is not for raising exceptions).
    thank you.

    Hi,
    You have to use OADailogue region to achieve this. Please follow below code units to create a dialogue page and display an error message.
    OADialogPage dialogPage = new OADialogPage(OAException.WARNING, message, null, "", "");
    String yes = pageContext.getMessage("AK", "FWK_TBX_T_YES", null);
    String no = pageContext.getMessage("AK", "FWK_TBX_T_NO", null);
    dialogPage.setOkButtonItemName("DeleteYesButton");
    dialogPage.setNoButtonItemName("DeleteNoButton");
    dialogPage.setOkButtonToPost(true);
    dialogPage.setNoButtonToPost(true);
    dialogPage.setRetainAMValue(true);
    dialogPage.setPostToCallingPage(true);
    dialogPage.setOkButtonLabel(yes);
    dialogPage.setNoButtonLabel(no);
    java.util.Hashtable formParams = new java.util.Hashtable(1);
    formParams.put("foo","value");
    dialogPage.setFormParameters(formParams);
    pageContext.redirectToDialogPage(dialogPage);
    Thanks
    Bharat

  • Endeca : multi invoice pay throwing correct error for internal user but it is failing to throw the same error for external user

    Hi,
    1) Internal User expected exception:
    Exception: Payments,apply credits,disputes and print are not supported when multiple customer/currency transactions are selected
    2) External User is throwing below error instead of throwing above exception.
    Error
      You are trying to access a page that is no longer active.
      The referring page may have come from a previous session. Please select Home
       to proceed.
    found this MACCHECK from fnd logs of external user payment.
    MACCHECK: . Parameter failing validation is :mode. The parameter mode with value MultiPay could not be recognized as part of Server's response on the previous request.  Incoming URL is : /OA_HTML/OA.jsp?page=/oracle/apps/ar/irec/endeca/webui/EndecaDummyPG . Current URL is : /OA_HTML/OA.jsp?page=/oracle/apps/ar/irec/endeca/webui/OIREndecaCustHomePG&akRegionApplicationId=222&_ti=1125493452&oapc=10&retainAM=Y&addBreadCrumb=N&oas=6-LL4ndIUFLX-2zjQAQD6A.. . Referer URL is : https://<hostname>:4443/endeca/web/ar/customer?doAsUserLanguageId=en_US&languageId=en_US . HTTP Request Method is : POST
    can someone please help.
    Thanks,
    RRS

    Well, I compared my classpath between my windows batch file and the
    makefile (that comes with the samples installation) on Solaris and realized
    that I am using different sets of jars.
    So, I removed the extra jars from the makefile to narrow down the
    problem. If I remove the /opt/SUNWam/lib/servlet.jar from the makefile,
    I can reproduce this problem on the Solaris box as well.
    When I include this servlet.jar on my windows machine the program works!
    Only jars I have in my classpath are amclientsdk.jar and servlet.jar which
    I have copied from my installation (/opt/SUNWam/lib) on the Solaris box.
    Just the same way, by copying the am_services.jar, saaj-api.jar, and jaxm-api.jar,
    from the Solarix box to the windows machine,
    I am also able to pull the assertions from the Access Manager.
    I installed Sun Java Enterprise System 2005Q1 on a Solaris 10 machine.
    During the installation, I configured to install the Access Manager
    in Sun Application Server.
    Why do I need to have different set of jars on the windows machine
    for the Access Manager client SDK ?
    Could you please point me to a download link where I could download
    the correct Windows Access Manager Client SDK for
    Sun Java System Access Manager 6.0 (Sun JES 2005Q1)?
    Thanks.

  • B2B-51507- Payload validation error - 11.1.1.7 Latest Version

    Anuj/Nitesh (B2B Gurus)
    I am facing a problem when Posting the message from SOA to B2b (XML->EDI) using the B2b Adapter.
    Flow is : Ebusiness->PLSQL->AQ->BPEL->B2B.  Once the message is posted to B2b It is throwing the following Error.
    But I am passing all the mandatory and Optional Parameters.
    Tried the Following Threads, But No luck. I am passing all the Mandatory Parameters.
    How to map Internal-Properties in XSLT.
    Oracle B2B Payload Validation exception
    Scenario - 1 (Success No Errors , Output Does not Contain PO Details)
    Disabled the Validate flag in the Partner Agreement for the B2B Document.
    Verified the B2b Wired Message, Output got generated but without the PO information I am passing from BPEL.
    Scenario - 2 (Error )
    Enabled the Validate flag in the Partner Agreement for the B2B Document. The system is generating an error and throwing list of errors.
    Error
    Id
    C064016C14103689486000005559CD14
    Message Id
    C064016C14103688C7F000005559CD0F
    Refer To Message
    Refer To Message
    Sender Type
    Name
    Sender Value
    ABC
    Receiver Type
    Name
    Receiver Value
    TEST123
    Sender
    ABC
    Receiver
    TEST123
    Agreement Id
    EDI_850_tpa_Lt7763342564515893374
    Agreement
    XXX_EDI_X12_4010_850_Outbound
    Document Type
    850
    Document Protocol
    EDI_X12
    Document Version
    4010
    Message Type
    REQ
    Direction
    OUTBOUND
    State
    MSG_ERROR
    Acknowledgement Mode
    NONE
    Response Mode
    NONE
    Send Time Stamp
    9/9/2013 10:48
    Receive Time Stamp
    9/9/2013 10:48
    Document Retry Interval(Channel)
    0
    Document Remaining Retry(Channel)
    0
    Document Retry Interval(Agreement)
    0
    Document Remaining Retry(Agreement)
    0
    Native Message Size
    Translated Message Size
    5471
    Business Action Name
    Business Transaction Name
    Xpath Name1
    XPathName1
    Xpath Value1
    Xpath Expression1
    Xpath Name2
    XPathName2
    Xpath Value2
    Xpath Expression2
    Xpath Name3
    XPathName3
    Xpath Value3
    Xpath Expression3
    Correlation From XPath Name
    CorrelationFromXPathName
    Correlation From XPath Value
    Correlation From XPath Expression
    Correlation To XPath Name
    CorrelationToXPathName
    Correlation To XPath Value
    Correlation To XPath Expression
    Wire Message
    Wire Message
    Application Message
    Application Message
    Payload Storage
    Payload Storage
    Attachment
    Attachment
    Label
    soa_b2b_ - Thu Sep 05 11:51:44 CDT 2013 - 4
    Collaboration Id
    C064016C14103688E1A000005559CD13
    Collaboration Name
    Collaboration Version
    Business Action Name
    Exchange Protocol Name
    Generic File
    Exchange Protocol Version
    1
    Interchange Control Number
    Group Control Number
    Transaction Set Control Number
    Error Code
    B2B-51507
    Error Description
    Description: Payload validation error.
    Error Level
    ERROR_LEVEL_COLLABORATION
    Error Severity
    ERROR
    Error Text
    Error Brief : Error reporting limit exceeded. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. A data element with 'Mandatory' status is missing. A functional group code mismatch was encountered. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. Validator error - Extra data was encountered. Validator error - Extra data was encountered. A data element with 'Mandatory' status is missing. A transaction ID mismatch was encountered. A data element with 'Mandatory' status is missing. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. A data element with 'Mandatory' status is missing. Validator error - Extra data was encountered. Validator error - Extra data was encountered. An X12 syntax error occurred. An X12 syntax error occurred. An X12 syntax error occurred. An X12 syntax error occurred. An X12 syntax error occurred. Validator error - Extra data was encountered. Validator error - Extra data was encountered. A data element with 'Mandatory' status is missing. An X12 syntax error occurred. An X12 syntax error occurred. Validator error - Extra data was encountered. A data element with 'Mandatory' status is missing. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. A data element with 'Mandatory' status is missing. An X12 syntax error occurred. An X12 syntax error occurred. Validator error - Extra data was encountered. Validator error - Extra data was encountered. A data element with 'Mandatory' status is missing. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered. Validator error - Extra data was encountered.
    Error Brief :^M
    Error reporting limit exceeded.^M
    Validator error - Extra data was encountered.^M
    Validator error - Extra data was encountered.^M
    Validator error - Extra data was encountered.^M
      Validator error - Extra data was encountered.^M
    Validator error - Extra data was encountered.^M
    Validator error - Extra data was encountered.^M
    Validator error - Extra data was encountered.^M
    Validator error - Extra data was encountered.^M
      Validator error - Extra data was encountered.^M
    Validator error - Extra data was encountered.^M
    Validator error - Extra data was encountered.^M
    Validator error - Extra data was encountered.^M
    Validator error - Extra data was encountered.^M
      Validator error - Extra data was encountered.^M
    Validator error - Extra data was encountered.^M
    A data element with 'Mandatory' status is missing.^M
    A data element with 'Mandatory' status is missing.^M
      A data element with 'Mandatory' status is missing.^M
    A data element with 'Mandatory' status is missing.^M
    A data element with 'Mandatory' status is missing.^M
    A data element with 'Mandatory' status is missing.^M
      A data element with 'Mandatory' status is missing.^M
    A data element with 'Mandatory' status is missing.^M
    A data element with 'Mandatory' status is missing.^M
    A data element with 'Mandatory' status is missing.^M
      A data element with 'Mandatory' status is missing.^M
    A data element with 'Mandatory' status is missing.^M
    A data element with 'Mandatory' status is missing.^M
    A data element with 'Mandatory' status is missing.^M
      A data element with 'Mandatory' status is missing.^M
    A data element with 'Mandatory' status is missing.^M
    Validator error - Extra data was encountered.^M
    Validator error - Extra data was encountered.^M
      Validator error - Extra data was encountered.^M
    Description: Payload validation error., null, null, null, null, C064016C140EF31BFCA000005559CC
    A4, null, null, 1258, B2B-51507, null, null, null, null, null, 2013-09-05 12:35:49.092, null, ^M
      Error :^M
    Analysis halted after 101 error(s) (Limit for Transaction is 100). Large numbers of errors usually indicate that the same error is repeatedly encountered in multiple segments or transactions. Fix the repeating error and resubmit the test to obtain further results.^M
      Extra Element was found in the data file as part of Segment ISA. Segment ISA is defined in the guideline at position N/A.{br}{br}This error was detected at:{br}{tab}Segment Count: 1{br}{tab}Element Count: 1{br}{tab}Characters: 210 through 212^M
      Extra Element was found in the data file as part of Segment ISA. Segment ISA is defined in the guideline at position N/A.{br}{br}This error was detected at:{br}{tab}Segment Count: 1{br}{tab}Element Count: 2{br}{tab}Characters: 247 through 257^M
      Extra Element was found in the data file as part of Segment ISA. Segment ISA is defined in the guideline at position N/A.{br}{br}This error was detected at:{br}{tab}Segment Count: 1{br}{tab}Element Count: 3{br}{tab}Characters: 292 through 294^M
      Extra Element was found in the data file as part of Segment ISA. Segment ISA is defined in the guideline at position N/A.{br}{br}This error was detected at:{br}{tab}Segment Count: 1{br}{tab}Element Count: 4{br}{tab}Characters: 329 through 339^M
      Extra Element was found in the data file as part of Segment ISA. Segment ISA is defined in the guideline at position N/A.{br}{br}This error was detected at:{br}{tab}Segment Count: 1{br}{tab}Element Count: 5{br}{tab}Characters: 374 through 376^M
      Extra Element was found in the data file as part of Segment ISA. Segment ISA is defined in the guideline at position N/A.{br}{br}This error was detected at:{br}{tab}Segment Count: 1{br}{tab}Element Count: 6{br}{tab}Characters: 411 through 426^M
      Extra Element was found in the data file as part of Segment ISA. Segment ISA is defined in the guideline at position N/A.{br}{br}This error was detected at:{br}{tab}Segment Count: 1{br}{tab}Element Count: 7{br}{tab}Characters: 463 through 465^M
      Extra Element was found in the data file as part of Segment ISA. Segment ISA is defined in the guideline at position N/A.{br}{br}This error was detected at:{br}{tab}Segment Count: 1{br}{tab}Element Count: 8{br}{tab}Characters: 502 through 517^M
      Extra Element was found in the data file as part of Segment ISA. Segment ISA is defined in the guideline at position N/A.{br}{br}This error was detected at:{br}{tab}Segment Count: 1{br}{tab}Element Count: 9{br}{tab}Characters: 552 through 558^M
      Extra Element was found in the data file as part of Segment ISA. Segment ISA is defined in the guideline at position N/A.{br}{br}This error was detected at:{br}{tab}Segment Count: 1{br}{tab}Element Count: 10{br}{tab}Characters: 593 through 597^M
      Extra Element was found in the data file as part of Segment ISA. Segment ISA is defined in the guideline at position N/A.{br}{br}This error was detected at:{br}{tab}Segment Count: 1{br}{tab}Element Count: 11{br}{tab}Characters: 632 through 633^M
      Extra Element was found in the data file as part of Segment ISA. Segment ISA is defined in the guideline at position N/A.{br}{br}This error was detected at:{br}{tab}Segment Count: 1{br}{tab}Element Count: 12{br}{tab}Characters: 668 through 673^M
      Extra Element was found in the data file as part of Segment ISA. Segment ISA is defined in the guideline at position N/A.{br}{br}This error was detected at:{br}{tab}Segment Count: 1{br}{tab}Element Count: 13{br}{tab}Characters: 708 through 717^M
      Extra Element was found in the data file as part of Segment ISA. Segment ISA is defined in the guideline at position N/A.{br}{br}This error was detected at:{br}{tab}Segment Count: 1{br}{tab}Element Count: 14{br}{tab}Characters: 752 through 753^M
    Thanks
    Rao.

    Issue is resolved by doing the Following Steps.
    1. Open the ECS file in the Document Editor, Exclude the ISA, GS segments in the ECS file. Save the File and Upload the Document and Redeploy the Agreement.
    2. Export the XSD and refer it in the BPEL process and do the transformation.
    Thanks
    Nethi.

  • JSF, NetBeans and customizing of Standard Validation Errors

    Hello together,
    i want to use german Standard Validation Errors via a own .properties File:
    1.
    Here is my faces-config.xml ( the entries are uncommented ! ):
    <faces-config>
    <application>
    <locale-config>
    <default-locale>de</default-locale>
    <supported-locale>de</supported-locale>
    <supported-locale>en</supported-locale>
    </locale-config>
    *<message-bundle>alles.mymessages</message-bundle>*
    </application>
    </faces-config>
    2.
    Here is mymessages.properties-File in package alles:
    javax.faces.validator.NOT_IN_RANGE=Das angegebene Attribut liegt nicht zwischen den erwarteten Werten {0} und {1}.
    javax.faces.validator.NOT_IN_RANGE_detail="{2}"\:Eingegebener Wert liegt nicht im erwarteten Bereich von {0} bis {1}.
    javax.faces.validator.LongRangeValidator.LIMIT=Validierungsfehler
    javax.faces.validator.LongRangeValidator.LIMIT_detail=Eingegebener Wert kann nicht in den korrekten Typ umgewandelt werden.
    javax.faces.validator.LongRangeValidator.MAXIMUM=Validierungsfehler
    javax.faces.validator.LongRangeValidator.MAXIMUM_detail="{1}"\:Wert ist gr\u00F6\u00DFer als das erlaubte Maximum"{0}".
    3.
    Here the part of the JSF-View with the Validator:
    <ui:textField binding="#{WorkTypeEdit.textFieldBeschartKzSoll}" converter="#{WorkTypeEdit.bigIntegerConverter1}"
    id="textFieldBeschartKzSoll" required="true" style="height: 24px; width: 48px" validator="#{WorkTypeEdit.longRangeValidator1.validate}"/>
    The application still shows the standard englisch validation error text. What is wrong here ?
    I' am using NetBeans 5.5.1 with VWP and the deploment is to Glassfish server.
    Thanks a lot.
    HJA

    Hello Raymond,
    i did some coding and create additional a custom validator:
    My JSF-View part:
    <ui:textField binding="#{WorkTypeEdit.textFieldBeschartKzSoll}" converter="#{WorkTypeEdit.integerConverter1}"
    id="textFieldBeschartKzSoll" maxLength="2" required="true" style="height: 24px; width: 48px" *validator="#{MyValidation.validateInput}">*
    *<f:validateLongRange minimum="1" maximum="9"></f:validateLongRange>*
    </ui:textField>
    My custom validator in Myvalidation class:
    public void validateInput (FacesContext facescontext, UIComponent component, Object value) throws ValidatorException
    long min = 0, max = 0;
    Locale locale = facescontext.getViewRoot ().getLocale ();
    String mb = facescontext.getApplication ().getMessageBundle ();
    ResourceBundle rb = ResourceBundle.getBundle (mb, locale);
    Validator[] validator = ((UIInput) component).getValidators ();
    for (int i=0; i < validator.length; i++)
    if (validator[i] instanceof LongRangeValidator)
    LongRangeValidator lv = (LongRangeValidator) validator;
    long lvalue = Long.valueOf ((String)value.toString ());
    min = lv.getMinimum ();
    max = lv.getMaximum ();
    if (lvalue < min || lvalue > max)
    ((UIInput) component).setValid (false);
    *String message = rb.getString ("javax.faces.validator.NOT_IN_RANGE");*
    *String messageDetail = rb.getString ("javax.faces.validator.NOT_IN_RANGE_detail");*
    *facescontext.addMessage (component.getClientId (facescontext), new FacesMessage (FacesMessage.SEVERITY_ERROR,message,messageDetail));* }
    What happen now is, at first i get the german message because of rb.getString........ so the locale is working
    and then the englisch message follows in the message component.
    Sorry that i take your time so long...
    HJA

  • Popup closing even with validation errors in IE - works correctly in FF

    Hi,
    Using JDeveloper 11.1.1.4.
    We have a page where the user can upload files via a popup. After selecting the file to upload and submitting, the file type and size are validated against application parameters. If the validation fails, the inputFile component is set invalid and a ValidationException is thrown. In Firefox, the functionality is as expected: the popup stays open and the validation error message is displayed next to the inputFile component. In Internet Explorer, however, the popup closes without any error being displayed.
    Popup:
    <af:popup id="pt_fileUploadPopUp" contentDelivery="lazyUncached"
                            binding="#{FileUploadOperations.uploadFormPopup}">
    <af:inputFile label="#{UC1315ResourceBundle['L1336']} "
                                      id="pt_i3f1"
                                      value="#{FileUploadOperations.uploadedFile}"
                                      requiredMessageDetail="#{UC1315ResourceBundle['REQ_MSG_FILE_UPLOAD']}"
                                      validator="#{FileUploadOperations.validateFile}"
                                      required="true"/>
    <af:commandButton id="pt_CB_2001"
                                                text="#{UC1315ResourceBundle['BUTTON_2007']}"
                                                actionListener="#{FileUploadOperations.uploadFile}"
                                                partialSubmit="true"
                                                disabled="#{pageFlowScope.pApplicationMode == 'PREVIEW'}"/>
    </af:popup>Validator method:
        public void validateFile(FacesContext facesContext,
                                 UIComponent uIComponent, Object object) {
                try {
                    // validation logic
                } catch (CustomFileUploadException exp) {
                    inputFileComponent.resetValue();
                    inputFileComponent.setValid(false);
                    FacesMessage facesErrorMessage = new FacesMessage();
                    facesErrorMessage.setSeverity(FacesMessage.SEVERITY_ERROR);
                    facesErrorMessage.setDetail(exp.getMessage());
                    facesErrorMessage.setSummary(exp.getMessage());
                    throw new ValidatorException(facesErrorMessage);
        }Any ideas what might be the problem here?
    Thanks,
    Joonas

    @Srinivas, I changed the component inside the popup to af:dialog (was af:panelWindow before) but this didn't solve the problem - the behavior is the same. Thanks for the suggestion though.
    @Frank, seems this problem is implementation-specific. I created a simple test case and the validation error was displayed correctly in IE.

  • How to deal with validation errors from DAO layer.

    I have been pondering on how to deal with validation errors from DAO layer.
    Lets say you have a DAO that can save a car object. A car has a year, make, model, vin and so on. During the save operation of this DAO, it validates the car attributes to see if they pass some business rules. If it does not it throws some validation exception that contains all the validation errors. These validation errors know nothing about jsf or my components it just knows what attributes on the object are invalid and why.
    If I just want to show those errors at the top of the page that would be no problem I could just create some FacesMessage objects and add them to the FacesContext messages. But if the DAO layer is telling me that the make attribute is invalid it would be nice to map it to the make field on the screen. I am wondering if any of you have tackled this problem or have some ideas on how to tackle it?
    Brian

    Let it throw an exception with a self explaining message, then catch it and embed that message in a FacesMessage.
    Or let it throw more specific exception types (InvalidCarMakeException extends CarDAOException and so on) and let JSF handle it with own FacesMessage message.

  • Cannot add user throws a error in apex 4.2 of sample demo application admin

    In sample demo of apex 4 which is migrated to apex 4.2 in sample application module in admin section..
    If i add a user
    And at default i dont give a password it throws a error ..
    First go to following link
    [http://apex.oracle.com/pls/apex/f?p=18534:LOGIN:25053108911952]
    and enter user name as admin and pasword as test
    Once when you login click on Tab manage admin user which is on right hand side..
    Now to add a user click on add user button.. add the record and click save..
    It throws a error saying
    1 Error has occured column must have a value..
    How can i remove this error message ? .. Can some one help..
    select
    "USER_ID",
    "USER_NAME",
    "CREATED_ON",
    decode(password, null, 'Set Password', 'Reset Password') rp,
    expires_on,
    admin_user,
    utype
    from "#OWNER#"."DEMO_USERS"
    where user_name != 'ADMIN'
    The above query is used.. and inside it i RP column is culprit since the user has no password..
    Since user has no password it doont save the record.. I checked the table and this column has no not null constraint..
    http://apex.oracle.com/pls/apex/f?p=18534:LOGIN:25053108911952
    Edited by: pauljohny on Nov 27, 2012 12:22 AM
    Edited by: pauljohny on Nov 27, 2012 12:24 AM

    closing the thread its seems working now..Removed some validation issue
    Thanks

  • After throwing an error suppler is created

    Hi all,
    In '/oracle/apps/pos/supplier/webui/SuppCrtPG' I have extended a controller "oracle.apps.ar.hz.components.party.organization.webui.HzPuiOrgProfileQuickCO"
    after checking some validations I am throwing an error
    by - throw new OAException("Plese enter 10 Alpha Numeric characters in PAN number field." ,OAException.ERROR);
    My issue is that after throwing an error when clik on "Apply" button again with no changes made system should not create supplier but it creates. I checked from ap_suppliers table.
    Why after throwing an error system creates a supplier??
    Please help?
    thanks
    Amit

    So, you are pressing apply button then error messge is apearing but no supplier created. but when you again pressed it, it will create supplier. Am I correct?
    if not tell me again what is the flow?
    --Parag                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • JAXB Validation Error

    Hi,
    Iam using JAXB. I get an validation error. When i try to marshal an object to XML. The code is simple as shown below
    1. Container.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <schema targetNamespace="http://agi.com"
    xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://agi.com"
    elementFormDefault="qualified">
    <complexType name="ContainerType" abstract="true">
    <sequence>
    <choice>
    <element name="File" type="anyType" />
    <element name="Pen" type="anyType" />
    </choice>
    </sequence>
    </complexType>
    <element name="Container" type="tns:ContainerType" abstract="true" />
    </schema>
    2. Holder.xsd
    <?xml version="1.0" encoding="UTF-8"?>
    <schema targetNamespace="http://agi.com"
    xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://agi.com"
    elementFormDefault="qualified">
    <include schemaLocation="Container.xsd"></include>
    <complexType name="HolderType">
    <complexContent>
    <restriction base="tns:ContainerType">
    <sequence>
    <choice>
    <element name="File">
    <complexType>
    <sequence>
    <element name="FileName"
    type="string">
    </element>
    <element name="Capacity"
    type="integer">
    </element>
    </sequence>
    </complexType>
    </element>
    <element name="Pen">
    <complexType>
    <sequence>
    <element name="Make"
    type="string">
    </element>
    </sequence>
    </complexType>
    </element>
    </choice>
    </sequence>
    </restriction>
    </complexContent>
    </complexType>
    <element name="Holder" type="tns:HolderType"></element>
    </schema>
    Main.java
    package test.client;
    import java.io.PrintWriter;
    import java.io.StringWriter;
    import java.math.BigInteger;
    import java.util.List;
    import javax.xml.bind.JAXBContext;
    import javax.xml.bind.Marshaller;
    import javax.xml.bind.Unmarshaller;
    import javax.xml.bind.Validator;
    import test.vo.AnyType;
    import test.vo.Holder;
    import test.vo.ObjectFactory;
    import test.vo.HolderType.FileType;
    import test.vo.HolderType.PenType;
    import com.sun.xml.bind.StringInputStream;
    public class Main {
    public static void main(String s[]) throws Exception{
    JAXBContext ctx = JAXBContext.newInstance("test.vo" );
    ObjectFactory obj = new ObjectFactory();
    Holder input = obj.createHolder();
    FileType file = obj.createHolderTypeFileType();
    file.setCapacity( BigInteger.valueOf(35) );
    file.setFileName("Accounts");
    AnyType any = obj.createAnyType();
    List lst = any.getContent();
    lst.add(file);
    input.setFile(any);
    Marshaller marsh = ctx.createMarshaller();
    marsh.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT,
    new Boolean(true));
    marsh.setProperty(Marshaller.JAXB_SCHEMA_LOCATION,
    "http://agi.com");
    Validator validator = ctx.createValidator();
    validator.validate(input);
    StringWriter sw = new StringWriter();
    marsh.marshal(input, new PrintWriter(sw) );
    StringBuffer sb = sw.getBuffer();
    System.out.println(sb.toString() );
    This throws the following exception
    DefaultValidationEventHandler: [ERROR]: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.HolderType.FileType>
    Location: obj: test.vo.impl.HolderImpl@1cd8669
    Exception in thread "main" com.sun.xml.bind.serializer.AbortSerializationException: tag name "test.vo.AnyType" is not allowed. Possible tag names are: <test.vo.HolderType.FileType>
    at test.vo.impl.runtime.ValidationContext.reportEvent(ValidationContext.java:199)
    at test.vo.impl.runtime.ValidationContext.reportEvent(ValidationContext.java:166)
    at test.vo.impl.runtime.MSVValidator.childAsElementBody(MSVValidator.java:336)
    at test.vo.impl.runtime.MSVValidator.childAsBody(MSVValidator.java:292)
    at test.vo.impl.ContainerTypeImpl.serializeBody(ContainerTypeImpl.java:52)
    at test.vo.impl.HolderTypeImpl.serializeBody(HolderTypeImpl.java:30)
    at test.vo.impl.HolderImpl.serializeBody(HolderImpl.java:43)
    at test.vo.impl.runtime.MSVValidator._validate(MSVValidator.java:102)
    at test.vo.impl.runtime.MSVValidator.validate(MSVValidator.java:77)
    at test.vo.impl.runtime.ValidationContext.validate(ValidationContext.java:75)
    at test.vo.impl.runtime.ValidatorImpl.validate(ValidatorImpl.java:121)
    at test.vo.impl.runtime.ValidatorImpl.validate(ValidatorImpl.java:104)
    at test.client.Main.main(Main.java:63)
    However if i commentout the validation it works fine yeilding the
    following result
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <Holder xsi:schemaLocation="http://agi.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://agi.com">
    <File>
    <FileName>Accounts</FileName>
    <Capacity>35</Capacity>
    </File>
    </Holder>
    Which look good conforming to the schema above
    It willbe helpful if someout could point out the mistake iam doing
    Please help
    Regards
    Agilan Palani

    I changed the code
    marsh.setProperty(Marshaller.JAXB_SCHEMA_LOCATION,"http://agi.com Holder.xsd");
    to
    marsh.setProperty(Marshaller.JAXB_SCHEMA_LOCATION,"http://agi.com E:/Agilan/Holder.xsd");
    But still the same error.
    I have validated the generated xml using XMLObjective. It says the generated xml is valid against the schema.
    I really dont know why the JAXB validation fails?
    Please help

  • Validating error with JAXP

    i wrote a small app that read a COLLADA instance document and convert it to a html document. First I wrote some xsl stylesheets and now I'm using a JAXP DOM parser to parse the instance document and a JAXP xslt transformer to perform the transformation.
    When I use a non-validating parser it seems all work well but when i try to use a validating parser i get this message error:
    org.xml.sax.SAXParseException: src-resolve: Cannot resolve the name 'xml:base' to a(n) 'attribute declaration' component.
    What does it mean?
    When I'm at my home pc,I get the error above but when I'm at university lab pc I don't get any error. WHY!? I'm using the same files.
    Thx for your help

    i'm using jdk 1.5.0_11 and here is my java code.
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.FactoryConfigurationError;
    import javax.xml.parsers.ParserConfigurationException;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import org.w3c.dom.Document;
    import org.w3c.dom.DOMException;
    // For JFileChooser
    import javax.swing.*;
    // For write operation
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.transform.stream.StreamResult;
    import java.io.*;
    public class StylizerMio2 {
        // Global value so it can be ref'd by the tree-adapter
        static Document document;
        // Constants you'll use when configuring the factory
        static final String JAXP_SCHEMA_LANGUAGE="http://java.sun.com/xml/jaxp/properties/schemaLanguage";
        static final String W3C_XML_SCHEMA="http://www.w3.org/2001/XMLSchema";
         //Constants used to specify the schema in the application
         static final String schemaSource="COLLADASchema_141.xsd";
         static final String JAXP_SCHEMA_SOURCE="http://java.sun.com/xml/jaxp/properties/schemaSource";
        public static void main(String[] argv) {
            /*if (argv.length != 2) {
                System.err.println("Usage: java StylizerMio stylesheet xmlfile");
                System.exit(1);
            // Generating a parser
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
             //Configure the factory to generate a namespace-aware,validating parser
            factory.setValidating(true);  
            factory.setNamespaceAware(true);
             try{
                  factory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
              // Associate a document with a schema
              factory.setAttribute(JAXP_SCHEMA_SOURCE, new File(schemaSource));
             catch (IllegalArgumentException x) {
                  // Happens if the parser does not support JAXP 1.2
                  x.printStackTrace();
            // Associating the document with the schema
            try {
              JFileChooser chooser = new JFileChooser();
            ExampleFileFilter daeFilter = new ExampleFileFilter();
            daeFilter.addExtension("dae");
            daeFilter.setDescription("documenti istanza COLLADA");
            chooser.setFileFilter(daeFilter);
            chooser.setCurrentDirectory(new File("."));
              int returnVal = chooser.showOpenDialog(null);
              if(returnVal == JFileChooser.APPROVE_OPTION) {
              System.out.println("You chose to open this file: " +
                   chooser.getSelectedFile().getName());
                File stylesheet = new File("trasformazione.xsl");
              //"Moon Buggy/lunar_vehicle_tris.dae"
                File datafile = chooser.getSelectedFile();
                DocumentBuilder builder = factory.newDocumentBuilder();
              //Handling validation errors
              builder.setErrorHandler(
              new org.xml.sax.ErrorHandler(){
                   // ignore fatal errors (an exception is garaunteed)
                   public void fatalError(SAXParseException exception)
                        throws SAXException{}
                             //treat validation errors as fatal
                             public void error(SAXParseException e)
                                  throws SAXParseException
                                  throw e;
                             // dump warnigs too
                             public void warning(SAXParseException err)
                                  throws SAXParseException
                                  System.out.println("** Warning"
                                  + ", line " + err.getLineNumber()
                                  + ", uri " + err.getSystemId());
                                  System.out.println("   " + err.getMessage());
                document = builder.parse(datafile);
                // Use a Transformer for output
                TransformerFactory tFactory = TransformerFactory.newInstance();
                StreamSource stylesource = new StreamSource(stylesheet);
                Transformer transformer = tFactory.newTransformer(stylesource);
                DOMSource source = new DOMSource(document);
                // SaveDialogue JFileChooser
                ExampleFileFilter htmlFilter = new ExampleFileFilter();
                htmlFilter.addExtension("html");
                htmlFilter.setDescription("documento html");
                chooser.setFileFilter(htmlFilter);
                 chooser.showSaveDialog(null);
                  //"Moon Buggy/lunar_vehicle_tris.html"
                File htmlFile= chooser.getSelectedFile();
                StreamResult result = new StreamResult(htmlFile);
                transformer.transform(source, result);
            } catch (TransformerConfigurationException tce) {
                // Error generated by the parser
                System.out.println("\n** Transformer Factory error");
                System.out.println("   " + tce.getMessage());
                // Use the contained exception, if any
                Throwable x = tce;
                if (tce.getException() != null) {
                    x = tce.getException();
                x.printStackTrace();
            } catch (TransformerException te) {
                // Error generated by the parser
                System.out.println("\n** Transformation error");
                System.out.println("   " + te.getMessage());
                // Use the contained exception, if any
                Throwable x = te;
                if (te.getException() != null) {
                    x = te.getException();
                x.printStackTrace();
            } catch (SAXException sxe) {
                // Error generated by this application
                // (or a parser-initialization error)
                Exception x = sxe;
                if (sxe.getException() != null) {
                    x = sxe.getException();
                x.printStackTrace();
            } catch (ParserConfigurationException pce) {
                // Parser with specified options can't be built
                pce.printStackTrace();
            } catch (IOException ioe) {
                // I/O error
                ioe.printStackTrace();
        } // main
    }

Maybe you are looking for

  • Adding OR condition gives ORA-00920 error

    I am trying to write a xquery like this - for $VAR3 in document("DS")/db/V_ViewName where (($VAR3/CODE eq $#PARAM of type xs:string) or (xf:empty($#PARAM of type xs:string)))      return      <stuff>           <stuff_name>{  treat as xs:string(xf:dat

  • Mouse-Over, Focus, URL Links on Web pages ..all quite odd in last two days

    And I have no suspicions about why. For example, it used to be that headlines on google news changed the cursor when I passed over them .... and .. that URL was listed at base of a browser. It used to be that if I selected a pull-down menu that had s

  • MacBook not showing external hard drive connected to Air Port Extreme

    I have a MacBook 5.2 running Mac OS X Version 10.5.7. I am running a wireless network Air Port Extreme router Version 7.4.2. I have connected a 1 TB Western Digital 10EAVS External hard drive and a printer to the Air Port Extreme router via a USB 2 h

  • BitSet values ObjectOutputStream operation!

    I am using ObjectInputStream /ObjectOutputStream to read/write a set of objects in a TreeSet to a file. Everything works fine except for one field of BitSet. The values of BitSet are not preserved. Am I doing something wrong or is this not possible?

  • After Effects error: Can't import file "(FILE TITTLE)" unsupported filetype or extension

    Hello so I was working with AE3 for 2 years and i had no problems with it but.. when i reinstall my windows and install AE3 with same installation file as always i was using.. and  I got problem. When i try to import AVI or wmv or other video clips e