Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    com.isomorphic.xml.XMLParsingException

    My application uses SmartClient- Struts2 Configuration.
    I am uploading a file using a datasource/DynamicForm with an attribute defined as binary.
    When I upload the file on the screen the data is submited to Action Class successfully.
    After Submission the user is expected to be on the same page. So when user again selects a new file and submits the data as modification I get an XML Error as

    === 2009-04-13 17:43:08,130 [ng)'] ERROR XML - XML parser fatal error: file '(in
    memory stream)' line 1: org.xml.sax.SAXParseException: XML document structures
    must start and end within the same entity.
    === 2009-04-13 17:43:08,130 [ng)'] DEBUG XML - Exception thrown during XML parsi
    ng
    com.isomorphic.xml.XMLParsingException: [
    "XML parser fatal error: file '(in memory stream)' line 1: org.xml.sax.SAXParse
    Exception: XML document structures must start and end within the same entity."]
    at com.isomorphic.xml.XML.parseXML(XML.java:157)
    at com.isomorphic.xml.XML.toDSRecords(XML.java:241)
    at com.isomorphic.xml.XML.toDSRecords(XML.java:237)
    at com.isomorphic.xml.XML.toDSRecords(XML.java:229)
    at com.isomorphic.rpc.RPCManager.parseRequest(RPCManager.java:923)
    at com.isomorphic.rpc.RPCManager.<init>(RPCManager.java:225)
    at com.db.tf.dss.web.action.TFDSSBaseAction.init(TFDSSBaseAction.java:12
    3)

    This Error Comes only during the second Call and not during the first.

    #2
    Hi vinodevs,

    Please capture the request being sent to the server with Fiddler (IE) or Firebug (Firefox) and post it here.

    Comment


      #3
      Getting XmlParsing Exception while Creating RPCManager in Struts2 Action class

      I am getting following exception while creating RPCManager in struts 2 action .

      XML parser fatal error: file '(in memorystream)' line 1: org.xml.sax.SAXParseException: Element type \"transaction\" must be followed by either attribute specifications, \">\" or \"/>\"."

      I am sending following request :

      RPCManager.send("German","setData(data)",{actionURL:"mystrutsAction.action"})

      setdata(data) is javascript funtion.
      Issue is that my Action class method is getting invoked with the above call.
      But when I try to create RPCManager as below:

      RPCManager rpc = new RPCManager(request,response);

      XmlParsing excption is thrown.

      this is what I found in request parametermap:

      <transaction xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" ="xsd:Object"><transactional ="xsd:long">0</transactional><operations ="xsd:List"><elemi>ResourceFileGeneration</elemi></operations></transaction>


      can someone please help to resolve this problem?

      Comment


        #4
        It looks like Struts, or some other server side layer you have deployed, is altering the XML before you receive it. Take a look at the request as logged by Firebug or the RPC tab in the developer console to verify this.

        If you do verify that the request is being munged, it's likely to be some kind of security service that thinks it is helping out by removing attributes fr inbound XML.

        Comment

        Working...
        X