Transformer throws exception

Hi I am working with Transformer to transform a xml file using a xsl.
I get the following exception :-
javax.xml.transform.TransformerConfigurationException: javax.xml.transform.Trans
formerException: javax.xml.transform.TransformerException: stylesheet requires a
ttribute: version
at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(Transf
ormerFactoryImpl.java:946)
at TransformTest.<init>(TransformTest.java:40)
at TransformTest.main(TransformTest.java:21)
Caused by: javax.xml.transform.TransformerException: javax.xml.transform.Transfo
rmerException: stylesheet requires attribute: version
at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(Transf
ormerFactoryImpl.java:942)
... 2 more
Caused by: javax.xml.transform.TransformerException: stylesheet requires attribu
te: version
at org.apache.xalan.processor.ProcessorLRE.startElement(ProcessorLRE.jav
a:209)
at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetH
andler.java:656)
at org.apache.crimson.parser.Parser2.maybeElement(Parser2.java:1488)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:500)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(Transf
ormerFactoryImpl.java:934)
... 2 more
Can any one help me out ?
My code is:
******************************CODE**************************************
          String xmlFileName = arr[0];
          String xslFileName = arr[1];
          //Get the xml dom
          Document xmlDocument = getDOM(xmlFileName);
          //Create a dom source for this
          Source domSource = new DOMSource(xmlDocument);
          //Get the xsl
          StreamSource xslSource = new StreamSource(new File(xslFileName));
          //Now create Transformer
          Transformer transformer = null;
          try {
               TransformerFactory factory = TransformerFactory.newInstance();
               Templates templates = factory.newTemplates(xslSource);
               transformer = templates.newTransformer();
          catch(TransformerConfigurationException te) {
               te.printStackTrace();
          //Make the Result
          StreamResult result = new StreamResult(System.out);
          //Now apply the transform
          try {
               transformer.transform(domSource, result);
          catch(TransformerException te) {
               te.printStackTrace();
Following is my xsl:-
******************************XSL**************************************
test1.xsl:
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
     <xsl:apply-templates select="/courses/course" />
</xsl:template>
<xsl:template match="course">
     The course will run for <xsl:value-of select="@length"/> <xsl:value-of select="@unit"/>.     
     The name is <xsl:value-of select="name"/>.
</xsl:template>
</xsl:stylesheet>
And following is my xml, test1.xml:-
******************************XML**************************************
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="test1.xsl" ?>
<courses>
     <course length="4" unit="days">
          <name>HTML 101</name>
     </course>
</courses>
The xml and xsl both are well formed.

Hi
I got the answer.
Actually the stylesheet element of the xsl requires a attribute called version as shown below:-
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform" version = "1.0" >
^^^^^^^^^^^^^^^^^

Similar Messages

  • Custom XSLT Functions Throw Exception

    Hi,
    I have following requirement-
    1. I have defined and configured some custom XSLT functions in Jdev and BPEL, which throw exception in case of an error.
    2. Now I want to catch that exception in my BPEL process
    3. In My BPEL process I have defined transformation step ( which is using those Custom XSLT functions) in a scope and added a catch branch to that
    4. But even XSLT java function throw an exception , it is not being catch by catch branch.
    Could you please help me regarding this and tell me any other way to catch an exception in BPEL process thrown by Custom XSLT function within transformation step?
    Thanks.

    Hi,
    Its the problem with the date. In the configuration file i used dateTime for java.util.Date, because of this i cant see "User Defined" option in Jdeveloper component pallete. I checked at XML data types i had seen dateTime for java.util.Date Class, but its not working.
    Do anyone created a custom xslt function which has date as parameter or return type?, If so wht they had used as data type for xml and java.
    Thanks,
    RR

  • Throw exception in Java mapping and handle this in BPM

    Hi,
    I'll use a Java mapping in a BPM transform step. Is it possible to throw an exception inside this Java mapping and handle this in a BPM exception handler?
    thanks and regards
    Verena

    Hi Verena,
    In a BPM transformation step, I think you can throw exceptions only for system errors.
    Let me explain with an example, one of the ways to handle your scenario:
    Lets assume your Java Mapping fails then you can trap that exception in your Java mapping and compose an XML message which indicates that an error has occurred.
    say for e.g.
    <intermediateStructure>
    <SatusDocument>
    <StatusCode>ERROR</StatusCode>
    <ErrCode>123</ErrCode>
    <ErrDesc><!populate the thrown exception details></ErrDesc>
    </StatusDocument>
    <Payload>
    <!contains actual XML message with data>
    </Payload>
    </intermediateStructure>
    if Java mapping is Successful, you can compose the XML message as follows:
    <intermediateStructure>
    <SatusDocument>
    <StatusCode>SUCCESS</StatusCode>
    <ErrCode>0</ErrCode>
    <ErrDesc></ErrDesc>
    </StatusDocument>
    <Payload>
    <!contains actual XML message with data>
    </Payload>
    </intermediateStructure>
    You can use BPM switch operation to switch to different processing branches say for e.g. "error" branch or "success" branch by examining the value of <StatusCode> tag.
    Hope it helps !
    Regards,
    Sridhar

  • Function module JOB_CLOSE throwing exception

    Hello,
    We have a batch job which has 2 steps:
    1) Step 1 uses job_open, job_submit and job_close and immediately schedules batch job A/P_ACCOUNTS which in turn creates batch input sessions A/P_ACCOUNTS.
    2) Step 2 Processes A/P_ACCOUNTS sessions created yesterday or today.
    In few cases, job_close is throwing exception job_close_failed. I believe that error is coming due to non availability of work processes. Job A/P_Accounts is defined as a class C batch job. There is a check in the FM job_close which does the following check:
    - if the class of a batch job is B or C, it calculates the number of free work processes. If there are no work processes available then JOB_CLOSE throws JOB_CLOSE_FAILED exception. 
    - If the class is u2018Au2019, it skips this check.
    We have an option of changing the class of batch job to A but there are some system critical jobs that are running as class A.
    My question is:
    In the code, JOB_CLOSE has been called for scheduling the job A/P_ACCOUNTS with parameter start immediately. Can anyone please let me know what will happen if function JOB_CLOSE is not called with start immediately option? Will the batch job A/P_ACCOUNTS wait till the time work processes are available?
    Or, can anything else be done to solve the issue?
    Regards,
    Siddharth

    HI,
    This is my experience with job_close..
    when i was working in zprograms then i was able to scedule it any time i wanted..
    but in my standard program when i tried it didn't worked....
    so i have to use that option of starting it immediately..
    and then it is working fine..
    now if i schedule 5 jobs... one after another..
    its get queued up...and once the processor is free...its working..
    my code of job close
      CALL FUNCTION 'JOB_CLOSE'
        EXPORTING
          jobcount             = job_count
          jobname              = job_name
          strtimmed            = yes " yes = 'X'
        IMPORTING
          job_was_released     = job_released
        EXCEPTIONS
          cant_start_immediate = 1
          invalid_startdate    = 2
          jobname_missing      = 3
          job_close_failed     = 4
          job_nosteps          = 5
          job_notex            = 6
          lock_failed          = 7
          invalid_target       = 8
          OTHERS               = 9.
    regards,
    Yadesh

  • Faxing of SAPScript throwing exception

    Dear All,
    I am facing problem while sending Sales Order output through FAX. It is throwing exception in OPEN_FORM function module as FAX_NOT_VALID. I debugged and found that actually system is failing FM SX_NUMBER_TO_DEVTYPE which in turn showing that the exception has occured due to Node not found. Is it a configuaration issue? I tried to configure through SPRO but could not find any relevent place. Looking for your valuable suggestion.
    Any suggestion!
    Thanks and regards,
    Atanu

    Make sure are you entering the correct fax number in the recepient.
    Go to transaction SBWP - > create new message and try to send it as FAX. It you are not able to send fax via Business workplace then it implies that some setting is required form the BASIS.
    Otherwise the parameters passed to the OPEN_FORM needs to be investigated.

  • Using sql bulk copy throwing exception -The given value of type String from the data source cannot be converted to type int of the specified target column

    Hi All,
    I am reading notepads files and inserting data in sql tables from the notepad-
    while performing sql bulk copy on this line it throws exception - "bulkcopy.WriteToServer(dt); -"data type related(mentioned in subject )".
    Please go through my  logic and tell me what to change to avoid this error -
    public void Main()
    Dts.TaskResult = (int)ScriptResults.Success;
    string[] filePaths = Directory.GetFiles(@"C:\Users\jainruc\Desktop\Sudhanshu\master_db\Archive\test\content_insert\");
    for (int k = 0; k < filePaths.Length; k++)
    string[] lines = System.IO.File.ReadAllLines(filePaths[k]);
    //table name needs to extract after = sign
    string[] pathArr = filePaths[0].Split('\\');
    string tablename = pathArr[9].Split('.')[0];
    DataTable dt = new DataTable(tablename);
    |
    string[] arrColumns = lines[1].Split(new char[] { '|' });
    foreach (string col in arrColumns)
    dt.Columns.Add(col);
    for (int i = 2; i < lines.Length; i++)
    string[] columnsvals = lines[i].Split(new char[] { '|' });
    DataRow dr = dt.NewRow();
    for (int j = 0; j < columnsvals.Length; j++)
    //Console.Write(columnsvals[j]);
    if (string.IsNullOrEmpty(columnsvals[j]))
    dr[j] = DBNull.Value;
    else
    dr[j] = columnsvals[j];
    dt.Rows.Add(dr);
    SqlConnection conn = new SqlConnection();
    conn.ConnectionString = "Data Source=UI3DATS009X;" + "Initial Catalog=BHI_CSP_DB;" + "User Id=sa;" + "Password=3pp$erv1ce$4";
    conn.Open();
    SqlBulkCopy bulkcopy = new SqlBulkCopy(conn);
    bulkcopy.DestinationTableName = dt.TableName;
    bulkcopy.WriteToServer(dt);
    conn.Close();
    Issue 1:-
    I am reading notepad: getting all column and values in my data table now while inserting for date and time or integer field i need to do explicit conversion how to write for specific column before bulkcopy.WriteToServer(dt);
    Issue 2:- Notepad does not contains all columns nor in specific sequence in that case i can add few column ehich i am doing now but the issue is now data table will add my columns + notepad columns and while inserting how to assign in perticular colums?
    sudhanshu sharma Do good and cast it into river :)

    Hi,
    I think you'll have to do an explicit column mapping if they are not in exact sequence in both source and destination.
    Have a look at this link:
    https://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlbulkcopycolumnmapping(v=vs.110).aspx
    Good Luck!
    Kaur.
    Please mark as answer if this resolves your issue.

  • How to throw exception in run() method of Runnable?

    Hi, everyone:
    I want to know how to throw exception in run() method of interface Runnable. Since there is no throwable exception declared in run() method of interface Runnable in Java API specification.
    Thanks in advance,
    George

    Thanks, jfbriere.
    I must add though that if your run() methodis
    executed after a call to Thread.start(), then
    it is not a good choice to throw anyRuntimeException
    from the run() method.
    The reason is that the thrown exception won't be
    handled appropriately by a try-catch block.Why do you say that "the thrown exception won't be
    handled appropriately by a try-catch block"? Can you
    explain it in more detail?
    regards,
    George
    Because the other thread runs concurrently with and independently of the parent thread, there's no way you can write a try/catch that will handle the new thread's exception: try {
        myThread.start();
    catch (TheExceptionYouWantToThrowFromRun exc) {
        handle it
    do the next thing This won't work because the parent thread just continues on after myThread.start(). Start() doesn't throw the exception--run() does. And our parent thread here has lost touch with the child thread--it just moves on to "do the next thing."
    Now, you can do some exception handling with ThreadGroup and uncaughtException(), but make sure you understand why the above won't work, in case that was what you were planning to do.

  • File 2 IDOC scenario-throwing exception

    Hi friends,
    Please help me to resolve the following error:
    when I am executing the scenario,I am getting the following error in sxmb_moni:
    Runtime exception in message mapping transformation
    Also observed the following error message when testing in message mapping:
    Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 2d, 20, 3c(:main:, row:3, col:3) com.sap.aii.utilxi.misc.api.BaseRuntimeException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 2d, 20, 3c(:main:, row:3, col:3) at com.sap.aii.mappingtool.tf3.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:157) at com.sap.aii.mappingtool.tf3.rt.xparser.XParser.run(XParser.java:73) at java.lang.Thread.run(Thread.java:832) Root Cause: com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 2d, 20, 3c(:main:, row:3, col:3)(:main:, row=3, col=3) -> com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 2d, 20, 3c(:main:, row:3, col:3) at com.sap.engine.lib.xml.parser.XMLParser.scanProlog(XMLParser.java:2787) at com.sap.engine.lib.xml.parser.XMLParser.scanDocument(XMLParser.java:2832) at com.sap.engine.lib.xml.parser.XMLParser.parse0(XMLParser.java:231) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parseAndCatchException(AbstractXMLParser.java:145) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:160) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:261) at com.sap.engine.lib.xml.parser.Parser.parseWithoutSchemaValidationProcessing(Parser.java:280) at com.sap.engine.lib.xml.parser.Parser.parse(Parser.java:342) at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:125) at javax.xml.parsers.SAXParser.parse(Unknown Source) at com.sap.aii.mappingtool.tf3.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:155) at com.sap.aii.mappingtool.tf3.rt.xparser.XParser.run(XParser.java:73) at java.lang.Thread.run(Thread.java:832) -
    at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:144) at javax.xml.parsers.SAXParser.parse(Unknown Source) at com.sap.aii.mappingtool.tf3.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:155) at com.sap.aii.mappingtool.tf3.rt.xparser.XParser.run(XParser.java:73) at java.lang.Thread.run(Thread.java:832) Caused by: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 2d, 20, 3c(:main:, row:3, col:3) at com.sap.engine.lib.xml.parser.XMLParser.scanProlog(XMLParser.java:2787) at com.sap.engine.lib.xml.parser.XMLParser.scanDocument(XMLParser.java:2832) at com.sap.engine.lib.xml.parser.XMLParser.parse0(XMLParser.java:231) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parseAndCatchException(AbstractXMLParser.java:145) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:160) at com.sap.engine.lib.xml.parser.AbstractXMLParser.parse(AbstractXMLParser.java:261) at com.sap.engine.lib.xml.parser.Parser.parseWithoutSchemaValidationProcessing(Parser.java:280) at com.sap.engine.lib.xml.parser.Parser.parse(Parser.java:342) at com.sap.engine.lib.xml.parser.SAXParser.parse(SAXParser.java:125) at javax.xml.parsers.SAXParser.parse(Unknown Source) at com.sap.aii.mappingtool.tf3.rt.xparser.MTSaxHandler.run(MTSaxHandler.java:155) at com.sap.aii.mappingtool.tf3.rt.xparser.XParser.run(XParser.java:73) at java.lang.Thread.run(Thread.java:832) Fatal Error: com.sap.engine.lib.xml.parser.ParserException: XMLParser: No data allowed here: (hex) 2d, 20, 3c(:main:, row:3, col:3)
    11:58:05 End of test

    Hi Chirag,
    When I tested with payload from sxmb_moni,I got the following error message in MM.
    RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /WPUFIB01/IDOC/E1WPF01/E1WPF02/KNTOBJECT. The message is: Exception:[java.lang.NumberFormatException: For input string: "CBD163"] in class com.sap.aii.mappingtool.flib3.Arithm method formatNumber[CBD163, com.sap.aii.mappingtool.tf3.rt.Context@571d571d]
    Thanks,
    Srinivas.

  • XSLT Mapping, Transformer configuration exception occurred when loading

    Hi,
    My source message is an IDOC HRMD, I need my target message to include exactly
    <EPERSON xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ContextPersonMessage">
    I have therefore suggested to use XSLT mapping.
    Here is the test_mapping.xsl that I Imported as Zip in Imported Archives.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://polyright.com/xi/HR">
         <xsl:template match="/">
              <EPERSON xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="ContextPersonMessage">
                          <xsl:for-each select="HRMD_A07/IDOC/E1PLOGI">
                <CONTEXTPERSON personid="" id="">
                      <PERSON action="add">
                               <TITLE></TITLE>
                               <FIRSTNAME><xsl:value-of select="E1PITYP/E1P0002/VORNA"/></FIRSTNAME>
                               <SECONDNAME></SECONDNAME>
                               <NAME><xsl:value-of select="E1PITYP/E1P0002/NACHN"/></NAME>
                               <ADDRESS1></ADDRESS1>
                               <ADDRESS2></ADDRESS2>
                               <POSTALCODE></POSTALCODE>
                               <CITY></CITY>
                               <COUNTRY></COUNTRY>
                               <COUNTRYID></COUNTRYID>
                               <PROFESSION></PROFESSION>
                               <LANGUAGE></LANGUAGE>
                               <LANGUAGEID></LANGUAGEID>
                               <PERSONTYPEID></PERSONTYPEID>
                               <CREATIONDATE></CREATIONDATE>
                               <BIRTHDATE></BIRTHDATE>
                               <CATEGORY></CATEGORY>
                             </PERSON>
                      </xsl:for-each>
              </EPERSON>
         </xsl:template>
    </xsl:stylesheet>
    When I test the Interface mapping, I get the following error:
    Transformer configuration exception occurred when loading XSLT test_mapping.xsl (http://polyright.com/xi/HR, 783938d1-4463-11dd-b136-e03ac0a80c15, -1)
    Searching through the forum, it is probably an namespace issue, but I have no idea of what needs to be changed. Any suggestions ?

    Try running end-to-end scenario and check if you could get detailed error message.
    Also check if the problem arises from the "ns0" usage.
    Regards,
    Prateek

  • PDFLPrintDoc function throw exception on Mac in PDF Lib 10

    Hi,
    Currently I'm doing the work of upgrading a xcode project on Mac from PDF lib from 8.1 to 10.
    After change to use PDF lib 10 framework, and build project, I found it throw an exception when calling function PDFLPrintDoc to print PS type, error message saying An internal error occured.
    However, on Win platform, it is ok.
    I read from release note that since PDF lib 9,  
    PDFLPrintDoc() honors only default values for tilingMode (kPDNoTiling)
    In the previous code, the  flattenInfo variable in PDPrintParams is a null porinter, so I manuall add code to set PDFlattenTilingMode to be kPDNoTiling.
    But the problem is, now when running ,it still throw exception saying "An internal error occured" , nothing changed.
    Has anybody here encountered such problem?
    Please give me an answer, thanks~

    Since this is PDFL, you have a license from either Adobe or Datalogics.  Please contact their support directly.

  • Programmatically adding chart to a report throws exception

    programmatically adding chart to a report throws exception "chart condition fields are not valid".
    Configuration:
    I am using CR4E to create web application, I've added RAS jars (rasapp.jar, rascore.jar, reporttemplate.jar, serialization.jar) to this web application. For designing reports i am using Crystal Reports 2008.
    Code:
    <%
    // Get the previously opened report from the session.
    ReportClientDocument reportClientDocument =
         (ReportClientDocument)session.getAttribute("ReportClientDocument");
    System.out.println(reportClientDocument.getReportDocument().getName());
    // Try to get the report's DataDefinition object.
    IDataDefinition dataDefinition;
    try
         dataDefinition = reportClientDocument.getDataDefController().getDataDefinition();
    // If the DataDefinition object can not be retrieved, redirect the user to an error page.
    catch (Exception e)
         System.out.println("With error1");
        return;
    // Create a new ChartDefinition object and set its type to ChartType.group.
    ChartDefinition chartDefinition = new ChartDefinition();
    chartDefinition.setChartType(ChartType.group);
    Get the conditional field of the report's first group. Set this conditional
    field for the ChartDefinition object using the setConditonalFields method. Notice
    that the conditional field is first placed in a Fields collection because the
    setConditionalFields method takes a Fields object as an argument.
    Fields conditionFields = new Fields();
    if (!dataDefinition.getGroups().isEmpty())
         IField field = dataDefinition.getGroups().getGroup(0).getConditionField();
         System.out.println("Condition field name ->" + field.getLongName(Locale.ENGLISH));
         conditionFields.addElement(field);
    chartDefinition.setConditionFields(conditionFields);
    //Get the summary field name from the form on the previous page.
    String summaryFieldName = URLDecoder.decode(request.getParameter("summaryField"));
    System.out.println("Summary field name ->" + summaryFieldName);
    Loop through all of the report's summary fields until the one matching the name
    above is found. Set this summary field for the ChartDefinition object using the
    setDataFields method. Notice that the summary field is first placed in a Fields
    collection because the setDataFields method takes a Fields object as an argument.
    Fields dataFields = new Fields();
    for (int i = 0; i < dataDefinition.getSummaryFields().size(); i++)
        IField summaryField = dataDefinition.getSummaryFields().getField(i);
         if (summaryField.getLongName(Locale.ENGLISH).equals(summaryFieldName))
              System.out.println("Adding data field ->" + summaryFieldName);
              dataFields.addElement(summaryField);
    chartDefinition.setDataFields(dataFields);
    Create a new ChartObject to represent the chart that will be added.  Set the
    ChartDefinition property of the ChartObject using the ChartDefinition object created
    above.
    ChartObject chartObject = new ChartObject();
    chartObject.setChartDefinition(chartDefinition);
    Get the chart type, chart placement, and chart title strings from the form on the
    previous page. If no chart title was chosen, create a generic title.
    String chartTypeString = request.getParameter("type");
    String chartPlacementString = request.getParameter("placement");
    String chartTitle = request.getParameter("title");
    System.out.println("chartTypeString ->"+ chartTypeString + "<-chartPlacementString->" + chartPlacementString + "<-chartTitle->"+chartTitle);
    if (chartTitle.equals(""))
         chartTitle = "untitled";
    Create a ChartStyleType object and a AreaSectionKind object based on the
    the chartTypeString and chartPlacementString retrieved above. In this example
    possible chart types are bar chart and pie chart. Possible chart placements
    are header and footer.
    ChartStyleType chartStyleType = ChartStyleType.from_string(chartTypeString);
    AreaSectionKind chartPlacement = AreaSectionKind.from_string(chartPlacementString);
    // Set the chart type, chart placement, and chart title for the chart.
    chartObject.getChartStyle().setType(chartStyleType);
    chartObject.setChartReportArea(chartPlacement);
    chartObject.getChartStyle().getTextOptions().setTitle(chartTitle);
    // Set the width, height, and top for the chart.
    chartObject.setHeight(5000);
    chartObject.setWidth(5000);
    chartObject.setTop(1000);
    Get a ReportDefController object that can be used to modify the report's definition.
    ReportDefController reportDefController;
    try
         reportDefController = reportClientDocument.getReportDefController();
    catch (Exception e)
         System.out.println("With Error2");
         return;
    *Create a Section object that represents the section that will hold the chart.
    If the chart placement was set header, get the header section, otherwise, if the
    chart placement was set to footer, get the footer section.
    Section chartSection = null;
    if (chartPlacement.equals(AreaSectionKind.reportHeader))
         IArea reportHeaderArea =
              reportDefController.getReportDefinition().getReportHeaderArea();
         chartSection = (Section)reportHeaderArea.getSections().getSection(0);
    else if (chartPlacement.equals(AreaSectionKind.reportFooter))
         IArea reportFooterArea =
              reportDefController.getReportDefinition().getReportFooterArea();
         chartSection = (Section)reportFooterArea.getSections().getSection(0);
    Add the chart to the section using the ReportDefController object.
    reportDefController.getReportObjectController().add(chartObject, chartSection, 1);
    // Save the changes and close the report.
    reportClientDocument.save();
    reportClientDocument.close();
    session.removeAttribute("ReportClientDocument");
    %>     
    Trace:
    com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException: The chart condition fields are not valid.---- Error code:-2147213287 Error code name:invalidChartObject
         at com.crystaldecisions.sdk.occa.report.lib.ReportDefControllerException.throwReportDefControllerException(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportObjectController.add(Unknown Source)
         at org.apache.jsp.AddChart_jsp._jspService(AddChart_jsp.java:230)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:244)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:276)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:218)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
         at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:393)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
         at java.lang.Thread.run(Thread.java:595)

    Please try this code snippet
    var cs:ColumnSeries = new ColumnSeries();
    cs.dataProvider = dp;
    cs.displayName = "Series 2";
    cs.yField = "values";
    chart.series.push(cs);
    OR
    var temp:Array = [];
    var cs:ColumnSeries = new ColumnSeries();
    cs.dataProvider = dp;
    cs.displayName = "Series 2";
    cs.yField = "values";
    temp = chart.series;
    temp.add(cs);
    chart.series = temp;

  • RuntimeException in Message-Mapping transformation: Runtime exception durin

    Hi Friends,
    Iam going test Message Mapping, i got the error like
      RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /ns0:LeapIndent_R3_MT/Recordset/RowData/QTY_TNS. The message is: Exception:[java.lang.NumberFormatException: empty String] in class com.sap.aii.mappingtool.flib3.Arithm method formatNumber[, com.sap.aii.mappingtool.tf3.rt.Context@27f972cf]
    Pls help me ..
    Thanks & Regards,
    Nvr

    Hi Ravi,
      Thanks for ur reply, the problem is solved, the Date field is Mandaratory, they are not mention the data field, so that way the problem is coming.
    Thanks & Regards,
    NVR

  • XI transformer configuration exception

    Hi, I wonder if someone can help. I am struggling with an XSL that has been imported into XI. It is a mapping that has been used in another XI system (that I do not have access to) but I have a screen shot of the XSL. I have 'imported' this as an archive and used it on my mapping as it apparently solves loss of foreign characters when outputting to ISO-8859-1 but when I test I get the message 'Transformer configuration exception occurred when loading XSLT'. The code is as follows: -
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version "1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"  xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <xsl:output encoding="ISO-8859-1"/>
    <xsl:template match="/">
         <xsl:copy-of select="*"/>
         </xsl:template>
    </xsl:stylesheet>
    Can anyone see what is wrong or is there something else I need to do. I added this .xsl into a zip before importing it.
    thanks
    Andy
    Edited by: Andy Jepson on Jan 16, 2008 1:50 PM
    Hi. I think I've solved this. Took the XSL into XMLSpy and saw that the file was badly formed. Even though I had read and re-read the code I seemed to miss an '=' on the version on line 2.
    Andy
    Edited by: Andy Jepson on Jan 16, 2008 4:41 PM
    Sorry guys. I still have a problem with this. The aforementioned XSL simply replaces the whole XML now rather than just amending the file encoding. Anybody help?

    Hi Tapio,
    Pls do check the following points.
    1. Make sure that the xsl file which you have your mapping code is having a 'small letter' extension. i.e., if your file name should be TAPIO.xsl, '.xsl' should not be in capital letters. If not change it and then make a zip file and reimport it as the imported archive.
    2. Check for the well formedness in any of the XML tools like XML spy. If any error is there with the missing tag or syntax you can rectify the same there itself.
    3. Activate the imported archive before using it in Interface Mapping.
    Cheers
    JK

  • ** Throw Exception in BPM - Webservice to JDBC

    Hi friends,
    I am doing Webservice to JDBC scenario using BPM. I am doing insert data in backend system oracle table by passing inputs from WebService. After insert data in table, JBDC returns the response to web service thru response variable 'insert_count = 1' like this. When I try to insert the same record, that is, employee no as primary key in my table,  XI throws an error 'ORA-00001 - unique constraint' in Addtional . We have to pass this information to Web Service. How will we achive this ?
    Presently in our BPM design,
    1) Exception property of the block as 'Error'.
    2) Inside Block, in Sync Send Step (BPM -> JDBC) specified 'Exception/System Error'  as 'Error'.
    3) Inserted one Exception Handler Brach. In this Brach, inserted one control step. In this step, itself we put a Control Step, the action property of this step is 'Throw Exception'. Here , what we need to set for the 'Exception Property' ..?
    Kindly help me friends.

    Hi Mahesh,
    I refered those scenarios. But, our requirment is we want to take 'Additional Text' option from SXMB_MONI and map to WS source structure one element.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?><!-- Call Adapter --> <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1"><SAP:Category>XIServer</SAP:Category><SAP:Code area="INTERNAL">PL_TIMEOUT</SAP:Code><SAP:P1/><SAP:P2/><SAP:P3/><SAP:P4/><SAP:AdditionalText>TIME OUT REACHED</SAP:AdditionalText><SAP:ApplicationFaultMessage namespace=""/><SAP:Stack>Timeout condition of pipeline reached
    </SAP:Stack><SAP:Retry>N</SAP:Retry></SAP:Error>
    Could you kindly help me ?

  • How to throw Exception in Thread.run() method

    I want to throw exception in Thread.run() method. How can I do that ?
    If I try to compile the Code given below, it does not allow me to compile :
    public class ThreadTest {
         public static void main(String[] args) {
         ThreadTest.DyingThread t = new DyingThread();
         t.start();
         static class DyingThread extends Thread {
         public void run() {
         try {
                   //some code that may throw some exception here
              } catch (Exception e) {
              throw e;//Want to throw(pass) exception to caller
    }

    (a) in JDK 1.4+, wrap your exception in RuntimeException:
    catch (Exception e)
    throw new RuntimeException(e);
    [this exception will be caught by ThreadGroup.uncaughtException() of this thread's parent thread group]
    In earlier JDKs, use your own wrapping unchecked exception class.
    (b) if you know what you are doing, you can make any Java method throw any exception using Thread.stop(Throwable) regardless of what it declares in its "throws" declaration.

Maybe you are looking for

  • Projects are seen in workspace but not getting displayed

    I have some Web dynpro, JEEE, Dictonary DCs and projects in workspace, but it is not getting displayed when I open NWDS. I have given the correct workspace path but still the Project explorer is blank Please help. (P.S. NWDS was shut down improperly.

  • Issues with Mac Book Pro after migration

    Hi all, I changed my macbook pro few days ago for new one. I used Migration path with a Time Machine´s backup but performance of new MacBook is not my expectation (a lot of reboots and crashes). I appreciate any help. EtreCheck version: 2.1.8 (121) R

  • Exchange 2010 Std. on Esxi 5.0 (suggestions for deployment)

    Dear Experts, Soon we will be starting process of moving from E2k3 to E2k10 and it is going to be on Esxi 5.0. In this regard, I have concerns are there some guidelines to follow for it exchange 2010 virtualization? - How much size HDD when server ho

  • Why not add a custom URL variable to publishing options?

    This program is great to animate with, but EXTREMELY FREAKIN' FRUSTRATING to implement. A lot of this could be alleviated if the "publish" options let me specify an URL at the host level (or better yet an FTP protocol that I could upload my work with

  • Mail (8.0) preference for all recipients displayed

    I've searched online and I've looked over the Mail preferences and view options, but I just can't figure out how to make ALL recipients show in emails that I send and receive. For example, a friend sends me (and 4 others) an email. When I see it in M