How to put org.w3c.dom.Document into String

Hello!
I have some sample xml file with xml schema (xsd file). After parsing this sample file into org.w3c.dom.Document I would like to put it into the string and print out for test purpose only. But I don't know how to do it.
I would like to print something like
<somebody>
<first>First somenthing</first>
<second>Second something</second>
</somebody>
Thanks for your advices.

The function you have specified works fine and gives back the string from DOM object.But it ruins all the formatting associated with the XML (like new line character)
Is there any way to overcome it?
Currently if i have a xml as
<student>
<firstname>
</firstname>
</student>
The output of the code u have sent strips off the new line characters and returns everything in a single line as below:
<student> <firstname> </firstname> </student>
Thanks for any help associated with above problem.

Similar Messages

  • How to create org.w3c.dom.Document.

    Hi,
    I have my complete xml file in a String variable like
    String strXml = " <?xml version="1.0"?>
    <report>
    <name>testReport & report
    <duration>Jan to Feb</duration>
    <reportId>1</reportId>
    </report> "
    I need to create a "org.w3c.dom.Document" object from the above "strXml" variable.
    Thanks in advance for your answers,
    Sha S.

    this is the code snippet that would answer u r question
    import org.apache.xml.serialize.XMLSerializer;
    import org.w3c.dom.Attr;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.NamedNodeMap;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.w3c.dom.Text;
    import org.w3c.dom.ProcessingInstruction;
    import org.xml.sax.InputSource;
    import com.exel.businessobjects.*;
    StringReader srxml = new StringReader(xmlcontent);
    Reader rxml     = (Reader)srxml;
    InputSource isxml = new InputSource(rxml);
    DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = dbf.newDocumentBuilder();
    Document doc = db.parse(isxml);

  • Org.w3c.dom.Document  to  String?

    Hi.
    How do I create a String (or a file) from a org.w3c.dom.Document object?
    thanks in advance
    [jarimba]

    I just randomly picked one of the hundreds of posts asking this same question:
    http://forum.java.sun.com/thread.jsp?forum=34&thread=301336

  • How to write the org.w3c.dom.Document  into an XML file.

    The file doesn't not exist. I have a class to form an XML Document object with giving parameters. And then how to write this Document object to an specialitied
    file?

    The easiest way is to use a Transformer to do an default transform of the document from a DOMSource to a StreamResult.
    something like
             TransformerFactory tf = TransformerFactory.newInstance();
             tf.setAttribute("indent-number", new Integer(4));
             Transformer t = tf.newTransformer();
             t.setOutputProperty(OutputKeys.INDENT, "yes");
             t.setOutputProperty(OutputKeys.METHOD, "xml");
             t.setOutputProperty(OutputKeys.MEDIA_TYPE, "text/xml");
             t.transform(new DOMSource(yourDOMDocument), new StreamResult(new OutputStreamWriter(yourFileOutputStream)));

  • How to convert org.dom4j.Document into org.w3c.dom.Document  ?

    Hi,
    I have done googling for how to convert org.dom4j.Document into org.w3c.dom.Document , but could not get any usefull data.
    If any one is having solution or any idea, please reply.
    Thanks in advance
    <!--Session data-->

    Note: This thread was originally posted in the [Java Programming|http://forums.sun.com/forum.jspa?forumID=31] forum, but moved to this forum for closer topic alignment.

  • How to convert clobDomain to org.w3c.dom.Document

    Hi
    We have store the xml data into oracle database as clobDomain.We are reading the same data from db and want to convert it into org.w3c.dom.Document type.We used the method getXMLContentNode() but its doesn't help us.See the below code.
    ClobDomain pedigreeXML = (ClobDomain) pedigreeDocumentRow.getAttribute("PedigreeDocument");
    DocumentBuilderFactory docBuildFactory= DocumentBuilderFactory.newInstance();
    Document containerDoc = docBuildFactory.newDocumentBuilder().newDocument();
    System.out.println(containerDoc.toString()); // this sop statement printing the xml fine
    Node node= pedigreeXML.getXMLContentNode(containerDoc);
    System.out.println(node); // this sop statement is printing data as "oracle.xml.parser.v2.XMLCDATA@1de6ded"
    Please let me know can we convert clobDomain to Document type.
    Thanks
    Baji

    Baji,
    it would help if you give the jdev version you are working on...
    I don't see a problem with the output you get from System.out.println(node); // this sop statement is printing data as "oracle.xml.parser.v2.XMLCDATA@1de6ded"as it only prints you the address of the node, but not the content. Try
    String str = node.getTextContent();and check if this get you the content.
    Timo

  • How to add node value using org.w3c.dom.Document?

    Hi ,
    I'm using org.w3c.dom.Document to deal with xml files. I could successfully add nodes , and their attributes. However I could not add a value of the node. (e.g. <myNode>I couldn't add this value</myNode>)
    does anyone know how to deal with this?
    I tried subNode.setNodeValue("the value i can't add"); whereas the subNode is an instance of org.w3c.dom.Node... i know this is interface i of course used the concrete class
    org.apache.crimson.tree.ElementNode
    but when I used the subNode.getNodeValue() i simply got null?
    can u plz help me?
    thanks in advance

    Reading the API documentation for the Node interface might help. At least you wouldn't be surprised when the results are exactly what the documentation says they will be.
    What would really help would be forgetting the idea that an Element can have a value. Text nodes have values, though, so create a Text node and make it the child of the Element node.

  • How to parse & update org.w3c.dom.Document

    Hi,
    I have a org.w3c.dom.Document "w3Doc" object which is converted to org.jdom.Document object using DOMBuilder().build(w3Doc) method.
    Now the problem which I'm facing is that this org.w3c.dom.Document object contains an illegal xml character & when DOMBuilder().build() method tries to create JDOM doc/tree from org.w3c.dom.Document it raises IllegalDataException & the application errors up.
    Now, I want to parse org.w3c.dom.Document "w3Doc" object & check for illegal xml character in the w3Doc & remove this character.
    Can anyone help me out in finding which parser should I use to read w3Doc & update the doc(by removing the illegal data).
    Thanks in advance,

    Normally a Document is the output of a parser, not the input to one. And all the parsers I know of will not allow invalid XML characters to pass. So it must be that you're creating Text nodes in your program that include invalid XML characters and adding them to a Document. (I'm surprised that the DOM implementation allows you to do that.)
    So you should just stop doing that, instead of trying to find something to clean up the mess after the fact. The XML Recommendation, in section 2.2, tells you what characters are valid in XML. You can find it here:
    http://www.w3.org/TR/REC-xml/

  • Org.w3c.dom.Document to/from String ?

    I need to be able to parse (once) an XML string, and then pass the parsed object around to/from different objects.
    I tried to use org.w3c.dom.Document,
    generated by javax.xml.parsers.DocumentBuilder .
    HOWEVER - I don't see any way to parse an xml String!
    The doc-builder parse() method accepts either a file/url, or an InputStream.
    When I tried to use the StringBufferInputStream I found-out it is deprecated, and that I should use StringReader.
    BUT I cannot parse using StringReader ! (the method parse() doesn't work with it)
    Is there anyway to parse a String to create a Document ?
    ========================================================
    And that's only HALF my problem:
    I did parse an input file into a Document, to experiment a little.
    I then wanted to convert it to an XML String - but couldn't.
    How do I get the xml String from a Document ?
    I cannot: How do I save it to a file ?
    I must say that under .NET both tasks are TRIVIAL:
    XmlDocument.LoadXML()
    XmlDocument.OuterXml
    Thanks
    Meir

    The doc-builder parse() method accepts either a file/url, or an InputStream.This isn't true. Look it up again. There are overridden versions of parse() that use File, InputSource, InputStream, or String. The String one isn't what you want, because the String it takes is a URL pointing to the XML and not the XML itself. The File one doesn't work for you because you don't have a file, and you've already said why the InputStream one doesn't work for you.
    So that leaves the version that takes an InputSource. So, what is an InputSource anyway? You could look it up just by clicking on the link in the API docs...

  • Org.w3c.dom.Document toString() ?

    hi i have a constructed org.w3c.dom.Document var newDoc...
    in ibm developerworks tutorial there is a line newDoc.toString() but that gives "[#document null]"
    newDoc.getDocumentElement().getNodeValue() gives the xml string in jdk 1.4 but not in jdk 1.3 wih apache xerces 2.6.2
    how to i get the xml in string output? (i do not wish to use sun java web service development platform)
    please email responses to vishalrao at gmail dot com , thanks!

    From what I saw there was no change and the document getNodeValue always returns null in jdk1.4 as well.
    you can use the transform api to serialize xml into any serialized output form, including strings.
    look into http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/transform/Transformer.html

  • How to edit org.w3c.dom.DocumentType?

    Hi all,
    I'm creating xml files using org.w3c.dom.Document. I want to add the DocType. I see on the net that DocumentType is readonly http://www.w3.org/2003/01/dom2-javadoc/org/w3c/dom/DocumentType.html
    is there a way other than importing and using jdom.jar to do so. it's really disappointing to hear such news about DocumentType object.
    I want then to add the PublicId and SystemId!
    would plz help me regarding that issue?
    Thanks

    well, thanks Srini_Kandula. However, the point of i want a thing other than jdom.jar is that i don't want to depend on other libraries!
    As for DrClap, ur right it sounds pointless, but simply the final (operating system) OS files should have some document type. So i need to assign a spcifice document type. You said that: "you can easily assign a document type at that time" As i know when we write xmls we just create a new Trasformer and then transorm method is called. We may here set the 'indent' to 'yes' to have ,in a way, a formated xml document. I didn't know how to add document type at that time. would u please help me? and if you really want to help me more, i want an advanced way to format my xml document. in other words the indention i have just put every tag in a new line, and doesn't give different indention if the tag is included within another tag.
    Thanks for help in advance
    bye

  • Problem casting org.w3c.dom.Document to oracle.xml.parser.v2.XMLDocument

    I have the following problem:
    I get my xml-documents as an XMLType from the database and want to compare these using the supplied Oracle class oracle.xml.differ.XMLDiff (i use the java version supplied with Oracle 9i r2).
    XMLType.getDOM() returns the xml-document as a org.w3c.dom.Document,
    what i need for oracle.xml.differ.XMLDiff is a oracle.xml.parser.v2.XMLDocument.
    How can i cast/convert between these two formats?
    thanks!
    p.s. cross-posting with Re: Casting/Converting XMLType to XMLDocument? (but i think this forum is more relevant).

    Hi,
    thanks for the suggestion: i have written the code shown below. It results in a casting error.
    As far as i know, i don't use a oracle.xdb.dom.XDBDocument, i only use a oracle.xdb.XMLType as the input parameter for my conversion-method:
    any new suggestions ???
    p.s. the second method which is commented does work, but is a bit verbose.
       private static oracle.xml.parser.v2.XMLDocument convert2XMLDocument(XMLType xml) {
         // simple version (should work according to tech. doc. 9i r2/ 10g r1 database)
         oracle.xml.parser.v2.XMLDocument doc = null;
         try {
            // n.b. probleem is dat XMLType.getDOM() een w3c.Document object teruggeeft ipv een oracle.XMLDocument.
            System.out.println("convert2XMLDocument(): casting w3c.Document naar oracle.XMLDocument.");
            doc = (oracle.xml.parser.v2.XMLDocument) xml.getDOM(); // public org.w3c.dom.Document getDOM()
            System.out.println("convert2XMLDocument(): done casting w3c.Document naar oracle.XMLDocument.");
         catch (Exception e) {
            e.printStackTrace(System.out);
        return doc;
       private static XMLDocument convert2XMLDocument(XMLType xml) {
         // complex version: works ok !!!
         XMLDocument doc = null;
         try{
            DOMParser parser  = new DOMParser();
            parser.setValidationMode(oracle.xml.parser.v2.XMLParser.NONVALIDATING);
            parser.setPreserveWhitespace (true);   
            parser.parse(new StringReader(xml.getStringVal()));
            doc = parser.getDocument();
        catch ( XMLParseException e ) {
          e.printStackTrace(System.out);
        catch ( SQLException e ) {
          e.printStackTrace(System.out);
        catch ( Exception e ) {
          e.printStackTrace(System.out);
        return doc;
    convert2XMLDocument(): casting w3c.Document naar oracle.XMLDocument.
        java.lang.ClassCastException: oracle.xdb.dom.XDBDocument
         at pnb.bdb.xml.testJDBC.convert2XMLDocument(testJDBC.java:305)
         at pnb.bdb.xml.testJDBC.main(testJDBC.java:187)

  • XDK 10.1.0.2.0 NT XMLType and org.w3c.dom.Document problem/bug?

    Hi Chaps,
    I have Oracle 11g1 server side and am using the Oracle XDK 10.1.0.2.0 for Windows client side with Sun Java JDK 6 (1.6.0_06-b02).
    (I couldnt find an XDK for 11g1???)
    I have a table in my database that has an XMLType, its a very simple table -
    CREATE TABLE hcr_xml_test
    RRN VARCHAR(24) PRIMARY KEY,
    ClipID VARCHAR2(27),
    Lodgement XMLType
    XMLTYPE COLUMN Lodgement
    STORE AS OBJECT RELATIONAL
    ELEMENT "/www.hcrregister.com/RequestServices/Messages/ConditionReportCreateRequest_1.xsd#ConditionReportCreateRequest_1"
    Thats all fine, however with the XDK I am trying to construct an XMLType for use with JDBC from a valid org.w3c.dom.Document so that I can insert a row into my table. My code looks like this -
    XMLType xml = new XMLType(realCon, doc);
    stmt = (OraclePreparedStatement) realCon.prepareStatement(sql);
    stmt.setString(1, id.getRRN());
    stmt.setString(2, id.getCenteraClipID());
    stmt.setObject(3, xml);
    stmt.execute();
    doc is a org.w3c.dom.Document
    realCon is a java.sql.Connection
    That code throws a SQLException at the line "stmt.setObject(3, xml);" -
    java.sql.SQLException: Fail to convert to internal representation
    at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
    at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:112)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:173)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:229)
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:403)
    at oracle.sql.OPAQUE.<init>(OPAQUE.java:85)
    at oracle.xdb.XMLType.toDatum(XMLType.java:480)
    at oracle.jdbc.driver.OraclePreparedStatement.setORADataInternal(OraclePreparedStatement.java:7437)
    at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:8158)
    at oracle.jdbc.driver.OraclePreparedStatement.setObject(OraclePreparedStatement.java:8149)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.setObject(OraclePreparedStatementWrapper.java:229)
    at uk.co.landmarkinfo.registers.datawarehouse.tools.oracle.lodgementloader.DocumentProcessor.run(DocumentProcessor.java:232)
    Inspecting the exception I can see that the vendorCode is 17059.
    If I use "XMLType xml = XMLType.createXML(realCon, doc);" then xml is null instead of throwing a SQLException, so something isnt working here...
    However, if I serialize my Document to a String first and give that String to either the XMLType Constructor or XMLType.createXML() then it all works fine -
    /////TEMP
    Transformer transformer = saxTransformerFactory.newTransformer();
    transformer.setOutputProperty("omit-xml-declaration", "no");
    transformer.setOutputProperty("indent", "yes");
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    transformer.transform(new DOMSource(doc), new StreamResult(baos));
    XMLType stringXML = new XMLType(realCon, new String(baos.toByteArray()));
    ////END TEMP
    stmt = (OraclePreparedStatement) realCon.prepareStatement(sql);
    stmt.setString(1, id.getRRN());
    stmt.setString(2, id.getCenteraClipID());
    stmt.setObject(3, stringXML);
    stmt.execute();
    But why do I need to serialize to a String first??? Looking at the javadoc I dont think I should have to do this. So is there a problem in Oracles XDB handling of Document or have I missed something?

    Anyone has any idea? Please help!!!
    xu

  • Java.lang.StackOverflowError when invoking a method, returning a org.w3c.dom.Document object, on a SessionBean

    Hello,
    I hope someone can help me with this.
    I have a stateless session bean, which is returning a
    org.w3c.dom.Document object. The whole object is getting created
    but at the client side I am getting the following exception:
    java.rmi.RemoteException: ; nested exception is:
    weblogic.rmi.ServerError: A RemoteException occurred in the server method
    - with nested exception:
    [java.lang.StackOverflowError:
    Start server side stack trace:
    java.lang.StackOverflowError
    at java.lang.Exception.<init>(Compiled Code)
    at java.lang.reflect.InvocationTargetException.<init>(InvocationTargetEx
    ception.java:58)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Compiled Code)
    at java.io.ObjectOutputStream.invokeObjectWriter(Compiled Code)
    at java.io.ObjectOutputStream.outputObject(Compiled Code)
    at java.io.ObjectOutputStream.writeObject(Compiled Code)
    at java.io.ObjectOutputStream.outputClassFields(Compiled Code)
    at java.io.ObjectOutputStream.defaultWriteObject(Compiled Code)
    Then multiple occurences of the last few lines followed by
    at org.apache.xerces.dom.ParentNode.writeObject(Compiled Code)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Compiled Code)
    at java.io.ObjectOutputStream.invokeObjectWriter(Compiled Code)
    at java.io.ObjectOutputStream.outputObject(Compiled Code)
    at java.io.ObjectOutputStream.writeObject(Compiled Code)
    at java.io.ObjectOutputStream.outputClassFields(Compiled Code)
    at java.io.ObjectOutputStream.defaultWriteObject(Compiled Code)
    at org.apache.xerces.dom.ParentNode.writeObject(Compiled Code)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Compiled Code)
    at java.io.ObjectOutputStream.invokeObjectWriter(Compiled Code)
    at java.io.ObjectOutputStream.outputObject(Compiled Code)
    at java.io.ObjectOutputStream.writeObject(Compiled Code)
    at weblogic.common.internal.WLObjectOutputStreamBase.writeObject(Compiled
    Code)
    at weblogic.common.internal.WLObjectOutputStreamBase.writeSpecial(Compiled
    Code)
    at weblogic.common.internal.WLObjectOutputStreamBase.writeObject(Compiled
    Code)
    at weblogic.common.internal.WLObjectOutputStreamBase.writeObjectWL(Compiled
    Code)
    at weblogic.rmi.extensions.AbstractOutputStream2.writeObject(Compiled
    Code)
    at com.ssmb.teams.model.CMSInterestDataEJBEOImpl_WLSkel.invoke(Compiled
    Code)
    at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(Compiled Code
    at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(Compiled
    Code)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(Compiled Code)
    at weblogic.kernel.ExecuteThread.run(Compiled Code)
    End server side stack trace
    at weblogic.rmi.extensions.AbstractRequest.sendReceive(AbstractRequest.j
    ava:76)
    at com.ssmb.teams.model.CMSInterestDataEJBEOImpl_WLStub.getRegionAnalyst
    Data(CMSInterestDataEJBEOImpl_WLStub.java:558)
    at com.ssmb.teams.model.CMSInterestDataEJBEOImpl_ServiceStub.getRegionAn
    alystData(CMSInterestDataEJBEOImpl_ServiceStub.java, Compiled Code)
    at CMSJavaScript.main(CMSJavaScript.java:87)
    The structure of the XML document is
    <Maillist>
         <Region>
              <RegionCode>7</RegionCode>
              <RegionName>Asia Pacific</RegionName>
              <Analyst>
                   <Id>11111</Id>
                   <Name>AAAAAAAAAAAAAAAAA</Name>
              </Analyst>
              <Analyst>
                   <Id>22222</Id>
                   <Name>BBBBBBBBBBBBBBBBBB</Name>
              </Analyst>
         </Region>
    </Maillist>
    If the no. of Anlayst elements are 219, I am getting this error ( the same thing
    is working for less no. of analyst).
    Surprisingly when I access this ejb, by deploying it on my local server instance
    on Win-NT, it works fine. I am getting this
    exception, when the server is running on Sun Solaris.
    The weblogic version is 5.1.
    It will be really helpful if someone can reply to mee ASAP
    Thanks.
    Suren.

    Thanks a lot guys for all that information.
    Rajesh Mirchandani <[email protected]> wrote:
    Suren,
    More info at
    http://edocs.bea.com/wls/docs60/faq/java.html#251197
    Rob Woollen wrote:
    The quick fix is probably to use the -Xss argument on the Solaris JVMto increase the
    thread stack size.
    -- Rob
    Suren wrote:
    Thanks for your quick response.
    But how do we overcome with this?
    I tried to look for some help with this, but if you have any idea,
    can you suggest
    something ?
    Thanks
    Suren.
    Rob Woollen <[email protected]> wrote:
    It looks like the stack is overflowing when your DOM Tree is being
    serialized.
    Perhaps the Solaris JVM has a lower stack size by default.
    -- Rob
    Suren wrote:
    Hello,
    I hope someone can help me with this.
    I have a stateless session bean, which is returning a
    org.w3c.dom.Document object. The whole object is getting created
    but at the client side I am getting the following exception:
    java.rmi.RemoteException: ; nested exception is:
    weblogic.rmi.ServerError: A RemoteException occurred in
    the
    server method
    - with nested exception:
    [java.lang.StackOverflowError:
    Start server side stack trace:
    java.lang.StackOverflowError
    at java.lang.Exception.<init>(Compiled Code)
    at java.lang.reflect.InvocationTargetException.<init>(InvocationTargetEx
    ception.java:58)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Compiled Code)
    at java.io.ObjectOutputStream.invokeObjectWriter(Compiled
    Code)
    at java.io.ObjectOutputStream.outputObject(Compiled Code)
    at java.io.ObjectOutputStream.writeObject(Compiled Code)
    at java.io.ObjectOutputStream.outputClassFields(CompiledCode)
    at java.io.ObjectOutputStream.defaultWriteObject(CompiledCode)
    Then multiple occurences of the last few lines followed by
    at org.apache.xerces.dom.ParentNode.writeObject(CompiledCode)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Compiled Code)
    at java.io.ObjectOutputStream.invokeObjectWriter(CompiledCode)
    at java.io.ObjectOutputStream.outputObject(Compiled Code)
    at java.io.ObjectOutputStream.writeObject(Compiled Code)
    at java.io.ObjectOutputStream.outputClassFields(CompiledCode)
    at java.io.ObjectOutputStream.defaultWriteObject(CompiledCode)
    at org.apache.xerces.dom.ParentNode.writeObject(CompiledCode)
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Compiled Code)
    at java.io.ObjectOutputStream.invokeObjectWriter(CompiledCode)
    at java.io.ObjectOutputStream.outputObject(Compiled Code)
    at java.io.ObjectOutputStream.writeObject(Compiled Code)
    at weblogic.common.internal.WLObjectOutputStreamBase.writeObject(Compiled
    Code)
    at weblogic.common.internal.WLObjectOutputStreamBase.writeSpecial(Compiled
    Code)
    at weblogic.common.internal.WLObjectOutputStreamBase.writeObject(Compiled
    Code)
    at weblogic.common.internal.WLObjectOutputStreamBase.writeObjectWL(Compiled
    Code)
    at weblogic.rmi.extensions.AbstractOutputStream2.writeObject(Compiled
    Code)
    at com.ssmb.teams.model.CMSInterestDataEJBEOImpl_WLSkel.invoke(Compiled
    Code)
    at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(CompiledCode
    at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(Compiled
    Code)
    at weblogic.rmi.internal.BasicExecuteRequest.execute(CompiledCode)
    at weblogic.kernel.ExecuteThread.run(Compiled Code)
    End server side stack trace
    at weblogic.rmi.extensions.AbstractRequest.sendReceive(AbstractRequest.j
    ava:76)
    at com.ssmb.teams.model.CMSInterestDataEJBEOImpl_WLStub.getRegionAnalyst
    Data(CMSInterestDataEJBEOImpl_WLStub.java:558)
    at com.ssmb.teams.model.CMSInterestDataEJBEOImpl_ServiceStub.getRegionAn
    alystData(CMSInterestDataEJBEOImpl_ServiceStub.java, Compiled
    Code)
    at CMSJavaScript.main(CMSJavaScript.java:87)
    The structure of the XML document is
    <Maillist>
    <Region>
    <RegionCode>7</RegionCode>
    <RegionName>Asia Pacific</RegionName>
    <Analyst>
    <Id>11111</Id>
    <Name>AAAAAAAAAAAAAAAAA</Name>
    </Analyst>
    <Analyst>
    <Id>22222</Id>
    <Name>BBBBBBBBBBBBBBBBBB</Name>
    </Analyst>
    </Region>
    </Maillist>
    If the no. of Anlayst elements are 219, I am getting this error( the
    same thing
    is working for less no. of analyst).
    Surprisingly when I access this ejb, by deploying it on my local
    server
    instance
    on Win-NT, it works fine. I am getting this
    exception, when the server is running on Sun Solaris.
    The weblogic version is 5.1.
    It will be really helpful if someone can reply to mee ASAP
    Thanks.
    Suren.

  • Security Exception in trying to get a org.w3c.dom.Document

    Hi,
    I'm trying to get an org.w3c.dom.Document using the following code----
         String configFileName = "discoveryconsts.xml";
              DocumentBuilder db = null;
              Document xmlDocument = null;
              DocumentBuilderFactory dbf = null;
         dbf = DocumentBuilderFactory.newInstance();
    System.out.println("The DocumentBuilderFactory is :" + dbf);     
    //the exception happens here,while building the DocumentBuilder.
         db = dbf.newDocumentBuilder();
    System.out.println("The DocumentBuilder is :" + db);          try
         xmlDocument = db.parse(configFileName);
    System.out.println("The Document Builder is :" + db);
    catch(Exception e)
         System.out.println("The Exception is :"+ e);
    System.out.println("The XML Document is :" + xmlDocument);
    The error obtained is in the ---
    java.lang.SecurityException: sealing violation
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
    at org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(DocumentBuilderImpl.java:98)
    atorg.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(DocumentBuilderFactoryImpl.java:87)
    at Prototype.ChangingDiscConstsFile.discoveryConstants(ChangingDiscConstsFile.java:36)
    at Prototype.ChangingDiscConstsFile.main(ChangingDiscConstsFile.java:74)
    This error is obtained at runtime(ie.The file gets compiled).
    Kindly let me know the reason for the exception.
    regards,
    Karan.

    Hello Satya,
    Have you checked if the cross domain security between the domain WLS 10.3.5 and the backend server is enabled?
    Trust between domains is established so that principals in a Subject from one WebLogic domain can make calls in another domain. In previous releases of WebLogic Server, there was only one type of domain trust that is now referred to as Global Trust. WebLogic Server now supports a type of domain trust that is referred to as Cross Domain Security. The following sections explain how to configure each domain trust type:
    Enabling Cross Domain Security Between WebLogic Server Domains
    Enabling Global Trust
    http://docs.oracle.com/cd/E21764_01/web.1111/e13707/domain.htm#i1176046

Maybe you are looking for

  • Check-in of required SC's in NW2004s

    Hello, please, can somebody help me ? To change the ESS sources, i must check-in the required SC in the Track (CMS), in order to do the ".sca" files must be copied to folder "cms/inbox" . But where can i find the ".sca" files in NW 2004s? The Folder

  • Crazy story when purchasing Mac Mini and question

    I got a mac mini 2 weeks ago and never opened the applecare protection plan.. I got rung up for the 599- version but the retail store ( not apple store) gave me a 799- version. I didnt know until I got it to my office. Well two weeks later the kid wh

  • Can't adjust framebuffer resolution [SOLVED]

    Ever since the last kernel update, I am unable to adjust the framebuffer. I had it set to 1024x768 in the menu.lst file but ever since the update it can only use the default resolution. I've tried both 1024x768 and 1280x1024 resolutions with no luck.

  • Re: Line speed halved

    Hi my line speed has halfed Since  I was Offered Fast Optic Broardband,I had my house rewired by BT engineers With all the up to date connections and got my speed up to 3MB After being offered Fast Optic,, Which I could Not Afford My speed was cut To

  • Is the Airport Express compatible with a computer with 802.11ac

    Thinking of buying a Toshiba Model: P75-A7100 which apparently has Wireless-AC.  Can I use the airport express with this?  If not, will the Airport extreme $199 let me play music wirelessly?