Exception -not-null property references a null or transient value

HI,
I am trying to save a relational table and it is throwing the following exception in Hibernate .Pls help me
Caused by: org.hibernate.PropertyValueException: not-null property references a null or transient value: com.aexp.acqsys.sim.dm.DmPackageContents._contentsByServiceBackref
     at org.hibernate.engine.Nullability.checkNullability(Nullability.java:72)
     at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:265)
     at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
     at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:101)
     at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
     at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
     at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
     at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
     at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
     at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:557)
     at org.hibernate.impl.SessionImpl.save(SessionImpl.java:545)
     at org.hibernate.impl.SessionImpl.save(SessionImpl.java:541)
     at com.amex.testsim.flow.datapackages.ManageDatapackagesController$3.doInHibernate(ManageDatapackagesController.java:519)
     at com.amex.testsim.hibernate.support.HibernateController.doInHibernate(HibernateController.java:49)
     at com.amex.testsim.flow.datapackages.ManageDatapackagesController.copyDataPackage(ManageDatapackagesController.java:471)
     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 org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:129)

Hi Andrew,
With an EAV mapping most (I would even say all) jpa annotations are ignored. In this case (afaics) the xsd element has
minOccurs=1 (the default). This means that for ecore (and Teneo) it is a mandatory feature which must have a value. The
EAVSingleEAttributeValueHolder.mandatoryValue field is used to enforce required/mandatory constraints.
So in this case it can be solved by adding minOccurs="0" to the xsd element.
gr. Martin
Andrew wrote:
> When using Teneo with EAV schema, I seem to be unable to store an
> EObject if the value for one of its EStructuralFeature's is null. I get
> the following exception:
>
> org.hibernate.PropertyValueException: not-null property references a
> null or transient value: EAVSingleEAttributeValueHolder.mandatoryValue
>
> I tried to make the property nullable by adding an annotation to the XSD
> from which the ecore model is created, eg.
>
> <xsd:element name="Number" type="xsd:integer">
> <xsd:annotation>
> <xsd:appinfo source="teneo.jpa">@Column(name="Number",nullable="true
> ")</xsd:appinfo>
> </xsd:annotation>
> </xsd:element>
>
> However, this does not fix the problem. Does anyone know how to make
> this work?
With Regards, Martin Taal
Springsite/Elver.org
Office: Hardwareweg 4, 3821 BV Amersfoort
Postal: Nassaulaan 7, 3941 EC Doorn
The Netherlands
Cell: +31 (0)6 288 48 943
Tel: +31 (0)84 420 2397
Fax: +31 (0)84 225 9307
Mail: [email protected] - [email protected]
Web: www.springsite.com - www.elver.org

Similar Messages

  • From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?

    Hi,
    Use NVL or COALESCE:
    NVL (col_a, col_b)
    Returns col_a if col_a is not NULL; otherwise, it returns col_b.
    Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
    For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

  • Null Pointer exception returned when object is not null!

    I've isolated the problem and cut down the code to the minimum. Why do I get a null pointer exception when the start method is called, when the object objJTextField is not null at this point???? I'm really stuck here, HELP!
    (two small java files, save as BasePage.java and ExtendedPage.java and then run ExtendedPage)
    first file
    ~~~~~~~
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    public abstract class BasePage extends JFrame implements ActionListener
    private JPanel objJPanel = null;
    public BasePage()
    setSize(300,200);
    Container objContentPane = getContentPane();
    objJPanel = new JPanel();
    createObjects();
    createPage();
    // Add panels to content pane
    objContentPane.add(objJPanel);
    public void addComponentToPage(JComponent objJComponent)
    objJPanel.add(objJComponent);
    public void addButtonToPage(JButton objJButton)
    objJButton.addActionListener(this);
    objJPanel.add(objJButton);
    public void actionPerformed(ActionEvent objActionEvent)
    System.out.println("Action performed");
    userDefinedButtonClicked(objActionEvent.getActionCommand());
    // overide
    public abstract void createObjects();
    public abstract void createPage();
    public abstract void userDefinedButtonClicked(String sActionCommand);
    file 2
    ~~~~
    import javax.swing.*;
    public class ExtendedPage extends BasePage
    private JTextField objJTextField = null;
    private JButton objJButtonBrowse = null;
    public ExtendedPage()
    super();
    public void createObjects()
    objJTextField = new JTextField(20);
    objJButtonBrowse = new JButton("Start");
    objJButtonBrowse.setActionCommand("START");
    public void createPage()
    addComponentToPage(objJTextField);
    addButtonToPage(objJButtonBrowse);
    public void userDefinedButtonClicked(String sActionCommand)
    if ((sActionCommand != null) && (sActionCommand.equals("START")) )
    start();
    private void start()
    objJTextField.setText("Doesn't work");
    public static void main(String[] args)
    ExtendedPage objEP = new ExtendedPage();
    objEP.show();

    Hello ppaulf,
    Your problem is in your ExtendedPage.java file. You can fix this by changing the line
    private JTextField objJTextField = null;to:
    private JTextField objJTextField = new JTextField();This creates a proper instance.
    Good luck,
    Ming
    Developer Technical Support
    http://www.sun.com/developers/support

  • Could not create pool connection. the dbms driver exception was : null

    Hi,
    I am creating Data source to connect to my DB2 database
    Details of the connections are as follows
    1) URL : jdbc:as400://hostname;translate binary=true
    2) Driver class : com.ibm.as400.access.AS400JDBCDriver
    am getting following error when I am trying to deploy the data source to server
    An error occurred during activation of changes, please see the log for details.
    weblogic.application.ModuleException:
    weblogic.common.ResourceException: Could not create pool connection. The DBMS driver exception was: null
    Connection is successful using test configuration.
    Weblogic Version am using is 10.3.
    Please help.
    Thanks,
    Arun

    Hi. That means the JDBC driver you specified threw a NullPointerException
    when we tried to make a connection with it...
    Can you show the XML file for the DataSource? It's in the domain's
    config/jdbc directory.

  • BPM 5.7 MP3 Exception [Protocol [null] not supported.

    Hi
    we recently started getting this error for each deployed project
    Each of my process instances goes to exception state and we are unable to understand this
    From log viewer
    PSGLProcessService::sourcePollProcess. Exception:fuego.directory.DirectoryRuntimeException: Exception [Protocol [null] not supported.
    Technical detail:Verify that the needed plug-in supporting files are present in your system and that the provider name is not misspelled.
    Where do i check for this files
    The BPM log viewer records this information and the url it is using is correct
    PSGLProcessService::sourcePollProcess. Fuego.Server.directoryURL : remote://orclServer/schema=albpm,sid=ALBPMDEV, UserID:EIBUser, Password:********
    Appreciate any help with this

    did you resolve this? i have same situation, but instead [null] there is [REMOTE_JDBC] name.

  • Create a field NOT NULL in a z table

    Hi,
    I want to create a ztable and i need to create in it a field that can't be initial but it's not a field of the key.
    Is there any kind of property to set a NOT NULL in the field??.
    Thanx.
    Jorge

    "Initial Values" Column is an Indicator that NOT NULL is forced for that fieldCheck out the documentation below for you reference.
    Use
        Select this flag if a field to be inserted in the database is to be
        filled with initial values. The initial value used depends on the data
        type of the field.
        Please note that fields in the database for which the this flag is not
        set can also be filled with initial values.
        When you create a table, all fields of the table can be defined as NOT
        NULL and filled with an initial value. The same applies when converting
        the table. Only when new fields are added or inserted, are these filled
        with initial values. An exception is key fields. These are always filled
        automatically with initial values.
        Restrictions and notes:
        o   The initial value cannot be set for fields of data types LCHR, LRAW,
            and RAW. If the field length is greater than 32, the initial flag
            cannot be set for fields of data type NUMC.
        o   If a new field is inserted in the table and the initial flag is set,
            the complete table is scanned on activation and an UPDATE is made to
            the new field. This can be very time-consuming.
        o   If the initial flag is set for an included structure, this means
            that the attributes from the structure are transferred. That is,
            exactly those fields which are marked as initial in the definition
            have this attribute in the table as well.

  • Is not null and null join

    Hi, I am trying to properly display a list of tasks for a project however without a join to the project number (which I was aware of) and the employee table, I get over 500 results.
    The task can be created without a employee assigned to it so therefore the page does not require the field to be filled in.
    Here is the SQL code, any does anyone have any ideas?
    select
        pd.pk_proj_detail_id    "Task Number",
        pd.task_title           "Task Title",
        pd.DETAIL_STATUS        "Task Status",
        pm.name                 "Associated Project",
        pps.last_name||', '||pps.first_name||', '||pps.middle_initial||'.' "Assigned Employee",
        pd.TRACKIT_NUMBER       "TrackIt! Number",
        pd.CREATEBY_DATE        "Date Entered",
        pd.DATE_BEGIN           "Date Began",
        pd.ESTIMATED_DATE       "Estimated Completion Date",
        pd.DATE_END             "Date Completed"
    from
        PROTRAC_DETAIL pd,
        protrac_master pm,
        cobr.vw_pps_payroll pps,
        resources r
    where
        pd.fk_proj_master_id = pm.PK_PROJ_MASTER_ID
        and r.fk_master_id = pm.PK_PROJ_MASTER_ID
        and (r.emp_id = pps.emple_no
            or r.emp_id is null)

    It's 10g r2 with Application Express 3.1.0.00.32
    This is the tasks (detail) table
    ALTER TABLE PROTRAC_DETAIL
    DROP PRIMARY KEY CASCADE;
    DROP TABLE PROTRAC_DETAIL CASCADE CONSTRAINTS;
    CREATE TABLE PROTRAC_DETAIL
      PK_PROJ_DETAIL_ID      NUMBER                 NOT NULL,
      FK_PROJ_MASTER_ID      NUMBER,
      TRACKIT_NUMBER         NUMBER,
      DETAIL_DESCRIPTION     VARCHAR2(4000 CHAR),
      DETAIL_STATUS          VARCHAR2(19 CHAR),
      DETAIL_STATUS_COMMENT  VARCHAR2(4000 CHAR),
      DATE_BEGIN             DATE,
      DATE_END               DATE,
      ESTIMATED_DATE         DATE,
      CREATEBY_DATE          DATE,
      CREATEBY_USER          VARCHAR2(50 CHAR),
      LASTMOD_DATE           DATE,
      LASTMOD_USER           VARCHAR2(50 CHAR),
      TASK_TITLE             VARCHAR2(100 CHAR)
    TABLESPACE DEVPROTRAC_DATA
    PCTUSED    0
    PCTFREE    10
    INITRANS   1
    MAXTRANS   255
    STORAGE    (
                INITIAL          64K
                MINEXTENTS       1
                MAXEXTENTS       2147483645
                PCTINCREASE      0
                BUFFER_POOL      DEFAULT
    CREATE UNIQUE INDEX PROTRAC_DETAIL_PK ON PROTRAC_DETAIL
    (PK_PROJ_DETAIL_ID)
    TABLESPACE DEVPROTRAC_DATA
    PCTFREE    10
    INITRANS   2
    MAXTRANS   255
    STORAGE    (
                INITIAL          64K
                MINEXTENTS       1
                MAXEXTENTS       2147483645
                PCTINCREASE      0
                BUFFER_POOL      DEFAULT
    CREATE OR REPLACE TRIGGER BUI_PROTRAC_DETAIL
    before insert or update
    on PROTRAC_DETAIL
    referencing new as New old as Old
    for each row
    begin
        if inserting then
            select users_seq.nextval, sysdate, apex_application.g_user
                into :new.pk_proj_detail_id, :new.createby_date, :new.createby_user
                from dual;
        elsif updating then
            select sysdate, apex_application.g_user
                into :new.lastmod_date, :new.lastmod_user
                from dual;
        end if;
    end;
    SHOW ERRORS;
    ALTER TABLE PROTRAC_DETAIL ADD (
      CONSTRAINT PROTRAC_DETAIL_PK
    PRIMARY KEY
    (PK_PROJ_DETAIL_ID)
        USING INDEX
        TABLESPACE DEVPROTRAC_DATA
        PCTFREE    10
        INITRANS   2
        MAXTRANS   255
        STORAGE    (
                    INITIAL          64K
                    MINEXTENTS       1
                    MAXEXTENTS       2147483645
                    PCTINCREASE      0
    ALTER TABLE PROTRAC_DETAIL ADD (
      CONSTRAINT PROTRAC_DETAIL_NUM
    FOREIGN KEY (FK_PROJ_MASTER_ID)
    REFERENCES PROTRAC_MASTER (PK_PROJ_MASTER_ID));
    ALTER TABLE DEVPROTRAC.RESOURCES ADD (
      FOREIGN KEY (FK_DETAIL_ID)
    REFERENCES DEVPROTRAC.PROTRAC_DETAIL (PK_PROJ_DETAIL_ID));
    SET DEFINE OFF;
    Insert into PROTRAC_DETAIL
       (PK_PROJ_DETAIL_ID, FK_PROJ_MASTER_ID, TRACKIT_NUMBER, DETAIL_DESCRIPTION, DETAIL_STATUS,
        DETAIL_STATUS_COMMENT, DATE_BEGIN, DATE_END, ESTIMATED_DATE, CREATEBY_DATE,
        CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, TASK_TITLE)
    Values
       (34, 24, NULL, 'test', 'Queued',
        NULL, NULL, NULL, NULL, TO_DATE('10/30/2008 13:37:01', 'MM/DD/YYYY HH24:MI:SS'),
        'LREDMOND', TO_DATE('11/03/2008 15:19:35', 'MM/DD/YYYY HH24:MI:SS'), NULL, 'bananana');
    Insert into PROTRAC_DETAIL
       (PK_PROJ_DETAIL_ID, FK_PROJ_MASTER_ID, TRACKIT_NUMBER, DETAIL_DESCRIPTION, DETAIL_STATUS,
        DETAIL_STATUS_COMMENT, DATE_BEGIN, DATE_END, ESTIMATED_DATE, CREATEBY_DATE,
        CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, TASK_TITLE)
    Values
       (41, 40, NULL, '2354234', 'Queued',
        NULL, NULL, NULL, NULL, TO_DATE('10/31/2008 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        'LREDMOND', TO_DATE('11/03/2008 13:52:02', 'MM/DD/YYYY HH24:MI:SS'), 'LREDMOND', 'I can type on the keyboarddf');
    Insert into PROTRAC_DETAIL
       (PK_PROJ_DETAIL_ID, FK_PROJ_MASTER_ID, TRACKIT_NUMBER, DETAIL_DESCRIPTION, DETAIL_STATUS,
        DETAIL_STATUS_COMMENT, DATE_BEGIN, DATE_END, ESTIMATED_DATE, CREATEBY_DATE,
        CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, TASK_TITLE)
    Values
       (49, 32, 78888, 'one day fishsticks will walk on the moon.', 'Queued',
        'waiting for fishsticks.', NULL, NULL, NULL, TO_DATE('11/03/2008 11:28:11', 'MM/DD/YYYY HH24:MI:SS'),
        'LREDMOND', NULL, NULL, 'Fix the keyboard');
    Insert into PROTRAC_DETAIL
       (PK_PROJ_DETAIL_ID, FK_PROJ_MASTER_ID, TRACKIT_NUMBER, DETAIL_DESCRIPTION, DETAIL_STATUS,
        DETAIL_STATUS_COMMENT, DATE_BEGIN, DATE_END, ESTIMATED_DATE, CREATEBY_DATE,
        CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, TASK_TITLE)
    Values
       (50, 38, NULL, 'dfdfdfdfdfdfdfdfdf', 'Queued',
        NULL, NULL, NULL, NULL, TO_DATE('11/03/2008 12:03:06', 'MM/DD/YYYY HH24:MI:SS'),
        'LREDMOND', TO_DATE('11/03/2008 15:19:44', 'MM/DD/YYYY HH24:MI:SS'), NULL, 'resreeeeeeeeee');
    Insert into PROTRAC_DETAIL
       (PK_PROJ_DETAIL_ID, FK_PROJ_MASTER_ID, TRACKIT_NUMBER, DETAIL_DESCRIPTION, DETAIL_STATUS,
        DETAIL_STATUS_COMMENT, DATE_BEGIN, DATE_END, ESTIMATED_DATE, CREATEBY_DATE,
        CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, TASK_TITLE)
    Values
       (33, 31, NULL, 'Make sure the bananas are fresh', 'Queued',
        NULL, NULL, NULL, NULL, TO_DATE('10/29/2008 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
        'LREDMOND', TO_DATE('11/03/2008 15:19:52', 'MM/DD/YYYY HH24:MI:SS'), NULL, 'e543563465');
    Insert into PROTRAC_DETAIL
       (PK_PROJ_DETAIL_ID, FK_PROJ_MASTER_ID, TRACKIT_NUMBER, DETAIL_DESCRIPTION, DETAIL_STATUS,
        DETAIL_STATUS_COMMENT, DATE_BEGIN, DATE_END, ESTIMATED_DATE, CREATEBY_DATE,
        CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, TASK_TITLE)
    Values
       (48, 37, NULL, 'guitar heros! yay', 'Queued',
        NULL, NULL, NULL, NULL, TO_DATE('11/03/2008 11:26:06', 'MM/DD/YYYY HH24:MI:SS'),
        'LREDMOND', TO_DATE('11/03/2008 15:19:57', 'MM/DD/YYYY HH24:MI:SS'), NULL, '34444444444444543etfg');
    COMMIT;This is for the resources table:
    ALTER TABLE RESOURCES
    DROP PRIMARY KEY CASCADE;
    DROP TABLE RESOURCES CASCADE CONSTRAINTS;
    CREATE TABLE RESOURCES
      PK_RESOURCES_ID   NUMBER,
      FK_DETAIL_ID      NUMBER,
      EMP_ID            NUMBER,
      RESOURCE_STATUS   VARCHAR2(8 CHAR),
      RESOURCE_COMMENT  VARCHAR2(4000 CHAR),
      CREATEBY_DATE     DATE,
      CREATEBY_USER     VARCHAR2(50 CHAR),
      LASTMOD_DATE      DATE,
      LASTMOD_USER      VARCHAR2(50 CHAR),
      FK_MASTER_ID      NUMBER
    TABLESPACE DEVPROTRAC_DATA
    PCTUSED    0
    PCTFREE    10
    INITRANS   1
    MAXTRANS   255
    STORAGE    (
                INITIAL          64K
                MINEXTENTS       1
                MAXEXTENTS       2147483645
                PCTINCREASE      0
                BUFFER_POOL      DEFAULT
    CREATE UNIQUE INDEX RESOURCES_PK ON RESOURCES
    (PK_RESOURCES_ID)
    TABLESPACE DEVPROTRAC_DATA
    PCTFREE    10
    INITRANS   2
    MAXTRANS   255
    STORAGE    (
                INITIAL          64K
                MINEXTENTS       1
                MAXEXTENTS       2147483645
                PCTINCREASE      0
                BUFFER_POOL      DEFAULT
    CREATE OR REPLACE TRIGGER BUI_RESOURCES
    before insert or update
    on RESOURCES
    referencing new as New old as Old
    for each row
    begin
        if inserting then
            select users_seq.nextval, sysdate, apex_application.g_user
                into :new.pk_resources_id, :new.createby_date, :new.createby_user
                from dual;
        elsif updating then
            select sysdate, apex_application.g_user
                into :new.lastmod_date, :new.lastmod_user
                from dual;
        end if;
    end;
    SHOW ERRORS;
    ALTER TABLE RESOURCES ADD (
      CONSTRAINT RESOURCES_PK
    PRIMARY KEY
    (PK_RESOURCES_ID)
        USING INDEX
        TABLESPACE DEVPROTRAC_DATA
        PCTFREE    10
        INITRANS   2
        MAXTRANS   255
        STORAGE    (
                    INITIAL          64K
                    MINEXTENTS       1
                    MAXEXTENTS       2147483645
                    PCTINCREASE      0
    ALTER TABLE RESOURCES ADD (
      FOREIGN KEY (FK_DETAIL_ID)
    REFERENCES PROTRAC_DETAIL (PK_PROJ_DETAIL_ID),
      FOREIGN KEY (FK_MASTER_ID)
    REFERENCES PROTRAC_MASTER (PK_PROJ_MASTER_ID));
    SET DEFINE OFF;
    Insert into RESOURCES
       (PK_RESOURCES_ID, FK_DETAIL_ID, EMP_ID, RESOURCE_STATUS, RESOURCE_COMMENT,
        CREATEBY_DATE, CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, FK_MASTER_ID)
    Values
       (53, 50, 356654, 'Active', NULL,
        TO_DATE('11/04/2008 09:32:06', 'MM/DD/YYYY HH24:MI:SS'), 'LREDMOND', NULL, NULL, NULL);
    Insert into RESOURCES
       (PK_RESOURCES_ID, FK_DETAIL_ID, EMP_ID, RESOURCE_STATUS, RESOURCE_COMMENT,
        CREATEBY_DATE, CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, FK_MASTER_ID)
    Values
       (51, 41, 447250, 'Active', 'No Sure.',
        TO_DATE('11/03/2008 14:23:11', 'MM/DD/YYYY HH24:MI:SS'), NULL, TO_DATE('11/04/2008 09:00:04', 'MM/DD/YYYY HH24:MI:SS'), NULL, 40);
    Insert into RESOURCES
       (PK_RESOURCES_ID, FK_DETAIL_ID, EMP_ID, RESOURCE_STATUS, RESOURCE_COMMENT,
        CREATEBY_DATE, CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, FK_MASTER_ID)
    Values
       (54, 50, 323829, 'Active', NULL,
        TO_DATE('11/04/2008 10:26:08', 'MM/DD/YYYY HH24:MI:SS'), 'LREDMOND', NULL, NULL, 38);
    Insert into RESOURCES
       (PK_RESOURCES_ID, FK_DETAIL_ID, EMP_ID, RESOURCE_STATUS, RESOURCE_COMMENT,
        CREATEBY_DATE, CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, FK_MASTER_ID)
    Values
       (52, 33, 8915, 'Active', 'get to work',
        TO_DATE('11/03/2008 15:20:18', 'MM/DD/YYYY HH24:MI:SS'), 'LREDMOND', TO_DATE('11/03/2008 15:35:10', 'MM/DD/YYYY HH24:MI:SS'), NULL, NULL);
    COMMIT;The results I want is everything above regardless of emp_id assigned (if any). Without the r.emp_id = pps.emple_no join, the query will generate 234234239482304234 results.
    Hope this helps.
    Edited by: leland on Nov 4, 2008 12:56 PM

  • BOOLEAN DEFAULT FALSE NOT NULL for key-column

    Hello,
    These statements show an unexpected behavior when a column is added to a table as 'BOOLEAN DEFAULT FALSE NOT NULL' and added afterward to the table's primary key column set:
    create table test_1 (a char(1))
    insert into test_1 values('A')
    alter table test_1 add b boolean default false not null
    alter table test_1 add primary key (a,b)
    create table test_2 (a char(1), b boolean default false not null)
    insert into test_2 (a) values('A')
    alter table test_2 add foreign key f_test_1 (a,b) references test_1 (a,b)
          -> [350]: Referential integrity violated
    update test_1 set b=false
    alter table test_2 add foreign key f_test_1 (a,b) references test_1 (a,b)
          -> success
    delete from test_2
    delete from test_1
    insert into test_1 (a,b) values('A',false)
    insert into test_2 (a) values('A')
          -> success
    I think the error message '[350] Referential integrity violated' should not happen because the column 'b' really contains 'false'. But there obviously seem to be a difference before and after setting the column 'b' explicitly to 'false'. I can imagine that this depends on the way how the index for the primary key is updated. Probably the index is not properly updated in this context(?)
    Gabriel

    Hi Gabriel,
    you're right, this is a bug and indeed seems to caused by the way the DEFAULT boolean is stored in the page.
    (There is no separate index for the primary key in MaxDB as all data is stored in B*trees - basically the table is the primary key).
    This is how the record looks like when column b is 'false' only due to the change of the DEFAULT value:
    ROOT/LEAF 460  perm       entries : 1         [block 0]
         bottom  : 93         filevers: 14888     convvers: 83
                                                  writecnt: 1
      1: (pos 00081)
    00001      recLen      : 12                recKeyLen   : 4
    00005      recVarcolOff: 0                 recVarcolCnt: 0
         record
          1  2  3  4  5  6  7  8  9 10 11 12
         81 82 83 84 85 86 87 88 89 90 91 92
    dec: 12  0  4  0  0  0  0  0 32 65  0  0
    hex: 0C 00 04 00 00 00 00 00 20 41 00 00
    chr:                             A
    And this is how it looks like after the explicit UPDATE:
    ROOT/LEAF 460  perm       entries : 1         [block 0]
         bottom  : 93         filevers: 14888     convvers: 84
                                                  writecnt: 2
      1: (pos 00081)
    00001      recLen      : 11                recKeyLen   : 3
    00005      recVarcolOff: 0                 recVarcolCnt: 0
         record
          1  2  3  4  5  6  7  8  9 10 11
         81 82 83 84 85 86 87 88 89 90 91
    dec: 11  0  3  0  0  0  0  0 32 65  0
    hex: 0B 00 03 00 00 00 00 00 20 41 00
    chr:                             A
    Little difference but this leads to the problems during the foreign key validation.
    I'll inform the developers next week about this.
    As a workaround you'll have to explicitly update the columns for which you change the default setting.
    regards,
    Lars

  • Default Value , Not Null and EJB2.1

    Hi ,
    Am using Weblogic10.3 + Oracle Db + EJB2.1 Local Entity Beans .
    The issue is that one of the table has createdDt which is not null and is defualt is set to Sysdate. When I try to create this Entity with createdDt null , I get an exception like below , But since I have mentioned default value , I shouldnt be getting this. Have I missed something ?
    Code is quite straighforward
    Organisation org = organisationHome.create();
    ....org.setter methods..
    java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-01400: cannot insert NULL into ("XXX"."ORGANISATION_T"."CREATEDDT_F")
    ErrorCode=1400 SQLState=23000
    java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-01400: cannot insert NULL into ("XXX"."ORGANISATION_T"."CREATEDDT_F")
         at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
         at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
         at weblogic.jdbc.oracle.OracleImplStatement.execute(Unknown Source)
         at weblogic.jdbc.base.BaseStatement.commonExecute(Unknown Source)
         at weblogic.jdbc.base.BaseStatement.executeUpdateInternal(Unknown Source)
         at weblogic.jdbc.base.BasePreparedStatement.executeUpdate(Unknown Source)
         at weblogic.jdbcspy.SpyPreparedStatement.executeUpdate(Unknown Source)
         at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:159)
         at weblogic.ejb.container.manager.BaseEntityManager.executeInsertStmt(BaseEntityManager.java:763)
         at weblogic.ejb.container.internal.TxManager$TxListener.executeInsert(TxManager.java:900)
         at weblogic.ejb.container.internal.TxManager$TxListener.executeDBOperations(TxManager.java:831)
         at weblogic.ejb.container.internal.TxManager$TxListener.beforeCompletion(TxManager.java:1054)
         at weblogic.transaction.internal.ServerSCInfo.doBeforeCompletion(ServerSCInfo.java:1217)
         at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1195)
         at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:118)
         at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1302)
         at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:2114)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:263)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:230)
         at weblogic.ejb.container.internal.BaseRemoteObject.postInvoke1(BaseRemoteObject.java:621)
         at weblogic.ejb.container.internal.StatelessRemoteObject.postInvoke1(StatelessRemoteObject.java:60)
         at weblogic.ejb.container.internal.BaseRemoteObject.postInvokeTxRetry(BaseRemoteObject.java:441)
         at com.tieto.tix.core.domain.DomainServices_7p8lqs_EOImpl.createOrganisation(DomainServices_7p8lqs_EOImpl.java:7717)
         at com.tieto.tix.core.domain.DomainServices_7p8lqs_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
         at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

    parmTest( , "param2") is syntactically incorrect, so there can be no "workaround".
    In addition to solutions offered by SwapnilVJ and Saransoft84, you could also use a rest parameter:
    function parmTest(... args)
    // set up default values
    var val1:Boolean=true;
    var val2:String="";
    switch(args.length)
      case 0:break;
      case 1:
       if(args[0] is String){val2=args[0] as String;}
       else{val1=args[0] as Boolean;}
       break;
      case 2:
      default:
       val1=args[0] as Boolean;
       val2=args[1] as String;
       break;
       trace(val1 + " " +val2);
    parmTest();
    parmTest("hello");
    parmTest(null,"hello");
    parmTest("hello",null);

  • Filter by form shows only "Is Null" and "Is Not Null" value in split database

    Hello,
    I have a SPLIT database into FE (forms, queries...) and BE (tables with data) ready for distribution.
    PROBLEM
    When "Filter by Form" is chosen
    only 2 values are available in combobox filter ("Is Null", "Is Not Null"). All other functionalities of the form work fine (data display), which means that tables are linked
    correctly.
    In the UNSPLIT database "Filter by Form" works OK (i.e. comboboxes show lists of possible values to choose from).
    All the forms (and queries) behave like this.
    Recordsource of all forms are queries.
    Type of filtered fields => text (no memo fields, no comboboxes)
    QUESTION:
    What is the reason of this behavior and how can it be fixed so that "Filter by Form" works in SPLIT database (and displays available values in comboboxes)?
    Thank you for help.

    Hi,
    this is the default behaviour with linked tables. To change it:
    open the form in design view
    select the text box you want to use for the filter
    in the properties of the text box click at the data tab and change the FilterLookUp property from "Database default" to "Always"
    See also
    https://msdn.microsoft.com/en-us/library/office/ff194556(v=office.15).aspx.
    cu
    Karl
    Access FAQ (de/it): http://www.donkarl.com
    Access Lobby: http://www.AccessDevelopers.org

  • When primary table is also join table and you have NOT NULL constraints

    Hi,
    Me again. This is similar to the message titled "Problem with an
    optional 1 to 1 relationship modelled using a link table". Whats
    different about this case is we are dealing with a one to many relationship.
    Given this SQL:
    create table person (
    pid INTEGER(10) NOT NULL,
    language_code VARCHAR(3) NOT NULL
    create table language_person (
    pid INTEGER(10) NOT NULL REFERENCES person(pid),
    language_code VARCHAR(3) NOT NULL,
    first_name VARCHAR(20) NOT NULL
    I wrote these classes (abbreviated)
    Person:
    * @jdo:persist
    * @jdo:identity-type application
    * @jdo:objectid-class PersonId
    * @jdo:requires-extent false
    * @jdo:extension vendor-name="kodo" key="table"
    * value="PERSON"
    * @jdo:extension vendor-name="kodo" key="lock-column"
    * value="none"
    * @jdo:extension vendor-name="kodo" key="class-column"
    * value="none"
    public class Person {
    * @jdo:primary-key true
    * @jdo:extension vendor-name="kodo" key="data-column"
    * value="PID"
    private int pid;
    * @jdo:extension vendor-name="kodo" key="data-column"
    * value="LANGUAGE_CODE"
    private String languageCode;
    * @jdo:collection element-type="LanguagePerson"
    * @jdo:extension vendor-name="kodo" key="pid-data-column"
    * value="PID"
    * @jdo:extension vendor-name="kodo" key="table"
    * value="LANGUAGE_PERSON"
    * @jdo:extension vendor-name="kodo" key="pid-ref-column"
    * value="PID"
    * @jdo:extension vendor-name="kodo"
    key="languageCode-data-column"
    * value="LANGUAGE_CODE"
    * @jdo:extension vendor-name="kodo"
    key="languageCode-ref-column"
    * value="LANGUAGE_CODE"
    private Set languagePersons = new HashSet();
    public Person(int pid, String languageCode) {
    this.pid = pid;
    this.languageCode = languageCode;
    public void addLanguagePerson(LanguagePerson languagePerson) {
    languagePersons.add(languagePerson);
    public Set getLanguagePersons() {
    return languagePersons;
    LANGUAGE_PERSON
    * @jdo:persist
    * @jdo:identity-type application
    * @jdo:objectid-class LanguagePersonId
    * @jdo:requires-extent false
    * @jdo:extension vendor-name="kodo" key="table"
    * value="LANGUAGE_PERSON"
    * @jdo:extension vendor-name="kodo" key="lock-column"
    * value="none"
    * @jdo:extension vendor-name="kodo" key="class-column"
    * value="none"
    public class LanguagePerson {
    * @jdo:primary-key true
    * @jdo:extension vendor-name="kodo" key="data-column"
    * value="PID"
    private int pid;
    * @jdo:primary-key true
    * @jdo:extension vendor-name="kodo" key="data-column"
    * value="LANGUAGE_CODE"
    private String languageCode;
    * @jdo:extension vendor-name="kodo" key="data-column"
    * value="FIRST_NAME"
    private String firstName;
    public LanguagePerson(int pid, String languageCode, String firstName) {
    this.pid = pid;
    this.languageCode = languageCode;
    this.firstName = firstName;
    And then I do this:
         PersistenceManager pm = JDOFactory.getPersistenceManager();
    pm.currentTransaction().begin();
    final Person person = new Person(1,"EN");
    final LanguagePerson languagePerson = new
              LanguagePerson(1,"EN","Mike");
    person.addLanguagePerson(languagePerson);
    pm.makePersistent(person);
    pm.currentTransaction().commit();
    The SQL that issues forth is this:
    1125 [main] INFO jdbc.SQL - [ C:6588476; T:6166426; D:2891371 ]
    preparing statement <17089909>: INSERT INTO PERSON(LANGUAGE_CODE, PID)
    VALUES (?, ?)
    1125 [main] INFO jdbc.SQL - [ C:6588476; T:6166426; D:2891371 ]
    executing statement <17089909>: [reused=1;params={(String)EN,(int)1}]
    1125 [main] INFO jdbc.SQL - [ C:6588476; T:6166426; D:2891371 ]
    preparing statement <9818046>: INSERT INTO
    LANGUAGE_PERSON(LANGUAGE_CODE, PID) VALUES (?, ?)
    1125 [main] INFO jdbc.SQL - [ C:6588476; T:6166426; D:2891371 ]
    executing statement <9818046>: [reused=1;params={(String)EN,(int)1}]
    1140 [main] INFO jdbc.SQL - [ C:6588476; T:6166426; D:2891371 ]
    preparing statement <24763620>: INSERT INTO LANGUAGE_PERSON(FIRST_NAME,
    LANGUAGE_CODE, PID) VALUES (?, ?, ?)
    1140 [main] INFO jdbc.SQL - [ C:6588476; T:6166426; D:2891371 ]
    executing statement <24763620>:
    [reused=1;params={(String)Mike,(String)EN,(int)1}]
    And the second INSERT fails on Oracle because FIRST_NAME is null, and
    the table definition requires it to be NOT NULL.
    Is there anyway I can get Kodo to figure out its dealing with the same
    table for inserting the link columns and the full row, and optimize
    accordingly i.e do one INSERT for LANGUAGE_PERSON?
    I guess my only other options are a) introduce an explicit link table or
    b) define a custom mapping?
    Thanks,
    Mike.

    There are examples of 1-Many mappings in the documentation:
    http://www.solarmetric.com/Software/Documentation/latest/docs/
    ref_guide_meta_examples.html
    The important point I think you've missed is that right now, 1-many
    mappings always require an inverse 1-1 mapping. Again, see the docs
    above.
    So your LanguagePerson needs a field of type Person, and whenever you add
    a LanguagePerson to a Person, make sure to set that LanguagePerson's
    Person too. LanguagePerson.person will use the same PID column as
    LanguagePeson.pid. Kodo has no problem with having 2 mappings
    mapped to the same column.
    Kodo 3.0 will allow 1-Many relations without an inverse 1-1.

  • NULLABLE column is not updated after the NOT NULL constraint definition...

    Hi,
    SQL> select column_name,nullable from all_tab_columns where table_name='EMP';
    COLUMN_NAME                    NULLABLE
    EMPNO                          N
    ENAME                          Y
    JOB                            Y
    MGR                            Y
    HIREDATE                       Y
    SAL                            Y
    COMM                           Y
    DEPTNO                         Y
    CODE_POLEIS_DIAM               Y
    9 rows selected
    SQL> ALTER TABLE EMP add constraint emp_job_nn check(job is not null);
    Table altered
    SQL> select constraint_name from all_cons_columns
      2  where table_name='EMP';
    CONSTRAINT_NAME
    FK_DEPTNO
    PK_EMP
    EMP_JOB_NN
    SQL> select column_name,nullable from all_tab_columns where table_name='EMP';
    COLUMN_NAME                    NULLABLE
    EMPNO                          N
    ENAME                          Y
    JOB                            Y                         <---------'NULL'
    MGR                            Y
    HIREDATE                       Y
    SAL                            Y
    COMM                           Y
    DEPTNO                         Y
    CODE_POLEIS_DIAM               Y
    9 rows selected
    Why is not updated....????
    In Oracle ebook:
    Oracle® Database Reference
    10g Release 2 (10.2)
    Part Number B14237-02
    the comments about the NULLBLE column are as follows:
    "Specifies whether a column allows NULLs. Value is N if there is a NOT NULL constraint on the column or if the column is part of a PRIMARY KEY. The constraint should be in an ENABLE VALIDATE state."
    BUT BY DEFAULT ALL CONSTRAINTS ARE IN VALIDATE STATE
    (Ref: Oracle® Database SQL Reference
    10g Release 2 (10.2)
    Part Number B14200-02 )Note : I use OraDB 10g v.2
    Thanks a lot
    Sim

    Hi,
    Tom Kytes answer it before:
    SQL> create table t ( id int );
    Table created.
    SQL> desc t
    Name                            Null?    Type
    ID                                       NUMBER(38)
    SQL> alter table t add constraint t_nn check (id is not null);
    Table altered.
    SQL> insert into t (id) values (null);
    insert into t (id) values (null)
    ERROR at line 1:
    ORA-02290: check constraint (TANDREWS.T_NN) violated
    SQL> desc t
    Name                            Null?    Type
    ID                                       NUMBER(38)
    Followup July 16, 2003 - 10am US/Eastern:
    that is not a NOT NULL constraint, that is a check constraint
    ops$tkyte@ORA920LAP> create table t ( x int );
    Table created.
    ops$tkyte@ORA920LAP> alter table t modify x not null;
    Table altered.
    ops$tkyte@ORA920LAP> set linesize 50
    ops$tkyte@ORA920LAP> desc t
    Name                    Null?    Type
    X                       NOT NULL NUMBER(38)To see the full thread in asktom, please refer to:
    - http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1338402651192
    Cheers,
    Francisco Munoz Alvarez
    http://www.oraclenz.com

  • How to write a create method for a table Not null fields

    Hi all,
    I have a table with four columns,
    process
    prs_seqid NUMBER(4) NOT NULL,
    prs_sbs VARCHAR2(2) NOT NULL,
    prs_name VARCHAR2(64) NOT NULL,
    description VARCHAR2(128)
    Where prs_seqid is primary key and prs_sbs is foreign key.
    I tried to create a CMP bean for this table. I am unable to write a record in table while I can read
    Records from table. These are the create methods
    public Long ejbCreate() throws CreateException {
    return null;
    public Long ejbCreate(Long newPrs_seqid, String newPrs_sbs, String newPrs_name) throws CreateException {
    prs_seqid = newPrs_seqid;
    newPrs_sbs = prs_sbs;
    prs_name = newPrs_name;
    return null;
    public void ejbPostCreate() {
    public void ejbPostCreate(Long newPrs_seqid, String newPrs_sbs, String newPrs_name) {
    When I run the client code �home.create(pk, "AB", "ABC");�
    It throws
    java.rmi.ServerException: RemoteException occurred in server thread; nested exce
    ption is:
    java.rmi.RemoteException: Transaction aborted (possibly due to transacti
    on time out).; nested exception is: javax.transaction.RollbackException; nested
    exception is:
    javax.transaction.RollbackException
    java.rmi.RemoteException: Transaction aborted (possibly due to transaction time
    out).; nested exception is: javax.transaction.RollbackException; nested exceptio
    n is:
    javax.transaction.RollbackException
    javax.transaction.RollbackException
    <<no stack trace available>>
    In log file I got
    java.sql.SQLException: ORA-01400: cannot insert NULL into ("SCOTT"."PROCESSES"."PRS_SBS")
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1446)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1371)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1900)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:363)
         at com.sun.ejb.persistence.PersistenceManagerImpl.createRow(PersistenceManagerImpl.java:630)
         at com.sun.ejb.persistence.PersistenceManagerImpl.storeRow(PersistenceManagerImpl.java:412)
         at com.sun.ejb.persistence.PartitionImpl.ejbStore(PartitionImpl.java:555)
         at com.telesenskscl.processes.ProcessesBean_PM.ejbStore(ProcessesBean_PM.java:103)
         at com.sun.ejb.containers.EntityContainer.callEJBStore(EntityContainer.java:1581)
         at com.sun.ejb.containers.EntityContainer.enlistResourcesAndStore(EntityContainer.java:868)
         at com.sun.ejb.containers.EntityContainer.beforeCompletion(EntityContainer.java:853)
         at com.sun.ejb.containers.ContainerSynchronization.beforeCompletion(ContainerSynchronization.java:65)
         at com.sun.jts.jta.SynchronizationImpl.before_completion(SynchronizationImpl.java:48)
         at com.sun.jts.CosTransactions.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:108)
         at com.sun.jts.CosTransactions.TopCoordinator.beforeCompletion(TopCoordinator.java:2289)
         at com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:233)
         at com.sun.jts.CosTransactions.TerminatorImpl.commit(TerminatorImpl.java:208)
         at com.sun.jts.CosTransactions.CurrentImpl.commit(CurrentImpl.java:386)
         at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:208)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:434)
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:1460)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:1278)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:397)
         at com.telesenskscl.processes.ProcessesBean_PM_RemoteHomeImpl.create(ProcessesBean_PM_RemoteHomeImpl.java:41)
         at com.telesenskscl.processes._ProcessesBean_PM_RemoteHomeImpl_Tie._invoke(Unknown Source)
         at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:519)
         at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:204)
         at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:112)
         at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:273)
         at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:84)
         at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:99)
    javax.ejb.EJBException: nested exception is: javax.ejb.EJBException: nested exception is: java.sql.SQLException: ORA-01400: cannot insert NULL into ("SCOTT"."PROCESSES"."PRS_SBS")
    javax.ejb.EJBException: nested exception is: java.sql.SQLException: ORA-01400: cannot insert NULL into ("SCOTT"."PROCESSES"."PRS_SBS")
    java.sql.SQLException: ORA-01400: cannot insert NULL into ("SCOTT"."PROCESSES"."PRS_SBS")
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:208)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:543)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1405)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:822)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:1446)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:1371)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1900)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:363)
         at com.sun.ejb.persistence.PersistenceManagerImpl.createRow(PersistenceManagerImpl.java:630)
         at com.sun.ejb.persistence.PersistenceManagerImpl.storeRow(PersistenceManagerImpl.java:412)
         at com.sun.ejb.persistence.PartitionImpl.ejbStore(PartitionImpl.java:555)
         at com.telesenskscl.processes.ProcessesBean_PM.ejbStore(ProcessesBean_PM.java:103)
         at com.sun.ejb.containers.EntityContainer.callEJBStore(EntityContainer.java:1581)
         at com.sun.ejb.containers.EntityContainer.enlistResourcesAndStore(EntityContainer.java:868)
         at com.sun.ejb.containers.EntityContainer.beforeCompletion(EntityContainer.java:853)
         at com.sun.ejb.containers.ContainerSynchronization.beforeCompletion(ContainerSynchronization.java:65)
         at com.sun.jts.jta.SynchronizationImpl.before_completion(SynchronizationImpl.java:48)
         at com.sun.jts.CosTransactions.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:108)
         at com.sun.jts.CosTransactions.TopCoordinator.beforeCompletion(TopCoordinator.java:2289)
         at com.sun.jts.CosTransactions.CoordinatorTerm.commit(CoordinatorTerm.java:233)
         at com.sun.jts.CosTransactions.TerminatorImpl.commit(TerminatorImpl.java:208)
         at com.sun.jts.CosTransactions.CurrentImpl.commit(CurrentImpl.java:386)
         at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:208)
         at com.sun.enterprise.distributedtx.J2EETransactionManagerImpl.commit(J2EETransactionManagerImpl.java:434)
         at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:1460)
         at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:1278)
         at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:397)
         at com.telesenskscl.processes.ProcessesBean_PM_RemoteHomeImpl.create(ProcessesBean_PM_RemoteHomeImpl.java:41)
         at com.telesenskscl.processes._ProcessesBean_PM_RemoteHomeImpl_Tie._invoke(Unknown Source)
         at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatchToServant(GenericPOAServerSC.java:519)
         at com.sun.corba.ee.internal.POA.GenericPOAServerSC.internalDispatch(GenericPOAServerSC.java:204)
         at com.sun.corba.ee.internal.POA.GenericPOAServerSC.dispatch(GenericPOAServerSC.java:112)
         at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:273)
         at com.sun.corba.ee.internal.iiop.RequestProcessor.process(RequestProcessor.java:84)
         at com.sun.corba.ee.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:99)
    Please help me ASAP. Thanks in advance

    I found problem was with my code. I wrote
    newPrs_sbs = prs_sbs; instead of
    prs_sbs = newPrs_sbs;
    This solves my problem
    Thanks to all.....

  • Adding a *Not* Null Entry to a Data-Bound Drop Down List

    How do I add a not null entry to a data-bound drop down list? I am supposed to have something like this:
    <html:select property="Korisnik1" >
    <html:option value="0000">
         (Not null value)
    </html:option>
    <html:option value="-1">
    (Null value)
    </html:option>
    <html:optionsCollection label="prompt" value="index" property="Korisnik1.displayData" />
    </html:select >
    In case the value 0000 is marked the value should be inserted in to the database. The code above displays the value but insert doesn't work.

    I think that in this case that article is not what's required Shay as the question related to a "No Null" entry. The answer would be to add it into the list that is used to populate the list in the first place - generally by adding a "union select from dual" to the query that generates the list values.

  • NOT NULL Unique Constraint in Data Modeler

    I've created Unique Constraints in the Relational Model and I'm trying to figure out how to make it a NOT NULL constraint.
    Let's say the table name is category with columns cat_id, cat_name, sort.
    In SQL I create "ALTER TABLE category MODIFY (category CONSTRAINT xxx_cat_name_nn NOT NULL);", but inside the modeler there is no data entry points in the [Unique Key Properties - xxx_cat_name_nn] dialog box, that I can find, that lets me tell it that it is a NOT NULL constraint. I'm sure there is a way but I'm just fall over my own feet trying to find it.
    Any help would be greatly appricated.
    Edited by: 991065 on Feb 28, 2013 1:40 PM

    Hi,
    You can make the column NOT NULL by unsetting the "Allow Nulls" property for the Column.
    If you want a named NOT NULL Constraint, you should also set the "Not Null Constraint Name" property (on the Default and Constraint tab of the Column Properties dialog).
    David

Maybe you are looking for

  • Change color on Report Painter

    Dear gurus. Pls give idear about Report painter. Now I am making comparson report between planned data and actual data on report painter in order to check variance between them. Column1: Planned data Column2: Actual data Column3: Variance between Col

  • I can't drag and drop files that are already on my desktop

    Files and images that are already on my desktop will not respond when I try to 'drag and drop' them, for example into the trash or iPhoto. No idea how this has happened! Thanks

  • Media Transfer

    Is there a way to transfer your music and videos from your itouch to your computer? Ive had practically every ipod out there and I was able to do it and now with the touch I cant! Is there a way to do it because i deleted more than half my songs on m

  • Help needed - weird behavior on 8300

    Hi, I have the Curve for about a month. Lately (for 3 days), the phone's acting weird. It lets me make calls and all of a sudden, it turns itself off. Initially, I thought that the phone may not have enough charge; but today it happened again about 4

  • Simple: add web dynpro to netweaver developer studio

    Hi all, I downloaded and installed a java version of NetWeaver that has only the developer studio. is there a package that I can use to add web dynpro ? or do I have to download another version that has both ? thanks.