No columns in table ERROR

I have a simple query with a join between 2 tables.
(something like this)
select db2admin.invoice.product_num, db2admin.product.description, db2admin.invoice.amount
from db2admin.invoice, db2admin.product
where db2admin.invoice.product_num = db2admin.product.product_num
and db2admin.invoice.invoice_date = ?
order by db2admin.product.description
I`ve set the:
setTableName("INVOICE");
setSchemaName("DB2ADMIN");
boolean columns[] = {true, false, true};
setInsertableColumns(columns);
setUpdatableColumns(columns);
I insert an item and do a commitchanges()
and the following error occurs:
java.sql.SQLException: No columns in table: PAT_TRANSF_ITENS
Can anyone help?

The DB2 driver seems a little wierd - it doesn't return the schema name if you have a join.
So do not call setSchemaName() IF your SELECT has a join and you're using our bundled DB2 driver.
Also, you don't have to call setInsertableColumns() like you did, because your second column is not in the INVOICE table.

Similar Messages

  • No columns in table error when committing via CachedRowSetDataProvider

    Okay, another issue that's had me scratching what's left of my hair over the past couple of days.
    I've got a CachedRowSetDataProvider tied to a CachedRowSetXImpl. This rowset pulls all data back from a table (command = select all FIRST_NAME, LAST_NAME from t_person). I want to insert/append a new row into that table. I'm doing something like the following:
    RowKey rk = t_rolesDataProvider.appendRow();
    t_rolesDataProvider.setCursorRow(rk);
    t_rolesDataProvider.setValue("FIRST_NAME", fName);
    t_rolesDataProvider.setValue("LAST_NAME", lName);
    t_rolesDataProvider.commitChanges();
    When it gets to the .commitChanges() line, I get the following error:
    java.sql.SQLException: No columns in table: t_person
    I've seen this reported a couple other times but haven't been able to find anything that helps me with my issue (even though what I'm doing seems much simpler than the other reports I've seen).
    I've also reviewed several of the blogs regarding how you're supposed to be able to do this (insertableColumns and all that) but if there are any other resources, I'd appreciate them as well.
    Here's the kicker, it works fine when I'm pointing to a MySQL database but when I switch over to an Oracle database, I start getting these errors.
    It only seems to be an issue when I go to insert, update or delete data. I can display data from these same tables just fine with either driver/database.
    Please help!
    Thanks,
    TJ

    I am also having this error inserting into mySQL table. I am updating a view.. But the view is of the base table, so it should be updatable. When I debug this, I see that the "FieldKeys" is fully populated, and the I see nothing irregular inside the DataProvider.
    getPDataProvider().cursorLast();  \\ added to try and populate columns
    if ( getPDataProvider().canAppendRow() ) {
        try
            getSessionBean1().getPRowSet().execute(); \\ added to try and populate columns
            RowKey rowKey = getPDataProvider().appendRow();
            getPDataProvider().setCursorRow(rowKey);
            getPDataProvider().setValue("partys.PartyId"        ,rowKey, (new Integer(0)));              
            getPDataProvider().setValue("partys.GameId"         ,rowKey, (new Integer(this.getSessionBean1().getSelectedGameId() )));                          
            getPDataProvider().setValue("partys.HostId"         ,rowKey, (new Integer(this.getSessionBean1().getCurrentHostId()  )));                          
            getPDataProvider().setValue("partys.PartyName"      ,rowKey, "Enter Party Name Here" );                          
            getPDataProvider().setValue("partys.StatusId"       ,rowKey, (new Integer(0)));                                                     
            getPDataProvider().setValue("partys.PartPassCode"   ,"Enter Password" );                          
            getPDataProvider().setValue("partys.PersonalMessage",rowKey, "Were having a Party" );  
            getPDataProvider().commitChanges();
        }catch (Exception e) {error("Cannot create new reocord: " + e); return("stay"); }Has anyone found this problem ???
    [#|2006-10-28T10:26:35.296-0400|WARNING|sun-appserver-pe8.2|javax.enterprise.system.stream.err|_ThreadID=18;|
    java.sql.SQLException: No columns in table: partys
         at com.sun.sql.rowset.internal.CachedRowSetXWriter.initSQLStatements(CachedRowSetXWriter.java:1251)
         at com.sun.sql.rowset.internal.CachedRowSetXWriter.writeData(CachedRowSetXWriter.java:327)
         at com.sun.sql.rowset.CachedRowSetXImpl.acceptChanges(CachedRowSetXImpl.java:1036)
         at com.sun.data.provider.impl.CachedRowSetDataProvider.commitChanges(CachedRowSetDataProvider.java:833)
         at vehicleincidentreportapplication.WWM_Players.createANewPartyButton_action(WWM_Players.java:631)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
         at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:57)
         at javax.faces.component.UICommand.broadcast(UICommand.java:312)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:221)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

  • Tabular Form: Conditional column based on another column in table/form?

    Hi!
    I have 4 columns in table A:
    number (the question number)
    question (the question to be asked)
    type (TEXT, LOV are the 2 valid values)
    answer (the answer with text or a selection from the lov table below)
    I have 2 columns in table B:
    number (the question number)
    values (a single value for the lov's)
    In table B there can be mutiple rows for each number. Table A and table B
    join on the number.
    I want to build a tablular form on table A where for each row either a text
    box or a select list is displayed depending on the contents of the type column.
    So row 1 would display a text box when the type value is text; row 2 would
    display a select list when the type value is lov.
    Is this even possible? How do I refer to the type column in the conditional for the
    answer column? I am guessing that I will need to have 2 answer columns one
    that displays when the type column is TEXT and one that displays when the
    type column contains LOV. This is OK. Setting up the conditional is display is the issue at this point.
    Hopefully I have explained this well enough! :)
    Thanks!
    Dave Venus

    Hi Dave,
    Sorry for not responding sooner - I finish work at 3pm GMT.
    I'll take your first question first (3:28PM posting according to my display - not sure if you are on GMT time?):
    As far as I understand it, using the select_list_from_query() function generates the options that are required in the select list as HTML tags. Each instance of this function should create a SELECT tag and the results of the query should generate one or more OPTION tags within it.
    Second question (4:20PM posting):
    The HTMLDB_ITEM functions are listed in the documentation - here's a link to the online version:
    http://download-east.oracle.com/docs/cd/B19306_01/appdev.102/b14303/api.htm#sthref2524
    Most of the examples that I have seen have been on this forum - simply search for HTMLDB_ITEM or one of its functions.
    I tend to leave the generation of tabular forms to the wizard as much as possible. The only exceptions are when I need to have access to more than the Primary Key for a row but don't want to show the field on screen. There are examples on the forum about concatenating the HTMLDB_ITEM functions into a single value - this hides ID fields from the user but makes them available to PL/SQL code.
    Third question (5:29PM posting)
    I did try using DECODE in my questionnaire but not for the feature that you needed. Originally, I wanted to use this to display one of a number of different fields (ie, my date, number or string field as appropriate to the question) but this didn't help as I couldn't get back to the right field during the update. If you have decode working for the select lists, then that's great!
    The first column should be hidden or sitting behind a checkbox as this should be the Primary Key for the row and should not be editable by the user nor would it normally be displayed.
    As long as your select statement creates the correct output (albeit that you may need to work on the layout!), you should have an updatable form. However, you will need to have the MRU processes in place and the appropriate buttons that trigger these. When I did my questionnaire, I created the form using a wizard to get all of the processes and buttons and then changed the select statement. If you haven't got the processes and/or buttons, we can go through adding these onto your page.
    Last question (9:08PM posting)
    As explained above, column 1 should normally be hidden. The INPUT tag you detail above is what I would expect to see. The value="6" attribute indicates that 6 is the Primary Key for that row - every row will have the same tag but different values for the "value" attribute. So, if it is hidden and these are the tags you see doing a View Source on the page, then everything is correct.
    OK. So now we have the data on screen and (hopefully?) we have the correct processes and buttons on the page.
    The next step would be validation and update of the data.
    Validation of the data can be handled by a normal page process - I can let you have example code if you want to validate the data (this will also explain how to loop through the rows - there are also methods that you can use to do this in javascript if you want). Updates should be handled by the processes and buttons on the page - again, if you haven't got these we can go through adding them in (although, if you haven't yet formatted your page, you may find it quicker to copy your select statement and create the page again using the same select statement).
    ORA-20001 errors are user defined errors. Do you mean the "data has changed" errors? If so, you will probably need to include the MD5 checksum functionality (it's shown in the document linked above).
    Finally, we'll keep this thread going so that you have all of your workings and my responses in one place, if that's ok with you?
    Regards
    Andy

  • SharePoint List Form using InfoPath 2010 "Cannot insert the value NULL into column 'tp_DocId', table 'Content_SP_00003.dbo.AllUserData'; column does not allow nulls"

    I am experiencing issue with my SharePoint site , when I am trying to add new Item in List . Error given below :--> 02/03/2015 08:23:36.13 w3wp.exe (0x2E04) 0x07E8 SharePoint Server Logging Correlation Data 9gc5 Verbose Thread change; resetting trace
    level override to 0; resetting correlation to e2e9cddc-cf35-4bf8-b4f3-021dc91642da c66c2c17-faaf-4ff9-a414-303aa4b4726b e2e9cddc-cf35-4bf8-b4f3-021dc91642da 02/03/2015 08:23:36.13 w3wp.exe (0x2E04) 0x07E8 Document Management Server Document Management 52od
    Medium MetadataNavigationContext Page_InitComplete: No XsltListViewWebPart was found on this page[/sites/00003/Lists/PM%20Project%20Status/NewForm.aspx?RootFolder=&IsDlg=1]. Hiding key filters and downgrading tree functionality to legacy ListViewWebPart(v3)
    level for this list. e2e9cddc-cf35-4bf8-b4f3-021dc91642da 02/03/2015 08:23:36.17 w3wp.exe (0x1B94) 0x1A0C SharePoint Server Logging Correlation Data 77a3 Verbose Starting correlation. b4d14aec-5bd4-4fb1-b1e3-589ba337b111 02/03/2015 08:23:36.17 w3wp.exe (0x1B94)
    0x1A0C SharePoint Server Logging Correlation Data 77a3 Verbose Ending correlation. b4d14aec-5bd4-4fb1-b1e3-589ba337b111 02/03/2015 08:23:36.31 w3wp.exe (0x2E04) 0x07E8 SharePoint Foundation Database 880i High System.Data.SqlClient.SqlException: Cannot insert
    the value NULL into column 'tp_DocId', table 'Content_SP_00003.dbo.AllUserData'; column does not allow nulls. INSERT fails. The statement has been terminated. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject
    stateObj) at System.Data.SqlClient.SqlDataReader.ConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavi... e2e9cddc-cf35-4bf8-b4f3-021dc91642da 02/03/2015
    08:23:36.31* w3wp.exe (0x2E04) 0x07E8 SharePoint Foundation Database 880i High ...or runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream,
    Boolean async) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior,
    RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior) at Microsoft.SharePoint.Utilities.SqlSession.ExecuteReader(SqlCommand
    command, CommandBehavior behavior,

    Are you trying to setup P2P? Could you explain the process you followed completely? By anychance you create the backup and then created the publication?
    Regards, Ashwin Menon My Blog - http:\\sqllearnings.com

  • Cannot drop column from table owned by SYS

    Hello everybody,
    How can I drop a column of table which is owned by sys? thanks!
    Result as follows:
    SQL> ALTER TABLE HELLO_TB DROP COLUMN NUM;
    ALTER TABLE HELLO_TB DROP COLUMN NUM
    ERROR at line 1:
    ORA-12988: cannot drop column from table owned by SYS
    newbie v

    You can not 'change' the ownership.
    You can, however, 'move' or 'clone' most objects by exporting and importing. As follows:
    I create a table under SYS (shudder).
    I then export it
    - using userid SYS in this case,
    - under normal circumstances I'd either use a DBA account or the owner's userid
    - since I want a table, I use the TABLES option - a list is comma separated and in quotes
    I then import it using a 'userid' switch - fromuser & touser options
    - in this case from SYS to HR
    Finally, I verify it was transported.
    Actual console session in Linux follows:
    pop2@fuzzy:~> sqlplus / as sysdba
    SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 10 19:58:01 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> create table test1 ( x1 number );
    Table created.
    SQL> insert into test1 values (2);
    1 row created.
    SQL> select * from test1;
            X1
             2
    SQL> Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    pop2@fuzzy:~> exp file=exp.dmp tables='TEST1'
    Export: Release 10.2.0.1.0 - Production on Fri Mar 10 20:00:07 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Username: sys/????? as sysdba
    Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    Export done in AL32UTF8 character set and AL16UTF16 NCHAR character set
    About to export specified tables via Conventional Path ...
    . . exporting table                          TEST1          1 rows exported
    Export terminated successfully without warnings.
    pop2@fuzzy:~> imp file=exp.dmp fromuser=sys touser=hr
    Import: Release 10.2.0.1.0 - Production on Fri Mar 10 20:00:44 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Username: sys/????? as sysdba
    Connected to: Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    Export file created by EXPORT:V10.02.01 via conventional path
    import done in AL32UTF8 character set and AL16UTF16 NCHAR character set
    . importing SYS's objects into HR
    . . importing table                        "TEST1"          1 rows imported
    Import terminated successfully without warnings.
    pop2@fuzzy:~> sqlplus hr/hr
    SQL*Plus: Release 10.2.0.1.0 - Production on Fri Mar 10 20:00:57 2006
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    SQL> select * from test1;
            X1
             2
    SQL>The export/import pair are incredibly powerful - and few people understand them well. If you are interested in digging into their capability, check out their chapters in the Utilities manual (under the Books tab) at http://www.oracle.com/pls/db102/portal.portal_db?selected=1

  • About Columns in table

    Hi Team
    I have some query plz solve with clear picture
    1) How to drop the columns in table.
    2) How to change the columns name in table.
    3) How to find the version name
    select v$version from dual;
    it is showing error .. how?
    Thanks and Regards
    Suman
    Message was edited by:
    User1839

    Hi Suman,
    Since you are a forum member since July 2007, you should know that there's no 'team' here sitting and waiting to answer anyone's questions. We are all contributing to the forum in chunks of our free time.
    To your questions: Why don't you try to read the documentation, in that case maybe Tahiti? Look up 'Alter table' statement as a starter. There you can find the answers specified for your db version, which you did not mention.

  • Change "Date" From a Column in Table A, to New Column in Table B:

    I'm trying to pull a Date from TABLE_A, and change the year to a current date, and popluate this into a new table. I also want to pull the PK of TABLE_A over, so that I can create a link back to the master record.
    In my example I'm useing SYSDATE for my current date. Once I get the script working, I want to pull the Calander_Date from my "Current Calendar" in APEX.
    1. INSERT INTO TABLE_B (NAME_ID,Date,New_Date VALUES (
    2. NAME_ID , (This is a Column FROM TABLE_A),
    3. DATE, (This is also a Colum From TABLE_A)
    4. TO_CHAR(DATE,'DD')||'-'||
    5. TO_CHAR(DATE,'MON')||'-'||
    6. TO_CHAR(SYSDATE,'YY') )
    7. FROM TABLE_A
    8 WHERE TO_CHAR(DATE,'MON') = TO_CHAR(SYSDATE,'MON');
    Needless to say, this doesn't work!!! I'm very new to SQL and APEX. I've also tried embedding SELECT STATEMENTS, as shown below, but still now dice (Trying to figure out out to calculate the TO_CHAR FROM DUAL and from TABLE_A for the "DATE" Column)
    1. INSERT INTO TABLE_B (NAME_ID,Date,New_Date VALUES (
    2. SELECT NAME_ID FROM TABLE_A,
    3. ELECT DATE FROM TABLE_A,
    4. SELECT TO_CHAR(DATE,'DD')||'-'||
    5. SELECT TO_CHAR(DATE,'MON')||'-'||
    6. SELECT TO_CHAR(SYSDATE,'YY') ) FROM
    7. FROM NAMES
    8 WHERE TO_CHAR(DATE,'MON') = TO_CHAR(SYSDATE,'MON');
    Depending on the modifications I make I usually get the following two errors:
    ORA-0933: SQL Command not properly ended (in the first example)
    ORA-00936: Missing Expression (in the second example).
    Appreciate any thoughts you all might have!!!
    LEONHARK

    So here's a question: are the different pieces of the day stored in the same column in Table A, or different columns? If they are the same, you can simplify a lot of your data copy procedure to:
      insert into TABLE_B (NAME_ID, SOME_DATE, NEW_DATE)
       values (select KEY_ID, to_date(ORIG_DATE,'DD-MM-YYYY') from TABLE_A
      where to_date(ORIG_DATE,'MM') = TO_DATE(SYSDATE,'MM'));If the dates are stored in individual fields in Table_A, use something like:
      insert into TABLE_B (NAME_ID, SOME_DATE, NEW_DATE)
       values (select KEY_ID, to_date(ORIG_DAY || '-' || ORG_MONTH || '-' || ORIG_YEAR,'DD-MM-YYYY') from TABLE_A
      where to_date(ORIG_DATE,'MM') = TO_DATE(SYSDATE,'MM'));An alternate for your where clause that uses a range of dates instead of a specific month is
      where to_date(ORIG_DATE,'DD-MM-YYYY') between TO_DATE('01-01-2007','MM-DD-YYYY') and TO_DATE('12-31-2007','MM-DD-YYYY');A couple of advantages: a date comparison is much faster than a string comparison and more accurate to what you want. Convert the strings to dates rather than the dates to strings. In my opinion, dealing with dates can be one of the biggest headaches for those learning SQL. There are a lot of good helps out there, but you will want to familiarize yourself with the TO_DATE() and TO_CHAR() functions, because you will use them a lot!
    Also, store dates as DATE datatypes! Do NOT store them as text! You will save yourself a lot of headaches and your queries will run much faster if you use DATE datatypes.

  • 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.
    %

  • Cannot solve ORA-30756 "cannot create column or table of type that..."

    Hi there!
    I'm working on some excersises for the university but just can't get rid of this error.
    First, here's my SQL:
    [http://pastebin.com/f1266a668]
    And here is what I get:
    TYPE "LieferserviceTyp" Kompiliert.
    TYPE "ArtikelTyp" Kompiliert.
    TYPE "LebensmittelTyp" Kompiliert.
    TYPE "HaushaltswarenTyp" Kompiliert.
    TYPE "ArtikelInArtKombiTyp" Kompiliert.
    TYPE "ArtikelKombiTyp" Kompiliert.
    TYPE "ArtikelInKatalogTyp" Kompiliert.
    TYPE "KatalogTyp" Kompiliert.
    Fehler beim Start in Zeile 60 in Befehl:
    CREATE TABLE "Artikel" OF "ArtikelTyp" (
    PRIMARY KEY("artnr")
    Fehler bei Befehlszeile:60 Spalte:0
    Fehlerbericht:
    SQL-Fehler: ORA-30756: Spalte oder Tabelle mit einem Objekttyp, der ein Supertyp-Attribut enthält, kann nicht erstellt werden
    30756. 00000 - "cannot create column or table of type that contains a supertype attribute"
    *Cause:    The user tried to create a column or table of an object type that
    contains a supertype attribute. This is not supported because
    it leads to infinite recursion in our current storage model.
    Note that creating a column of a type implies that we
    create columns corresponding to all subtype attributes as well.
    *Action:   Change the type definition to contain a supertype REF attribute
    instead of the supertype object attribute.
    Fehler beim Start in Zeile 67 in Befehl:
    CREATE TABLE "Kataloge" OF "KatalogTyp" (
    PRIMARY KEY("katalog_id")
    Fehler bei Befehlszeile:67 Spalte:0
    Fehlerbericht:
    SQL-Fehler: ORA-30756: Spalte oder Tabelle mit einem Objekttyp, der ein Supertyp-Attribut enthält, kann nicht erstellt werden
    30756. 00000 - "cannot create column or table of type that contains a supertype attribute"
    *Cause:    The user tried to create a column or table of an object type that
    contains a supertype attribute. This is not supported because
    it leads to infinite recursion in our current storage model.
    Note that creating a column of a type implies that we
    create columns corresponding to all subtype attributes as well.
    *Action:   Change the type definition to contain a supertype REF attribute
    instead of the supertype object attribute.
    Fehler beim Start in Zeile 76 in Befehl:
    DROP TABLE "Artikel"
    Fehlerbericht:
    SQL-Fehler: ORA-00942: Tabelle oder View nicht vorhanden
    00942. 00000 - "table or view does not exist"
    *Cause:   
    *Action:
    Fehler beim Start in Zeile 77 in Befehl:
    DROP TABLE "Kataloge"
    Fehlerbericht:
    SQL-Fehler: ORA-00942: Tabelle oder View nicht vorhanden
    00942. 00000 - "table or view does not exist"
    *Cause:   
    *Action:
    DROP TYPE "KatalogTyp" erfolgreich.
    DROP TYPE "ArtikelInKatalogTyp" erfolgreich.
    DROP TYPE "ArtikelKombiTyp" erfolgreich.
    DROP TYPE "ArtikelInArtKombiTyp" erfolgreich.
    DROP TYPE "HaushaltswarenTyp" erfolgreich.
    DROP TYPE "LebensmittelTyp" erfolgreich.
    DROP TYPE "ArtikelTyp" erfolgreich.
    DROP TYPE "LieferserviceTyp" erfolgreich.
    The comments are in german but the structure should be clear I think.
    Any help appreciated!

    Unfortunately it's a bad idea to store your code samples (or screenshots or whatever) on an external site, because not everybody can get access to such sites, especially if their workplace has limitations on websites that can be visited.
    you're pastebin.com is one such site that I cannot access, so I can't see your code.
    If you want to paste code and/or data on the forums remember to put the tag: {noformat}{noformat} before _and_ after it, so that the formatting is maintained and it's easier for us to read.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • In my books, I get an error message stating: "error on line 1 at column 1: Encoding error"

    In the books that I have purchased on iBooks, I now get the following error message instead of the books text:
    This page contains the following errors:
    error on line 1 at column 1: Encoding error
    Below is a rendering of the page up to the first error
    But there is no text on the page other than the error message. These books have worked for months and the table of contents work, but the substance has been replaced by the above message.
    Thoughts? Help?

    I have the same problem on my iPad, which is the earlier version. I'd also like help.

  • Com.waveset.util.ConfigurationError: Cannot find columns for table 'object'

    I am trying to install IDM on my own laptop and use MS SQL Server 2000 as the repository. I run the create table scripts, copy all the jar files to C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\Idm\WEB-INF\lib. But I still got the following error message:
    com.waveset.util.ConfigurationError: Cannot find columns for table 'object' ==>com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'object'
    Does anyone have any idea of what may cause this problem?
    THANKS!

    I found the solution to this issue.. is that the Database user ID must be set to the schema .. this is the statment that probably did not work:
    CREATE USER <username> FOR LOGIN <login name> with DEFAULT_SCHEMA = <database name>
    In sql 2005 expand the database... open security .. find the user.. right click and select properties.. in the default schema box.. select the SunSync database .. in the schemas owned by this user select the sunsync schema database..
    good luck

  • Reg:How to delete the column in table control also from database table.

    Hi Experts,
    Once again thank u all for giving the responses.
    one more doubt is how to delete the columns of table control and also the record shold delete from ztable.
    With Regards,
    Saroja.P.

    Hi,
    If you want to delete the rows in the table control and simultaneously delete it from the database table, then you can implement a 'DELETE' functionality specific to your table control. Have a MARK field (you will find that in the screen attributes of the table control -> give a name for the MARK field, you will find an additional MARK column at the beginning of your table control). You can check whatever rows you want to delete from the table control, call the delete module.
    "This portion of code inside the LOOP...ENDLOOP.
    IF sy-ucomm eq 'F_DELETE'.
       gt_itab2-check = mark.  " Store the MARK field status into your internal table's correspoding field 'check'
      MODIFY gt_itab INDEX tabcontrol-current_line.
    ENDIF.
    iF sy-ucomm eq 'DELETE1'.
      DELETE gt_itab WHERE check eq 'X'. "Your internal table does not have rows that you want to delete
    ENDIF.
    Now you can modify your database table using the MODIFY statement.
    MODIFY ZDB FROM TABLE gt_itab.

  • How to Enable and Disable column in Table Control.

    Hi all,
    I want to make certain column of Table control as Enable or Disable on Button action.
    Enable means ready for input and Disable means not ready for input.
    Please send me sample code.
    Thanks in advance.

    Hi Vipin,
        You have to loop through the table columns to set the properties in the PBO of your screen.
    Here is the sample solution.
    delcare a workarea for the columns in the table control in your top include.
    Table Control .
    CONTROLS: TAB1 TYPE TABLEVIEW USING SCREEN '0100'.
    DATA: WA_COLS LIKE LINE OF TAB1-COLS.
    in your screen
    PROCESS BEFORE OUTPUT.
      MODULE INTIALISE_100.
    *&      Module  0100_INTIALISE  OUTPUT
    MODULE INTIALISE_100 OUTPUT.
        LOOP AT TAB1-COLS INTO WA_COLS.
          WA_COLS-SCREEN-INPUT = 1.
          MODIFY TAB1-COLS FROM WA_COLS TRANSPORTING SCREEN-INPUT.
        ENDLOOP.
    ENDMODULE.                 " 0100_INTIALISE  OUTPUT
    modify the screen-input property as required for the table control columns.
    Please provide points if helpfull.....
    Thanks,
    Karthik
    Message was edited by: Karthik
            Karthikeyan K

  • "This page contains the following errors: error on line 1 at column 1: error on line 1 at column 1: Encoding error Below is a rendering of the page up to the first error"

    I am getting this error since purchasing my latest book:
    “This page contains the following errors: error on line 1 at column 1: error on line 1 at column 1: Encoding error
    Below is a rendering of the page up to the first error”
    This message also appears on some, but not all books I purchased earlier.
    I've tried to restart my iPhone (5) and downloaded iBooks (and the books itself) again several times but nothing has changed. I’m also synced the iPhone via iTunes without luck.
    It’s the latest version of iBooks from Appstore. The same books on iBooks for iPad and Mac working fine!
    iOS 7.0.6
    iBooks 3.2 (2083)

    Did you Reset your iphone?

  • How to add column in table control for transaction APPCREATE

    Hi All,
    How can i add the additional column in table control for transaction APPCREATE.
    There is structure PT1045_EXT present behind table control. But not found any customer exit or badi to display on screen.
    Please help...

    You can add new columns
    If you add new columns in tr. PHAP_CATALOG

Maybe you are looking for

  • 845PE MAX 2 and RAM

    Hi I need some help, just got a 845PE MAX2 board , while partitioning and installing my OS i noticed some unstabilitys, the PC kept turning it self off. Now i cant even boot it up, dies 1 sec after i turn it on. My system : Intel p4 2.4 asus geforce

  • Repair disk permissions data

    i have a mac mini i bought in december 2008..... when i run disk permissions, i get a bunch of data, such as: Permissions differ on System/Library/PrivateFrameworks/iphotoAccess.frame /ilifemediabrowser /coreservices/RawCamera.bundle /mobiledevice Ra

  • I don't have iTunes Radio on my Mac

    I have a Mac OSX 10.6.8 and iTunes 11.1.1 and live in the US. When I go into my Music Library, I do not see an option for Radio. I see Songs - Albums - Artists - Genres - Videos - Internet - Match. Am I looking in the right place? I think I have look

  • Sjsas 80 (j2sdk 1.4) and sym links under Linux

    iH: I have a WAR deployed, which includes a download directory. I would like to sym link a directory within the download directory to another path on the disk. I can view the link in the page that SJSAS generates when I browse the directory, but I ca

  • How to install Swing for JDK 1.1.8? (Emergency)

    I encounter a problem in developing application software now. Would you give me help? Thanks a lot. I'm using PersonalJava with JDK 1.1.8 to develop PDA application. And I need to import some classes such as Swing and com.sun.ftp, but I do not know h