Field 'record_EMP_ID' doesn't have a default value

I solved org.hibernate.TransientObjectException by adding "@OneToMany(fetch=FetchType.EAGER, cascade=CascadeType.ALL)"
But this time values can't be inserted to DB.
OS : Windows 7
JDK : JDK 1.6
JBoss : JBoss 5.1.0.GA
DB : MySQL 5.5
Error is "Field 'record_EMP_ID' doesn't have a default value"
- Members.java
@Entity
@Table(name = "family")
public class Members implements Serializable {
@Id
@Column(name = "EMP_ID")
private String id ;
@Column(name = "EMP_Passwd")
private String passwd ;
@Column(name = "EMP_Name")
private String name ;
@OneToMany(fetch=FetchType.EAGER, cascade=CascadeType.ALL)
@JoinTable(name="info", joinColumns = {@JoinColumn(name = "EMP_Name")})
private Collection<Records> record = new ArrayList();
....getter and setter
- Records.java
@Entity
@Table(name = "info")
public class Records implements Serializable {
@Id
@GeneratedValue(strategy=GenerationType.AUTO)
@Column(name = "EMP_ID")
private int i;
@Column(name = "EMP_Name")
private String name;
@Column(name = "EMP_Bank_Account")
private String account;
@Column(name = "EMP_Hobby")
private String hobby;
@Column(name = "EMP_Phone")
private int phone;
...getter and setter method
in jsp file I invoke EntityManager.persist
Context ctx = new InitialContext();
IMappingTestPort port = (IMappingTestPort) ctx.lookup("MappingTestBean/remote");
Records r = new Records();
r.setName("aaa");
r.setAccount("111-2222");
r.setHobby("bbb");
r.setPhone(021112222);
Members m = new Members();
m.setId("aupres");
m.setPasswd("aaa");
m.setName("ccc");
m.getRecord().add(r);
port.setFamilyMember(m); // This EntityManager.persist method
But it failed.
In console
20:21:29,233 INFO [STDOUT] Hibernate: insert into family (EMP_Name, EMP_Passwd, EMP_ID) values (?, ?, ?)
20:21:29,268 INFO [STDOUT] Hibernate: insert into info (EMP_Bank_Account, EMP_Hobby, EMP_Name, EMP_Phone) values (?, ?, ?, ?)
20:21:29,288 WARN [JDBCExceptionReporter] SQL Error: 1364, SQLState: HY000
20:21:29,288 ERROR [JDBCExceptionReporter] Field 'record_EMP_ID' doesn't have a default value
record_EMP_ID is automatically generated by hibernate
Pls help!

An update: 
New virtual machines created after the integration is in place is visible in Virtual Machine Health Dashboard. No other dashboards seems to contain any data.

Similar Messages

  • New Customer Field in Shopping Cart (SRM) with default value

    We have requirement to add new Customer field in Shopping cart (SRM 4.0) and assign a default value to it.
    We have added the custom field and also assigned default value 'X' to it using BADI BBP_CUF_BADI_2 method MODIFY_OUTPUT. Problem we are facing is in case user changes the value and unchecks the custom field then it gets overwritten by default value once the shopping cart is saved. We have followed steps mentioned in link below in order to add custom field and populate it.
    /people/nanda.kondagunta/blog/2006/10/23/how-to-create-custom-fields-in-srm
    KR Jaideep,

    Dear Poster
    Your thread has had no response since it's creation over
    2 weeks ago, therefore, I recommend that you either:
    - Rephrase the question.
    - Provide additional Information to prompt a response.
    - Close the thread if the answer is already known.
    Thank you for your compliance in this regard.
    Jason Boggans
    SAP SRM SDN Moderator

  • Addign new customer field in Shopping cart SRM with default value

    We have requirement to add new Customer field in Shopping cart (SRM 4.0) and assign a default value to it.
    We have added the custom field and also assigned default value  'X' to it using BADI  BBP_CUF_BADI_2 method MODIFY_OUTPUT. Problem we are facing is in case user changes the value and unchecks the custom field then it gets overwritten by default value once the shopping cart is saved. We have followed steps mentioned in link below in order to add custom field and populate it.
    [/people/nanda.kondagunta/blog/2006/10/23/how-to-create-custom-fields-in-srm|/people/nanda.kondagunta/blog/2006/10/23/how-to-create-custom-fields-in-srm]
    KR Jaideep,

    Hi,
    In badi BBP_CUF_BADI_2, method MODIFY_OUTPUT,
    are you doing something like this?
    CASE IV_FIELDNAME.
      WHEN 'YOUR_CUSTOM_FIELD'.
        IF IV_VALUE IS INITIAL.
          MOVE 'YOUR_DEFAULT_VALUE' TO EV_VALUE.
        ENDIF.
    ENDCASE.
    Best regards.
    Edited by: Pablo Casamayor on Jul 23, 2009 12:32 PM

  • Data field FUNCTIONAL_YN does not support the default value (Message 14120)

    L.S.,
    When defining a data type of category NC, I would like to use data fields of type checkbox. At NC logging data entry the checkbox should be "checked" by default.
    When looking for the proper value to indicate that the ccheckbox is selected, I have tried values like: 0, 1, TRUE, FALSE, T, t, X, x ... etc. But always I got the same error message:
           "Data field FUNCTIONAL_YN does not support the default value (Message 14120)"
    What should be the right value?
    Kind regards, Hans

    Hans,
    It looks as if by means of GUI you cannot specify default state of being selected for Checkbox field. The default state is unselected.
    It is easier to invert the statement in the label of the field so that an operator could use unselected state as default.
    Regards,
    Sergiy

  • Producat Category should not have any default value - Shopping Cart

    Hi SRM Experts,
    Presently I am getting default value for Product Category in SRM Shopping Cart Creation Web Browser Screen initial screen. But I dont require to have any default value. Please suggest me or provide a solution how I can get a solution for the above issue.
    Thanks a lot in advance.
    SRM Version - SRM 4.0
    Thanks,
    Sudarsan

    Hi Lokesh / Muthu / Krish,
    Thanks a lot for your response .
    I checked BAdI (DOC_CHANGE) and Extended attributes also. I removed default prodcut category from extended product category and we are not maintaining the default Product Catgory values in BAdI also. Still I am getting default value while I am creating Shopping Cart with Describe Requirement Option. Please let me know is there any other solution for my issue.
    Thanks,
    Sudarsan

  • Mandatory custom metadata field with current system date as default value.

    I want to create a custom metadata field of type Date. I want to make it mandatory and want to set its default value as system date.
    I have already created field of type Date. What expression I should write to make system date as default value?
    Because its a mandatory field, what would happen to existing content. Will there metadata get updated?
    Thanks
    Sanjeev

    I want to create a custom metadata field of type Date. I want to make it mandatory and want to set its default value as system date.
    I have already created field of type Date. What expression I should write to make system date as default value?
    See http://docs.oracle.com/cd/E23943_01/doc.1111/e10726/c08_config_ref.htm#CSIDO710
    >
    Because its a mandatory field, what would happen to existing content. Will there metadata get updated?No, it will not be updated - profiles are active only for new or updated items (in fact, they work on front-end).
    >
    Thanks
    Sanjeev

  • How to preset fields in a transaction BP with default values

    Hi!
    I want to fill few fields in transaction BP with default values.
    This should be if there`s a new business partner to insert.
    If i can do this depending on the selected role it was the best
    First i thought on SPA/GPA-parameters ... but then i can`t do it in depence on the selected role.
    In customizing i can tell only if a field should be displayed or not, for input or not, ... but no values to insert.
    Is here anybody with a good idea for me?
    I`ve posted my question first in crm-section but i think here it`s better
    Thanks a lot in advance.
    Best regards,
    Ingo

    Hi,
    There is one possibility which requires an enhancement of the
    BDT event ISDAT and a call to the function module
    BUP_BUPA_FIELDVALUES_SET. This means that an ISDAT function module needs to be written (transaction BUS7) which calls the function module BUP_BUPA_FIELDVALUES_SET with the needed values that are to be defaulted. You can read the role value using BUS_PARAMETERS_ISSTA_GET (T_RLTYP).The fields which are possible can be found in the DDIC structure BUSDEFAULT. However this is limited only to the fields inside this structure.
    Thanks and warm regards,
    Smita.

  • Can we have a Default Value for the dashboard prompt ?

    Hi
    I have a requirement as when we run the dashboard, dashboard prompt should be defaulted with a value for the first time.
    Defaulting the values is done by SQL Results,but when i try to change the values for that prompt it is not showing any other values other than the defaulted prompt.
    Ex: I have a dashboard prompt as Employee Name and i have defaulted the value for that with 'Scott' and ran the dashboard.
    When i try to run it for different employee i am not able to get other values to be selected.
    Do we have any mechanism as such we can have default value when we run the dashboard for the first time and then all the values when we run it for the second time?
    Thanks

    user12846884 wrote:
    Defaulting the values is done by SQL Results,but when i try to change the values for that prompt it is not showing any other values other than the defaulted prompt.
    ThanksYou do something wrong. What is the version of OBIEE? How do you create prompt?

  • Can I set up a data-driven menu box to have a default value?

    I'm working on building a little webpage that lets user's
    update one column.
    So, for this column.. I have setup a drop-down box giving
    choices (from a table).
    I'd like for the box's "default" selected value to be the one
    that is already choosen in the table...
    How can I get this to bind?
    Example: Each row need to get tagged as "lost", "won", or
    "unsure".
    I need these three choices to be in the drop-down (easy -
    already done).
    But if there is already a value of "won" for that column,
    then I want the drop-down to say "won" as it's default.
    Any ideas?
    Thanks so much!!!

    It looks like that VBScript already has this capability built
    in.
    <%If (Not
    isNull((rsContact.Fields.Item("ContactNumber").Value))) Then
    If
    (CStr(rsNumber.Fields.Item("Number").Value) =
    CStr((rsContact.Fields.Item("ContactNumber").Value))) Then
    Response.Write("selected=""selected""") :
    Response.Write("")%>
    ><%=(rsNumber.Fields.Item("Number").Value)%></option>
    This markup is comparing the current value of the data from
    the
    rsNumber.Fields.Item("Number") recordset to the value of the
    data from the
    rsContact.Fields.Item("ContactNumber") recordset, and if they
    are the same,
    it is writing the selected attribute to the field -
    Response.Write("selected=""selected"""). Is this not working?
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "simp1eton" <[email protected]> wrote in
    message
    news:gbg6fd$1ts$[email protected]..
    > Awesome, thanks!
    > How do I fit it into the code of my list/menu?
    >
    >
    >
    > <select name="contactNumberMenu<%=counter%>"
    > id="contactNumberMenu<%=counter%>">
    > <%
    > While (NOT rsNumber.EOF)
    > %>
    > <%
    > rsNumber.MoveNext()
    > Wend
    > If (rsNumber.CursorType > 0) Then
    > rsNumber.MoveFirst
    > Else
    > rsNumber.Requery
    > End If
    > %><%
    > While (NOT rsNumber.EOF)
    > %><option
    value="<%=(rsNumber.Fields.Item("Number").Value)%>" <%If
    (Not
    > isNull((rsContact.Fields.Item("ContactNumber").Value)))
    Then If
    > (CStr(rsNumber.Fields.Item("Number").Value) =
    > CStr((rsContact.Fields.Item("ContactNumber").Value)))
    Then
    > Response.Write("selected=""selected""") :
    Response.Write("")%>
    >><%=(rsNumber.Fields.Item("Number").Value)%></option>
    > <%
    > rsNumber.MoveNext()
    > Wend
    > If (rsNumber.CursorType > 0) Then
    > rsNumber.MoveFirst
    > Else
    > rsNumber.Requery
    > End If
    > %>
    > </select>
    >

  • Default value for Read-Only Picklist Field

    Hi, all--
    I would like to have a default value ("Undetermined") for the "Associated Account" read-only picklist value. I have an account record of this value for this purpose. This is because if there is no value in the field, the record will not be included in a report that includes the field. I do not want to make the field required at this point.
    Field management doesn't appear to allow any default value for read-only picklists. Does anyone know how to get around this, either at the lead record stage or at the lead report stage (without resorting to an analytic, which won't work for what we are doing)?
    Thanks.

    That's a great question. It doesn't appear as though you can select it from the typical method of Admin | Application Customization | Lead | Lead Field Setup | Associated Account.
    Have you tried creating a workflow to populate the field using Before Modified Record Saved?

  • Can you set default values for person/group picker fields? To current user?

    Two-part question/issue . . .
    Part 1:
    In InfoPath 2013 in use with SharePoint 2013, how do you set a Default Value for Person/Group Picker fields? Other field types like Text Boxes have a Default Value section in the Data tab of Properties.  There doesn't appear to be any equivalent for
    the Person/Group Picker field type in Properties.  I'd like to set a default person for a few fields in a form I've created.  Is this possible?
    Part 2:
    The default user I want to set for one of those Person/Group fields is the "current user."  I want a user to log into our SharePoint 2013 intranet, load a new form for edit/creation, and have one of the Person/Group fields in that form to
    automatically populate this particular user.  Is this possible?

    Hi Stephen,
    You can auto populate your InfoPath farm with current user Name and all other property that you have in your User profile, you have couple of options.
    First you can make a secondary connection in your InfoPath form with user profile and can use the UserProfileService.asmx and call the GetUserProfileByName method. Here is the steps you can follow.
    http://blogs.technet.com/b/anneste/archive/2011/11/02/how-to-create-an-infopath-form-to-auto-populate-data-in-sharepoint-2010.aspx
    Secondly you can use JQuery and SPServices ,
    $().SPServices.SPGetCurrentUser function to populate the values with script to achieve the same in this case you no need to use InfoPath form just create simple text type column in SharePoint
    list and auto populate it with getting the current user Name from User Profile here is the scripts
    <script language="javascript" type="text/javascript" src="../../jQuery%20Libraries/jquery-1.4.2.min.js"></script>
    <script language="javascript" type="text/javascript" src="../../jQuery%20Libraries/jquery.SPServices-0.5.4.min.js"></script>
    <script language="javascript" type="text/javascript">
    $(document).ready(function() {
      var userCurrentName = $().SPServices.SPGetCurrentUser({
        fieldName: "CurrentUser"
      $("input[Title='CurrentUser']").val(userCurrentName);
      var userPhone = $().SPServices.SPGetCurrentUser({
        fieldName: "WorkPhone"
      $("input[Title='Phone']").val(userPhone);
    </script>
    Krishana Kumar http://www.mosstechnet-kk.com

  • Javascript to access a field default value?

    Hi,
    I'm working on a 'enter' event for text fields such that if the field contents are still on their default value, it will immediate (hence the enter) clear out, but if the contents have already been changed it will let the user simply edit their changes.
    For example, I'm using the caption as the To: line on a form, then the default value of the text field says "type name here". I'd like to compare the field contents to the default upon 'enter' of the field.
    Got this far:
    if (this.rawValue == {default}) {
    this.rawValue = "";}
    and it aint working. the {default} is the only thing I can find in the scripting reference that comes close. Maybe there's a way with xfa.event.reenter??
    thanks.

    Paul, maybe I'm misreading the docs on event.reenter, but it looked like it was a flag about whether or not the user had ever entered that field before. Which is exactly what I'm hoping to test.
    I have about 100 of these fields, so am hoping to do a simple if test, with 'relative' statements. Testing against the known default value certainly would work, but I have to write the 100 custom tests, rather than copy/paste the same thing into each field...
    Do you know a way to access the value stored in the Default field in the properties tab?
    thanks,
    -jamie

  • Parameter field default values not being set in BO Infoview

    For a report, I have three numeric input parameter fields with a default value of -1.  When the report is processed in the Crystal Reports development environment, the parameter fields are all displayed with the default values. 
    When copied and then processed in BO Infoview, the three parameters come up with a value of "Empty".  In order for the report to process correctly, these "Empty" fields need to be individually called, a numeric value entered and then the report "Scheduled".  Does anyone know of any way to force or get Infoview to use the pre-defined default values of these fields when running with Infoview? 
    Thanks

    In the CMC, you have to config the report object's parameter.
    It's under the Process tab of Object.
    Bryan Tsou@Taiwan

  • Default Value Date Picker Field

    Hello:
    In a detail tabular form I am referencing a date picker field from the master form as default value.
    This is the situation in the detail form:
    TABULAR FORM
    Column Name:                   FECHAREGISTRO -- the field's name in the detail tabular form
    Default Type: Item (application or page item name)
    Default: P68_FECHAREGISTRO -- It's a field in the master form and also is Date Picker format
    Reference Table Owner: SAMPEDRORIVEROS
    Reference Table Name: BITACORAABOGADO
    Reference Column Name: FECHAREGISTRO -- It's a date field in the database
    At execution time I have the error:
    report error:
    ORA-01790: expression must have same datatype as corresponding expression
    I think it is because i must use to_date and to_char in order to change the datatype and i have tried using:
    Default: to_date(to_char(:P68_FECHAREGISTRO,'DD-MON-YYYY'),'DD-MON-YYYY')
    and in Default Type: PL/SQL Expression or Function
    but I get a different message at execution time:
    report error:
    ORA-01722: invalid number
    Could you explain me what is the problem??
    Thanks in advance.
    Jairohernan

    I don't think you need to do a to_char here
    try
    to_date(:P68_FECHAREGISTRO,'DD-MON-YYYY')

  • Initialize some fields in material master with default values

    Hi,
    I would like to initialize some fields in material master MM01 with default values.
    for exemple in the view MRP1 there is a field MRP type I would like to initialize PD in the field as default value.
    but when I go to the technical information there is no parameter id that I can use in SU3.
    Do you know how I can the initialize the field those don't have parameter ID?
    thank
    Dede

    Dear Glenn,
    This is possible in SAP for this use T code MMD1 and create MRP profile and assign this MRP profile while creating material using MM01 in the organisation level put this created MRP profile. The values you maintained in this profile get copied to the material by default.
    To maintain MRP profile go to MMD1->give your profile name...........> click on  selection screen push button--->give here profile description--->select what MRP  field which u want to make fixed one/default. if make fixed later you can not change--
    >click on data screen 1 push button and maintain your value and save
    sree

Maybe you are looking for

  • Using Desc on Multiple tables

    I am trying to find a way to run DESC (or similar) on every table belonging to a certain user. So far I have had no luck finding a way of doing this, other than brute force. The problem with brute forcing it is that the user has ~250 tables that I wo

  • What are the standard features of a DC 7600?

    Am considering buying a refurbished DC7600 with windows 7. The only description of the processor is a Pentium 4 3.4 Ghz. Which processor would that be? When I research Pentium 4 3.4 Ghz, I am coming up with several possibilities. Does the DC 7600 onl

  • Java/lang/VeryifyError

    when I try to run this java app i get the java/lang/VerifyError This is the .java file: import javax.microedition.lcdui.*; import javax.microedition.midlet.*; public class FlashLight extends MIDlet implements CommandListener { Display display = null;

  • CPS job status alert via email

    Dear All, We are using Build: M28.20-37214 CPS version. So far we are able to get email alert from CPS when any job reaches any final (completed, error, canceled) status. However in our email alert template we also want to include the date and time w

  • Messages Beta, Lion 10.7.3 Firewall issue.

    Everytime I reboot or I log in I see a dialog prompt : "Do you want the application "imagent.app" to accept incoming network connections?" I believe it's related to the new Messages beta and it is the firewall asking to allow incoming Facetime functi