ORACLE.FDK.ServerError while creating document and assigning category

Hi,
I try tro create a new Document in Content Services and assigning an existing category
here is the code snippet:
public static Item createDocumentWithCategory(Item parent, Item category)
throws FdkException, RemoteException
// get the Manager instances
FileManager fm =s_WsCon.getFileManager();
System.out.println("Ok document");
RechercheCategorie categorie=RechercheCategorie();
categorie.catValeur2();
Item cat=categorie.getCat();
Item workspace =fm.resolvePath("/solaria/E-TOP2", null);
System.out.println("id dans create document:"+cat.getId()+"workspace name:=
"+workspace.getName()+ "workspaceid:"+workspace.getId());
// create Category definition for category instance
NamedValue[] categoryDefs =WsUtility.newNamedValueArray(new Object[]=
{ Options.CATEGORY_ID, new Long(cat.getId()) }/*,
{ Options.CATEGORY_DEFINITION_ATTRIBUTES,
WsUtility.newNamedValueArray(new Object[][] {
{ "CUSTOM_Attribute", "Value One" } }) }*/
System.out.println("Ok document");
// create document specifying category definition
Item newDoc =fm.createDocument(
WsUtility.newNamedValueArray(new Object[][] {
{ Attributes.NAME, "MyDoc41" },
{ Options.CATEGORY_DEFINITION, categoryDefs },
{ Options.DESTFOLDER, new Long(workspace.getId()) } }), null, null);
System.out.println("Ok document2");
return newDoc;
It throws an Exception essage d'erreur:
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:=
faultString: ORACLE.FDK.UnexpectedError:ORACLE.FDK.ServerError
faultActor:=
faultNode:=
faultDetail:=
     {http://xmlns.oracle.com/content/ws}fault:<detailedErrorCode xsi:type="x=
sd:string">ORACLE.FDK.ServerError</detailedErrorCode><errorCode xsi:type=
"xsd:string">ORACLE.FDK.UnexpectedError</errorCode><exceptionEntries xsi:ty=
pe="ns1:ArrayOfFdkExceptionEntry" xsi:nil="true"/><info xsi:type="ns1=
:ArrayOfNamedValue" xsi:nil="true"/><serverStackTraceId xsi:type="xsd:s=
tring">139-1170838513360</serverStackTraceId>
What is wrong with the code?
Please advise
Jo

The stack trace is incomplete. Please post the complete exception stack trace.
regards,
-sancho

Similar Messages

  • Fiori Error while creating catalog and Group in Fiori Launchpad

    Hi ,
    We are getting following error while creating Catalog and Groups in Fiori Launchapd:
    Error (500, Internal Server Error) in OData response for GET "/sap/opu/odata/UI2/TRANSPORT/CustomizingRequests?$filter=isDefaultRequest%20eq%20true": HTTP request failed
    Details: Model 'ZTRANSPORT_MODEL_0001_BE' contains errors. Contact Adminstrator
    Regards,
    Trilochan
    Message was edited by: Michael Appleby

    Hi Trilochan,
    Have you assigned transport request? Select the config icon at right top.
    Creating Transport Requests for User Changes - User Interface Add-On for SAP NetWeaver - SAP Library
    Also look at SAP Fiori - UI Add-on SP09 update troubleshooting
    Regards, Masa
    SAP Customer Experience Group - CEG

  • Same event trigerring while create , approve and reject -RELEASESTEPCREATED

    Hi gurus,
    I am currently working with scheduling agreement workflow with business object BUS2013 and event RELEASESTEPCREATED,
    and i take a zcopy of the standard workflow - WS200000078 and modified according to the requirement.
    When i create the Scheduling agreement my workflow triggers fine and when i approve it triggering a mail and completed successfully, but when i reject the scheduling agreement the workflow doesn't completed instead it triggering again.
    I checked in trace and find the event RELEASESTEPCREATED is triggered while Creating , Releasing and Rejecting the scheduling agreement document. So it is placing again and again.
    Please help me how to proceed while rejecting the scheduling agreement document.
    Thanks in advance,
    Vijayan.R

    Hi,
    You could create a check function module and set that for the event in transaction SWETYPV. In the function try to check whether the object is rejected, and if it is, raise exception. => Workflow will not start.
    It is quite normal that some events are created (by the standard) even if you don't want. You just need to find a way to prevent it to do some unwanted action such as starting a workflow. For that a check function module is one way.
    Regards,
    Karri

  • Updating the GRANTS of a Container: error ORACLE.FDK.ServerError

    Hi there,
    Am trying to update the grants of a container and adding new Users with admin roles using SecurityManagers.addGrants() method. But when ever i excute the method i recieve the following error, ORACLE.FDK.UnexpectedError:ORACLE.FDK.ServerError. Below is the code.
    First am preparing the GRANTS, as follows.
    private NamedValue[] prepareGrants() {
            NamedValue[] attributes = null;
            NamedValue[] roles1 = null;
            NamedValue[] roles2 = null;
            Item user1 = null;
            Item user2 = null;
            Item libAdminRole;
            Item quotaAdminRole;
            Item secAdminRole;
            try {
    //            sm.keepAlive();
                user2 = um.getUser("karthik.rajashekar",null);
                user1 = um.getUser("test.user1",null);
                libAdminRole = secm.getRoleByName("WorkspaceAdministrator",null);
                quotaAdminRole = secm.getRoleByName("QuotaAdministrator",null);
                roles1 = newNamedValueArray(new Object[][]{
                    {Attributes.GRANTEE,new Long(user1.getId())},
                    {Attributes.ROLES,new Long[]{new Long(libAdminRole.getId()),new Long(quotaAdminRole.getId())}},
                    {Attributes.PROPAGATING, new Boolean(true)},
                    {Attributes.HAS_ADMIN_ROLES,new Boolean(true)}
                secAdminRole = secm.getRoleByName("SecurityAdministrator",null);
                roles2 = newNamedValueArray(new Object[][]{
                    {Attributes.GRANTEE,new Long(user2.getId())},
                    {Attributes.ROLES,new Long[]{new Long(secAdminRole.getId())}},
                    {Attributes.PROPAGATING, new Boolean(true)},
                    {Attributes.HAS_ADMIN_ROLES,new Boolean(true)}
                NamedValueSet[] secConfig = new NamedValueSet[]{newNamedValueSet(roles1),newNamedValueSet(roles2)};
                attributes = newNamedValueArray(new Object[][]{
                    {Attributes.GRANTS,secConfig}
            } catch (RemoteException ex) {
                ex.printStackTrace();
                logout();
            return attributes;
        }Then am using calling addGrants() with the attributes i have prepared from the former function, Below is the code
    public void addGrants(String path, NamedValue[] grants) {
            try {
                Item mycontainer = fm.resolvePath(path,null);
    //            Long id = new Long(mycontainer.getId());
                secm.addGrants(mycontainer.getId(),grants,null);
            } catch (RemoteException ex) {
                ex.printStackTrace();
                logout();
            } catch (Exception ex) {
                ex.printStackTrace();
                logout();
        }Below using the log file entry, of OC4J_Content, related to the error,
    07/09/19 20:32:12 content:  [oracle.ifs.fdk.http.HttpAuthManager] [85] 1273949 orcladmin INFO: HTTP Login: User = orcladmin;
    IP = 192.9.200.7; UA = Axis/1.2
    07/09/19 20:32:13 content:  [oracle.ifs.fdk.ExceptionLogger] [85] 1273949 orcladmin SEVERE: Exception ID: 9-1190214133370
    ORACLE.FDK.UnexpectedError:ORACLE.FDK.ServerError
            at oracle.ifs.fdk.FdkException.getInstance(FdkException.java:181)
            at oracle.ifs.fdk.FdkException.getInstance(FdkException.java:74)
            at oracle.ifs.fdk.impl.SecurityManagerImpl.addGrants(SecurityManagerImpl.java:563)
            at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:388)
            at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:283)
            at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)
            at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
            at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
            at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
            at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
            at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
            at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
            at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
            at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
            at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
            at oracle.ifs.fdk.http.HttpServerManager.doFilter(HttpServerManager.java:103)
            at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20)
            at oracle.ifs.fdk.http.AxisSecurityFilter.doFilter(AxisSecurityFilter.java:83)
            at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:659)
            at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
            at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
            at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
            at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
            at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
            at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.ClassCastException
            at oracle.ifs.fdk.impl.Utils.createSecurityConfigurationDefinition(Utils.java:624)
            at oracle.ifs.fdk.impl.SecurityManagerImpl.addGrants(SecurityManagerImpl.java:524)
            ... 28 more
    FdkException Details: oracle.ifs.fdk.FdkException: ErrorCode = ORACLE.FDK.UnexpectedError; DetailedErrorCode = ORACLE.FDK.Ser
    verError; Cause = null; ServerStackTraceId = 9-1190214133370; Info = null; Entries = nullCan anyone help me out on this?

    Hi there,
    Am trying to update the grants of a container and adding new Users with admin roles using SecurityManagers.addGrants() method. But when ever i excute the method i recieve the following error, ORACLE.FDK.UnexpectedError:ORACLE.FDK.ServerError. Below is the code.
    First am preparing the GRANTS, as follows.
    private NamedValue[] prepareGrants() {
            NamedValue[] attributes = null;
            NamedValue[] roles1 = null;
            NamedValue[] roles2 = null;
            Item user1 = null;
            Item user2 = null;
            Item libAdminRole;
            Item quotaAdminRole;
            Item secAdminRole;
            try {
    //            sm.keepAlive();
                user2 = um.getUser("karthik.rajashekar",null);
                user1 = um.getUser("test.user1",null);
                libAdminRole = secm.getRoleByName("WorkspaceAdministrator",null);
                quotaAdminRole = secm.getRoleByName("QuotaAdministrator",null);
                roles1 = newNamedValueArray(new Object[][]{
                    {Attributes.GRANTEE,new Long(user1.getId())},
                    {Attributes.ROLES,new Long[]{new Long(libAdminRole.getId()),new Long(quotaAdminRole.getId())}},
                    {Attributes.PROPAGATING, new Boolean(true)},
                    {Attributes.HAS_ADMIN_ROLES,new Boolean(true)}
                secAdminRole = secm.getRoleByName("SecurityAdministrator",null);
                roles2 = newNamedValueArray(new Object[][]{
                    {Attributes.GRANTEE,new Long(user2.getId())},
                    {Attributes.ROLES,new Long[]{new Long(secAdminRole.getId())}},
                    {Attributes.PROPAGATING, new Boolean(true)},
                    {Attributes.HAS_ADMIN_ROLES,new Boolean(true)}
                NamedValueSet[] secConfig = new NamedValueSet[]{newNamedValueSet(roles1),newNamedValueSet(roles2)};
                attributes = newNamedValueArray(new Object[][]{
                    {Attributes.GRANTS,secConfig}
            } catch (RemoteException ex) {
                ex.printStackTrace();
                logout();
            return attributes;
        }Then am using calling addGrants() with the attributes i have prepared from the former function, Below is the code
    public void addGrants(String path, NamedValue[] grants) {
            try {
                Item mycontainer = fm.resolvePath(path,null);
    //            Long id = new Long(mycontainer.getId());
                secm.addGrants(mycontainer.getId(),grants,null);
            } catch (RemoteException ex) {
                ex.printStackTrace();
                logout();
            } catch (Exception ex) {
                ex.printStackTrace();
                logout();
        }Below using the log file entry, of OC4J_Content, related to the error,
    07/09/19 20:32:12 content:  [oracle.ifs.fdk.http.HttpAuthManager] [85] 1273949 orcladmin INFO: HTTP Login: User = orcladmin;
    IP = 192.9.200.7; UA = Axis/1.2
    07/09/19 20:32:13 content:  [oracle.ifs.fdk.ExceptionLogger] [85] 1273949 orcladmin SEVERE: Exception ID: 9-1190214133370
    ORACLE.FDK.UnexpectedError:ORACLE.FDK.ServerError
            at oracle.ifs.fdk.FdkException.getInstance(FdkException.java:181)
            at oracle.ifs.fdk.FdkException.getInstance(FdkException.java:74)
            at oracle.ifs.fdk.impl.SecurityManagerImpl.addGrants(SecurityManagerImpl.java:563)
            at sun.reflect.GeneratedMethodAccessor199.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:324)
            at org.apache.axis.providers.java.RPCProvider.invokeMethod(RPCProvider.java:388)
            at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:283)
            at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)
            at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
            at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
            at org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
            at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
            at org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
            at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
            at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
            at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)
            at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
            at oracle.ifs.fdk.http.HttpServerManager.doFilter(HttpServerManager.java:103)
            at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20)
            at oracle.ifs.fdk.http.AxisSecurityFilter.doFilter(AxisSecurityFilter.java:83)
            at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:659)
            at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
            at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
            at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
            at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
            at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
            at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.ClassCastException
            at oracle.ifs.fdk.impl.Utils.createSecurityConfigurationDefinition(Utils.java:624)
            at oracle.ifs.fdk.impl.SecurityManagerImpl.addGrants(SecurityManagerImpl.java:524)
            ... 28 more
    FdkException Details: oracle.ifs.fdk.FdkException: ErrorCode = ORACLE.FDK.UnexpectedError; DetailedErrorCode = ORACLE.FDK.Ser
    verError; Cause = null; ServerStackTraceId = 9-1190214133370; Info = null; Entries = nullCan anyone help me out on this?

  • Not able to see the Oracle JRF option while creating a domain.

    Hi
    I am new to OSM development. I am trying to create a Oracle JRF domain using Fusion Middleware. In the select source template for the domain creation screen I am not getting the Oracle JRF option. I am using Weblogic 11gR1. May I know the reason why I am not getting this option?
    Rgds
    Sam

    Thanks.
    I downloaded the latest patch from OTN. But when I tried to install it, it threw an error - INST-07010 : Validation of Oracle Home location failed. The location specified does not exist.
    The weblogic version is 10.3.3.
    The error is thrown since in the middleware folder there is no folder called oracle_common. To see what happens if I created this folder (oracle_common) manually, the pack installer returned an message stating that the s/w is upto date and no upgrade is needed. I am still not seeing the template source - Oracle JRF.
    Questions:
    1. How is the folder oracle_common created?
    2. If the s/w is upto date then why I am not seeing the Oracle JRF option while creating the domain?
    Rgds
    Sam
    Edited by: 827861 on Jan 13, 2011 11:58 PM

  • Need a help to create user and assign BP to it

    Hi,
    I have requirement to create Users (like SU01) in CRM and for that users need to create BP with role EMPLOYEE and assign BP to that USER.
    Can anybody please help on which Function Module I need to use to create user and assign BP to it.
    Thanks in advance..
    Sushant

    Hi,
    Many post post are there for your query in SDN search if my below shown link is not helpful.
    Hope the below will help you.
    Users Created ...
    Cheers!!
    VEnk@

  • Create Document and send

    Dear Friends,
    i have ECC6.0 loaded, When i put transaction code IW23, Take a notification number, try to prepare and send a document or mail
    by creating document and send by adding the recipent type.
    in recipient type iam not able to find out complete options like saplogon etc etc.
    But with some other user i can see those options easily.
    Please Suggest. Thanks in Advance
    RP

    Hi Gagan,
    Thanks for the answer, it was authorization problem only.
    i have checked it with su53 and then through PFCG i added the authorization transaction to one of its role.
    The Problem is solved, i can see those options for that usse also.
    Thanks and Regards
    RP

  • Create Material Code, while creating Document in CV01N

    Dear All,
    Can I Create Material Code, while creating Document in CV01N,
    So as i could maintain the same code structure as documents.
    Regards
    Raghu

    hi,
    actually i posted this question twice,
    thatu2019s why closed this immediately,
    anyways last question was " is it possible in std SAP"
    i have replay as "No we can not",
    So i would go for development.
    Regards
    Raghu

  • Where, on my macbook pro, should I save created documents and files

    Where, on my macbook pro, should I save created documents and files?

    The usual place is to the hard drive in folders under your user name. The following may have something regarding Finder that will help you understand how it works: Mac Basics: The Finder organizes all of your files - Apple Support

  • Creating documents and spreadsheets

    Is there a way to create documents and spreadsheets on MacBook Pro without downloading something like Open Office?

    You can use the built-in TextEdit for creating "simple" text documents but for spreadsheets there is no such app.
    The free OpenOffice; LibreOffice or NeoOffice or the commercial Apples Pages and Numbers or Microsoft Office for Mac are the ways to go.
    Stefan

  • While creating SAP ISU Device category i got one error message like The material 5 does not exist or is not activated Message no. M3305

    while creating SAP ISU Device category EG01 .i got one error message like The material 5 does not exist or is not activated Message no. M3305

    I don't know EG01 transaction, but if SAP says "material 5 does not exist " then SAP is usually right.
    Can you give an evidence that material 5 exists? e.g. screenshot from  SE16 at table MARA, MARC and MAST

  • Employee Category and Assignment Category

    Hi
    I see on the Assignment screen there are fields for Employee Category and Assignment Category.
    Could anyone offer some insight as to what data is usually held in these columns?
    Thanks
    Martin

    Hello
    I assume Employee Category basically represent the employee type for example Full Time Employee or Full Time Contractor or Retiree etc. Assignment category represents the type of assignment for example Full-time regular or Part Time Regular etc.
    I know this is not detail explanation but hope it will help you.
    Thanks
    Gaurav

  • Create product and product category

    hi,
    can anybody explain me how to create product and product category in gateway services.
    thanks&regards in advance,
    Haritha

    Hello Haritha,
    I do not know about the logic which are supposed to be used to accomplish ur business scenario.
    But Once u know the underlying code/standard FM to be used, then u can follow the below which will help u get info on how u can consume those business logic inside GW and expose it as service.
    1.Let’s code CRUDQ and Function Import operations in OData service!
    2. How To Batch Multiple Operations Into A Single Request
    3.How To... Create Complex Business Entities using the Gateway OData Channel
    4.Purchase Order: Create OData Service in the SAP NetWeaver Gateway System for CRUDQ Operations
    5. Implementing  Expand Entity/Entity Set
    6. Detailed step by step procedure for Creating Gateway Service with all the CRUD Operations and testing them in Service Explorer Part1
    7. Step by Step development for CREATE_DEEP_ENTITY operation
    U can also search in the forum for additional  info as well.
    Regards,
    Ashwin

  • DMS Connector error while creating folder and uploading document.

    Hi,
    I have configure DMS connector on Portal with ECC. We are able to see /dmsrm -->Dynamic folder and also variant available in ECC and files in variant.
    When i try to create new folder in variant, i am unable to create folder . It give me error.
    The item could not be created because an exception occurred in the framework
    Also i get same errror when i upload new document in same variant.
    Please help out.
    Regards
    Biren

    Hi Biren,
    Is your issue resolved?
    Even I am not able to upload/create documents.
    One thing I learnt is you can not create/upload files at the variant level.
    You need to create a subfolder under the variant and then you cna create/upload files.
    But for me at the subfolder level I am getting "No document Type Specified error"
    Regards,
    rao

  • Getting Error while creating Document object  after  parsing XML String

    Hi All,
    I have been trying to parse an XML string using the StringReader and InputSource interface but when I am trying to create Document Object using Parse() method getting error like
    [Fatal Error] :2:6: The processing instruction target matching "[xX][mM][lL]" is not allowed.
    seorg.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
    Please find the code below which i have been experimenting with:
    import java.io.BufferedReader;
    import java.io.FileNotFoundException;
    import java.io.FileReader;
    import java.io.IOException;
    import java.io.StringReader;
    import java.util.List;
    import java.util.*;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import org.w3c.dom.Document;
    import org.w3c.dom.Element;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import org.xml.sax.InputSource;
    import org.xml.sax.SAXException;
    import java.io.*;
    public class TestMain {
         public static void main(String[] args) {
              String file = "";
              file = loadFileContent("C:\\Test.xml");
              System.out.println("contents >> "+file);
              parseQuickLinksFileContent(file);
    public static void parseQuickLinksFileContent(String fileContents) {
    PWMQuickLinksModelVO objPWMQuickLinksModelVO = new PWMQuickLinksModelVO();
         try {
    DocumentBuilderFactory factory =           DocumentBuilderFactory.newInstance();
         DocumentBuilder builder = factory.newDocumentBuilder();
         StringReader objRd = new StringReader(fileContents);
         InputSource objIs = new InputSource(objRd);
         Document document = builder.parse(objIs); // HERE I am getting Error.
         System.out.println(document.toString());
    What is happening while I am using builder.parse() method ???
    Thanks,
    Rajendra.

    Getting following error
    [Fatal Error] :2:6: The processing instruction target matching "[xX][mM][lL]" is not allowed.
    seorg.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.

Maybe you are looking for