Repeated column in mapping error - Hibernate mapping

Hi, I am relatively new to using Hibernate. I have two tables which I have tried to map unsuccesfully.
Table 1:
Primary Key(Instrument) -> Generated using function.
Table 2:
Primary Key(Instrument) -> Referenced from primary key of table 1
Table 3:
Primary Key(Instrument) -> Referenced from primary key of table 2
Additional Column(Parent_Instrument) -> Referenced from the primary key of table 2
So, two columns in Table 3 have to be mapped to the primary key of table 2.
I have tried mapping them but am getting the following error:
Caused by: org.hibernate.MappingException: Repeated column in mapping for entity: com.db.csb.model.securitycreation.entities.tradegate.WiBonds column: INSTRUMENT (should be mapped with insert="false" update="false")
     at org.hibernate.mapping.PersistentClass.checkColumnDuplication(PersistentClass.java:652)
     at org.hibernate.mapping.PersistentClass.checkPropertyColumnDuplication(PersistentClass.java:674)
     at org.hibernate.mapping.PersistentClass.checkColumnDuplication(PersistentClass.java:696)
     at org.hibernate.mapping.PersistentClass.validate(PersistentClass.java:450)
     at org.hibernate.mapping.RootClass.validate(RootClass.java:192)
     at org.hibernate.cfg.Configuration.validate(Configuration.java:1102)
     at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1287)
     at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
     at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:807)
     at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:740)
     at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:131)
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1062)
     at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1029)
     ... 32 moreThe following is my code:
TABLE 2
@Entity
@Table(name="BOND_SPEC")
@Id
     @GenericGenerator
     @GeneratedValue
     @Column(name="INSTRUMENT", nullable=false,insertable=false,updatable=false)
     public long getInstrument() {
          return instrument;
     public void setInstrument(long instrument) {
          this.instrument = instrument;
@OneToMany
     @JoinColumn(name = "INSTRUMENT", nullable=false, insertable=false)
     public Set<WiBonds> getWiBonds(){
          return Wi_Bonds;
     public void setWiBonds(Set<WiBonds> Wi_Bonds){
          this.Wi_Bonds = Wi_Bonds;
TABLE 3
@Entity
@Table(name="WI_BONDS")
     @Id
     @GenericGenerator(name = "fk_bondspec", strategy = "foreign", parameters = { @Parameter(name = "property", value = "BondSpec") })
     @GeneratedValue(generator = "fk_bondspec")
     @Column(name="INSTRUMENT", nullable=false,insertable=false,updatable=false)     
     public long getInstrument() {
          return instrument;
     public void setInstrument(long instrument) {
          this.instrument = instrument;
     @ManyToOne(targetEntity = BondSpec.class)
     @JoinColumn(name = "INSTRUMENT", nullable = false, insertable=false, updatable=false)
     public BondSpec getBondSpec() {
     public void setbondSpec(BondSpec bondspec) {
     @OneToOne(targetEntity = BondSpec.class)
     @JoinColumn(name = "PARENT_INSTRUMENT", nullable = false, insertable = false, updatable = false, unique=true)
     public long getParent_instrument() {
     public void setParent_instrument(long parent_instrument) {
     }What am I doing wrong?

theraptor wrote:
I probably didn't explain it correctly. I am trying to populate these tables with data about financial instruments.
Table 2 and 3 share a primary key (INSTRUMENT). The primary key is generated in table 2, and the same value has to be later inserted into table 3. Sorry, I'm not following this at all. I don't think two tables should "share" a primary key. Both should have their own. Perhaps Table 3 would have a foreign key relationship with Table 2. OR the two tables should be one. But this notion of sharing doesn't sound right to me, and apparently Hibernate agrees. I think you have a bad design.
Table 2 has a one to many relation with table 3. Then they can't share a primary key. It's 1:m, which you can easily model with Hibernate.
(By many I mean it could be 0 as well, since hibernate does not provide a (one to 'maybe' one 'maybe zero) relation.Fine. Then it's a 1:m relationship. You've been thinking about it incorrect.
Table 3 has an additional column PARENT_INSTRUMENT which is a foreign key to the the primary key of table 2.No. Wrong.
Yes Instrument is financial in nature. However, I am not trying to model what you have spoken about above.Yes, I get it. Listen to Hibernate - your original idea is quite incorrect. Table 2 is 1:m with Table 3. Model it that way, and forget about this incorrect notion of "sharing a primary key". Give Table 3 its own auto generated key.
%

Similar Messages

  • Hibernate Mapping Exception Error reading resource: Help Please

    I've downloaded Hibernate this weekend and have been working at getting this up and running in my spare time. I've run into a problem and can't seem to find the solution. I'm hoping some one here can help me out.
    I'm running MyEclipse
    MySQL
    and Hibernate 2 in a struts application
    I've only got one form and table that I'm trying to map right now, but I get the above error when I run this line of code.
    Configuration cfg = new Configuration().addClass(AddCustomerForm.class);
    Does anyone have any ideas. Here are the important sections from the two configuration files
    <!-- hibernate.cfg.xml-->
    <hibernate-configuration>
        <session-factory>
            <!-- properties -->
            <property name="connection.username">PaintTracker</property>
            <property name="connection.url">jdbc:mysql://127.0.0.1:3306/PaintTracker</property>
            <property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property>
            <property name="connection.password">PaintTracker</property>
            <property name="connection.driver_class">com.mysql.jdbc.Driver</property>
            <property name="show_sql">true</property>
            <mapping resource="com/PaintTracker/struts/form/AddCustomerForm.hbm.xml"/>
        </session-factory>
    <!--AddCustomerForm.hbm.xml -->
    <hibernate-mapping>
         <class name="com.PaintTracker.struts.form.AddCustomerForm" table="customer">
              <id name="customerID" column="CustomerID" type="java.lang.Long" unsaved-value="0">
                   <generator class="identity"/>
              </id>
              <property name="firstName" column="FirstName" type="java.lang.String"/>
              <property name="lastName" column="LastName" type="java.lang.String"/>
              <property name="streetAddress" column="StreetAddress" type="java.lang.String"/>
              <property name="middleInitial" column="MiddleInitial" type="java.lang.String"/>
              <property name="city" column="City" type="java.lang.String"/>
              <property name="state" column="State" type="java.lang.String"/>
              <property name="zipCode" column="ZipCode" type="java.lang.String"/>
              <property name="phoneNumber" column="PhoneNumber" type="java.lang.Long"/>
              <property name="emailAddressLeft" column="EmailAddressLeft" type="java.lang.String"/>
              <property name="emailAddressRight" column="EmailAddressRight" type="java.lang.String"/>
              <property name="company" column="Company" type="java.lang.String"/>          
         </class>
    </hibernate-mapping>

    ok finally gotten back to this and rewrote a bunch of the code. I'm getting almost the same error, but not quite.
    I'm still getting org.hibernate.MappingException: Error reading resource: but it is pointing to the first mapping resource located inside the hibernate.cfg.xml.. so I know it is finding and making it inside the hibernate.cfg.xml.
    this is the code that the exception occurs in.
    the actual line is the configuration.configure(); in the else statement.
    public HibernateUtil(URL url2) {
              Configuration configuration = new Configuration();
              log.info("configuration_static is null");
              log.debug("configuring configuration_static from " + url2);
              try {
                   if (url2 != null)
                        configuration.configure(url2);
                   else
                        configuration.configure();
                   this.sessionFactory = configuration.buildSessionFactory();
                   log.info("Configuration complete");
              } catch (HibernateException e) {
                   log.error(e);
                   System.out.println(e);
                   configuration = null;
                   log.info("Configuration failed.  Setting config to null!");
         }The resource I am trying to read is located correctly (eclipse lets you navigate to and choose the xml file to use.. it then builds the hibernate.cfg.xml file for you.)
    here is a copy of the resource that is giving me a problem... whichever resource I have listed first is the one the exception is thrown for... so I'm hoping I just have something mixed up in the way I'm writing my xml files.
    <hibernate-mapping package="com.WorkoutTracker.db.model">
         <class name="com.WorkoutTracker.db.model.User" table="user">
              <id name="userID" column="userId" type="java.lang.Long" unsaved-value="0">
                   <generator class="increment"/>
              </id>
              <property name="userFName" column="userFName" type="java.lang.String"/>
              <property name="userLName" column="userLName" type="java.lang.String"/>
         </class>
    </hibernate-mapping>

  • Error While mapping table with 100 Columns

    Hello
    Actually i had a requirement in which i have to map the data into target table from more than 50 tables with complex join conditions
    So I created 5 maps separately to load the data and now i am feared that while i deploy the the first map the other columns which doesnt have a map
    will be filled with nulls and some of the columns have unique constraint on it so its giving me error
    Please Help me out i need to submit my Assignment by Monday
    Thanks
    Sriks

    Bharadwaj Hari wrote:
    Hi,
    I agree with u...I am not sure of the environment the user has so i put forth all the 3 option that crossed my mind that time....thats why i said he has to choose what best suits him/her...
    Also if the database is huge and we create physical temp tables (option 2 and ur idea) its like having redundant data in the database which is also a problem....So ist upto the user to actually evaluate the situation and come up with what best suits him/her...
    Regards
    BharathHi,
    I understand your opinion. But I am not sure that the user have enough experience to choose the best option by his one. And about the redundant data: because of this I wrote that he should truncate the tables after the last mapping which loads all data into the real target table.
    Regards,
    Detlef

  • Problem in hibernate mapping

    Hi,
    I am new to hibernate and found some problem in mapping for a simple example. Kindly have a look at my code and stack trace and help me fix the problem.
    Mobile.hbm.xml
    <?xml version="1.0"?>
    <!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping>
         <class name="com.mindtree.entity.MobileInvoice" table="MOBILE">
              <property name="model" column="MODEL"/>
              <property name="make" column="MAKE"/>
              <property name="price" column="PRICE"/>
              <property name="date" column="DATE1" />
              <property name="csex" column="CSEX" />
              <property name="cage" column= "CAGE" />
              <id name="id" column="ID">
                   <generator class="increment"/>
              </id>
         </class>
    </hibernate-mapping>Stacktrace:
    org.hibernate.MappingException: Could not read mappings from resource: Mobile.hbm.xml
         at org.hibernate.cfg.Configuration.addResource(Configuration.java:485)
         at org.hibernate.cfg.Configuration.parseMappingElement(Configuration.java:1465)
         at org.hibernate.cfg.Configuration.parseSessionFactory(Configuration.java:1433)
         at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1414)
         at org.hibernate.cfg.Configuration.doConfigure(Configuration.java:1390)
         at org.hibernate.cfg.Configuration.configure(Configuration.java:1310)
         at org.hibernate.cfg.Configuration.configure(Configuration.java:1296)
         at com.mindtree.dao.MobileDAOImpl.addInvoice(MobileDAOImpl.java:25)
         at com.mindtree.dao.Test.main(Test.java:18)
    Caused by: org.hibernate.MappingException: invalid mapping
         at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:425)
         at org.hibernate.cfg.Configuration.addResource(Configuration.java:482)
         ... 8 more
    Caused by: org.xml.sax.SAXParseException: The content of element type "class" must match "(meta*,subselect?,cache?,synchronize*,comment?,tuplizer*,(id|composite-id),discriminator?,natural-id?,(version|timestamp)?,(property|many-to-one|one-to-one|component|dynamic-component|properties|any|map|set|list|bag|idbag|array|primitive-array)*,((join*,subclass*)|joined-subclass*|union-subclass*),loader?,sql-insert?,sql-update?,sql-delete?,filter*,resultset*,(query|sql-query)*)".
         at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
         at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
         at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
         at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
         at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
         at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
         at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.dom4j.io.SAXReader.read(SAXReader.java:465)
         at org.hibernate.cfg.Configuration.addInputStream(Configuration.java:422)
         ... 9 moreThanks :)

    for ex:
    hibernate.cfg.xml
    <mapping resource="com/spm/dao/Login.hbm.xml" />
    login.hbm.xml
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping>
         <class name="com.dao.Login" table="login">
              <id name="id" type="java.lang.Short">
                   <column name="id" />
                   <generator class="increment" />
              </id>
              <property name="username" type="java.lang.String">
                   <column name="username" length="15" not-null="true" />
              </property>
         </class>
    </hibernate-mapping>

  • Hibernate mapping not working

    Greetings,
    I have worked with Hibernate only once or twice before and never had the chance to go any deeper in it. But based on a working sample I have built this mapping for a new project of mine but unable I am to make it work. I'd be delighted to have point outs to what is leading to the exceptions on this... here are my codes:
    package br.com.realstatemanagement.entities;
    import java.util.Date; import java.util.Set; public class Customer { private int customerID; private String firstName; private String lastName; private Date birthDate; private String address; private String neighborhood; private String city; private String state; private String zipCode; private String country="BRASIL"; private String socSecNo; private String identity; private CustomerContacts[] contact; public CustomerContacts[] getContact() { return contact; } public void setContact(CustomerContacts[] contact) { this.contact = contact; } public void setCountry(String country) { this.country = country; } public int getCustomerID() { return customerID; } public void setCustomerID(int customerID) { this.customerID = customerID; } public String getZipCode() { return zipCode; } public void setZipCode(String zipCode) { this.zipCode = zipCode; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public Date getBirthDate() { return birthDate; } public void setBirthDate(Date birthDate) { this.birthDate = birthDate; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getNeighborhood() { return neighborhood; } public void setNeighborhood(String neighborhood) { this.neighborhood = neighborhood; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getState() { return state; } public void setState(String state) { this.state = state; } public String getSocSecNo() { return socSecNo; } public void setSocSecNo(String socSecNo) { this.socSecNo = socSecNo; } public String getIdentity() { return identity; } public void setIdentity(String identity) { this.identity = identity; } public String getCountry() { return country; } }
    package br.com.realstatemanagement.entities; public class CustomerContacts { private int contactId; private String type; private String contact; public int getContactId() { return contactId; } public void setContactId(int contactId) { this.contactId = contactId; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getContact() { return contact; } public void setContact(String contact) { this.contact = contact; } }
    Follows the mappings....
    <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping>   <class name="br.com.realstatemanagement.entities.CustomerContacts" table="CustomerContacts">   <id name="contactId" type="int" column="contact_id" >   <generator class="increment"/>   </id>   <property name="type" type="string">     <column name="type" />   </property>   <property name="contact" type="string">     <column name="contact"/>   </property> </class> </hibernate-mapping>
    <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping>   <class name="br.com.realstatemanagement.entities.Customer" table="Customer">   <id name="customerID" type="int" column="customer_id" >   <generator class="increment"/>   </id>   <property name="firstName">     <column name="first_name" />   </property>   <property name="lastName">     <column name="last_name"/>   </property>   <property name="birthDate">     <column name="birthDate"/>   </property>   <property name="address">   <column name="address" />   </property>   <property name="neighborhood">   <column name="neighborhood" />   </property>   <property name="city">   <column name="city" />   </property>   <property name="state">   <column name="state" />   </property>   <property name="zipCode">   <column name="zipCode" />   </property>   <property name="country">   <column name="country" />   </property>   <property name="socSecNo">   <column name="socSecNo" />   </property>   <property name="identity">   <column name="identity" />   </property>   <many-to-one name="contact" column="contact_id" class="br.com.realstatemanagement.entities.CustomerContacts" insert="false" update="false"/> </class> </hibernate-mapping>
    Kindly help me out on this...
    Thanks very much

    Apologies... it is not that I did not want to put the exception details nor did I not intended to, I simply forgot... Here it is, am once again I am sorry for forgetting about it:
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    org.apache.jasper.JasperException: javax.el.PropertyNotFoundException: Property 'CustomerContacts' not found on type br.com.realstatemanagement.entities.Customer
         org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    root cause
    javax.el.PropertyNotFoundException: Property 'CustomerContacts' not found on type br.com.realstatemanagement.entities.Customer
         javax.el.BeanELResolver$BeanProperties.get(BeanELResolver.java:193)
         javax.el.BeanELResolver$BeanProperties.access$400(BeanELResolver.java:170)
         javax.el.BeanELResolver.property(BeanELResolver.java:279)
         javax.el.BeanELResolver.getValue(BeanELResolver.java:60)
         javax.el.CompositeELResolver.getValue(CompositeELResolver.java:54)
         org.apache.el.parser.AstValue.getValue(AstValue.java:118)
         org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
         org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:935)
         org.apache.jsp.customers_jsp._jspx_meth_c_005fout_005f4(customers_jsp.java:318)
         org.apache.jsp.customers_jsp._jspx_meth_c_005fforEach_005f0(customers_jsp.java:208)
         org.apache.jsp.customers_jsp._jspService(customers_jsp.java:134)
         org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
         org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
         org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
         org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

  • Hibernate mapping

    I get an error when i do -> new Configuration().configure();  The error is "Could not parse mapping document from resource Client.hbm.xml"
    Glassfish gives the messages:
    configuring from resource: /hibernate.cfg.xml
    Configuration resource: /hibernate.cfg.xml
    Reading mappings from resource : Client.hbm.xml
    Error parsing XML: XML InputStream(1) Document is invalid: no grammar found.
    Error parsing XML: XML InputStream(1) Document root element "hibernate-mapping", must match DOCTYPE root "null".
    Here is my simple Client.hbm.xml mapping file:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
    <hibernate-mapping>
    <class dynamic-insert="false" dynamic-update="false" mutable="true"
    name="icmmclientsmanager.Client"
    optimistic-lock="version"
    polymorphism="implicit"
    select-before-update="false" table="Clients">
    <id column="cId" name="cid">
    <generator class="identity"/>
    </id>
    <property column="cName" name="cName"/>
    <property column="cAddress" name="cAddress"/>
    </class>
    </hibernate-mapping>
    "Please help!!"Edited by: dof on Jun 4, 2008 6:38 PM

    Might be because it's not finding the file? Should i understand from the error that it's finding the file but there is something else.
    Here is my hibernate.cfg.xml, maybe the problem is here
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
        <session-factory name="session1">
            <property name="hibernate.dialect">
                org.hibernate.dialect.DerbyDialect
            </property>
            <property name="hibernate.connection.driver_class">
                com.mysql.jdbc.Driver
            </property>
            <property name="hibernate.connection.url">
                jdbc:mySql://localhost:3306/ICMMDev
            </property>
            <property name="hibernate.connection.username">
                root
            </property>
            <property name="hibernate.connection.password">
                password
            </property>
            <property name="hibernate.show_sql">
                true
            </property>
            <property name="hibernate.current_session_context_class">
                thread
            </property>
            <mapping resource="Client.hbm.xml"/>
        </session-factory>
    </hibernate-configuration>

  • VLD-1141: Internal error during mapping generation.

    I am getting the "VLD-1141: Internal error during mapping generation" error when deploying a mapping. This mapping was previously working fine. As part of a re-factoring effort, for all the underlying tables and views, we replace 2 existing columns with a new column. All the objects were successfully re-imported and synchronized in the mapping. The mapping is using Mapping Input Parameter, Lookups, Expression Transformations, Splitter, Set Operator, Source & Target Tables. All these transformation were part of the earlier working version of the mapping.
    On doing validation within the mapping, I get a success message followed by 4 warning for the Lookup Condition on key Lookup does not contain a complete unique key. Before the re-factoring effort, I was getting the same 4 warning messages, however the mapping was executing correctly.
    When I do Generate within the mapping, I get the following message:
    Code cannot be generated.
    Click the message tab for details.
    In the Design Center, when I do a validation on the mapping I get the following error:
    VLD-1141: Internal error during mapping generation.
    java.lang.NullPointerException
    at oracle.wh.service.impl.mapping.component.Sequence.getSequenceExpressions(Sequence.java:138)
    at oracle.wh.service.impl.mapping.component.Sequence.doSequenceValidation(Sequence.java:239)
    at oracle.wh.service.impl.mapping.component.entity.EntitySqlDelegate.prepareOutputContext2(EntitySqlDelegate.java:123)
    at oracle.wh.service.impl.mapping.component.entity.EntitySqlDelegate.prepareOutputContext2(EntitySqlDelegate.java:97)
    at oracle.wh.service.impl.mapping.component.entity.EntitySqlDelegate.prepareOutputContext(EntitySqlDelegate.java:78)
    at oracle.wh.service.impl.mapping.generation.WBMappingGenerator.generate(WBMappingGenerator.java:240)
    at oracle.wh.service.impl.mapping.generation.PlSqlGenerationMediator.assembleSetBasedInternal(PlSqlGenerationMediator.java:2108)
    at oracle.wh.service.impl.mapping.generation.PlSqlGenerationMediator.assembleSetBased(PlSqlGenerationMediator.java:2090)
    at oracle.wh.service.impl.mapping.generation.PlSqlGenerationMediator.assemble(PlSqlGenerationMediator.java:541)
    at oracle.wh.service.impl.mapping.generation.WBMappingGenerator.generate(WBMappingGenerator.java:798)
    at oracle.wh.service.impl.mapping.generation.WBMappingGenerator.generate(WBMappingGenerator.java:335)
    at oracle.wh.service.impl.mapping.generation.WBDeployableMappingGenerator.generate(WBDeployableMappingGenerator.java:102)
    at oracle.wh.service.impl.generation.common.WBGenerationService.generateCode(WBGenerationService.java:433)
    at oracle.wh.service.impl.generation.common.WBGenerationService.generateCode(WBGenerationService.java:311)
    at oracle.wh.service.impl.generation.service.WhValidationGenerationTransaction.run(WhValidationGenerationTransaction.java:251)
    Any help in this regards would be appreciated.
    Naval

    Hi,
    I think your mapping is corrupted by converting two columns to one. The owb has always a problem if you change the structure of a table which is bound to a table operator. The way to avoid this is to drop the table operator after changing the table in the table editor and recreate it with the changed table definition.
    Make a test: select the new attribut in the table operator and look left on the configuration window. To which table and attribute it's bound?
    Regards,
    Detlef

  • Error while mapping two times nested table

    Hi,
    I have a Product table which has nested ProductSubcategory in it.
    ProductSubcategory nested table also has nested table ProductCategory inside it.
    So there is a nested table inside nested table.
    I designed a dimension on warehoue builder and while mapping, i got "ORA-22913: must specify table name for nested table column or attribute" error.
    I mapped nested tables before with using varray iterator and expand object, but they were nested once. Is there any solution for mapping two or more time nested tables?
    Now i exracted tables and i continuou working but, i wondered is there any way.
    Creation codes are below. Thanx :)
    CREATE TABLE PRODUCT
    (     PRODUCTID NUMBER NOT NULL ,
         ProductSubcategory ProductSubcategory,
         MODIFIEDDATE DATE NOT NULL)
    NESTED TABLE ProductSubcategory STORE AS ProductSubcategory_TABLE
    ( NESTED TABLE ProductCategoryId STORE AS ProductCategory_TABLE);
    CREATE TYPE TYPE_ProductSubcategory AS OBJECT (
         ProductSubcategoryID number ,
         ProductCategoryId ProductCategory ,
         Name Varchar(50) ,
         rowguid varchar2(100) ,
         ModifiedDate date );
    CREATE TYPE TYPE_ProductCategory AS OBJECT (
         ProductCategoryID number ,
         Name Varchar(50) ,
         rowguid varchar2(100) ,
         ModifiedDate date );

    Bharadwaj Hari wrote:
    Hi,
    I agree with u...I am not sure of the environment the user has so i put forth all the 3 option that crossed my mind that time....thats why i said he has to choose what best suits him/her...
    Also if the database is huge and we create physical temp tables (option 2 and ur idea) its like having redundant data in the database which is also a problem....So ist upto the user to actually evaluate the situation and come up with what best suits him/her...
    Regards
    BharathHi,
    I understand your opinion. But I am not sure that the user have enough experience to choose the best option by his one. And about the redundant data: because of this I wrote that he should truncate the tables after the last mapping which loads all data into the real target table.
    Regards,
    Detlef

  • Dynamic mapping in hibernate

    Hi...
    I want to do the hibernate mapping for a dynamic component.Can any of you tell me how to
    put that mapping. I know we can use the following.But no proper idea.
    <dynamic-component name="ids">
         <many-to-one class="class name " column="column-name "/>
    </dynamic-component>>
    Can any one give some guide lines/any tutorial/instructions to do this?
    Thanks a lot.
    Regards,
    Menaka.

    Hai Menaka,
    this is ranga nice to meeting you. Probable for ur problum you may find out at this url
    http://hibernate.org

  • OWB 11.2 internal error during mapping generation

    Dear all,
    Ever since switching to OWB 11.2 I have been sporadically receiving unexplicable errors during mapping deployment. It only happens when I generate more than 1 mapping simultaneously, and it appears to be completely random. One or more mappings will fail during the generation phase of the deployment with an 'internal error', after which I get the option to continue deployment of those mappings that did generate correctly. What I usually do next is trying to deploy the failed mappings again, which always works - the internal error does not reoccur. But it seems to be that this second generation does not work properly either.
    For example, today I had to redeploy my entire set of mappings, due to a server change. Of the 60 mappings I had, about 5 failed with the forementioned error. (Sadly I can't include the exact error here since the job logs in the control center do not record this failure to generate, it looks like the failed mappings never were included in the job in the first place.) One of them I deployed aftewards, and found the query in the pacakge to look like:
        INSERT
        /*+ APPEND  */
        INTO
          "SA_BETMD_01" "SA_BETMD_01"
          ("DEWNKNR",
          "DEBTMCE",
          "DEBTMOM",
          "DEBTMO2",
          "DEBTMO3")
          (SELECT
    /*+ NO_MERGE */
    /* DRBETMD_RS.INOUTGRP1 */
      "DRBETMD_RS"."DEWNKNR" "DEWNKNR",
      "DRBETMD_RS"."DEBTMCE" "DEBTMCE",
      "DRBETMD_RS"."DEBTMOM" "DEBTMOM",
      NVL("DRBETMD_RS"."DEBTMO2", "DRBETMD_RS"."DEBTMOM")/* ATTRIBUTE NVL_BTMO2.OGRP.DEBTMO2: EXPRESSION */ "DEBTMO2",
      NVL("DRBETMD_RS"."DEBTMO3", "DRBETMD_RS"."DEBTMOM")/* ATTRIBUTE NVL_BTMO3.OGRP.DEBTMO3: EXPRESSION */ "DEBTMO3"
    FROM
      "SRC"."DRBETMD_RS"@"[email protected]_SRC_PRD_RET"  "DRBETMD_RS"
        ;However, generating the preview code in OWB results in a more correct and complete version of the code:
        INSERT
        /*+ APPEND  */
        INTO
          "SA_BETMD_01" "SA_BETMD_01"
          ("DEWNKNR",
          "DEBTMCE",
          "DEBTMOM",
          "DEBTMO2",
          "DEBTMO3",
          "DEBTMO4")
          (SELECT
    /*+ NO_MERGE */
    /* DRBETMD_RS.INOUTGRP1 */
      "DRBETMD_RS"."DEWNKNR" "DEWNKNR",
      "DRBETMD_RS"."DEBTMCE" "DEBTMCE",
      "DRBETMD_RS"."DEBTMOM" "DEBTMOM",
      NVL("DRBETMD_RS"."DEBTMO2", "DRBETMD_RS"."DEBTMOM")/* ATTRIBUTE NVL_BTMO2.OGRP.DEBTMO2: EXPRESSION */ "DEBTMO2",
      NVL("DRBETMD_RS"."DEBTMO3", "DRBETMD_RS"."DEBTMOM")/* ATTRIBUTE NVL_BTMO3.OGRP.DEBTMO3: EXPRESSION */ "DEBTMO3",
      NVL("DRBETMD_RS"."DEBTMO4", "DRBETMD_RS"."DEBTMOM")/* ATTRIBUTE NVL_BTMO4.OGRP.DEBTMO4: EXPRESSION */ "DEBTMO4"
    FROM
      "SRC"."DRBETMD_RS"@"[email protected]_DGN_PRD_RET"  "DRBETMD_RS"
        ;The same goes for other packages, all of which crash due trying to insert NULL values in a mandatory column! (In case, DEBTMO4.)
    Funny enough, if I generate the mapping again a bit later - without making any changes to the mapping - the code is complete and everything works properly.
    Does anyone else ever had this problem? My main problem is that I can't just reproduce this problem, so I can't exactly report it as a bug and expect it to be solved...
    Kind regards,
    Kurt Geens

    Good morning Dave,
    I do mean during deployment. As you probably know all too well, the deployment of a package is split in two parts: generation of the code, and the actual deployment. The internal error occurs during that first part - the generation of code. The exact steps I went through when the error occured are the following:
    1) I selected about 15 mappings, and chose to 'replace' these mappings in the database. The code was generated, with 4 mappings having the forementioned 'internal error'. After pressing the play button the deployment of the 11 remaining packages continued without problem.
    2) Within the same session, I selected the 4 failed mappings, and chose to 'replace' these again. The generation and deployment was succesful - no internal errors occured.
    3) I exited OWB and started a daily workflow process. One of the mappings that had an internal error in step 1 crashed with a 'cannot insert null into' error.
    4) I restarted OWB, opened the mapping, chose to generate the code, and compared the generation result with the package code in the database. This resulted in the difference mentioned in my original mail.
    5) I deployed (replace) the mapping once more, and verified the code in the database. This time the code was complete (no missing column).
    Regards,
    Kurt

  • Hibernate mapping editor not working fully

    My hibernate mapping editor is not working fully. I can manually enter a new property into the xml and the design pane will update but if I try to add a new property in the design pane it only adds "<property/>" without the attributes specified.
    I looked at my workshop log and I did find the following exception:
    BEGIN EXCEPTION-
    !ENTRY org.eclipse.ui 4 0 2007-03-13 09:08:37.939
    !MESSAGE Failed to execute runnable (java.lang.NullPointerException)
    !STACK 0
    org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
         at org.eclipse.swt.SWT.error(SWT.java:3374)
         at org.eclipse.swt.SWT.error(SWT.java:3297)
         at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:126)
         at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3325)
         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
         at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
         at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
         at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
         at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
         at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
         at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
         at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
         at org.eclipse.core.launcher.Main.run(Main.java:977)
         at org.eclipse.core.launcher.Main.eclipse_main(Main.java:952)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at com.m7.installer.util.NitroxMain$1.run(NitroxMain.java:36)
         at java.awt.event.InvocationEvent.dispatch(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    Caused by: java.lang.NullPointerException
         at com.m7.wide.doceditor.XmlTagCommander$_A.actionPerformed(Unknown Source)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.AbstractButton.doClick(Unknown Source)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at javax.swing.JComponent.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at com.m7.wide.eclipse.jstudio.Plugin$_A.A(Unknown Source)
         at com.m7.wide.eclipse.jstudio.Plugin$4.run(Unknown Source)
         at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
         at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
         ... 32 more
    ---END EXCEPTION---
    Any ideas on how to fix this?
    Thanks,
    Avi.

    Yes, there is a known issue using the latest update of 1.4.2 or 1.5.0 vm.
    Generally, Workshop should work fine with 1.4.2 or 1.5.0 series. You can find the supported platform info at
    http://edocs.bea.com/workshop/docs92/supportedplatforms33.html
    FYI:
    http://forums.bea.com/bea/thread.jspa?threadID=400001144&tstart=15&mod=1169490304818
    http://forums.bea.com/bea/thread.jspa?threadID=400001987&tstart=0&mod=1172533558688

  • XSU Problem:Error-- Cannot map Unicode to Oracle character

    Hi, I am using XSU to get the resultset from database(oracle 9.2.0.6.0) as XML.When I query data from some columns and get the XMLString, they give me error -"Cannot map Unicode to Oracle character". The database charset is "US7ASCII" .
    One column is storing Chinese with ''US7ASCII".When xmlString Result contianer
    the column,there is "oracle.xml.sql.OracleXMLSQLException: Cannot map Unicode to Oracle character".But If xmlString Result don't container that column,it run very good.
    The program container these libs: ojdbc14.jar,xmlparserv2.jar,xdb.jar,nls_charset12.jar,xsu12.jar.
    The program code:
    public class OracleXmlParse {
    public static void main(String[] args) {
    try{
    DriverManagerDataSource dataSource = new DriverManagerDataSource("oracle.jdbc.driver.OracleDriver",
                        "jdbc:oracle:thin:@168.1.1.136:1521:imis","ims","ims");
    String selectSQL = "select AREA_CODE,AREA_NAME,REGION_CODE,AREA_NAME_CN from CDM_AREA";
    OracleXMLQuery query = new OracleXMLQuery(conn,selectSQL);
    query.setEncoding("UTF-8");
    String str = query.getXMLString();
    System.out.println(str);
    conn.close();
    }catch(SQLException e){
                   e.printStackTrace();
    Exception:
    Exception in thread "main" oracle.xml.sql.OracleXMLSQLException: Cannot map Unicode to Oracle character.
         at oracle.xml.sql.core.OracleXMLConvert.getXML(OracleXMLConvert.java:1015)
         at oracle.xml.sql.query.OracleXMLQuery.getXMLString(OracleXMLQuery.java:267)
         at oracle.xml.sql.query.OracleXMLQuery.getXMLString(OracleXMLQuery.java:221)
         at oracle.xml.sql.query.OracleXMLQuery.getXMLString(OracleXMLQuery.java:198)
         at procedure.OracleXmlParse.main(OracleXmlParse.java:34)
    The column that store chinese is AREA_NAME_CN .When "selectSQL " is equal to "select AREA_CODE,AREA_NAME,REGION_CODE from CDM_AREA",the program is ok.
    Please help.
    Message was edited by:
    user542404
    Message was edited by:
    user542404

    So, What is the solution ? Is there something I can do in my code ? My program gives the exception and stops. I am not even interested to fetch the data, which are giving this error.

  • Mapping Error in SXMB_MONI

    Hi,
    I am facing a mapping error in SXMB_MONI. When I test Message Mapping and Interface Mapping independently, the test executes successfully, displaying the expected output. However when I execute the scenario as a whole, I get an error in SXMB_MONI saying "Runtime Exception: Different length of queues in SortByKey"
    Please help me regarding the same.
    Thanks and Regards,
    Tejal

    Ref. to the help doc statement.
    <i>sortByKey -
    Like sort, but with two inbound parameters to sort (key/value) pairs. The sort process can be compared to that of a table with two columns.
    Using the first parameter, you pass key values from the first column, which are used to sort the table. If you have classified the key values as numeric in the function properties, they must not be equal to the constant ResultList.SUPPRESS. See also: The ResultList Object
    Using the second parameter, you pass the values from the second column of the table.</i>
    <i><b>If there is a discrepancy between the number of keys and values, the mapping runtime triggers an exception. The function returns a queue with the values sorted according to the keys.</b></i>
    http://help.sap.com/saphelp_nw04/helpdata/en/43/c4cdfc334824478090739c04c4a249/content.htm

  • DTW Sort Error - after mapping during import

    I got the "Sort Error - after mapping during import" message in DTW. (version 8.8)
    I would like to import warehouse info for items.
    My itemcodes are fix 15 character numbers, like this: 10204150020011
    The note nr. [1331130|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/oss_notes/sdn_oss_sbo_dtw/~form/handler%7b5f4150503d3030323030363832353030303030303031393732265f4556454e543d444953504c4159265f4e4e554d3d31333331313330%7d] said that I can't use recordkey like this.
    Do you have any idea how can I import thees information with DTW?
    Thank you,
    Attila Sarkady

    Dear All
    Please give correct and complete information
    i have tested every kind of combination;
    - recreate the template with the dtw for Items = i have UDF's
    - ADD the column RecordKey   !!! unbelievable that we have to do this
    - i have entered a nr 1 in it (even when we had already 850 items in the database)
    (and of course the hints of Gordon - columns as text, start with basic... - and use CSV format)
    now at last i can import the record line
    greetings
    philippe

  • Repeate Message after RuntimeException in Message-Mapping transformation

    Hello Experts,
    I have a mapping defined with a UDF. In the mapping editor the tests were successfull but in the reale world - of course not
    Now I have a message in the Integration Server with red flag because of
    com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Runtime exception during processing target field mapping /LIST/S_UNB/S_UNH/G_SSG18/S_GID/C_C213/D_7224. The message is: Exception:[java.lang.NumberFormatException: For input string: "__cC_"]
    I've located the error in the UDF and want to repeate the message with the new mapping. But again the same error although the test in the mapping tool (with the original payload) was successfull.
    It must be possible to repeate those messages but how?
    Thanks a lot.
    Christian

    This was a little bit strange. But after the import, the version of the mapping in PROD was different from TEST.
    I've changed the description Field of the Mapping in Test, activated the version and did the export/import again. Now the versions were the same and after repeating the message everything is o.k.
    THANKS ALL FOR YOUR HELP!
    Christian

Maybe you are looking for

  • Adobe Crashes upon adjusting Audio Gain and when exporting

    First a bit about the systems in question I have four identical edit bays. Each has a Dual Core 2.5 Ghz Pentium processor, 3.0 gbs of ram, a single sata drive split into two partitions (system 30 gb and video 470 gb). I am running up to date PPro 5.0

  • INS0029 Error occurred during installation

    Version: OWB Client 9.2.0.2.8 OWB Repository 9.2.0.2.0 I cannot install successfully OWB Runtime Repository. Installation falls in 66%, then display Error message: INS0029 Error occurred during installation. What can I do?

  • Page authorizations import error

    When exporting/importing applications from our test application to the production application we are finding that some of the page authorisations are getting lost. The ones affected are any that are defined as "{NOT}SOME SCHEME". When imported these

  • GP + Web Dynpro (Interface o Application)+ Web Services

    Hi, I have a scenario, in which I require to create a web dynpro, which will be utilized in a Callable Object, inside GP.  This web dynpro will be like a form, which will be fed from 2 sources.  • An external Web Service, that brings information from

  • Trying to update ACC but programs don't recognize I'm on-line nor will CC or Adobe AppManager open.

    My system told me when I opened this morning that I had two updates, one from Adobe and the other from my internet download manager. I took care of the IDM first which required a reboot. Then I started to do the Adobe update which said there was a mi