Xml mapping with JPA error

I am İshak Teyran , the data manager of a team which attends to IBM XML Challenge Turkey, we are trying to build a dynamic web project in Rational Software Architect 7.5, WAS 7.0 , DB2 9.5 EE.
the article of Vitor Rodrigues - http://www.ibm.com/developerworks/data/library/techarticle/dm-0901rodrigues/index.html - describes how to map xml to java using pureQuery however we need to do the same using JPA.. is there any difference?
we are trying to achieve the same using JPA. but unfortunately we failed..
for simplifying lets assume we have two tables , STUDENT ( id int, name char) and COURSES ( studentID int , and lessons xml) ... these two tables are related to each other with studentID foreign key... and we want to have student and courses java files where courses.java includes proper mapping to xml column lessons..
i tried to make an .xsd file for xml column lessons.. and then i created its java file.. then i used JPA for creating student and courses java files but it always turns me a null pointer exception.. i dont know why.. and as result , only student.java is being created..
i have tried following steps.
My database connection and the tables are already present.
1- i have created a new dynamic web site project, namely dene..
from project facets i enabled dynamic web module, faces support (base, enhanced componnents) , Java Persistence, Javascript Toolkit, JavaServer faces, JSTL, Web 2.0 , Websphere Web(Co-existence),Websphere Web(Extended),Default Style Sheet facets.. and these facets musts be enabled for our project.
2- i have created the CourseList.xsd and using -JAXB- i have created lessons.java
3- i right clicked project and from the menu .. JPA tools->Generate Entities .. i choose connection and tables to generate entities but unfortunately no entity gets created ... when i only choose student table to generate the entity of, Student.java is being created however Courses.java always returns nullpointerexception..
the stack trace of the exception is in the picture i attached.. here is its link.... [http://www.ibm.com/developerworks/forums/servlet/JiveServlet/download/430-250134-14212507-336353/hata.JPG]
i have thought it might be because i use the openjpa and jaxb libraries of RSA.. and then i tried to load the latest versions of JAXB and openjpa .. i added all of their .jar files to the application classpath.. (if it is sufficient to add only openjpa-1.2.0.jar and jaxb-api.jar files let me know it please).. but this did not work neither..
the only exception i get is :
An internal error occurred during: "Generating Entities".
java.lang.NullPointerException
while creating lessons.java and the entity java files i am making sure that i give the same package name for both ... but i never succeeded creating courses.java..
in RSA when i right click to project and go te JPA Tools menu there is a menu item "Configure Project for JDBC deployment" .. what is this for.. i have also tried using this and then trying to create entities but this failed too..
then when they did not work ;
i have decided to code the classes myself but in order to get things a little easier, i opened my DB and converted the XML column to a SMALLINT column .. just not an XML column... and then using JPA in RSA - i did not include openJPA jars in my project externally- i created the classes .. both Course.java and Student.java have been created well, because the column that was actually xml was converted to small integer..
and if i add the related persistence and strategy lines :
@Persistent
@Strategy("org.apache.openjpa.xmlmapping.XmlValueHandler")
to their proper places and editing the function and attributes data types and return types and then if i re-convert the column to XML data type in database, do you think it will work properly?
so i really need a suggestion.. any help will be appreciated..
what would you suggest?
how can we achieve this goal for those two tables i mentioned above in RSA and using JPA ?

Hi Tushar
You will need to be more specific. Do you want an XML layout to use for importing or exporting SAP Business One objects? Maybe give us details of the specific object. Most DI API objects have a write to XML which will give you the layout for that object. You can also refer to the REFDI.CHM file under the SDK Help folder.
Kind regards
Peter Juby

Similar Messages

  • XML Mapping with B1 Field

    Hi Expert,
    can anybody know how to identify / map the xml document with b1 field. I did not found any link / documentation on this.
    Thanks,
    Tushar

    Hi Tushar
    You will need to be more specific. Do you want an XML layout to use for importing or exporting SAP Business One objects? Maybe give us details of the specific object. Most DI API objects have a write to XML which will give you the layout for that object. You can also refer to the REFDI.CHM file under the SDK Help folder.
    Kind regards
    Peter Juby

  • Native mapping with JPA doesn't work by default - not marked cascade persi

    I started to use our old TopLink native mapping but via JPA instead of EclpseLink native API.
    But at first execution it's already complaining of my mappings. When using the native mappings shouldn't EclipseLink interpret it to keep old behavior?
    What are the other expected changes of behavior so that I can fix them proactively?
    What is the workaround for this specific problem?
    The error is:
    java.lang.IllegalStateException: During synchronization a new object was found through a relationship that was not marked cascade PERSIST: Id: 0
    DateTime: Mon Jun 08 02:00:00 EDT 2009
    Entry Type: 10009
    Entry Type In/Out: 10014
    calendarDate: Mon Jun 08 00:00:00 EDT 2009
    businessDate: Mon Jun 08 00:00:00 EDT 2009
    origin: timecard
    Inserted: true
    Changed: false
    Deleted: false
    Mon Jun 08 02:00:00 EDT 2009.
         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.discoverAndPersistUnregisteredNewObjects(UnitOfWorkImpl.java:4016)
         at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.discoverUnregisteredNewObjects(RepeatableWriteUnitOfWork.java:182)
    persistence.xml is:
    <persistence xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
         <persistence-unit name="AllInOne" transaction-type="JTA" >
         <description>This represent all CITYADM schema mappings. It does include pmsi.</description>
              <exclude-unlisted-classes>false</exclude-unlisted-classes>
              <properties>
                   <property name="eclipselink.session-name" value="AllInOne"/>
                   <property name="eclipselink.sessions-xml" value="sessions.xml"/>
              </properties>
         </persistence-unit>
         <persistence-unit name="DataServices" transaction-type="JTA">
         <description>This represent all REPORTADM schema mappings</description>
              <exclude-unlisted-classes>false</exclude-unlisted-classes>
              <properties>
                   <property name="eclipselink.session-name" value="DataServices"/>
                   <property name="eclipselink.sessions-xml" value="sessionsDataServices.xml"/>
              </properties>
         </persistence-unit>
    </persistence>

    Hello Sebastien,
    You are using em.persist instead of uow.regsiterObject, which has different behaviour as mandated by the JPA specification. EclipseLink/TopLink automatically registered referenced objects through registerObject, but the JPA specification states that persist will only cascade if the mapping is marked cascade persist - otherwise it is required to throw the exception you see.
    If you wish to use the JPA with a project defined through native api, you will need to modify your mappings to match how you want to use the API. In this case, to get the same effect as you would from registerObject, you will need to mark your mappings as cascade persist. Depending on how you merge your entities (shallow, deep etc) you might also need to evaluate how you plan to use the JPA merge method and mark mappings as cascade merge appropriately.
    See setCascadeMerge on ForeignReferenceMapping.
    Best Regards,
    Chris

  • PI 7.30 Message Mapping with MsgSplit error Split mapping created no messages, cannot proceed.

    Hi @all,
    I am working on a scenario to split one soruce message with several items to 0..n message for the same receiver.
    Therefore the occurrency of target message (signature in MM) have been adjusted.
    Not all items are forwarded to receiver, only if the content meets some rules the item should be forwarded.
    It could be that no item of the source message meet these rules and therefore no target message at all should be created.
    During test of this case I am facing following error in RWB, scenario is setup as integrated configuration.
    MappingException: Split mapping created no messages, cannot proceed. Review your mapping setup: splitting to 0 messages is not allowed.
    As the occurrency of the target message is 0..n, 0 should be also valid and there should be no error in this case, just stop processing like if there is no receiver in receiver determination step (mode IGNORE)
    Otherwise this will end up in lots of error messages which have to be analyzed and canceled manually which is quite time consuming.
    Maybe someone faced the same issue and found a solution to get rid of this error message.
    Best regards
    Jochen

    Hi Somil,
    hi Sriram,
    thanks for your response.
    In my scenario there also multiple receiver applications receiving data from one single sender application. We are using PI 7.30 dual stack and major goal is to setup all scenario as integrated configurations to have java only processing. One reason for this setup is that the main support user do not have extensive PI knowledge so far and we want to keep it as simple as possible and therefore do not want them to care about the abap stack as much as possible.
    Unfortunately migration to java only is not possible yet.
    In this release extended receiver determination using operation mapping is not supported in integrated configuration.
    There is quite complex rules to check if an item should be forward or not including lots of fields and also value mapping, so it would be quite difficult/impossible to write XPATH expression to have the same check during receiver determination step.
    One workaround could be creating a dummy message in case of no item to be forward and root this message to different place (local file which is always to be overwritten)
    Are there any alternatives/workarounds?
    Best regards
    Jochen
    Message was edited by: Jochen Gugel

  • Program to cancel xml message with status error or schedule ?

    Hi,
    Any program that can cancel xml message base on period. because i have about 100 thousand unuse xml message that accidentaly generated. because it is too long if i need to cancel 1 by one.
    Regards
    Fernand

    Hi All,
    I already try this program below :
    RSXMB_CANCEL_Message - cancel the meesage with errors.
    RSXMB_CANCEL_NO_COMMIT_MSG -cancel the message processing for messages without commit.
    RSXMB_CANCEL_NOT_REST_MESSAGES - Cancel Xi messages with errors that cannot be restarted
    but then no result selected. i need to select manual those message and cancel using cancel button.
    please advise.
    Thank you and best regards
    Fernand

  • How to make xml validation with automatic error fixed

    Hi', i have some string which i want to validate it:
    String word = "<style>body {background-color:transparent}";     
    byte[] bytes = word.getBytes();
    InputStream inputStream = new ByteArrayInputStream(bytes);
    DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
    docBuilderFactory.setValidating(true);                    
    DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
    DOcument doc = docBuilder.parse(inputStream);This code will produce some exception like this:
    Warning: validation was turned on but an org.xml.sax.ErrorHandler was not set, which is probably not what is desired.  Parser will use a default ErrorHandler to print the first 10  errors.  Please call the setErrorHandler method to fix this.
    Error: URI = "null", Line = "1", : Document root element "style", must match DOCTYPE root "null".
    Error: URI = "null", Line = "1", : Document is invalid: no grammar found.
    org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.Is there anyway to make this validation not only show the errors but automatic fix it?
    Thanks a lot...

    I mean there is no general method which is capable of correcting all possible errors found by schema validation.
    For example if the validation says it expected to find an <organization> element or a <company> element but it found a <banana> element, there is no way to determine what repair is necessary.
    Anyway the requirement is fighting against the way things work in the real world. The purpose of validation is just to find out whether a document matches a schema. If it doesn't, then too bad. Send it back to be fixed or replaced. If you are having a problem because you repeatedly get documents which don't quite match your schema, then you need to train the users to produce valid documents or to give them tools which help them do that.

  • Load xml - xls with OWB error "ORA-20011:....Start of root element expected

    Hi
    I need to load XML document into a table in Oracle warehouse builder.
    I've followed the steps as given in the user guide and I get the following error,
    ORA-20011: Error occurred while loading source XML document into the target database object PURCHASE_ORDERS.
    Base exception: Start of root element expected.
    ORA-06512: at "DC_DWH.WB_XML_LOAD_F", line 12
    ORA-06512: at "DC_DWH.WB_XML_LOAD", line 4
    ORA-06512: at line 7
    The steps are:
    DECLARE
    CONTROL_INFO VARCHAR2(200);
    BEGIN
    CONTROL_INFO := '<OWBXMLRuntime> <XMLSource> <file>c:\xml_test\y.xml</file> </XMLSource> <targets> <target XSLFile="c:\xml_test\y.xsl" dateFormat="yyyy.MM.dd">PURCHASE_ORDERS</target> </targets></OWBXMLRuntime>';
    DC_DWH.Wb_Xml_Load ( CONTROL_INFO );
    COMMIT;
    END;
    where:
    ------------- y.xml ----------------
    <purchaseOrder>
    <id>103123-4</id>
    <orderDate>2000-10-20</orderDate>
    <shipTo country="US">
    <name>Alice Smith</name>
    <street>123 Maple Street</street>
    <city>Mill Valley</city>
    <state>CA</state>
    <zip>90952</zip>
    </shipTo>
    <comment>Hurry, my lawn is going wild!</comment>
    <items>
    <item>
    <partNum>872-AA</partNum>
    <productName>Lawnmower</productName>
    <quantity>1</quantity>
    <USPrice>148.95</USPrice>
    <comment>Confirm this is electric</comment>
    </item>
    <item>
    <partNum>845-ED</partNum>
    <productName>Baby Monitor</productName>
    <quantity>1</quantity>
    <USPrice>39.98</USPrice>
    <shipDate>1999-05-21</shipDate>
    </item>
    </items>
    </purchaseOrder>
    -----------------y.xsl -------------------
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2004/07/xpath-functions" xmlns:xdt="http://www.w3.org/2004/07/xpath-datatypes">
    <SHIPTO_NAME>
    <xsl:value-of select="purchaseOrder/shipTo/name"/>
    </SHIPTO_NAME>
    <SHIPTO_STREET>
    <xsl:value-of select="purchaseOrder/shipTo/street"/>
    </SHIPTO_STREET>
    <SHIPTO_CITY>
    <xsl:value-of select="purchaseOrder/shipTo/city"/>
    </SHIPTO_CITY>
    </xsl:stylesheet>
    Any help is appreciated

    Hello,
    The error occurs as far as your XSL file has incorrect structure. Your have to transform incoming XML in so-called (by Oracle) canonical form i.e.:
    <ROWSET>
    <ROW>
    <FIELD_1>value-for-field-1</FIELD_1>
    <FIELD_N>value-for-field-N</FIELD_N>
    </ROW>
    </ROWSET>
    So, assuming your table has three fields : SHIPTO_NAME, SHIPT_STREET, SHIPTO_CITY, - your XSL file should look like following:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >
    <xsl:template match=”/”>
    <ROWSET>
    <xsl:apply-templates select=”purchaseOrder”/>
    </ROWSET>
    </xsl:template>
    <xsl:template match=”purchaseOrder”>
    <ROW>
    <SHIPTO_NAME><xsl:value-of select=”shipTo/name”/></SHIPTO_NAME>
    <SHIPTO_STREET><xsl:value-of select=”shipTo/street”/></SHIPTO_STREET>
    <SHIPTO_CITY><xsl:value-of select=”shipTo/city”/></SHIPTO_CITY>
    </ROW>
    </xsl:template>
    </xsl:stylesheet>
    Hope this will help.

  • Catch all error information while validating xml content with xsd schema

    Hi experts,
    I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below is a part of my java mapping.
    XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
    parser.setFeature( "http://xml.org/sax/features/validation" ,  true);
    parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
    parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");          parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); // schema is my schema name
    parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends DefaultHandler
    parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
    // In error handler, I comment all code so as not to throw any exception
    public class ParseErrorHandler extends DefaultHandler
         public void error(SAXParseException e) throws SAXException
              // sSystem.out.println("Error" + e.getMessage());
              // throw e;
         public void fatalError(SAXParseException e)
              // throw e;
              // System.out.println("SAP Fatal Error" + e.getMessage());
    Unfortunately the program always stopped while catching the first error. Check the below log.
    com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
    ERRORS :
    cvc-simple-type : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
    cvc-data : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is is not valid with respoct to the corresponding simple type definition.
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is associated with invalid data.
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]/:Header[1]' is not valid with respect to it's complex type definition..
    cvc-element : element information item '/:ShipNotice[1]' is not valid with respect to it's complex type definition..
    -> com.sap.engine.lib.xml.parser.ParserException:
    I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error handler logic? Is there any body can make me get out of this?
    Thanks.

    <h6>Hi experts,
    <h6>
    <h6>I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all <h6>error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below <h6>is a part of my java mapping.
    <h6>XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
    <h6>parser.setFeature( "http://xml.org/sax/features/validation" ,  true);
    <h6>parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
    <h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema");          <h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); <h6>// schema is my schema name
    <h6>parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends Default Handler
    <h6>parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
    <h6>
    <h6>// In error handler, I comment all code so as not to throw any exception
    <h6>public class ParseErrorHandler extends DefaultHandler
    <h6>{
    <h6>     public void error(SAXParseException e) throws SAXException
    <h6>     {
    <h6>          // sSystem.out.println("Error" + e.getMessage());
    <h6>          // throw e;
    <h6>     }
    <h6>
    <h6>     public void fatalError(SAXParseException e)
    <h6>     {
    <h6>          // throw e;
    <h6>          // System.out.println("SAP Fatal Error" + e.getMessage());
    <h6>
    <h6>     }
    <h6>
    <h6>}
    <h6>
    <h6>Unfortunately the program always stopped while catching the first error. Check the below log.
    <h6>
    <h6>com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
    <h6>ERRORS :
    <h6>cvc-simple-type : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
    <h6>cvc-data : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is is not valid with respoct to the corresponding simple type definition.
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is associated with invalid data.
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]' <h6>is not valid with respect to it's complex type definition..
    <h6>cvc-element : element information item '/:ShipNotice[1]' is not valid with <h6>respect to it's complex type definition..
    <h6> -> com.sap.engine.lib.xml.parser.ParserException:
    <h6>
    <h6>
    <h6>I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error <h6>handler logic? Is there any body can make me get out of this?
    <h6>Thanks.

  • Idoc with XSLT Mapping ALE service error

    Hi all,
    I have the same problem with "converting to an ALE logical system".
    In this case I have a Business System without logical system name in the SLD. This information for the IDoc control record, like SNDPOR, I will map with a xslt mapping.
    In weblogs from Michael are the properties for the directory described.
    /people/michal.krawczyk2/blog/2005/09/01/xi-idoc-adapter--edidc40--demystified
    I selected in the comminication channel the last two check boxes, as described in SAP help.
    "Take Sender from Payload
    If you want to take the sender of the message from the payload and not from the configuration information in the Integration Directory, set this indicator.
    If you do not set the indicator, the information is taken from the configuration in the Integration Directory.
    Take Receiver from Payload
    If you want to take the receiver of the message from the payload and not from the configuration information in the Integration Directory, set this indicator.
    If you do not set the indicator, the information is taken from the configuration in the Integration Directory.
    If you set both of the above indicators, you do not require a heading mapping and do not need to set the alternative identifiers.
    However, you must ensure that the SNDPRN, SNDPRT, RCVPRN, and RCVPRT fields are set in the IDoc control record.
    Setting the senders and receivers of a message from the payload simplifies configuration and speeds up processing.
    If the sender and receiver are not set correctly in the payload, the resulting error is only visible in the receiving system. "
    In my XSLT-Mapping I set the appropriate Idoc fields:
    <?xml version="1.0" encoding="iso-8859-1"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="xml"/>
    <xsl:preserve-space elements="*"/>
    <xsl:template match="DATEN">
    <_-XXX_-018_XXXXX_XIDATEN>
    <IDOC>
    <xsl:attribute name="BEGIN">1</xsl:attribute>
    <EDI_DC40>
    <xsl:attribute name="SEGMENT">1</xsl:attribute>
    <TABNAM>EDI_DC40</TABNAM>
    <DOCREL></DOCREL>     
    <DIRECT>2</DIRECT>
    <IDOCTYP>_-XXX_-018_XXXXX_XIDATEN</IDOCTYP>
    <MESTYP>_-XXX_-018_XXXXX_XIDATEN</MESTYP>
    <SNDPOR></SNDPOR>
    <SNDPRN>XXXXX01IN</SNDPRN>     
    <SNDPRT>LS</SNDPRT>
    <RCVPOR>xxx</RCVPOR>
    <RCVPRN>xxx</RCVPRN>
    <RCVPRT>LS</RCVPRT>
    </EDI_DC40>
    <xsl:variable name="pid" select="substring(.,1,1)"/>
    But in the sxmb_moni the message is red with the error message :" converting to an ALE logical system"
    Have you any idea?
    With another interface I used a graphic Mapping and the same properties in the directory and it works.
    Bye
    Stefan

    Hi togehter,
    it works now, after cpa_cache and sxi_cache.
    and and ...
      <IDOCTYP>/XXX/018_XXXXX_XIDATEN</IDOCTYP>
      <MESTYP>/XXX/018_XXXXX_XIDATEN</MESTYP>
    Without: _-...
    I would write a blog.
    Does know one how that goes here?
    Thanks
    SDN is great
    Stefan

  • Problem with castor xml mapping

    Hi,
    we have following problem with castor xml mapping.
    How to use references in the collections(Hashmap or vector)?
    WE have a method called getAttribute map which will return a hashmap consist different type of objects. We want to keep only the
    references of objects if that object occurs more than once,instead of keeping the whole object
    Following is the the xml mapping file.
    <mapping>
    <class name="com.opvista.ndtool.core.mos.ManagedObject" identity="Id" auto-complete="false" verify-constructable="false">
    <map-to xml="ManagedObject"/>
    <field name="Id" get-method="getId" set-method="setId" type="string">
    <bind-xml name="Id" node="attribute"/>
    </field>
    <field name="AttributeMap" type="org.exolab.castor.mapping.MapItem" collection="map" get-method="getAttributeMap">
    <bind-xml name="AttributeMap" node="element">
         <class name="org.exolab.castor.mapping.MapItem">
    <field name="key" type="java.lang.Object">
         <bind-xml name="key" node="attribute"/>
    </field>
    <field name="value" type="java.lang.Object">
         <bind-xml name="value" node="element" reference="true"/>
         </field>
    </class>
         </bind-xml>
    </field>
    </class>
    </mapping>
    we are using reference=true for the values. But it will throw below exception.
    Unable to resolve ID for instance of class 'java.lang.String' due to the following error: Unable to resolve ClassDescriptor.
         at org.exolab.castor.xml.Marshaller.getObjectID(Marshaller.java:1988)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1628)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1831)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1814)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1825)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:821)
    Please help us to overcome from this problem?
    Thanks,
    Dileep

    for your ref here is what i think the basic mapping file would look like
    <class name="Person">
    <map-to xml="person"/>
    <field name="name" type="string">
    <bind-xml name="name" node="attribute" />
    </field>
    <field name="age" type="string">
    <bind-xml name="age" node="attribute" />
    </field>
    </class>
    <class name="MetaPerson">
    <map-to xml="person"/>
    <field name="dependents" type="string">
    <bind-xml name="dependents" node="attribute" />
    </field>
    <field name="presentAdd" type="string">
    <bind-xml name="present_add " node="attribute" />
    </field>
    <field name="permanentAdd" type="string">
    <bind-xml name="permanent_add " node="attribute" />
    </field>
    </class>
    however i am still not clear as to how i can use the metaperson object in the person class as well as in the mapping file.
    hope this gives a better idea abt my problem statement.
    Please help me out

  • ExcelXML mapping---problem with XML maps in Excel sheet

    Hi Friends,
    I have one issue with ExcelXML mapping in Xcelsius.
    The problem is I have designed one dashboard using ExcelXML mapping and everything is working fine but I was afraid that  I could not able to find the mappings which were embedded in Excel.It happened many times.What I was doing is everytime Im re-mapping.I could be a big problem for me to do this procedire for everytime.How to recover my XML maps into excel sheet.Can anyone please provide the solution to achieve this.

    Shouldnt it be equivalent ? I mean, as far as I know the ns0: shouldnt be a problem
    when you have a namespace in the message then you need to associate it with some prefix....since ns0 (or any other prefix) is not present you are getting the error....having the namespace but not ns0 is the problem.
    XMLAnonymizer bean may help you to add the namespace prefix...

  • Excel XML map problem with numbers.

    Hi Xcelsius gurus,
    Once again i need your help.
    I use Excel XML maps to get data into my embedded spreadsheet, my data are current year sales per month like below:
    115.450,36
    220.336,20
    189.222,56
    200.005,48
    just numbers.
    After inserting the xml data i am not able to use them. No chart, No list, No gause can present my data. Like there is no data.
    I realised that after mapping the XML, spreadsheet's cells showing an error, when i click on error icon there is an option to convert data to number, that fix the problem.
    What could i do to solve this issue? Is there any problem with my XML file?
    Pease help me with this one, i am confused.

    Hi:
       what is your xml file format?
       you can try some ordinary xml format instead, here is a example:
       <?xml version="1.0" encoding="ISO-8859-1"?>
    <bookstore>
    <book catalog="Programming">
    <title lang="en">C++ Programming Language</title>
    <author>Bjarne Stroustrup</author>
    <year>998</year>
    <price>198.0</price>
    </book>
    <book catalog="Networking">
    <title lang="en">TCP/IP Illustrated</title>
    <author>Richard Stevens</author>
    <year>1996</year>
    <price>156.0</price>
    </book>
    </bookstore>

  • Using XML sequence Tag with updatexml() errors when called as function?

    Hello,
    I'm having a very difficult time with this error. I was hoping someone could shed some light onto why this is happening. It is 100% reproducible on my end. When I run the problematic code, I am given a "ORA-03113: end-of-file on communication channel" which is actually due to
    "ORA-07445: exception encountered: core dump [kolasaRead()+66] [SIGSEGV] [ADDR:0x64] [PC:0x2250968] [Address not mapped to object] []"
    Set up scripts:*
    CREATE TABLE test (id   NUMBER
                            ,xml  XMLTYPE);
    CREATE OR REPLACE FUNCTION test_replace_metadata(p_metadata                 IN XMLTYPE)
          RETURN XMLTYPE
       IS
          l_metadata_xml                          XMLTYPE;
       BEGIN
          l_metadata_xml := p_metadata;
          SELECT UPDATEXML(l_metadata_xml
                          ,'/DICOM_OBJECT/*[@tag="00100020"]/text()'
                          ,'1010101010101010101'
                          ,'xmlns="http://xmlns.oracle.com/ord/dicom/metadata_1_0"')
            INTO l_metadata_xml
            FROM DUAL;
          RETURN l_metadata_xml; 
      END test_replace_metadata;
    To select the resulting rows:*
    select rownum
               ,id
               ,xml
               --,var
               ,TO_CHAR(EXTRACTVALUE(xml
                   ,'/DICOM_OBJECT/*[@name="Patient ID"]'
                   ,'xmlns=http://xmlns.oracle.com/ord/dicom/metadata_1_0')) "PatientID"
           from test
          order by rownum desc
    The following code works:*
    DECLARE                
    l_metadata VARCHAR2(32767)
                := '<?xml version="1.0"?>
    <DICOM_OBJECT xmlns="http://xmlns.oracle.com/ord/dicom/metadata_1_0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/ord/dicom/metadata_1_0 http://xmlns.oracle.com/ord/dicom/metadata_1_0">
      <LONG_STRING tag="00100020" definer="DICOM" name="Patient ID" offset="816" length="6">#00100020#</LONG_STRING>
      <SEQUENCE xmlns="http://xmlns.oracle.com/ord/dicom/metadata_1_0" tag="00082218" definer="DICOM" name="Anatomic Region Sequence" offset="694" length="76">
                        <ITEM>
                          <SHORT_STRING tag="00080100" definer="DICOM" name="Code Value" offset="722" length="8">T-AA000</SHORT_STRING>
                          <SHORT_STRING tag="00080102" definer="DICOM" name="Coding Scheme Designator" offset="738" length="4">SRT</SHORT_STRING>
                          <LONG_STRING tag="00080104" definer="DICOM" name="Code Meaning" offset="750" length="4">Eye</LONG_STRING>
                        </ITEM>
                      </SEQUENCE>
    </DICOM_OBJECT>';
    l_metadata_xml XMLTYPE;
    BEGIN   
         l_metadata_xml := xmltype(l_metadata, 'http://xmlns.oracle.com/ord/dicom/metadata_1_0');
          SELECT UPDATEXML(l_metadata_xml
                          ,'/DICOM_OBJECT/*[@name="Patient ID"]/text()'
                          ,'dayodayodayo'
                          ,'xmlns="http://xmlns.oracle.com/ord/dicom/metadata_1_0"')
            INTO l_metadata_xml
            FROM DUAL;
       INSERT INTO test(id
                        ,xml)
           VALUES (7
                  ,l_metadata_xml);       
    END;    
    This code doesn't work, and gives the error mentioned:*
    DECLARE                
    l_metadata VARCHAR2(32767)
                := '<?xml version="1.0"?>
    <DICOM_OBJECT xmlns="http://xmlns.oracle.com/ord/dicom/metadata_1_0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.oracle.com/ord/dicom/metadata_1_0 http://xmlns.oracle.com/ord/dicom/metadata_1_0">
      <LONG_STRING tag="00100020" definer="DICOM" name="Patient ID" offset="816" length="6">#00100020#</LONG_STRING>
      <SEQUENCE xmlns="http://xmlns.oracle.com/ord/dicom/metadata_1_0" tag="00082218" definer="DICOM" name="Anatomic Region Sequence" offset="694" length="76">
                        <ITEM>
                          <SHORT_STRING tag="00080100" definer="DICOM" name="Code Value" offset="722" length="8">T-AA000</SHORT_STRING>
                          <SHORT_STRING tag="00080102" definer="DICOM" name="Coding Scheme Designator" offset="738" length="4">SRT</SHORT_STRING>
                          <LONG_STRING tag="00080104" definer="DICOM" name="Code Meaning" offset="750" length="4">Eye</LONG_STRING>
                        </ITEM>
                      </SEQUENCE>
    </DICOM_OBJECT>';
    l_metadata_xml XMLTYPE;
    BEGIN   
       l_metadata_xml := xmltype(l_metadata, 'http://xmlns.oracle.com/ord/dicom/metadata_1_0');
       --This is the difference from the above code                       
       l_metadata_xml := test_replace_metadata(l_metadata_xml);                                   
       INSERT INTO test(id
                        ,xml)
           VALUES (7
                  ,l_metadata_xml);       
    END;            
    This is the full text of the error message:*
    "ORA-03113: end-of-file on communication channel
    Process ID: 10847
    Session ID: 321 Serial number: 33192"Looking into the trace files, I saw this information (This is from a different occurance, but it has remained the same):
    Trace file (omitted)
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    ORACLE_HOME = /opt/app/oracle/product/11.1.0/db_1/
    System name:     Linux
    Node name:     (omitted)
    Release:     2.6.18-92.el5
    Version:     #1 SMP Tue Apr 29 13:16:15 EDT 2008
    Machine:     x86_64
    Instance name: (omitted)
    Redo thread mounted by this instance: 1
    Oracle process number: 53
    Unix process pid: 22883, image: (omitted)
    *** 2009-06-24 13:47:31.198
    *** SESSION ID:(omitted)
    *** CLIENT ID:(omitted)
    *** SERVICE NAME:(omitted)
    *** MODULE NAME:(omitted)
    *** ACTION NAME:(omitted)
    Exception [type: SIGSEGV, Address not mapped to object] [ADDR:0x64] [PC:0x2250968, kolasaRead()+66]
    DDE: Problem Key 'ORA 7445 [kolasaRead()+66]' was flood controlled (0x6) (incident: 70951)
    ORA-07445: exception encountered: core dump [kolasaRead()+66] [SIGSEGV] [ADDR:0x64] [PC:0x2250968] [Address not mapped to object] []
    ssexhd: crashing the process...
    Shadow_Core_Dump = PARTIAL  Why is this happening? Also, When I remove the call to the function or if I remove the SEQUENCE element from the xml everything works fine.
    Any ideas?
    Edited by: rcdev on Jun 25, 2009 2:17 PM - Added code blocks for readability.
    Edited by: rcdev on Jun 25, 2009 2:28 PM

    In short, something inside Oracle is blowing up that shouldn't be, hence the ORA-7445. I did a search on MetaLink but it didn't turn up anything for your version and the internal function that is blowing up. Given you are on 11.1.0.7, I'm going to assume you have some service contract with Oracle and so can open a SR with them. That would be your best bet for getting it resolved given the internal Oracle error you are encountering.
    The next best option would be to post this question on the {forum:id=34} forum given some of the people that watch that forum.

  • "an XML element was malformed" error with anonymous user

    There is no problem with another user but with anonymous user  it gives "an XML element was malformed" error  when I want to select data from Oracle database using BI_JDBC in VC. I have done the user mapping for the anonymous user like  other users. I also give "read" and "end user" permissions for  anonymous user in the BI_JDBC connection. For other users, it works. What should I do to use BI_JDBC in VC with anonymous user.
    Thanks in advance

    Hi Nihat,
    we currently facing the same issue, did you found the solution for this, or maybe a workaround for anonymous system access? Thanks for your help!
    Kind regards,
    Benny

  • Error in scheduling a mapping with sqlloader ctl file

    Hi everyone,
    I have been trying to schedule a single mapping which generates sqlloader ctl file. but i get the error
    ORA-20001: Begin. initialize complete. workspace set. l_job_audit_execution_id= 20545. ORA-20001: Please check execution object is deployed correctly. ORA-01403: no data found ORA-06512: at "USER7.PMAP_TLOG_JOB", line 180 ORA-20001: Please check execution object is deployed correctly. ORA-01403: no data found
    but when i attach this mapping with a process flow it works fine. There is no error.
    so my question is in OWB is it a must that we should attach the mapping which generates sqlloader ctl file to a process flow and then schedule it or can we schedule a single mapping which generates sqlloader ctl file and what should be the process to schedule a single mapping which generates sqlloader ctl file?
    can anyone please help?
    Thanks & Regards
    Subhasree

    Hi Nawneet,
    Any suggestions?
    can anybody else also help me in this error???
    Regards
    Subhasree

Maybe you are looking for

  • AIR-SAP1602E-E-K9 In Hypterminal

    hi all, was configuring this AP platform. after AP boots up it got stuck on this line: *Mar  1 00:03:09.978: %CDP_PD-4-POWER_OK: Full power - NON_CISCO-NO_CDP_RECEIVED inline power source i always use secure CRT but when i changed to hypterterminal i

  • Mac Pro kernel panic booting up.

    Hi everyone, hope you can help, its been a while that I get a couple kernel panics before the machine boots up, heres the latest one.. Anonymous UUID:       C15E88EC-9492-A870-BF4E-ECD2995A3F3A Fri Mar 14 10:41:48 2014 panic(cpu 9 caller 0xffffff800d

  • Is null validation not working correctly

    I have an application in which I have created a data entry page. We are using apex version 3.0.1.00.08. I have an item whose source is a database column which has a select list associated with it, as I want to show the user that they have not yet pic

  • How i use my isight to chat in adium with msn users

    I like Know how i use my isight (built-it in a MB) to chat in adium with msn users

  • Problem in adding a new business partner

    hi all            iam getting an error like "Bank account is missing",when i add a new business partner..i think iam missing any mandatory field..can anybody help me..i have posted my add BP coding in the last... <?xml version="1.0" encoding="utf-8"