Adapter Module: Validate an XML with an XSD

Hello all,
I'm developing a PI adapter module (Exchange Infrastructure 3.0) for the Mail Adapter. In this module I need to get each XML attachment and then validate with an XSD schema, for this I'm using the SAX parser.
I successfully retrieved all XML attachments but when I'm trying to use the method setProperty of the SAXParser instance I'm getting an exception, bellow the code snippet.
     private static final String SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
     private static final String SCHEMA_SOURCE   = "http://java.sun.com/xml/jaxp/properties/schemaSource";
     private static final String XML_SCHEMA      = "http://www.w3.org/2001/XMLSchema";
     public boolean isValid(byte[] src, AuditMessageKey amk1){
          SAXParserFactory spf = SAXParserFactory.newInstance();
          SAXParser sp = null;
          spf.setNamespaceAware(true);
          spf.setValidating(true);
          String[] schemas = new String[MAX_SCHEMAS];
          schemas[0] = getClass().getResource(SCHEMA1).getFile();
          schemas[1] = getClass().getResource(SCHEMA2).getFile();
          schemas[2] = getClass().getResource(SCHEMA3).getFile();
          try {
               sp = spf.newSAXParser();
          catch (Exception e){
               Audit.addAuditLogEntry(amk1, AuditLogStatus.ERROR, "MultipleAttachments: Error creating parser.");
               return false;
// HERE IS THE STEP THROWING THE EXCEPTION
          try {
               sp.setProperty(SCHEMA_LANGUAGE, XML_SCHEMA);
          catch (Exception e){
               Audit.addAuditLogEntry(amk1, AuditLogStatus.ERROR, "MultipleAttachments: Error setting schema.");
               return false;
Did Anyone have faced this issue? How can I solve this?
Best regards,
David

Hi David,
we developed a xsd validation with java mapping.
SAP has it's own parser. At the time we developed there was a bad bug in this parser. The parser throwed a fatal error although the xml was valid!
SAP corrected the error. But this is over 1,5 years ago. I recommend a OSS .
Regards Mario

Similar Messages

  • How to validate an XML with its XSD in jdk1.4.2_09?

    Hi all,
    Kindly Tell me how to validate an Xml against an XSD in JDK1.4.2_09....
    I was able to do it in jdk1.5 using the Validation class available in java.xml.validation package...
    But the Task for me is to do in jdk1.4.2 since my application server runs on jdk1.4.2... changin to jdk1.5 will result in failure of main application...
    sample code will be useful...
    thanks in advance.
    Regards,
    Sundararamaprasad.

    HI,
    Thanks for the suggestion.... The Thing is when i compiled and executre my code it really got execute well when i ran it in the Command Prompt after settiongup appropriate classpath and path... but when i executed the same thing in the server it did not get executed though the application server also run on top of the same JDk.....I've check it out..anyhow the link gave me a very good learning...Thanks for the valuable suggestion..... :)
    Regards,
    Sundararamaprasad.

  • Deploy Adapter-Module PI 7.1 with NWDS 7.1 to server?

    Hey,
    i am developed a adapter-module for PI 7.0 now i am upgrading the module to PI 7.1.
    I got the NWDS, all libs and build all Projects like it was described in a SAP Help skript.
    I created a new Project,
    added the EJB module,
    adjusted the decriptor file application-j2ee-engine.xml
    BUT where is the tag  to deploy the Module to the Server?
    In NWDS 7.0 where a tag like "deploy to J2EE engine" where is it in the NWDS 7.1.??
    Please help how to deploy my module to the server an where i can make the settings like the host and the port for the server?
    Thank you all

    Hi,
      Check these if you haven't checked already:
    Check the section 4.11 of this article
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0b39e65-981e-2b10-1c9c-fc3f8e6747fa?overridelayout=true
    Re: Deploy Custom Adapter Module in PI 7.1
    Customer Module Deployment in PI 7.1
    Regards,
    Ravi
    Edited by: Ravi Kanth Talagana on Jul 23, 2009 4:12 PM

  • How to validate an xml with a schema w/o specifying the schema in the xml

    I have done xml validation with xml schemas, where the xml points to the xsd to use. However, I would like to not have to specifiy the xml schema in the xml document (and can't ensure that the xml coming to us has that in it). How do I, in the java code, tell it what schema to use in validation?
    Brian

    static final String schemaSource = argv[0];
    static final String JAXP_SCHEMA_SOURCE =
    "http://java.sun.com/xml/jaxp/properties/schemaSource";
    DocumentBuilderFactory factory =
    DocumentBuilderFactory.newInstance();
    factory.setAttribute(JAXP_SCHEMA_SOURCE,
    new File(schemaSource));

  • Generation of xml with the XSD

    Hi,
    I want to generate an XML file by reading the CSV and XSD files.
    Please help me in this regard.
    Thanx
    kris

    You could use Stylus Studio for the same

  • Error validating xml with xsd schema on JSDK 1.4

    Hi All,
    Asked to me do it a Web Service client in Java and validate its xml answer with an xsd file using 1.4 plataform.
    I googled and I saw many samples to 1.5 plataform, and few samples to 1.4, but anyway I tried to do what they asked to me.
    I got connect with service, got the response and so I went to validate that xml with an xsd file.
    But I got an error on that task. The error occurs in the following line
    "Schema schema = factory.getSchema();"
    Bellow my code
    final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
              final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
              final String schemaSource = "C:\\GetAuthorizationServiceOutput.xsd";
              final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();          
              factory.setNamespaceAware(true);
              factory.setValidating(true);
              try {
              factory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
              factory.setAttribute(JAXP_SCHEMA_SOURCE,new File(source));
              catch (IllegalArgumentException x) {
                   System.out.println(x.getMessage());
    DocumentBuilder builder = null;
              Document document = null;
              try {
                   builder = factory.newDocumentBuilder();
                   document = builder.parse(new InputSource(new StringReader(ret.toString())));
              } catch (ParserConfigurationException e) {
                   e.printStackTrace();
              } catch (SAXException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
              **Schema schema = factory.getSchema();**
              Validator validator = schema.newValidator();
              try {
                   validator.validate(new DOMSource(document));
              } catch (SAXException e) {
                   e.printStackTrace();
              } catch (IOException e) {
                   e.printStackTrace();
    and here is the exception :
    Caused by: java.lang.NoSuchMethodError: javax.xml.parsers.DocumentBuilderFactory.getSchema()Ljavax/xml/validation/Schema;
    Method onLinkClicked of interface wicket.markup.html.link.ILinkListener targeted at component [MarkupContainer [Component id = btBack, page = br.com.weev.finan.mkb_er.extranet.view.relations.RelationsDetails, path = 30:form:btBack.RelationsDetails$4, isVisible = true, isVersioned = true]] threw an exception
    wicket.WicketRuntimeException: Method onLinkClicked of interface wicket.markup.html.link.ILinkListener targeted at component [MarkupContainer [Component id = btBack, page = br.com.weev.finan.mkb_er.extranet.view.relations.RelationsDetails, path = 30:form:btBack.RelationsDetails$4, isVisible = true, isVersioned = true]] threw an exception
         at wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:198)
         at wicket.request.target.component.listener.ListenerInterfaceRequestTarget.processEvents(ListenerInterfaceRequestTarget.java:74)
         at wicket.request.compound.DefaultEventProcessorStrategy.processEvents(DefaultEventProcessorStrategy.java:65)
         at wicket.request.compound.AbstractCompoundRequestCycleProcessor.processEvents(AbstractCompoundRequestCycleProcessor.java:57)
         at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:896)
         at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:929)
         at wicket.RequestCycle.step(RequestCycle.java:1010)
         at wicket.RequestCycle.steps(RequestCycle.java:1084)
         at wicket.RequestCycle.request(RequestCycle.java:454)
         at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:219)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
         at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
         at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
         at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
         at java.lang.Thread.run(Thread.java:534)
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.GeneratedMethodAccessor342.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at wicket.RequestListenerInterface.invoke(RequestListenerInterface.java:187)
         ... 39 more
    Caused by: java.lang.NoSuchMethodError: javax.xml.parsers.DocumentBuilderFactory.getSchema()Ljavax/xml/validation/Schema;
         at br.com.weev.finan.mkb_er.business.manager.impl.RelationManagerImpl.getAuthorizationService(RelationManagerImpl.java:152)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:296)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:177)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:144)
         at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
         at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
         at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
         at $Proxy22.getAuthorizationService(Unknown Source)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:377)
         at wicket.proxy.$Proxy39.getAuthorizationService(Unknown Source)
         at br.com.weev.finan.mkb_er.extranet.view.relations.RelationsDetails$4.onClick(RelationsDetails.java:125)
         at wicket.markup.html.link.Link.onLinkClicked(Link.java:254)
         ... 43 more
    It's my first time doing that, so I'm confuse to do it.
    Thank you
    Juliano.

    This is how.
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.dom.DOMResult;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.validation.Schema;
    import javax.xml.validation.SchemaFactory;
    import javax.xml.validation.Validator;
    DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
    dbfac.setNamespaceAware(true);
    SchemaFactory factory1 = SchemaFactory
                        .newInstance("http://www.w3.org/2001/XMLSchema");
    Schema schema = factory1.newSchema(new File("person.xsd"));
    dbfac.setSchema(schema);
    DocumentBuilder dbparser1 = dbfac.newDocumentBuilder();
    Document doc1 = dbparser1.parse(new File("person.xml"));
    Validator validator1 = schema.newValidator();
    DOMSource dm1 = new DOMSource(doc1);
    DOMResult domresult1 = new DOMResult();
    validator1.validate(dm1, domresult1);

  • Validate XML against XSD with imported xsd's

    Hello,
    I'm stuck for a while attempting to validate a xml against some xsd's. In the code below you can find my xsd's structure: (I need to use this structure in order to reuse the baseXsd's files.
    CommonTypes.xsd
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema id="CommonTypes" targetNamespace="http://test.com/CommonTypes"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    attributeFormDefault="qualified">
    <xs:simpleType name="NonEmptyString">
    <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:schema>
    CommonLog.xsd
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema id="CommonLogConfig"
    targetNamespace="http://test.com/CommonLogConfig"
    xmlns:cmn="http://test.com/CommonTypes"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    attributeFormDefault="qualified">
    <xs:import schemaLocation="..\Base\CommonTypes.xsd" namespace="http://test.com/CommonTypes" />
    <xs:simpleType name="LogName">
    <xs:restriction base="xs:string"/>
    </xs:simpleType>
    <xs:simpleType name="LogPath">
    <xs:restriction base="cmn:NonEmptyString"/>
    </xs:simpleType>
    </xs:schema>
    LogConfig.xsd
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema xmlns:mlc="http://test.com/CommonLogConfig"
    targetNamespace="component1_LogConfig"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    attributeFormDefault="qualified">
    <xs:import schemaLocation="..\Base\CommonLogConfig.xsd" namespace="http://test.com/CommonLogConfig" />
    <xs:element name="root">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="default">
    <xs:complexType>
    <xs:all>
    <xs:element name="LogName" type="mlc:LogName" fixed="component.name" />
    <xs:element name="LogPath" type="mlc:LogPath"/>
    </xs:all>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    LogConfig.xml
    <?xml version="1.0" encoding="utf-8"?>
    <root xmlns="component1_LogConfig">
    <default>
    <LogName>component.name</LogName>
    <LogPath></LogPath>
    </default>
    </root>
    As you can probably notice, the <LogPath> key on the LogConfig is empty, but, it is defined as a NonEmptyString type. That is the way I'm validating the xml against xsd:
    FileStream stream = new FileStream("LogConfig.xml", FileMode.Open);
    XmlValidatingReader vr = new XmlValidatingReader(stream, XmlNodeType.Element, null);
    vr.Schemas.Add(null, "LogConfig.xsd");
    vr.ValidationType = ValidationType.Schema;
    vr.ValidationEventHandler += new ValidationEventHandler(ValidationCallBack);
    while (vr.Read()) ;
    The validationCallBack is not being fired.
    I suppose it is possible since the visual studio show me the error at compile time:

    Well, it is weird, but, the code below works when validating the NonEmptyString type:
    XmlSchemaSet schemaSet = new XmlSchemaSet();
    schemaSet.Add(null, "LogConfig.xsd");
    XDocument doc1 = XDocument.Load("LogConfig.xml");
    doc1.Validate(schemaSet, new ValidationEventHandler(ValidationCallBack), false);
    However, if I leave the <LogName> empty it does not valid the values set on xsd fixed attribute, 
    The solution?
    Well, I'm validating the same xml twice, the code above and the code on my first question.

  • Dummy XML not getting generated from empty file by J2EE adapter module

    Hi All,
    i know when XI gets an empty input text file, it does not generate a send message for it in sender communication channel.
    in my scenario, if i get a file with data, i have to generate an XML message for it using file content conversion - this i have done...........
    but if i get an empty text file, then i have to generate a dummy XML send message for it for my BPM.......
    So i made a J2EE adapter module to generate dummy xml for empty file.....<b>when i give a file with data in it, then my adapter module is called..... but when i give an empty file, then my adapter module is not called</b>.........
    <b><i>Can anybody suggest why the module processor is not invoking my customer-adapter module when an empty file is given.............but the module processor is invoking my customer-adapter module when a file with data is given</i>.</b>
    Thanks,
    Rajeev Gupta

    Hi Amit,
    Below is the code of process method which i used:
    <i>public ModuleData process(ModuleContext moduleContext,
      ModuleData inputModuleData)
        throws ModuleException
    Object obj;
    Message msg_audit;
    AuditMessageKey amk;
    try
    File f = new File("/components/XITEMP/sample/PWC/check.txt");
    PrintStream ps;
    if (f.canWrite())
    FileOutputStream fos =new FileOutputStream(f);
    ps = new PrintStream(fos);  
    ps.println("Testing");
    ps.close();
    fos.close(); 
    else
      f = new File("/components/XITEMP/sample/PWC/check4.txt");
      if (f.exists() ==false)
      f.createNewFile();
    obj = inputModuleData.getPrincipalData();
    if (obj!=null)
    msg_audit = (Message)obj;
    amk = new AuditMessageKey(msg_audit.getMessageId(),AuditDirection.OUTBOUND);
    Audit.addAuditLogEntry(amk,AuditLogStatus.SUCCESS,"FileCheck: Module called");
    else
      String str = new String();
    String str1 = new String();     
                  str1="<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
                 str1+="<ns:MT_PWC_RECORD xmlns:ns=\"urn://PWC_SR3_01/PWC/Customer\">";
             str1+="<RECORD_SET>";     
                 str1+="<RECORD>";
             str1+="<RECORD_DATA>BLANK_FILE</RECORD_DATA>";
             str1+="</RECORD>";
             str1+="</RECORD_SET>";
             str1+="</ns:MT_PWC_RECORD>";     
    str=str1; 
    inputModuleData.setPrincipalData(str);
    catch(Exception e)
    try
    File f = new File("/components/XITEMP/sample/PWC/check.txt");
    PrintStream ps;
    if (f.canWrite())
      FileOutputStream fos =new FileOutputStream(f);
      ps = new PrintStream(fos);  
      ps.println(e.toString());
      ps.close();
      fos.close(); 
    catch(Exception ex)
    return inputModuleData;
       }</i>
    in the above methood, i  used file operations at start just to see whether the module is getting invoked or not...so when i give a data file, then the file operations are performed and messages are written in audit log.........but when i give an empty file, then the file operations are not performed - meaning the module is not getting invoked........
    Thanks,
    Rajeev Gupta

  • Using a different user(other than default PI user) with adapter module

    Hi,
    We are having a custom adapter module built to interact with a Hardware Security Module(HSM). This custom adapter module by default uses a PI user configured in the system. However, we are not able to pass commands to HSM because of insufficient authorizations to this PI user. Now, we do not exactly know the permissions required for the user to access HSM. We have asked the HSM support team about the same. However, I wanted to explore the possibility of using a different PI user to work with the adapter module and eventually pass commands to HSM.
    We have an admin user configured which has all the necessary authorizations. Is it possible to use this admin user created on PI system to work with adapter module so that it passes commands to HSM?
    Thanks,
    Ravi Desai

    We have given the necessary authorizations to PI user.

  • Validate xml with PL/SQL Parser

    Hi,
    i have an xml DTD into a VARCHAR2 variable and an xml document
    into a CLOB, i'd like to know how to validate the xml with my
    DTD using PL/SQL API for xml.
    Sorry for my terrible english (i'm not english) :-)
    Tank you.

    Here's an example:
    set serveroutput on
    DECLARE
      p xmlparser.parser;
      d xmldom.DOMDocument;
      dtd xmldom.DOMDocumentType;
      v varchar2(32700);
      good clob;
      bad clob;
      xml_parse_error exception;
      pragma exception_init(xml_parse_error,-20100);
    BEGIN
      bad   := '<!DOCTYPE Department SYSTEM "test.dtd"><Deprtment/>';
      good  := '<!DOCTYPE Department
    SYSTEM "test.dtd"><Department/>';
      v := '<!ELEMENT Department EMPTY>';
      p := xmlparser.newParser;
      xmlparser.parseDTDBuffer(p,v,'Department');
      xmlparser.setDoctype(p,xmlparser.getDoctype(p));
      xmlparser.setValidationMode(p,TRUE);
      xmlparser.parseClob(p,good);
      xmlparser.parseClob(p,bad);
      xmlparser.freeParser (p);
    EXCEPTION
      WHEN xml_parse_error THEN
         DBMS_OUTPUT.PUT_LINE(sqlerrm);
         xmlparser.freeParser (p);
    END;

  • Deployment error in adapter module

    HI ,
    The deployment of the adapter module was successful but with exception.below is the log.
    Any help with this is appreciated
    --- Deploying file(s):
    C:\Users\am90001042\workspace\File_EAR\File_EAR.ear
    --- Status:
    Deploy finished with warnings.
    --- Description:
        S U M M A R Y
    ~~~~~~~~~~~~~~~~~~~
    Successfully deployed:       0
    Deployed with warnings:       1
    Failed deployments:        0
    ~~~~~~~~~~~~~~~~~~~
    Description:
      1. Warning occurred on server 59866950 during update sap.com/File_EAR : References Test: There are no matching deploy time references (described in META-INF/SAP_MANIFEST.MF) for the following runtime references [sap.com/engine.security.facade, sap.com/engine.j2ee14.facade, sap.com/com.sap.aii.af.svc.facade, sap.com/com.sap.aii.af.ifc.facade, com.sap/com.sap.aii.af.lib.facade, sap.com/com.sap.base.technology.facade] (described in the META-INF/application-j2ee-engine.xml)., file: File_EAR.ear, column 0, line 0, severity: warning
      2. Exception has been returned while the [sap.com/File_EAR] was starting. Warning/Exception :[
    ][[ERROR CODE DPL.DS.6193] Error while ; nested exception is:
    com.sap.engine.services.deploy.exceptions.ServerDeploymentException: [ERROR CODE DPL.DS.5030] Clusterwide exception: [server ID 59866950:[ERROR CODE DPL.DS.5029] Exception in operation [startApp] with application [sap.com/File_EAR].
       -> [ERROR CODE DPL.DS.5035] Application [sap.com/File_EAR] cannot be started. Reason: it has hard reference to resource [com.sap~com.sap.aii.af.lib.facade] with type [library], which is not active on the server.
    Hint: 1) Is referred resource deployed? 2) Is referred resource able to start?
    server ID 59866950:com.sap.engine.services.deploy.exceptions.ServerDeploymentException: [ERROR CODE DPL.DS.5035] Application [sap.com/File_EAR] cannot be started. Reason: it has hard reference to resource [com.sap~com.sap.aii.af.lib.facade] with type [library], which is not active on the server.
    Hint: 1) Is referred resource deployed? 2) Is referred resource able to start?
    at com.sap.engine.services.deploy.server.ReferenceResolver.processReferenceToLibrary(ReferenceResolver.java:752)
    at com.sap.engine.services.deploy.server.ReferenceResolver.processMakeReference(ReferenceResolver.java:568)
    at com.sap.engine.services.deploy.server.ReferenceResolver.beforeStartingApplication(ReferenceResolver.java:488)
    at com.sap.engine.services.deploy.server.application.StartTransaction.beginCommon(StartTransaction.java:192)
    at com.sap.engine.services.deploy.server.application.StartTransaction.begin(StartTransaction.java:157)
    at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:493)
    at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:544)
    at com.sap.engine.services.deploy.server.application.ParallelAdapter.super_MakeAllPhases(ParallelAdapter.java:302)
    at com.sap.engine.services.deploy.server.application.StartTransaction.makeAllPhasesImpl(StartTransaction.java:579)
    at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:213)
    at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:374)
    at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3455)
    at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3441)
    at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3331)
    at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3303)
    at com.sap.engine.services.dc.lcm.impl.J2EELCMProcessor.doStart(J2EELCMProcessor.java:105)
    at com.sap.engine.services.dc.lcm.impl.LifeCycleManagerImpl.start(LifeCycleManagerImpl.java:78)
    at com.sap.engine.services.dc.cm.deploy.impl.LifeCycleManagerStartVisitor.visit(LifeCycleManagerStartVisitor.java:34)
    at com.sap.engine.services.dc.cm.deploy.impl.DeploymentItemImpl.accept(DeploymentItemImpl.java:83)
    at com.sap.engine.services.dc.cm.deploy.impl.DefaultDeployPostProcessor.postProcessLCMDeplItem(DefaultDeployPostProcessor.java:91)
    at com.sap.engine.services.dc.cm.deploy.impl.DefaultDeployPostProcessor.postProcess(DefaultDeployPostProcessor.java:61)
    at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.doPostProcessing(DeployerImpl.java:866)
    at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.performDeploy(DeployerImpl.java:814)
    at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.doDeploy(DeployerImpl.java:644)
    at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.deploy(DeployerImpl.java:363)
    at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.deploy(DeployerImpl.java:252)
    at com.sap.engine.services.dc.cm.deploy.impl.DeployerImplp4_Skel.dispatch(DeployerImplp4_Skel.java:897)
    at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:362)
    at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:69)
    at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:67)
    at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:41)
    at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:977)
    at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:57)
    at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:55)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:122)
    at com.sap.engine.core.thread.execution.Executable.run(Executable.java:101)
    at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:327)
    Result
    Status:Warning
    Thanks
    Nikhil

    Hello,
    Cross check the references which u have added under application-j2ee-engine.xml and ejb-jar.xml.
    There used to be wiki on SDN, which provides troubleshooting steps for each error code, but i couldn't able to find that...u can also try searching the same.
    Old Link:
    https://wiki.sdn.sap.com/wiki/display/JSTSG/(JSTSG)(TG)Q1127
    Thanks
    Amit Srivastava

  • Validation of XML with Schema, which contains more than one Schema

    Hi All,
    I am having a parent.xsd file, which inculdes or imports child.xsd file. I need to validate an xml with the parent xsd. Could u give any sample code for doing the same.
    Java Version : 1.4.2
    Using Xerces for parsing the xml....
    Thanks,
    Senthil

    Is anyone there to reply?

  • XML validation against XSD Schema in ABAP

    Hi colleagues,
    I'm looking for a way to validate a XML against a XSD schema in ABAP, without using java or command line or something like that. Is there any way to do this only with ABAP?
    Thanks in advance.
    Regards,
    Guenter

    Hi everyone,
    I'm currently facing the same problem. I need to validate a xml file with an existing xsd schema for some export/import functionality. I just found an ABAP program doing this with a Java fallback. But isn't there a way doing this wihtout using Java but only ABAP? There certainly is, anyone an idea?
    Thank you and regards
    Maximilian

  • Using XSL on XML validated against XSD

    Transforming XSD validated XMLType Data
    Re: example XSL in Chapter 6 that transforms XML with associated XSD schema definition (Oracle 9i XML Database Developer's Guide)
    I noted that this XSL uses only the "general" node identification functions (e.g., name() ) to access nodes in the <xsl:value-of select..>. I have also noted that standard XSL templates from other sections of the documentation, for example in Chapter 3 and in Appendix D, do not work with an XML which is validated against an XSD schema.
    Can anyone give me an example <xsl:value-of select..> that addresses a specific node in the "purchase order" example, like the shipTo, name, street -- or any other specific node. This is critical since there is always bound to be node-specific processing in any transformation, and this is not demonstrated by any example of XML which has been validated against an XSD.
    I have tried this endlessly on my own examples of XML w/XSD validation. Even if the value-of select="name(.)" tells you that the name of the node is "FooBar", you cannot use FooBar as a select test to do FooBar specific processing.
    Help?????

    Not quite understand your question. Can you send me the example doc?

  • Retreving Values from RFC in Adapter Module

    Hi All
    I have a scenario where I have to retreive a value from database table using RFC and import those values in adapter module for comparing it with some other Values. Can some one guide me how to retreive values in RFC using Adapter module. Some standard methods would be really helpful.
    Regards
    Abhishek Mahajan

    hi
    check this
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/ad09cd07-0a01-0010-93a9-933e247d3ba4
    https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/70d90a91-3cf4-2a10-d189-bfd37d9c3231
    bvr

Maybe you are looking for