Error:xml declaration may only begin enttties

my problem is that the code by the name DomEcho01.java in this tutorial
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/
compiles fine but at run time it gives me an error saying
"error:xml declaration may only begin enttties "
can ne1 tell me y is this happenin
thanx
sam

<?xml version='1.0' encoding='utf-8'?>
<!--  A SAMPLE set of slides  -->
<slideshow
    title="Sample Slide Show"
    date="Date of publication"
    author="Yours Truly"
    >
    <!-- TITLE SLIDE -->
    <slide type="all">
      <title>Wake up to WonderWidgets!</title>
    </slide>
    <!-- OVERVIEW -->
    <slide type="all">
      <title>Overview</title>
      <item>Why <em>WonderWidgets</em> are great</item>
      <item/>
      <item>Who <em>buys</em> WonderWidgets</item>
    </slide>
</slideshow>i am using the same xml file that is given in the tutorial

Similar Messages

  • "XML declaration allowed only at the start document "on Safari Iphone3G

    Hi
    I get the following error message on my Iphone3G with Vodaphone Hong Kong:
    "The following page contains the following errors:
    error on line 4 at column 6; XML declaration allowed only at the start document
    Below is a rendering of the page up to the first error"
    Moreover I see nothing in the page its empty.
    the corresponding URL is "http://smartone-vodafone.m-finance.net"(only avaible to vodaphone suscriber i guess
    with APN:Smartone-Vodaphone)
    does anyone get same problem? how to solve it?
    thx very much

    Hi,
    I am not sure if you can access it because its for Vodaphone suscriber only, I access first to "SmartIn" service via http://wap.smartone-vodafone.com so thereafter I enter to an other payed financial page "PLUS" via "http://plus.smartone-vodafone.com" and then the "Quote" menu afterwards I cannot open the page to see the price of Gold/Silver which gave me the previous error message and blank page at this adress on my Iphone3G
    "http://smartone-vodafone.m-finance.net/PLUSGS_ST/EN/index.jsp"
    But when I surf on my Laptop I found it seems to be a service provide by this other company "http://smartone-vodafone.m-finance.net"
    I tried different setting (console off/on) javascript/plug-ins/block pop up/accept cookies all On or Off but no succes. Its a pity because I bought Iphone3G only for that
    Maybe Apple should discuss between Vodaphone and this company how to solve the problem. It maybe only one error line code because every other page are fine?? my
    thank you very much again,

  • Xml declaration with whitespace leading..

    hi,,,,, we use SOAP message (SOAP with attachments..) to exchange some informations..
    the problem is that our client sends SOAP message like this.. (we captured HTTP input..)
    POST /mms/service HTTP/1.0
    Content-Type: multipart/related; boundary="NextPart_000_0125_01C19839.7237929064"; type="text/xml"; start="<0406262209010000000003>"
    Content-Length: 14687
    SOAPAction: ""
    --NextPart_000_0125_01C19839.7237929064
    Content-Type: text/xml
    Content-ID: <0406262209010000000003>
    <?xml version="1.0" encoding="euc-kr" ?>
         <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
         <env:Header>
    as you can see,, xml declaration has leading whitespaces..
    and, our XML library (crimson or xerces) throws SAXParseException: "XML declaration may begin entities"
    ofcourse, we should remove leading whitespaces.. but,,, unfortunately it's not an easy work for some reason.
    is there any other way.... let crimson or xerces ignore leading whitespaces.. or any other tolerant parsers ?
    thanks very much for any replies..

    sorry,, i missed pre tag.. the exact HTTP input is like below..
    <pre>
    POST /mms/service HTTP/1.0
    Host: 211.39.152.216
    Content-Type: multipart/related; boundary="NextPart_000_0125_01C19839.7237929064"; type="text/xml"; start="<0406262209010000000003>"
    Content-Length: 14687
    SOAPAction: ""
    --NextPart_000_0125_01C19839.7237929064
    Content-Type: text/xml; charset="euc-kr"
    Content-ID: <0406262209010000000003>
    <?xml version="1.0" encoding="euc-kr" ?>
         <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
         <env:Header>
    </pre>

  • Cash Discount may only be granted up to 3%

    Hi Guys,
    Im new to FI. While posting an invoice in MIRO, we encounter an error "Cash Discount may only be granted up to 3%".  Payment term we are using has cash discount of 5%. I want to take out the limit of the cash discount, how will I do it? What transaction codes to be used? Thanks.

    this is held in tolerances
    This is in SPRO "Define Tolerances Vendors"
    You have groups, and the tolerance group is assigned to the Vendor

  • Set ZATTR_PROD may only be changed in the original system

    Please,
    Iu2019ve enhancement the PRODUCT_CUSTOMER2 BADI to change product attribute type when Iu2019m replicating products from ECC to CRM.
    When I try to replicate the material from ECC to CRM thereu2019s the follow error:
    "Set ZATTR_PROD may only be changed in the original system"
    How can I solve it?
    Thanks in advance
    Edited by: Ronaldo Alvarenga on Oct 25, 2010 11:17 PM

    Hello,
    Maintain an entry for Z* settype in below path:
    SPRO>IMG>CRM>Master Data>Products>Enhancements>Allow Changes to Product Data.
    Hope this helps!
    Best Regards,
    Shanthala Kudva.

  • ERROR: XML parse error: Error on line 1 of document: cvc-elt.1: Can not find the declaration of element 'model'. Nested exception: Can not find the declaration of element 'model'.

    I have install flash builder 4 beta 2 + blazeds 4.00.7548. While try to connect to data service and face a problem.
    When i use a beta 1 that no such probem. please help.
    ERROR: XML parse error: Error on line 1 of document: cvc-elt.1: Can not find the declaration of element ‘model’. Nested exception: Can not find the declaration of element ‘model’.

    Hello All!
    I'm just getting started with Flash Builder 4 and BlazeDS and I'm having this same issue.     I have installed the FlashBuilder 4 beta 2  Build 253292, and Blaze 4  ( blazeds-turnkey-4.0.0.14341 ).       I have also installed the livecycle_dataservices3_modelerplugin_100509.      Upon clicking Data-Connect to data/service and then Blazeds,   I can see my DAO object listed.   However, if I select it I receive the dreaded error.       Now if I code in the remote object manually, in the  .mxml file and run it, all works just fine.        It's only while trying to use the object within Flashbuilder that I have the problem.     I see lots of ideas kicked around for this, and it seems that various solutions have worked for different users.    Can somebody put together a 'cookbook' of just exactly how to set things up to make this work? 
    Thanks

  • Error for output tax code:Tax code I4 may only contain one assignment line.

    Hi
    While posting customer invoice with output tax code, I am getting following error.
    Tax code I4 may only contain one assignment line.
    Please help me resolve.
    Regards
    Rekha

    There are quite some answered questions in this forum for this issue.
    Here is one.
    Error in Sample document (Message no. FF731)
    Also, please search the forum with the following search key words.
    Tax AND code AND may AND only AND contain AND one AND assignment AND line
    Make sure you select all posts, not just the past 90 days (the default option), and you will see quite some hits.

  • Error "You may only define methods within "CLASS class IMPLEMENTATION"

    We have code in LMIGOSMC so that the vendor batch number appears in the MIGO transaction for certain movement types.  We have created another, custom movement type in which this functionality should be available so I need to add it to LMIGOSMC.  When I go in and try to make the modification I am getting the following error:
    "You may only define methods within "CLASS class IMPLEMENTATION ...ENDCLASS".
    What am I doing wrong?

    Hi,
    You are not doing anything wrong with regard to the syntax error you are getting.  During the syntax check of include program LMIGOSMC, the system is not aware of the CLASS... ENDCLASS statements within the program LMIGOSM4.  Try the syntax check at the LMIGOSM4 program level (or even better, at the SAPLMIGO level) and you will see that the error is not given.
    Regards,
    Jamie

  • Character conversion error: "Unconvertible UTF-8 character beginning with 0

    Hi All,
    I developed an Adapter Module and added to Adapter Framework.
    package sample;
    import java.io.InputStream;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import javax.ejb.CreateException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NodeList;
    import com.sap.aii.af.mp.module.Module;
    import com.sap.aii.af.mp.module.ModuleContext;
    import com.sap.aii.af.mp.module.ModuleData;
    import com.sap.aii.af.mp.module.ModuleException;
    import com.sap.aii.af.ra.ms.api.Message;
    import com.sap.aii.af.ra.ms.api.XMLPayload;
    @ejbHome <{com.sap.aii.af.mp.module.ModuleHome}>
    @ejbLocal <{com.sap.aii.af.mp.module.ModuleLocal}>
    @ejbLocalHome <{com.sap.aii.af.mp.module.ModuleLocalHome}>
    @ejbRemote <{com.sap.aii.af.mp.module.ModuleRemote}>
    @stateless
    public class SetAttachmentName implements SessionBean, Module {
         private SessionContext myContext;
         private String mailFileName = "UStN";
         public void ejbRemove() {
         public void ejbActivate() {
         public void ejbPassivate() {
         public void setSessionContext(SessionContext context) {
              myContext = context;
         public void ejbCreate() throws CreateException {
         public ModuleData process(
              ModuleContext moduleContext,
              ModuleData inputModuleData)
              throws ModuleException {
              // create a second attachment for the receiver mail adapter
              try {
                   //                  get the XI message from the environment
                   Message msg = (Message) inputModuleData.getPrincipalData();
                   //               creating parsable XML document
                   InputStream XIStreamData = null;
                   XMLPayload xmlpayload = msg.getDocument();
                   XIStreamData = xmlpayload.getInputStream();
                   DocumentBuilderFactory docBuilderFactory =
                        DocumentBuilderFactory.newInstance();
                   DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
                   Document doc = docBuilder.parse(XIStreamData);
                   //            finding the tag's name from the Modules tab in the Directory that will hold the attachment's name
                   String absenderIDTag = null;
                   absenderIDTag = moduleContext.getContextData("<RCVPRN>");
                   //            finding the content of the tag that will be used as the attachment's name (assuming it's the only tag with this name)
                   Element element = doc.getDocumentElement();
                   NodeList list = doc.getElementsByTagName(absenderIDTag);
                   mailFileName += "_" + list.item(0).getFirstChild().toString();
                   String anIDTag = null;
                   anIDTag = moduleContext.getContextData("<CREDAT>");
                   element = doc.getDocumentElement();
                   list = doc.getElementsByTagName(anIDTag);
                   mailFileName += "_" + list.item(0).getFirstChild().toString();
                   Date date = new Date(System.currentTimeMillis());
                   //            Add date to the Message
                   SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
                   mailFileName += "_" + dateFormat.format(date);
                   String belegNummerTag = null;
                   belegNummerTag = moduleContext.getContextData("<BULK_REF>");
                   element = doc.getDocumentElement();
                   list = doc.getElementsByTagName(belegNummerTag);
                   mailFileName += "_" + list.item(0).getFirstChild().toString();
                   //               creating the attachment
                   byte by[] = xmlpayload.getText().getBytes();
                   XMLPayload attachmentPDF = msg.createXMLPayload();
                   attachmentPDF.setName(mailFileName);
                   attachmentPDF.setContentType("application/pdf");
                   attachmentPDF.setContent(by);
                   //adding the message to the attachment
                   msg.addAttachment(attachmentPDF);
                   //                  provide the XI message for returning
                   inputModuleData.setPrincipalData(msg);
              } catch (Exception e) {
                   //                  raise exception, when an error occurred
                   ModuleException me = new ModuleException(e);
                   throw me;
              //                  return XI message
              return inputModuleData;
    I get the following error
    Character conversion error: "Unconvertible UTF-8 character beginning with 0xaa" (line number may be too low).
    Any tips, pointers ?
    Thanks in Advance
    Mukhtar

    Hi Henrique,
    I am using .getNodeValue()
    import java.io.InputStream;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import javax.ejb.CreateException;
    import javax.ejb.SessionBean;
    import javax.ejb.SessionContext;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NodeList;
    import com.sap.aii.af.mp.module.*;
    import com.sap.aii.af.ra.ms.api.*;
    @ejbHome <{com.sap.aii.af.mp.module.ModuleHome}>
    @ejbLocal <{com.sap.aii.af.mp.module.ModuleLocal}>
    @ejbLocalHome <{com.sap.aii.af.mp.module.ModuleLocalHome}>
    @ejbRemote <{com.sap.aii.af.mp.module.ModuleRemote}>
    @stateless
    public class UStNAttachmentName3 implements SessionBean, Module {
         private SessionContext myContext;
         private String mailFileName = "UStN";
         public void ejbRemove() {
         public void ejbActivate() {
         public void ejbPassivate() {
         public void setSessionContext(SessionContext context) {
              myContext = context;
         public void ejbCreate() throws CreateException {
         public ModuleData process(
              ModuleContext moduleContext,
              ModuleData inputModuleData)
              throws ModuleException {
              // create a second attachment for the receiver mail adapter
              try {
                   // get the XI message from the environment
                   Message msg = (Message) inputModuleData.getPrincipalData();
                   // creating parsable XML document
                   InputStream XIStreamData = null;
                   XMLPayload xmlpayload = msg.getDocument();
                   XIStreamData = xmlpayload.getInputStream();
                   DocumentBuilderFactory docBuilderFactory =
                        DocumentBuilderFactory.newInstance();
                   DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
                   Document doc = docBuilder.parse(XIStreamData);
                   // finding the tag's name from the Modules tab in the Directory that will hold the attachment's name
                   String absenderIDTag = null;
                   absenderIDTag = moduleContext.getContextData("<RCVPRN>");
                   // finding the content of the tag that will be used as the attachment's name (assuming it's the only tag with this name)
                   Element element = doc.getDocumentElement();
                   NodeList list = doc.getElementsByTagName(absenderIDTag);
                   mailFileName += "_" + list.item(0).getFirstChild().getNodeValue();
                   String anIDTag = null;
                   anIDTag = moduleContext.getContextData("<CREDAT>");
                   element = doc.getDocumentElement();
                   list = doc.getElementsByTagName(anIDTag);
                   mailFileName += "_" + list.item(0).getFirstChild().getNodeValue();
                   Date date = new Date(System.currentTimeMillis());
                   // Add date to the Message
                   SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
                   mailFileName += "_" + dateFormat.format(date);
                   String belegNummerTag = null;
                   belegNummerTag = moduleContext.getContextData("<BULK_REF>");
                   element = doc.getDocumentElement();
                   list = doc.getElementsByTagName(belegNummerTag);
                   mailFileName += "_" + list.item(0).getFirstChild().getNodeValue();
                   // creating the attachment
                   byte by[] = xmlpayload.getText().getBytes();
                   XMLPayload attachmentPDF = msg.createXMLPayload();
                   attachmentPDF.setName(mailFileName);
                   attachmentPDF.setContentType("application/pdf");
                   attachmentPDF.setContent(by);
                   //adding the message to the attachment
                   msg.addAttachment(attachmentPDF);
                   // provide the XI message for returning
                   inputModuleData.setPrincipalData(msg);
              } catch (Exception e) {
                   // raise exception, when an error occurred
                   ModuleException me = new ModuleException(e);
                   throw me;
              // return XI message
              return inputModuleData;
    Still I get the same error.
    org.xml.sax.SAXParseException: Character conversion error: "Unconvertible UTF-8 character beginning with 0xaa" (line number may be too low).
    Adapter-Framework: Character conversion error: "Unconvertible UTF-8 character beginning with 0xaa" (line number may be too low).
    Regards,
    Mukhtar

  • Oracle Service Bus 11g omit-xml-declaration="yes" not working in XSL-T

    I have the requirement of removing the XML header from xsl output.
    eg: <?xml version="1.0" encoding="UTF-8" ?> this part has to removed
    I tried using the following in XSLT:
    <xsl:output indent="yes" omit-xml-declaration="yes" />.
    It seems to work in all online xml compilers. It does not work in work in OSB.
    I posted the message in a JMS Queue and it contains the xml header.
    Is this a work around for this issue?

    I'm pretty sure XSLT has nothing to do with that PI.
    After all, XSLT in OSB doesn't format text, it generates an XmlObject. The formatting (including adding the <?xml?> PI) are done by other parts of the engine. Probably the XmlBeans serializator.
    The only option I see is to serialize the XML, then cut off everything until first ?>.
    Why would you need that, I wonder? May be there is a better way.
    Vlad @ genericparallel.com

  • How do i prevent getting a xml declaration in the xml response

    Hi,
    I am using a soap call to access a webservice via plsql.
    The xml response from the webservice starts as follows
    <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">..............
    I want to find ways to
    1. either prevent the xml tag <?xml version='1.0' encoding='UTF-8'?> from being returned in the response.
    2. or somehow convert the entire response to a string and remove it by substr (not sure about this)
    The issue i am facing is that when i run a xmltype.extract on the xml to get a particular node i am getting the
    ORA-31013: Invalid XPATH expression
    when i remove the tag from the response (using hardcoded values) i get the right values back.
    Any suggestions are welcome.
    Regards
    kpillai

    Hi,
    The code extract with hardcoded values looks like this. Please note that i added quotes in the xml statement
    '<?xml version=''1.0'' encoding=''UTF-8''?>which is not the case when oracle returns the xml and i guess thats the whole issue.
    The code below runs perfectly. But when the entire procedure runs where the xml response is returned I get the error.
    DECLARE
    v_result XMLType;
    v_xml XMLType;
    v_request_id varchar2(100);
    v_start varchar2(10);
    v_end number(10);
    p_namespace varchar2(2000):='xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:service="http://mercury.com/ppm/dm/service/1.0" xmlns:common="http://mercury.com/ppm/common/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://mercury.com/ppm/dm/1.0"';
    BEGIN
         v_xml := XMLType('<?xml version=''1.0'' encoding=''UTF-8''?><soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Header /><soapenv:Body><service:createRequestResponse xmlns="http://mercury.com/ppm/dm/1.0" xmlns:service="http://mercury.com/ppm/dm/service/1.0" xmlns:common="http://mercury.com/ppm/common/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><service:return xmlns:service="http://mercury.com/ppm/dm/service/1.0" xmlns:common="http://mercury.com/ppm/common/1.0" xmlns="http://mercury.com/ppm/dm/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <addedBy>srvnewscale</addedBy>
    <creationDate>2010-10-22T10:33:44Z</creationDate>
    <description>testing1</description>
    <name>20013876</name>
    <displayURL>http://itg.abc.com:19001/itg/web/knta/crt/RequestDetail.jsp?REQUEST_ID=12345678</displayURL>
    <identifier><id>20013876</id>
    <serverURL>http://itg.abc.com:19001/itg/ppmservices/DemandService</serverURL>
    </identifier><status>Enter - Amend Service Offering</status>
    </service:return>
    </service:createRequestResponse>
    </soapenv:Body></soapenv:Envelope>');
         v_result := xmltype.extract(v_xml,'/soapenv:Envelope/soapenv:Body/service:createRequestResponse/service:return/name', p_namespace);
    insert into result2 values(v_result);
         if (v_result is NULL)
         then
         dbms_output.put_line('no result');
         end if;
         end;
    Regards
    Edited by: 804401 on Oct 24, 2010 9:21 PM

  • Character conversion error: Unconvertible UTF-8 character beginning..

    Hello,
    I'm using TrAX for XSLT transformations, and having a following
    problem
    Character conversion error: "Unconvertible UTF-8 character beginning with 0xa9" (line number may be too low).
    org.xml.sax.SAXParseException: Character conversion error: "Unconvertible UTF-8 character beginning with 0xa9" (line number may be too low).
            at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)
            at org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1072)
            at org.apache.crimson.parser.InputEntity.isXmlDeclOrTextDeclPrefix(InputEntity.java:914)
            at org.apache.crimson.parser.Parser2.maybeTextDecl(Parser2.java:2795)
            at org.apache.crimson.parser.Parser2.externalParameterEntity(Parser2.java:2880)
            at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1167)
            at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:489)
            at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
            at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
            at mlts.converter.XMLImport.outputESGML(XMLImport.java:311)
            at mlts.converter.Converter.processFile(Converter.java:312)
            at mlts.converter.Converter.Convert(Converter.java:229)
            at test.main(test.java:7)Following the source code, I've found that the exception is thrown
    when it reads DTD. I tried to read DTD using InputSource
    in ascii, in latin-1 and my program reads it without any problem.
    I really appreciate any help,
    Thanks

    http://forum.java.sun.com/thread.jsp?forum=34&thread=254927

  • Error : Array constants can only be used in initializers

    Hello All,
    I am using tableview model and declared two-dimensional array.
    Getting error Array constants can only be used in initializers in the line retVal<i>[j] =  {  {  createBy,desc,dispName }  };
    String[][] retVal;
    retVal = new String[20][20]
    //Fetching IResorce propeties here
    int resourceCounter = 0;
    for (int i = 0; i < list.size(); i++) {
       for (int j = 0; j < i; j++) {
          IResource ir = list.get(i);
          createBy = ir.getCreatedBy();
          desc = ir.getDescription();
            dispName = ir.getDisplayName();
         retVal<i>[j] =  {  {  createBy,desc,dispName }  };
         resourceCounter++;
    return retVal;
    Please help me out.
    Thanks
    Risha                              }

    I created ArrayList 
    static public String[] colnames =
                   "News Title",
                   "Short Description",
                   "Published",
                   "Valid To",
                   "Read Count",
                   "Users Details",
                   "Reply" };
         public ArrayList createData() {
               ArrayList rowArrList = new ArrayList();
              ArrayList tableArrList = new ArrayList();
              String createBy = null;
              String desc = null;
              String dispName = null;
              String lastMod = null;
              String name = null;
              String resType = null;
              try {
                   com.sapportals.portal.security.usermanagement.IUser user = null;
                   user = WPUMFactory.getUserFactory().getEP5User(request.getUser());
                   IResourceContext resourceContext = new ResourceContext(user);
                   String path = "/documents/Australia/News";
                   RID rid = RID.getRID(path);
                   com.sapportals.wcm.repository.IResource res =
                        ResourceFactory.getInstance().getResource(rid, resourceContext);
                   IProperty prop = null;
                   String propValue = null;
                   PropertyName propName = null;
                   if (res != null) {
                        if (res.isCollection()) {
                             ICollection collection = (ICollection) res;
                             IResourceList list = collection.getChildren();
                             int resourceCounter = 0;
                             for (int i = 0; i < list.size(); i++) {                              
    //                              for (int j = 0; j < i; j++) {
                                       IResource ir = list.get(i);
                                       createBy = ir.getCreatedBy();
                                       desc = ir.getDescription();
                                       dispName = ir.getDisplayName();
                                       lastMod = ir.getLastModifiedBy();
                                       name = ir.getName();
                                       resType = ir.getResourceType();
                                       rowArrList.add(createBy);
                                       rowArrList.add(desc);
                                       rowArrList.add(dispName);
                                       rowArrList.add(lastMod);
                                       rowArrList.add(name);
                                       rowArrList.add(resType);
                                       tableArrList.add(i,rowArrList);
                                  //}//Inside for loop
                             }//First for loop
                        }//Inside If
              } catch (ResourceException e) {
                   // TODO Auto-generated catch block
                   response.write("Error " + e.getMessage());
              } catch (UserManagementException ex) {
                   ex.printStackTrace();
                   response.write("Error " + ex.getMessage());
              return tableArrList;
          * Constructor.
         public TableViewBean() {
              ArrayList tabArr = createData();
              String[][] data = (String[][])tabArr.toArray();          
              model = new DefaultTableViewModel(data, colnames);
    Edited by: Risha on May 26, 2011 8:52 AM

  • Invalid xml declaration

    Hi all,
    Seem to be having a little difficulty. When I try and load my xml file into MSWord using the template builder I get this error:
    Invalid xml declaration: Line 1, position 5, file pos 4, source: <?xml version="1.0"?> url that then points to my file.
    I am at a total loss as to why this is? I have declared the following. My xml version is declared in line 1.
    BEGIN
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<?xml version="1.0"?>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<PERDUMMY1>');
    FOR v_employee IN csr_employee
    LOOP
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<G_EMP_NAME>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Last_update_date>' || v_employee.effective_start_date      ||'</Last_update_date>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<ID>'           || v_employee.ID                     ||'</ID>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<TITLE>'           || v_employee.TITLE                ||'</TITLE>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Marital_status>'      || v_employee.Marital_status      ||'</Marital_status>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<full_name>'      || v_employee.full_name                ||'</full_name>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<last_name>'      || v_employee.last_name                ||'</last_name>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<first_name>'      || v_employee.first_name                ||'</first_name>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Age>'           || v_employee.Age                    ||'</Age>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<First_Registration>' || v_employee.First_Registration           ||'</First_Registration>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Date_Of_Birth>'      || v_employee.Date_Of_Birth                ||'</Date_Of_Birth>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Gender>'           || v_employee.Gender                ||'</Gender>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Race>'           || v_employee.Race                     ||'</Race>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Personal_Address>'     || replace(v_employee.Personal_Address,'&','and')      ||'</Personal_Address>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Suburb>' || v_employee.Suburb ||'</Suburb>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Province>'      || replace(v_employee.Province,'&','and')           ||'</Province>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Postal_Code>'      || v_employee.Postal_Code               ||'</Postal_Code>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<City_Name>'      || v_employee.City_Name                ||'</City_Name>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Home_Phone_Number>' || v_employee.Home_Phone_Number          ||'</Home_Phone_Number>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Cell_Phone_Number>' || v_employee.Cell_Phone_Number          ||'</Cell_Phone_Number>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Batch_Number>'      || v_employee.Batch_Number                ||'</Batch_Number>');
    FOR v_prev_emp IN cur_prev_emp (v_employee.person_id)
    LOOP
    /*For each child record create a group tag <G_PREV_EMP> at the start*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<G_PREV_EMP>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<employer_name>' || replace(v_prev_emp.employer_name,'&','and')           || '</employer_name>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<job_name>' || replace(v_prev_emp.job_name,'&','and')          || '</job_name>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<start_date>' || v_prev_emp.start_date || '</start_date>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<end_date>' || v_prev_emp.end_date          || '</end_date>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Grp>' || v_prev_emp.Grp      || '</Grp>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<LEAV_REAS>' || replace(v_prev_emp.LEAV_REAS,'&','and')           || '</LEAV_REAS>');
    /*Close the group tag </G_NO_CHILD> at the end of child record*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</G_PREV_EMP>');
    END LOOP;
    FOR v_prev_Qual IN cur_prev_Qual (v_employee.person_id)
    LOOP
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<G_PREV_qual>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Qual_Type>' || replace(v_prev_qual.Qual_Type,'&','and') || '</Qual_Type>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Qual_date>' || replace(v_prev_qual.Qual_date     ,'&','and')     || '</Qual_date>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<GRADE_ATTAINED>'|| replace(v_prev_qual.GRADE_ATTAINED ,'&','and') || '</GRADE_ATTAINED>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<school_name>' || replace(v_prev_qual.school_name,'&','and')     || '</school_name>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</G_PREV_qual>');
    END LOOP;
    FOR v_train IN cur_train (v_employee.person_id)
    LOOP
    /*For each child record create a group tag <G_TRAIN> at the start*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<G_train>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Course_Name>' || replace(v_train.Course_Name,'&','and') || '</Course_Name>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Course_Desc>' || replace(v_train.Course_Desc,'&','and')          || '</Course_Desc>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Start_date>' || replace(v_train.Start_date,'&','and') || '</Start_date>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<END_DATE>' || replace(v_train.END_DATE,'&','and')          || '</END_DATE >');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</G_train>');
    END LOOP;
    FOR v_MED IN cur_med (v_employee.person_id)
    LOOP
    /*For each child record create a group tag <G_MED> at the start*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<G_MED>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Test>'           || v_MED.Test               || '</Test>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<CONSULTATION_DATE>' || v_MED.CONSULTATION_DATE           || '</CONSULTATION_DATE>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Result>'           || v_MED.Result          || '</Result>');
    /*Close the group tag </G_NO_CHILD> at the end of child record*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</G_MED>');
    END LOOP;
    FOR v_ind IN cur_ind (v_employee.person_id)
    LOOP
    /*For each child record create a group tag <G_IND> at the start*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<G_IND>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Induction_Date>'      || v_IND.Induction_Date               || '</Induction_Date>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<Status>'      || v_IND.Status                     || '</Status>');
    /*Close the group tag </G_NO_CHILD> at the end of child record*/
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</G_IND>');
    END LOOP;
    FOR v_first IN cur_first (v_employee.person_id)
    LOOP
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<G_first>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'<first_Date>'      || v_first.first_Date               || '</first_Date>');
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</G_first>');
    END LOOP;
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</G_EMP_NAME>');
    END LOOP;
    FND_FILE.PUT_LINE(FND_FILE.OUTPUT,'</PERDUMMY1>');
    I would be most grateful if anyone out there has any ideas?

    OPen your xml in IE, it will complain about the same thing.
    The xml formed could be wrong.
    can you paste the xml created here >?

  • Assign dynamic statement in declare block or begin block

    Hi all,
    For below code, if I assign the select statement in the declare section for corresponding variable, will it improve the performance.
    For cust_veh_id we have another cursor in declare block, only partial code is provided.
    What I meant.
    declare
    v_addr_chg_stmt                 varchar2(2000) := 'select ''Y''
    FROM cust_addrs addrs
    WHERE customer_id = :v_customer_id
    AND updated_date >:p_end_date
    and rownum = 1';Actaul
    declare
    p_end_date                      date;
    v_addr_chg_stmt                 varchar2(2000);
    v_mileage_stmt                 varchar2(2000);
    begin
    select updated_date into p_end_date
    from process_log_rfsh
    where tran_code ='CAP';
    v_addr_chg_stmt :=
    'select ''Y''
    FROM cust_addrs addrs
    WHERE customer_id = :v_customer_id
    AND updated_date >:p_end_date
    and rownum = 1'
    v_mileage_stmt :=
    'SELECT ''Y'' FROM cust_vehicles_audit
    WHERE cust_veh_id=:v_cust_veh_id
    AND field_name =''LAST_MILEAGE''
    AND added_date > :p_end_date
    and audit_date >= trunc(:p_end_date)
    and rownum=1'
           begin
                     execute immediate v_addr_chg_stmt
                        into v_addr_change_flag
                        using v_customer_id,  p_end_date;
                 exception
              when no_data_found then
                     v_addr_change_flag:='N';
                 end;
            begin
                   execute immediate v_mileage_stmt
                     into v_mileage_change_flag
                    using v_cust_veh_id,  p_end_date, p_end_date;
               exception
             when no_data_found then
                   v_mileage_change_flag:='N';
               end;
    end;Thanks
    Raghu
    Edited by: Raghu on 18 Jan, 2013 1:13 PM

    Raghu wrote:
    This code is already running in production from few years.Not a valid reason to justify using dynamic SQL.
    YOU NEED JUSTIFICATION FOR USING DYNAMIC CODE. In any language.
    Again: WHAT is your justification? If you cannot provide that, then why are you using dynamic code??
    If we have to use dynamic sql, performance wise defining in declare block or begin will be better.No difference - as neither method changes the actual SQL cursor executed. Neither makes the resulting cursor read data blocks faster.
    PL/SQL also does not care where variable assignment happens. The difference is so tiny and so small, it is irrelevant to performance:
    SQL> declare
      2          t1      timestamp;
      3  begin
      4          --// test 1
      5          t1 := systimestamp;
      6          for i in 1..10000 loop
      7                  declare
      8                          num     number;
      9                  begin
    10                          num := 1;
    11                  end;
    12          end loop;
    13          dbms_output.put_line( 'Test 1. '||to_char(systimestamp-t1) );
    14 
    15          --// test 2
    16          t1 := systimestamp;
    17          for i in 1..10000 loop
    18                  declare
    19                          num     number := 1;
    20                  begin
    21                          null;
    22                  end;
    23          end loop;
    24          dbms_output.put_line( 'Test 2. '||to_char(systimestamp-t1) );
    25 
    26  end;
    27  /
    Test 1. +000000000 00:00:00.000040000
    Test 2. +000000000 00:00:00.000024000
    PL/SQL procedure successfully completed.
    SQL>

Maybe you are looking for

  • Can't print to Networked Brother MFC-7420 Printer after installing 10.6

    A few days ago my dad decided to finally take the plunge and let me upgrade his operating system from 10.5 to Snow Leopard 10.6.6 on his Imac. Ever since then I have been unable to print to his Brother MFC-7420 printer. The printer is connected to hi

  • Is there a way to prevent timeline from opening every time?

    Every time I create a new project it opens with the timeline open and rulers on.  And it drives me crazy! Anyone else have this issue, or a fix for it?

  • Itunes Windows working no sound.

    Itunes visually shows it is playing a song; just no audio can be heard. It's a new win core2duo machine XPProSp2b. I have a RME fireface 800 unit. I would like to assign Itunes to play out of. It's a brand new install. Latest download of Itunes for W

  • Wifi connected, but no internet until wifi turned off and on...

    hello. I just got a new macbook air, 2012. Running mountain lion. while connected to the internet via wifi, suddenly the internet disconnects. The only solution has been to turn off wifi, and then back on. Then, its fine for a while. I thought it was

  • Manufacturing plant as well as Subcontractor.

    Hi, This is regarding a repetitive manufacturing plant (Make to Stock) also used as a subcontractor for another company of the same client for same manufactured material. Plant A of company code "1000" manufactures FG under repetitive scenario. Plant