11.1.1.4 Error in findByPrimaryKey

When using findByPrimaryKey on EntityDefImpl it throws a number format exception when the key contains a date value. My primary key is composed of four attributes which the first one is a date field.
The error thrown is just a number format exception pointing the date value and thrown at the point where I call EntitiDefImpl.findByPrimaryKey(getDBTransaction, pkey) the pkey is pkey = VO.getCurrentRow().getKey is this a bug or am I doing something wrong
Regards
Bee.
Edited by: NewBee on Jun 17, 2011 6:31 AM

Basically I do not want to use NumberFormat to convert a string to date.
What I'm trying to do is use findByPrimaryKey on EntityDefImpl to get an entity by passing the key. The key I'm using is a composite key which the first attribute is a date value. If I get the ViewObject current row to retrieve the Key [vo.getKey()] and supply that in the findByPrimaryKey (as illustrated in the start of this thread) I get the following error.
Key:oracle.jbo.Key[2011-03-02 509 1 1 ]
<Utils> <buildFacesMessage> ADF: Adding the following JSF error message: For input string: "3-"
java.lang.NumberFormatException: For input string: "3-"
     at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
     at java.lang.Integer.parseInt(Integer.java:458)
     at java.lang.Integer.parseInt(Integer.java:499)
     at oracle.sql.NUMBER.toBytes(NUMBER.java:1976)
     at oracle.sql.NUMBER.stringToBytes(NUMBER.java:3514)
     at oracle.sql.NUMBER.<init>(NUMBER.java:302)
     at oracle.jbo.domain.Number.<init>(Number.java:293)
     at oracle.jbo.domain.Number$1.convert(Number.java:64)
     at oracle.jbo.domain.TypeFactory.get(TypeFactory.java:855)
     at oracle.jbo.domain.TypeFactory.getInstance(TypeFactory.java:102)
     at oracle.jbo.server.AttributeDefImpl.convertToJava(AttributeDefImpl.java:2223)
     at oracle.jbo.server.EntityDefImpl.prepKeyForFind(EntityDefImpl.java:5726)
     at oracle.jbo.server.EntityDefImpl.findByPrimaryKey(EntityDefImpl.java:1760)here I'm not doing any date conversion manually in my code. what I have done is get the key by getkey() and supply it to findByPrimaryKey

Similar Messages

  • Can't update in mysql

    I am using JSP and MYSQL with a bean that does my database work.
    my search.jsp looks up records, when I click edit it sends the values to my inventory_admin.jsp
    When I make the changes to the data, the data is not saved in the database.
    Please, look see!
    <!--search.jsp-->
    <jsp:useBean id="inventoryBean" scope="session" class="mybeans.inventoryBean" />
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>
    <%// Do search with bean.
         String s = request.getParameter("searchField");
         int searchId = -1;
         if(s != null)
              try
                   searchId = Integer.parseInt(s);
              catch(NumberFormatException e) {}
         //Do actual search with bean
         boolean rc = false;
         if(searchId != -1)
              rc = inventoryBean.findByPrimaryKey(searchId);
              %>
    <form action="search.jsp" method="post" enctype="application/x-www-form-urlencoded">
    <h2 align="center">Software Inventory </h2>
    <p align="center"> </p>
    <p>Lookup:
    <input name="searchField" type="text" id="searchField">
    <input type="submit" name="Submit" value="Submit">
    </p>
    </form>
    <%
         //Output 'not found' message if needed
         if(rc == false)
              out.println("<P><B>Product not found</B></P>");
    %>
    <table width="25%" border="0">
    <tr>
    <td>Item ID:</td>
    <td><jsp:getProperty name="inventoryBean" property="itemid" /></td>
    </tr>
    <tr>
    <td>Product Name:</td>
    <td><jsp:getProperty name="inventoryBean" property="item" /></td>
    </tr>
    <tr>
    <td>Platform:</td>
    <td><jsp:getProperty name="inventoryBean" property="platform" /></td>
    </tr>
    <tr>
    <td>Serial:</td>
    <td><jsp:getProperty name="inventoryBean" property="serial" /></td>
    </tr>
    <tr>
    <td>Description:</td>
    <td><jsp:getProperty name="inventoryBean" property="description" /></td>
    </tr>
    </table>
    <p>&nosave=yes">EDIT</a></p>
    <p align="center"> </p>
    </body>
    </html>
    <!--inventory_admin.jsp-->
    <jsp:useBean id="inventoryBean" scope="session" class="mybeans.inventoryBean" />
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>
    <%-- Copy all form variables at once into the bean--%>
    <jsp:setProperty name="inventoryBean" property="*" />
    <%
         boolean saveResult = false;
         boolean notSaved = false;
         //Save our changes
         String s = request.getParameter("nosave");
         if(s == null || s.equals("yes") == false)
    saveResult = inventoryBean.update();
         else
              notSaved = true;
         //Do search with bean
         s = request.getParameter("itemid");
         int searchId = -1;
         if(s != null)
              try
                   searchId = Integer.parseInt(s);
              catch(NumberFormatException e) {}
         //Do actual search with Bean
         boolean rc;
         if(searchId != -1)
              rc = inventoryBean.findByPrimaryKey(searchId);
    %>
    <h2 align="center">Software Inventory - Edit Mode</h2>
    <FORM action="inventory_admin.jsp" method="post" enctype="application/x-www-form-urlencoded">
    <table width="25%" border="0">
    <tr>
    <td>ITEMID</td>
    <td><jsp:getProperty name="inventoryBean" property="itemid" /></td>
    </tr
    <tr>
    <td>Product Name:</td>
    <td><input name="description" type="text" value="<jsp:getProperty name="inventoryBean" property="item" />"></td>
    </tr>
    <tr>
    <td>Platform:</td>
    <td><input name="description" type="text" value="<jsp:getProperty name="inventoryBean" property="platform" />"></td>
    </tr>
    <tr>
    <td>Serial:</td>
    <td><input name="description" type="text" value="<jsp:getProperty name="inventoryBean" property="serial" />"></td>
    </tr>
    <tr>
    <td>Description:</td>
    <td><input name="description" type="text" value="<jsp:getProperty name="inventoryBean" property="description" />"></td>
    </tr>
    </table>
    <%
         if(notSaved == false)
              if(saveResult == true)
                   out.println("Changes saved");
              else
                   out.println("Changes NOT saved");
    %>
    <p><input type="submit" name="Submit" value="Submit"></p>
    <p align="center"> </p>
    </FORM>
    </body>
    </html>
    //inventory.java
    Here is the Bean Im using:
    // inventoryBean.java - Simple database bean for table products
    package mybeans; // Our custom 'package'.
    import mybeans.DBConfigInfo; // Import helper classes
    import mybeans.DBWorker; // for simpler database programming.
    // Import other packages here.
    import java.sql.*; // For database access.
    import java.util.Hashtable; // For findRecords().
    public class inventoryBean
    private boolean isBeanDataValid = false; // Set when bean contains valid data.
    private boolean isDBError = false; // Stores whether there was a processing error.
    private String dbErrorMsg = "(No error)";
    private DBWorker dbWorker; // Helper object for JDBC programming.
    // Attributes
    private String item = "";
    private String platform = "";
    private String serial = "";
    private String description = "";
    private int itemid = 0; // Primary key field
    public void clear()
    // Clears data in all your properties to 'empty' state.
    item = "";
    platform = "";
    serial = "";
    description = "";
    itemid = 0; // Primary key field
    // Accessor Methods
    public void setItem(String newItem) { item = newItem; }
    public String getItem() { return item; }
    public void setPlatform(String newPlatform) { platform = newPlatform; }
    public String getPlatform() { return platform; }
    public void setSerial(String newSerial) { serial = newSerial; }
    public String getSerial() { return serial; }
    public void setDescription(String newDescription) { description = newDescription; }
    public String getDescription() { return description; }
    public void setItemid(int newItemid) { itemid = newItemid; }
    public int getItemid() { return itemid; }
    // Operations
    // Default constructor.
    public inventoryBean()
    // Create a helper object to work with database.
    // DO NOT DELETE THIS CODE.
    dbWorker = new DBWorker();
    // Database Operations
    // Built-in methods:
    public boolean findByPrimaryKey(int searchId)
    // Use this method to find 1 record by primary key for your table.
    // (After this call, all fields will be loaded into your properties.)
    // Clear existing data, if any.
    clear();
    isBeanDataValid = false;
    // Query by primary key.
    boolean rc = dbWorker.open();
    if(rc == false)
    isDBError = true;
    dbErrorMsg = dbWorker.errorMsg;
    return false;
    try
    // 1) Get a connection.
    Connection conn = dbWorker.getConnection();
    // 2) Create a statement.
    Statement st = conn.createStatement();
    // 3) Build your SQL.
    String sql = "SELECT item, platform, serial, description, " +
    "itemid " +
    "FROM products " +
    "WHERE itemid=" + searchId;
    //System.out.println("DEBUG SQL =" + sql);
    // 4) Get a result set.
    ResultSet rs = st.executeQuery(sql);
    // 5) Move to first record
    if(rs.next())
    // 6) Retrieve fields into your properties using JDBC get??? methods.
    item = rs.getString("item");
    platform = rs.getString("platform");
    serial = rs.getString("serial");
    description = rs.getString("description");
    itemid = rs.getInt("itemid");
    // 7) Ensure non-null String fields with dbWorker.safeStr()
    item = dbWorker.safeStr(item);
    platform = dbWorker.safeStr(platform);
    serial = dbWorker.safeStr(serial);
    description = dbWorker.safeStr(description);
    // Set result code.
    isBeanDataValid = true;
    // 8) Close all DB objects.
    rs.close();
    st.close();
    dbWorker.close(); // Connection too.
    catch(SQLException e)
    System.out.println("Error in findByPrimaryKey (" + e.getMessage() + ")");
    return isBeanDataValid;
    // Update a record
    public boolean update()
    // Use this to update a record by a primary key.
    boolean resultCode = false;
    // Query by primary key.
    boolean rc = dbWorker.open();
    if(rc == false)
    isDBError = true;
    dbErrorMsg = dbWorker.errorMsg;
    return false;
    try // Remember to put all DB code inside a try block!
    // 1) Get a connection.
    Connection conn = dbWorker.getConnection();
    // 2) Create a statement.
    Statement st = conn.createStatement();
    // 3) Build your SQL.
    String sql = "UPDATE products SET item=" + dbWorker.sqlStr(item) + "," +
    "platform=" + dbWorker.sqlStr(platform) + "," +
    "serial=" + dbWorker.sqlStr(serial) + "," +
    "description=" + dbWorker.sqlStr(description)+
    " WHERE itemid=" + itemid;
    //System.out.println("DEBUG SQL =" + sql);
    // 4) Run action query.
    int rowsAffected = st.executeUpdate(sql);
    // 5) See if we succeeded (1 recorded affected).
    if(rowsAffected == 1)
    resultCode = true;
    else
    System.out.println("Warning: Can't update in update()!");
    // 6) Close all DB objects.
    st.close();
    dbWorker.close(); // Connection too.
    catch(SQLException e)
    System.out.println("Error in update (" + e.getMessage() + ")");
    return resultCode;
    // Delete a record
    public boolean delete(int deleteId)
    // Use this to delete a record by a primary key.
    boolean resultCode = false;
    // Query by primary key.
    boolean rc = dbWorker.open();
    if(rc == false)
    isDBError = true;
    dbErrorMsg = dbWorker.errorMsg;
    return false;
    try
    // 1) Get a connection.
    Connection conn = dbWorker.getConnection();
    // 2) Create a statement.
    Statement st = conn.createStatement();
    // 3) Build your SQL.
    String sql = "DELETE FROM products WHERE itemid=" + deleteId;
    //System.out.println("DEBUG SQL =" + sql);
    // 4) Run action query.
    int rowsAffected = st.executeUpdate(sql);
    // 5) See if we succeeded (1 recorded affected).
    if(rowsAffected == 1)
    resultCode = true;
    else
    System.out.println("Warning: Can't delete ID #" + deleteId + " in delete()!");
    // 6) Close all DB objects.
    st.close();
    dbWorker.close(); // Connection too.
    catch(SQLException e)
    System.out.println("Error in delete (" + e.getMessage() + ")");
    return resultCode;
    // Insert a new record.
    public boolean insert(String newItem, String newPlatform, String newSerial, String newDescription,
    int newItemid)
         // Use this to update a record by a primary key.
    boolean resultCode = false;
    // Query by primary key.
    boolean rc = dbWorker.open();
    if(rc == false)
    isDBError = true;
    dbErrorMsg = dbWorker.errorMsg;
    return false;
    try // Remember to put all DB code inside a try block!
    // 1) Get a connection.
    Connection conn = dbWorker.getConnection();
    // 2) Create a statement.
    Statement st = conn.createStatement();
    // 3) Build your SQL.
    String sql="INSERT INTO products(item, platform, serial, description, " +
    "itemid) " +
    "VALUES(" + dbWorker.sqlStr(newItem) + "," + dbWorker.sqlStr(newPlatform) + "," + dbWorker.sqlStr(newSerial) + "," + dbWorker.sqlStr(newDescription) + "," +
    newItemid + ")";
    //System.out.println("DEBUG SQL =" + sql);
    // 4) Run action query.
    int rowsAffected = st.executeUpdate(sql);
    // 5) See if we succeeded (1 recorded affected).
    if(rowsAffected == 1)
    resultCode = true;
    else
    System.out.println("Warning: Can't update in insert()!");
    // 6) Close all DB objects.
    st.close();
    dbWorker.close(); // Connection too.
    catch(SQLException e)
    System.out.println("Error in insert (" + e.getMessage() + ")");
    return resultCode;
    public int findMaxPrimaryKey()
    // Use this method to find the current max. value for a primary key
    // in the database for a given table.
    int retVal = -1;
    // Query by primary key.
    boolean rc = dbWorker.open();
    if(rc == false)
    isDBError = true;
    dbErrorMsg = dbWorker.errorMsg;
    return -1;
    try // Remember to put all DB code inside a try block!
    // 1) Get a connection.
    Connection conn = dbWorker.getConnection();
    // 2) Create a statement.
    Statement st = conn.createStatement();
    // 3) Build your SQL.
    String sql = "SELECT MAX(itemid) FROM products";
    //System.out.println("DEBUG SQL =" + sql);
    // 4) Get a result set.
    ResultSet rs = st.executeQuery(sql);
    // 5) Move to first record
    if(rs.next())
    // 6) Retrieve fields into your properties using JDBC get??? methods.
    retVal = rs.getInt(1); // Get first and only column.
    // 7) Close all DB objects.
    rs.close();
    st.close();
    dbWorker.close(); // Connection too.
    catch(SQLException e)
    System.out.println("Error in findMaxPrimaryKey (" + e.getMessage() + ")");
    return retVal;
    public Hashtable findRecords(String filter, String orderBy)
    // Use this method to return a Hashtable filled with
    // one or more records. You can specified a 'filter'
    // for finding records and 'orderBy' will determine the sort order.
    Hashtable retVal = new Hashtable();
    retVal.put("ROWCOUNT", "0");
    retVal.put("COLUMNCOUNT", "0");
    retVal.put("STATUS", "EMPTY");
    // Query by primary key.
    boolean rc = dbWorker.open();
    if(rc == false)
    isDBError = true;
    dbErrorMsg = dbWorker.errorMsg;
    return retVal;
    try // Remember to put all DB code inside a try block!
    // 1) Get a connection.
    Connection conn = dbWorker.getConnection();
    // 2) Create a statement.
    Statement st = conn.createStatement();
    // 3) Build your SQL.
    String sql = "SELECT item, platform, serial, description, " +
    "itemid " +
    "FROM products " +
    "WHERE " + filter + " " +
    "ORDER BY " + orderBy;
    //System.out.println("DEBUG SQL =" + sql);
    // 4) Get a result set.
    ResultSet rs = st.executeQuery(sql);
    int rowCount = 0;
    // 5) Move to first record (and then next) record.
    while(rs.next())
    // 6) Retrieve fields into your properties using JDBC get??? methods.
    String thisItem = rs.getString("item");
    String thisPlatform = rs.getString("platform");
    String thisSerial = rs.getString("serial");
    String thisDescription = rs.getString("description");
    int thisItemid = rs.getInt("itemid");
    // 7) Ensure non-null String fields with dbWorker.safeStr()
    thisItem = dbWorker.safeStr(thisItem);
    thisPlatform = dbWorker.safeStr(thisPlatform);
    thisSerial = dbWorker.safeStr(thisSerial);
    thisDescription = dbWorker.safeStr(thisDescription);
    // 8) Load this row into our Hashtable.
    // The convention here is to pack each row's column name with an ID
    // indicating the row. "ProjectId" + "0" = "ProjectId0" ===mapped to===> Value
    // Put this record into Hashtable.
    retVal.put("item" + rowCount, thisItem);
    retVal.put("platform" + rowCount, thisPlatform);
    retVal.put("serial" + rowCount, thisSerial);
    retVal.put("description" + rowCount, thisDescription);
    retVal.put("itemid" + rowCount, "" + thisItemid);
    rowCount++;
    // 9) Close all DB objects.
    rs.close();
    st.close();
    dbWorker.close(); // Connection too.
    // Write info to our hashtable--Since this container hold virtually anything,
    // you can put in whatever 'metadata' you want about your result set.
    retVal.put("ROWCOUNT", "" + rowCount);
    retVal.put("COLUMNCOUNT", "5");
    retVal.put("STATUS", "OK");
    catch(SQLException e)
    System.out.println("Error in findRecords (" + e.getMessage() + ")");
    retVal.put("STATUS", "ERROR");
    return retVal;
    //============================================================
    // DO NOT CHANGE THE CODE BELOW.
    //============================================================
    public boolean isValid()
    // Does bean contain real data?
    return isBeanDataValid;
    public boolean isError()
    // Returns true if there was a DB error.
    return isDBError;
    public String getErrorMsg()
    // Returns error message, if any.
    return dbErrorMsg;
    //=====================================================================
    // TODO: Remember to comment out main() with /* */ for production code!
    //=====================================================================
    // TEST DRIVER CODE
    public static void main(String[] args)
    // Test driver code goes here.
    String beanName = "inventoryBean";
    String tableName = "products";
    boolean isDataValidationError = false;
    // Exercise CRUD functionality of this bean.
    System.out.println("==============================================================");
    System.out.println("Starting Test Driver for bean " + beanName + "....");
    System.out.println("==============================================================");
    // Create bean.
    inventoryBean myBean = new inventoryBean();
    // Create a new record.
    int newId = myBean.findMaxPrimaryKey();
    newId++;
    boolean rc = myBean.insert("e", "t", "g", "R",
    newId);
    if(rc)
    System.out.println("SUCCESS: Inserted new record #= " + newId + ".");
    else
    System.out.println("ERROR! Can't insert record #= " + newId + ".");
    System.out.println("====================================================");
    System.out.println("VALIDATION FAILED: Test driver generated an error.");
    System.out.println("====================================================");
    return;
    // Retrieve a record
    rc = myBean.findByPrimaryKey(newId);
    if(rc)
    System.out.println("SUCCESS: Record #" + newId + " found.");
    else
    System.out.println("====================================================");
    System.out.println("VALIDATION FAILED: Test driver generated an error.");
    System.out.println("====================================================");
    System.out.println("ERROR! Record #" + newId + " NOT found.");
    // Simulate using set??? accessor methods with test data.
    // (Note: We don't change the primary key.)
    int testItemid = newId;
    System.out.println("Testing set???() accessor methods....");
    System.out.println("Setting Record #" + newId + " to:");
    System.out.println(" inventoryBean.setItem(testItem); // = R");
    myBean.setItem(testItem);
    System.out.println(" inventoryBean.setPlatform(testPlatform); // = Y");
    myBean.setPlatform(testPlatform);
    System.out.println(" inventoryBean.setSerial(testSerial); // = E");
    myBean.setSerial(testSerial);
    System.out.println(" inventoryBean.setDescription(testDescription); // = k");
    myBean.setDescription(testDescription);
    System.out.println(" inventoryBean.setItemid(testItemid); // = " + newId);
    myBean.setItemid(testItemid);
    // Call update.
    rc = myBean.update();
    if(rc)
    System.out.println("SUCCESS: Record #" + newId + " updated.");
    else
    System.out.println("ERROR! Record #" + newId + " NOT updated.");
    System.out.println("====================================================");
    System.out.println("VALIDATION FAILED: Test driver generated an error.");
    System.out.println("====================================================");
    return;
    // Requery and validate each field.
    rc = myBean.findByPrimaryKey(newId);
    if(rc)
    System.out.println("SUCCESS: Updated Record #" + newId + " found.");
    else
    System.out.println("====================================================");
    System.out.println("VALIDATION FAILED: Test driver generated an error.");
    System.out.println("====================================================");
    System.out.println("ERROR! Record #" + newId + " NOT found");
    // Simulate using get??? accessor methods.
    // Validate updated values against test values.
    System.out.println("Validating Record #" + newId + ":");
    String testData;
    String actualItem = myBean.getItem();
    testData = "R";
    if(testData.equals(actualItem))
    System.out.println(" OK: inventoryBean.getItem() = actualItem");
    else
    System.out.println(" ERROR! inventoryBean.getItem() returned [" + actualItem + "] instead of [R]");
    isDataValidationError = true;
    String actualPlatform = myBean.getPlatform();
    testData = "Y";
    if(testData.equals(actualPlatform))
    System.out.println(" OK: inventoryBean.getPlatform() = actualPlatform");
    else
    System.out.println(" ERROR! inventoryBean.getPlatform() returned [" + actualPlatform + "] instead of [Y]");
    isDataValidationError = true;
    String actualSerial = myBean.getSerial();
    testData = "E";
    if(testData.equals(actualSerial))
    System.out.println(" OK: inventoryBean.getSerial() = actualSerial");
    else
    System.out.println(" ERROR! inventoryBean.getSerial() returned [" + actualSerial + "] instead of [E]");
    isDataValidationError = true;
    String actualDescription = myBean.getDescription();
    testData = "k";
    if(testData.equals(actualDescription))
    System.out.println(" OK: inventoryBean.getDescription() = actualDescription");
    else
    System.out.println(" ERROR! inventoryBean.getDescription() returned [" + actualDescription + "] instead of [k]");
    isDataValidationError = true;
    int actualItemid = myBean.getItemid();
    if(actualItemid == newId)
    System.out.println(" OK: inventoryBean.getItemid() = actualItemid");
    else
    System.out.println(" ERROR! inventoryBean.getItemid() returned [" + actualItemid + "] instead of [" + newId + "]");
    isDataValidationError = true;
    // Cleanup with delete.
    rc = myBean.delete(newId);
    if(rc)
    System.out.println("SUCCESS: Record #" + newId + " deleted.");
    else
    System.out.println("ERROR! Record #" + newId + " NOT deleted.");
    // Now test out findRecords() for up to 100 records.
    Hashtable data = myBean.findRecords("itemid > 0", "itemid");
    String s = (String)data.get("STATUS");
    if(s != null && s.equals("OK"))
    s = (String)data.get("ROWCOUNT");
    int rowCount = Integer.parseInt(s);
    if(rowCount > 100) // Just output first 100 records.
    rowCount = 100;
    System.out.println("SUCCESS: Returning " + rowCount + " records (100 max.) using findRecords():");
    for(int i = 0; i < rowCount; i++)
    System.out.println(" Row #" + i + "=" +
    data.get("item" + i) + ", " +
    data.get("platform" + i) + ", " +
    data.get("serial" + i) + ", " +
    data.get("description" + i) + ", " +
    data.get("itemid" + i));
    else
    System.out.println("ERROR! No rows returned using findRecords()!");
    System.out.println("====================================================");
    System.out.println("VALIDATION FAILED: Test driver generated an error.");
    System.out.println("====================================================");
    return;
    if(isDataValidationError == false)
    // Print final success message.
    System.out.println("================================================================================");
    System.out.println("VALIDATION SUCCESS! Bean " + beanName + " passed all automated tests.");
    System.out.println("================================================================================");
    else
    System.out.println("====================================================================================");
    System.out.println("ERROR! Tests completed but bean " + beanName + " had a data validation error.");
    System.out.println("====================================================================================");

    Couple of pointers.
    1 - use [ code ] tags to post code
    2 - that is WAY too much code for more than a cursory glance. You're lucky the problem was easy to spot.
    Your problem lies in your edit JSP form:
    <td>Product Name:</td>
    <td><input name="description" type="text" value="<jsp:getProperty name="inventoryBean" property="item" />"></td>Note that the name of the input field is different from the jsp property you are populating it with.
    In fact, all of your input fields have a name of "description"
    I would recommend on your inventory_admin.jsp page that you put the following debugging code to make sure that the parameter values come through and are set correctly.
      out.println("name = param: " + request.getParameter("name") + "bean = " + inventoryBean.getName() + "<BR>");
      out.println("description = param:" + request.getParameter("description") + "bean = " + inventoryBean.getDescription() + "<BR>");
      ...

  • FindByPrimaryKey EJBQL error

    Hello,
    deploying an ejb on WLS7.0, I get the following error :Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was:
    weblogic.ejb20.cmp.rdbms.finders.IllegalExpressionException:
    While trying to process Query
    Method Name: findByPrimaryKey
    Parameter Types: (java.lang.Integer)
    EJB Query: SELECT OBJECT(bean) FROM primebrokerage.ejb.common.transactio
    n AS bean WHERE ( bean.transactionId = ?1 )
    Invalid Expression: First term of range_variable_declaration 'primebrokerage.ejb
    .common.transaction', cannot be a Path Expression, it can only be an abstract_sc
    hema_name
    at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:280)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:396)
    at weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:487)
    at weblogic.ejb20.deployer.EJBDeployer.compileEJB(EJBDeployer.java:799)
    at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1248)
    at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:235)
    at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationC
    ontainer.java:1425)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:650)
    at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:548)
    at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(Sla
    veDeployer.java:1026)
    at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDep
    loyer.java:700)
    at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHan
    dler.java:24)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
    could anybody give me a hint ? this finder is generated by the container soI don't understand why it does not work.
    Thank's.
    Nicolas

    Thank's a lot.
    "Emmanuel Proulx" <[email protected]> wrote:
    You're right, findByPrimaryKey is automatically generated by the EJB
    container.
    The bean type shown in the error message shows the abstract schema name
    as
    primebrokerage.ejb.common.transaction (see tag <abstract-schema-name>
    in
    ejb-jar.xml). Make sure your abstract schema name doesn't contain dots,
    as
    it will be used in the generated EJB-QL.
    Emmanuel
    "nicolas FRANK" <[email protected]> wrote in message
    news:[email protected]...
    Hello,
    deploying an ejb on WLS7.0, I get the following error :Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The errorwas:
    weblogic.ejb20.cmp.rdbms.finders.IllegalExpressionException:
    While trying to process Query
    Method Name: findByPrimaryKey
    Parameter Types: (java.lang.Integer)
    EJB Query: SELECT OBJECT(bean) FROMprimebrokerage.ejb.common.transactio
    n AS bean WHERE ( bean.transactionId = ?1 )
    Invalid Expression: First term of range_variable_declaration'primebrokerage.ejb
    common.transaction', cannot be a Path Expression, it can only be anabstract_sc
    hema_name
    at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:280)
    atweblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:396)
    atweblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:487)
    atweblogic.ejb20.deployer.EJBDeployer.compileEJB(EJBDeployer.java:799)
    atweblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1248)
    at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:235)
    atweblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationC
    ontainer.java:1425)
    atweblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:650)
    atweblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
    er.java:548)
    atweblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(Sla
    veDeployer.java:1026)
    atweblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDep
    loyer.java:700)
    atweblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHan
    dler.java:24)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
    could anybody give me a hint ? this finder is generated by the
    container so
    I don't understand why it does not work.
    Thank's.
    Nicolas

  • CMP findByPrimaryKey( Integer primaryKey ) Error

    I am using WebLogic 7.0 and my test program is throwing following error. I struggled to solve the problem for the last 2 days. Please Help
    run:
         [java]
         [java] Beginning com.tt.schms.school.ejb.cmp.Client...
         [java]
         [java] Trying to find school with id: 0
         [java] There was an exception while creating and using the School.
         [java] This indicates that there was a problem communicating with the server: javax.ejb.FinderException: Problem in
    findByPrimaryKey while preparing or executing statement: 'weblogic.jdbc.rmi.SerialPreparedStatement@353cde':
         [java] java.sql.SQLException: No data found
         [java] java.sql.SQLException: No data found
         [java]     at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6207)
         [java]     at sun.jdbc.odbc.JdbcOdbc.SQLGetDataInteger(JdbcOdbc.java:3166)
         [java]     at sun.jdbc.odbc.JdbcOdbcResultSet.getDataInteger(JdbcOdbcResultSet.java:5333)
         [java]     at sun.jdbc.odbc.JdbcOdbcResultSet.getInt(JdbcOdbcResultSet.java:550)
         [java]     at weblogic.jdbc.jts.ResultSet.getInt(ResultSet.java:141)
         [java]     at weblogic.jdbc.rmi.internal.ResultSetImpl.getInt(ResultSetImpl.java:210)
         [java]     at weblogic.jdbc.rmi.internal.ResultSetStraightReader.getInt(ResultSetStraightReader.java:57)
         [java]     at weblogic.jdbc.rmi.SerialResultSet.getInt(SerialResultSet.java:188)
         [java]     at com.tt.schms.school.ejb.cmp.SchoolBean_15djmm__WebLogic_CMP_RDBMS.__WL_loadGroup0FromRS(SchoolBean_1
    5djmm__WebLogic_CMP_RDBMS.java:941)
         [java]     at com.tt.schms.school.ejb.cmp.SchoolBean_15djmm__WebLogic_CMP_RDBMS.ejbFindByPrimaryKey(SchoolBean_15d
    jmm__WebLogic_CMP_RDBMS.java:724)
         [java]     at java.lang.reflect.Method.invoke(Native Method)
         [java]     at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.findByPrimaryKey(RDBMSPersistenceManager.java:216)
         [java]     at weblogic.ejb20.manager.BaseEntityManager.findByPrimaryKey(BaseEntityManager.java:755)
         [java]     at weblogic.ejb20.manager.BaseEntityManager.remoteFindByPrimaryKey(BaseEntityManager.java:698)
         [java]     at weblogic.ejb20.internal.EntityEJBHome.findByPrimaryKey(EntityEJBHome.java:367)
         [java]     at com.tt.schms.school.ejb.cmp.SchoolBean_15djmm_HomeImpl.findByPrimaryKey(SchoolBean_15djmm_HomeImpl.j
    ava:102)
         [java]     at com.tt.schms.school.ejb.cmp.SchoolBean_15djmm_HomeImpl_WLSkel.invoke(Unknown Source)
         [java]     at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
         [java]     at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:114)
         [java]     at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
         [java]     at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:821)
         [java]     at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308)
         [java]     at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         [java]     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
         [java]     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
         [java]
         [java]
         [java] End com.tt.schms.school.ejb.cmp.Client...
         [java]Please note that corresponding data is there in the database. When I access the DB using BMP from the same client code, it works fine.
    I searched this forum but could not find appropriate soln. There was one topic where the problem was solved by putting brackets around the where clause of ejbql. I assume findByPrimaryKey() method is implemented by the Container so I do not need to define ejbql (Am I correct ?) .
    Let me know gurus.
    Thanx

    Got around this problem by using direct jdbc driver instead of jdbc-odbc bridge.
    I know there are several limitations with jdbc-odbc bridge which might be causing this problem

  • Error FindByPrimaryKey

    Hello, I hava a simple EJB that i have deployed in Weblogic 7.0. I am using Microsoft Access as Database to make the test. When use the finder "FindbyPrimaryKey" gives me the following error:
    javax.ejb.FinderException: Problem in findByLogin while preparing or executing statement: 'weblogic.jdbc.rmi.SerialPreparedStatement@407776':
    java.sql.SQLException: No data found
    java.sql.SQLException: No data found
         at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6207)
         at sun.jdbc.odbc.JdbcOdbc.SQLGetDataString(JdbcOdbc.java:3261)
         at sun.jdbc.odbc.JdbcOdbcResultSet.getDataString(JdbcOdbcResultSet.java:5393)
         at sun.jdbc.odbc.JdbcOdbcResultSet.getString(JdbcOdbcResultSet.java:321)
         at weblogic.jdbc.jts.ResultSet.getString(ResultSet.java:84)
         at weblogic.jdbc.rmi.internal.ResultSetImpl.getString(ResultSetImpl.java:178)
         at weblogic.jdbc.rmi.internal.ResultSetStraightReader.getString(ResultSetStraightReader.java:37)
         at weblogic.jdbc.rmi.SerialResultSet.getString(SerialResultSet.java:128)
         at prueba.Usuario1Bean_3zqk0z__WebLogic_CMP_RDBMS.__WL_loadGroup0FromRS(Usuario1Bean_3zqk0z__WebLogic_CMP_RDBMS.java:844)
         at prueba.Usuario1Bean_3zqk0z__WebLogic_CMP_RDBMS.ejbFindByLogin(Usuario1Bean_3zqk0z__WebLogic_CMP_RDBMS.java:468)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.scalarFinder(RDBMSPersistenceManager.java:248)
         at weblogic.ejb20.manager.BaseEntityManager.scalarFinder(BaseEntityManager.java:609)
         at weblogic.ejb20.manager.BaseEntityManager.remoteScalarFinder(BaseEntityManager.java:549)
         at weblogic.ejb20.internal.EntityEJBHome.finder(EntityEJBHome.java:553)
         at prueba.Usuario1Bean_3zqk0z_HomeImpl.findByLogin(Usuario1Bean_3zqk0z_HomeImpl.java:123)
         at prueba.Usuario1Bean_3zqk0z_HomeImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:114)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
         at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:785)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:153)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
    The entity bean exists in the database so i don�t know what�s happening
    any idea?
    Thanks,
    Ranob

    I am getting the exactly same error with 7.0
    run:
         [java]
         [java] Beginning com.tt.schms.school.ejb.cmp.Client...
         [java]
         [java] Trying to find school with id: 0
         [java] There was an exception while creating and using the School.
         [java] This indicates that there was a problem communicating with the server: javax.ejb.FinderException: Problem in
    findByPrimaryKey while preparing or executing statement: 'weblogic.jdbc.rmi.SerialPreparedStatement@353cde':
         [java] java.sql.SQLException: No data found
         [java] java.sql.SQLException: No data found
         [java]     at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6207)
         [java]     at sun.jdbc.odbc.JdbcOdbc.SQLGetDataInteger(JdbcOdbc.java:3166)
         [java]     at sun.jdbc.odbc.JdbcOdbcResultSet.getDataInteger(JdbcOdbcResultSet.java:5333)
         [java]     at sun.jdbc.odbc.JdbcOdbcResultSet.getInt(JdbcOdbcResultSet.java:550)
         [java]     at weblogic.jdbc.jts.ResultSet.getInt(ResultSet.java:141)
         [java]     at weblogic.jdbc.rmi.internal.ResultSetImpl.getInt(ResultSetImpl.java:210)
         [java]     at weblogic.jdbc.rmi.internal.ResultSetStraightReader.getInt(ResultSetStraightReader.java:57)
         [java]     at weblogic.jdbc.rmi.SerialResultSet.getInt(SerialResultSet.java:188)
         [java]     at com.tt.schms.school.ejb.cmp.SchoolBean_15djmm__WebLogic_CMP_RDBMS.__WL_loadGroup0FromRS(SchoolBean_1
    5djmm__WebLogic_CMP_RDBMS.java:941)
         [java]     at com.tt.schms.school.ejb.cmp.SchoolBean_15djmm__WebLogic_CMP_RDBMS.ejbFindByPrimaryKey(SchoolBean_15d
    jmm__WebLogic_CMP_RDBMS.java:724)
         [java]     at java.lang.reflect.Method.invoke(Native Method)
         [java]     at weblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.findByPrimaryKey(RDBMSPersistenceManager.java:216)
         [java]     at weblogic.ejb20.manager.BaseEntityManager.findByPrimaryKey(BaseEntityManager.java:755)
         [java]     at weblogic.ejb20.manager.BaseEntityManager.remoteFindByPrimaryKey(BaseEntityManager.java:698)
         [java]     at weblogic.ejb20.internal.EntityEJBHome.findByPrimaryKey(EntityEJBHome.java:367)
         [java]     at com.tt.schms.school.ejb.cmp.SchoolBean_15djmm_HomeImpl.findByPrimaryKey(SchoolBean_15djmm_HomeImpl.j
    ava:102)
         [java]     at com.tt.schms.school.ejb.cmp.SchoolBean_15djmm_HomeImpl_WLSkel.invoke(Unknown Source)
         [java]     at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
         [java]     at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:114)
         [java]     at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
         [java]     at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:821)
         [java]     at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308)
         [java]     at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         [java]     at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
         [java]     at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
         [java]
         [java]
         [java] End com.tt.schms.school.ejb.cmp.Client...
         [java]If you find the solution could you please post it here.
    Thanx

  • Error While Trying To Populate Data .....Invalid Row ID

    Hi ,
    I have created a form wherein the user enters details and presses save . The data on the form level is populated in a Custom Table . Some attributes of the table are programatically populated and some attributes are tagged to UI Components on the Form Level.
    When the user presses Save the following Error Occurs
    oracle.apps.fnd.framework.OAException: oracle.jbo.DMLException: JBO-26080: Error while selecting entity for TcsAssocFrontEndSegLookUpEO
         at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:888)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1145)
         at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1408)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormData(OAPageBean.java:2517)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1647)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.sql.SQLException: ORA-01410: invalid ROWID
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:289)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:583)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1983)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1141)
         at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2487)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2854)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:622)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:550)
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelect(OracleSQLBuilderImpl.java:614)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:4962)
         at oracle.apps.fnd.framework.server.OAEntityImpl.doSelect(OAEntityImpl.java:1684)
         at oracle.jbo.server.EntityImpl.populate(EntityImpl.java:4122)
         at oracle.jbo.server.EntityDefImpl.findFromDatabase(EntityDefImpl.java:889)
         at oracle.jbo.server.EntityDefImpl.findByPrimaryKey(EntityDefImpl.java:1069)
         at oracle.jbo.server.QueryCollection.findByKey(QueryCollection.java:2944)
         at oracle.jbo.server.ViewRowSetImpl.findByKey(ViewRowSetImpl.java:3072)
         at oracle.jbo.server.ViewRowSetImpl.findByKey(ViewRowSetImpl.java:3004)
         at oracle.jbo.server.ViewRowSetImpl.findByKey(ViewRowSetImpl.java:2998)
         at oracle.jbo.server.ViewObjectImpl.findByKey(ViewObjectImpl.java:6450)
         at oracle.apps.fnd.framework.server.OAViewObjectImpl.findByKey(OAViewObjectImpl.java:456)
         at oracle.apps.fnd.framework.webui.OAWebBeanDataAttributeHelper.checkAttributes(OAWebBeanDataAttributeHelper.java:1129)
         at oracle.apps.fnd.framework.webui.OAWebBeanDataAttributeHelper.getViewObjectRow(OAWebBeanDataAttributeHelper.java:773)
         at oracle.apps.fnd.framework.webui.OAWebBeanDataAttributeHelper.setValue(OAWebBeanDataAttributeHelper.java:496)
         at oracle.apps.fnd.framework.webui.OAWebBeanFormElementHelper.setValue(OAWebBeanFormElementHelper.java:445)
         at oracle.apps.fnd.framework.webui.OAWebBeanTextInputHelper.setValue(OAWebBeanTextInputHelper.java:161)
         at oracle.apps.fnd.framework.webui.OAWebBeanFormElementHelper.processFormAttribute(OAWebBeanFormElementHelper.java:407)
         at oracle.apps.fnd.framework.webui.OAWebBeanFormElementHelper.processFormDataAfterController(OAWebBeanFormElementHelper.java:340)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormData(OAWebBeanHelper.java:757)
         at oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean.processFormData(OAMessageTextInputBean.java:488)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataIndexedChildren(OAWebBeanHelper.java:1068)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataChildren(OAWebBeanHelper.java:1024)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataChildren(OAWebBeanHelper.java:1018)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormData(OAWebBeanHelper.java:758)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormData(OAWebBeanContainerHelper.java:662)
         at oracle.apps.fnd.framework.webui.beans.layout.OACellFormatBean.processFormData(OACellFormatBean.java:416)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataIndexedChildren(OAWebBeanHelper.java:1068)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataChildren(OAWebBeanHelper.java:1024)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataChildren(OAWebBeanHelper.java:1018)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormData(OAWebBeanHelper.java:758)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormData(OAWebBeanContainerHelper.java:662)
         at oracle.apps.fnd.framework.webui.beans.layout.OARowLayoutBean.processFormData(OARowLayoutBean.java:352)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataIndexedChildren(OAWebBeanHelper.java:1068)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataChildren(OAWebBeanHelper.java:1024)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataChildren(OAWebBeanHelper.java:1018)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormData(OAWebBeanHelper.java:758)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormData(OAWebBeanContainerHelper.java:662)
         at oracle.apps.fnd.framework.webui.beans.layout.OATableLayoutBean.processFormData(OATableLayoutBean.java:354)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataIndexedChildren(OAWebBeanHelper.java:1068)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataChildren(OAWebBeanHelper.java:1024)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataChildren(OAWebBeanHelper.java:1018)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormData(OAWebBeanHelper.java:758)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormData(OAWebBeanContainerHelper.java:662)
         at oracle.apps.fnd.framework.webui.beans.layout.OAContentContainerBean.processFormData(OAContentContainerBean.java:353)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataIndexedChildren(OAWebBeanHelper.java:1068)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataChildren(OAWebBeanHelper.java:1024)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataChildren(OAWebBeanHelper.java:1018)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormData(OAWebBeanHelper.java:758)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormData(OAWebBeanContainerHelper.java:662)
         at oracle.apps.fnd.framework.webui.beans.layout.OAHeaderBean.processFormData(OAHeaderBean.java:394)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataIndexedChildren(OAWebBeanHelper.java:1068)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataChildren(OAWebBeanHelper.java:1024)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataChildren(OAWebBeanHelper.java:1018)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormData(OAWebBeanHelper.java:758)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormData(OAWebBeanContainerHelper.java:662)
         at oracle.apps.fnd.framework.webui.OASubTabLayoutHelper.processFormData(OASubTabLayoutHelper.java:524)
         at oracle.apps.fnd.framework.webui.beans.layout.OASubTabLayoutBean.processFormData(OASubTabLayoutBean.java:470)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataIndexedChildren(OAWebBeanHelper.java:1068)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataChildren(OAWebBeanHelper.java:1024)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataChildren(OAWebBeanHelper.java:1018)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormData(OAWebBeanHelper.java:758)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormData(OAWebBeanContainerHelper.java:662)
         at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormData(OAStackLayoutBean.java:356)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataIndexedChildren(OAWebBeanHelper.java:1068)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataChildren(OAWebBeanHelper.java:1024)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataChildren(OAWebBeanHelper.java:1018)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormData(OAWebBeanHelper.java:758)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormData(OAWebBeanContainerHelper.java:662)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormData(OAPageLayoutBean.java:1574)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataIndexedChildren(OAWebBeanHelper.java:1068)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataChildren(OAWebBeanHelper.java:1024)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataChildren(OAWebBeanHelper.java:1018)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormData(OAWebBeanHelper.java:758)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormData(OAWebBeanContainerHelper.java:662)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormData(OAFormBean.java:390)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataIndexedChildren(OAWebBeanHelper.java:1068)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataChildren(OAWebBeanHelper.java:1024)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormDataChildren(OAWebBeanHelper.java:1018)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormData(OAWebBeanHelper.java:758)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormData(OAWebBeanContainerHelper.java:662)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormData(OABodyBean.java:358)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormData(OAPageBean.java:2505)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1647)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:497)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:418)
         at OA.jspService(OA.jsp:40)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
         at java.lang.Thread.run(Thread.java:534)
    java.sql.SQLException: ORA-01410: invalid ROWID
    I am wondering if the error is occuring due to the fact that i am partly populating the data declaratively and partly programatically ?
    Kindly Help ,
    Thanks

    Thanks Mani ,
    The table being populated is a customised table . It has[b] no primary key . All the columns are[b] nullable . The VO that i am using is taking rowid as Primary Key By default. I am not explicitly setting rowId .

  • Error Message: JBO-26080: Error while selecting entity for PoLines

    I'm using JDev 9.0.4.
    i make a VO from two EO at the BC4J level.
    then i create complete struts JSP Application for this VO.
    so i get a page that i can do New/Edit and Delete to each row.
    when i try to do Edit for some lines (not all of them) i get this error :
    Error Message: JBO-26080: Error while selecting entity for PoLines
    Error Message: ORA-01722: invalid number
    What does it mean ? how can i solve it ?
    Thank You

    Un-comment the following lines to display the stack trace
    oracle.jbo.DMLException: JBO-26080: Error while selecting entity for ElcPoLines
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelect(OracleSQLBuilderImpl.java:832)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:4665)
         at oracle.jbo.server.EntityImpl.populate(EntityImpl.java:3845)
         at oracle.jbo.server.EntityDefImpl.findFromDatabase(EntityDefImpl.java:888)
         at oracle.jbo.server.EntityDefImpl.findByPrimaryKey(EntityDefImpl.java:943)
         at oracle.jbo.server.QueryCollection.findByKey(QueryCollection.java:2524)
         at oracle.jbo.server.ViewRowSetImpl.findByKey(ViewRowSetImpl.java:2907)
         at oracle.jbo.server.ViewObjectImpl.findByKey(ViewObjectImpl.java:6019)
         at oracle.jbo.client.JboUtil.getRowFromKey(JboUtil.java:91)
         at oracle.jbo.html.BC4JContext.getRow(BC4JContext.java:307)
         at oracle.jbo.html.struts11.actions.EditAction.populateBC4JFormBean(EditAction.java:160)
         at oracle.jbo.html.struts11.actions.EditAction.edit(EditAction.java:59)
         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:324)
         at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
         at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:778)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)
    ## Detail 0 ##
    java.sql.SQLException: ORA-01722: invalid number
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:242)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:554)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1478)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:890)
         at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2407)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2660)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:457)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:387)
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntitySelect(OracleSQLBuilderImpl.java:606)
         at oracle.jbo.server.EntityImpl.doSelect(EntityImpl.java:4665)
         at oracle.jbo.server.EntityImpl.populate(EntityImpl.java:3845)
         at oracle.jbo.server.EntityDefImpl.findFromDatabase(EntityDefImpl.java:888)
         at oracle.jbo.server.EntityDefImpl.findByPrimaryKey(EntityDefImpl.java:943)
         at oracle.jbo.server.QueryCollection.findByKey(QueryCollection.java:2524)
         at oracle.jbo.server.ViewRowSetImpl.findByKey(ViewRowSetImpl.java:2907)
         at oracle.jbo.server.ViewObjectImpl.findByKey(ViewObjectImpl.java:6019)
         at oracle.jbo.client.JboUtil.getRowFromKey(JboUtil.java:91)
         at oracle.jbo.html.BC4JContext.getRow(BC4JContext.java:307)
         at oracle.jbo.html.struts11.actions.EditAction.populateBC4JFormBean(EditAction.java:160)
         at oracle.jbo.html.struts11.actions.EditAction.edit(EditAction.java:59)
         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:324)
         at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
         at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
         at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
         at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
         at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
         at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:778)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:270)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:112)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
         at java.lang.Thread.run(Thread.java:534)

  • Error while running entity - help needed

    Hi everybody,
    Following is the error i get when i run the following comand,
    It prepares the std_ejb_jar file and when executing the ejbc command following error ocurs :
    D:\bea\wlserver6.0\samples\ejb\com\entity\cabin>java -classpath d:\bea\wlserver6.0/lib/weblogic_sp.jar;d:\bea\wlserver6.0/lib/weblogic.jar weblogic.ejbc -verbose -compiler javac build\std_ejb_cabin.jar \ejb_cabin.jar
    ERROR: Error from ejbc: [9.7.12] In EJB cabinmethod, the findByPrimaryKey method must return the Entity bean's remote interface type, and it's parameter must be the primary key type or java.lang.Object: findByPrimaryKey(ejb.com.entity.cabin.CabinPK) ERROR: ejbc found errors Process Exit...
    I have a table called cabin_table with id has not null.
    Thanx in Advance

    Thanks Buddy,
    I think that was the correct one, but as i was using the example of ejb1.1 compatible, this is futher giving me a problem, Says U need to make the methods in the bean as abstract, i think this is as per the ejb2.0 specs right?.
    I would try for that ad come back to u
    Thanks
    Amit

  • Ejb error while migrating from wl5.1 to wl8.1

    Hello All,
    I am trying to resolve this error that i am getting. Before i jump into the problem i would like to mention that i am in the process of converting our application from weblogic 5.1 to weblogic 8.1. For now i am using the same ejb(1.1 spec) and deploying it on WL8.1, the ejbs do get deployed, however when i try to run the application i get the following error. Am i missing something here (in descriptor files or somewhere else). Appreciate any input on this problem.
    com.xxx.yyy.jsp.data.ScreenData: findByPrimaryKey(com.xxx.yyy.ejb.testUser.TestUserPK(10002))
    com.xxx.yyy.jsp.data.ScreenData: Find AppUser Home for (com.xxx.yyy.ejb.testUser.TestUserPK(10002))
    com.xxx.yyy.jsp.data.ScreenData: Find AppUser Bean for (com.xxx.yyy.ejb.testUser.TestUserPK(10002))
    com.xxx.yyy.jsp.data.ScreenData Application user id com.xxx.yyy.ejb.testUser.TestUserPK(10002) remote server error.
    Error during setXXXContext: ; nested exception is:
    java.lang.IllegalStateException: [EJB:010193]Illegal call to EJBContext method. The bean is in "context setting" state. It cannot perform 'getting EJB object for Entity bean' OR 'getting the primary key' action(s). Refer to the EJB specification for more details.
    java.rmi.RemoteException: Error during setXXXContext: ; nested exception is:
    java.lang.IllegalStateException: [EJB:010193]Illegal call to EJBContext method. The bean is in "context setting" state. It cannot perform 'getting EJB object for Entity bean' OR 'getting the primary key' action(s). Refer to the EJB specification for more details.
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:186)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
    at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
    at com.xxx.yyy.ejb.testUser.TestUserBean_19p26e_HomeImpl_812_WLStub.findByPrimaryKey(Unknown Source)
    at com.xxx.yyy.jsp.data.ScreenData.findByPrimaryKey(ScreenData.java:104)
    at jsp_servlet._jsp.__router._jspService(__router.java:219)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
    at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:446)
    at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
    at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
    at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    Thanks
    vivi

    seems like you are calling EntityContext.getEJBObject() or EntityContext.getPrimaryKey() before the context has been set on the bean. an IllegalStateException is thrown in such cases.
    cheers,
    mihir

  • Error while deploying CMP.. can u pls tell me...

    Hi,
    Below is the error my jboss 3.2.3 container is throwing when i tried to deploy my CMP entity bean. It says
    my ejbFindByPrimaryKey() method must be implemented,but in a CMP i am told the container will take care of the implementation, one just has to specify it in the home object.. can anyone pls tell me where i could have gone wrong.
    2004-07-09 12:47:39,825 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/D:/jboss-3.2.3/server/default/deploy/product.jar
    2004-07-09 12:47:40,404 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
    Bean : Product
    Section: 12.2.2
    Warning: The class must be defined as public and must not be abstract.
    2004-07-09 12:47:40,404 WARN [org.jboss.ejb.EJBDeployer.verifier] EJB spec violation:
    Bean : Product
    Section: 12.2.5
    Warning: Every entity bean must define the ejbFindByPrimaryKey method.
    2004-07-09 12:47:40,419 ERROR [org.jboss.deployment.MainDeployer] could not create deployment: file:/D:/jboss-3.2.3/server/default/deploy/product.jar
    org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
         at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:491)
         at org.jboss.deployment.MainDeployer.create(MainDeployer.java:786)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:641)
         at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
         at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
         at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
         at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
         at $Proxy6.deploy(Unknown Source)
         at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:302)
         at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:476)
         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
         at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)

    This is my code
    ProductBean
    import javax.ejb.EntityContext;
    import javax.ejb.EntityBean;
    public abstract class ProductBean implements EntityBean {
         protected EntityContext ctx;
         //All set and get Methods
         public abstract String getName();
         public abstract void setName(String name);
         public abstract String getDescription() ;
         public abstract void setDescription(String desc);
         public abstract double getBasePrice() ;
         public abstract void setBasePrice(double baseprice);
         public abstract String getProductID();     
         public abstract void setProductID(String prodname);
         //EJB required Methods
         public void ejbActivate(){
              System.out.println("ejbActivate called");
         public void ejbRemove(){
              System.out.println("ejbRemove called");
         public void ejbPassivate(){
              System.out.println("ejbPassivate called");
         public void ejbLoad(){
              System.out.println("ejbLoad called");
         public void ejbStore(){
              System.out.println("ejbStore called");
         public void setEntityContext(EntityContext ctx){
              System.out.println("setEntityContext called");
              this.ctx=ctx;
         public void UnsetEntityContext(){
              System.out.println("UnsetEntityContext called");
              this.ctx=null;
         public void ejbPostCreate(String productID,String name,String description,double basePrice){
              System.out.println("ejbPostCreate called");
         public ProductKey ejbCreate(String productID,String name,String description,double basePrice){
              System.out.println("Create method  called");
              setProductID(productID);
              setName(name);
              setDescription(description);
              setBasePrice(basePrice);
              return new ProductKey(productID); // i am not sure which to retun,
              //return null;
                                               //Well just on a note for the above
                                              // I READ THAT CMP2.0 MUST RETURN NULL, BUT IN ED-ROMANS MASTERING
                                              // EJB  IT SAYS THE BEAN MUST RETURN THE PRIMARY KEY CLASS.
                                              // I HAVE TRIED BOTH THE ABOVE RETURN VALUES, STILL I GET THE SAME
                                              / /ERROR.
    HomeInterface
    import java.rmi.RemoteException;
    import java.util.Collection;
    import javax.ejb.CreateException;
    import javax.ejb.EJBHome;
    import javax.ejb.FinderException;
    public interface ProductHome extends EJBHome {
         public Product create(String productID,String name,String description,double basePrice)throws CreateException,RemoteException;
         public Product findByPrimaryKey(ProductKey key) throws FinderException,RemoteException;
         public Collection findByName(String name) throws RemoteException,FinderException;
         public Collection findByDescription(String desc) throws RemoteException,FinderException;
         public Collection findByBasePrice(double basePrice) throws RemoteException,FinderException;
         public Collection findByExpensiveProduct(double minPrice ) throws RemoteException,FinderException;
         public Collection findCheapProducts(double maxPrice) throws RemoteException,FinderException;
         public Collection findAllProducts() throws RemoteException,FinderException;
    RemoteInterface
    import java.rmi.RemoteException;
    import javax.ejb.EJBObject;
    public interface Product extends EJBObject {
         public String getName() throws RemoteException;
         public void setName(String name)throws RemoteException;
         public String getDescription() throws RemoteException;
         public void setDescription(String desc) throws RemoteException;
         public double getBasePrice() throws RemoteException;
         public void setBasePrice(double baseprice)throws RemoteException;
         public String getProductID()throws RemoteException;     
    ProductKey class - This is my PRIMARY KEY CLASS
    import java.io.Serializable;
    public class ProductKey implements Serializable{
         public String productID;
         public ProductKey(){          
         public ProductKey(String prodID){
              productID=prodID;
         public String toString(){
              return productID;
         public int hashCode()     {
              return productID.hashCode();
         public boolean equals(Object prod){
              return ((ProductKey)prod).productID.equals(productID);
    This is my ejb-jar.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
    <ejb-jar >
       <description><![CDATA[No Description.]]></description>
       <display-name>Generated by XDoclet</display-name>
       <enterprise-beans>
          <entity>
             <description><![CDATA[]]></description>
             <ejb-name>Product</ejb-name>
             <home>ProductHome</home>
             <local-home>ProductHomeLocal</local-home>
             <remote>Product</remote>
             <local-remote>ProductLocal</local-remote>
             <ejb-class>ProductBean</ejb-class>
               <persistence-type>Bean</persistence-type>
               <prim-key-class>ProductKey</prim-key-class>
               <reentrant>False</reentrant>     
               <cmp-version>2.x</cmp-version>
              <abstract-schema-name>ProductBean</abstract-schema-name>
              <cmp-field> <field-name>productID</field-name></cmp-field>
              <cmp-field> <field-name>name</field-name></cmp-field>
              <cmp-field> <field-name>description</field-name></cmp-field>
              <cmp-field> <field-name>basePrice</field-name></cmp-field>       
               <primkey-field>productID</primkey-field>
            <query>
                 <query-method>
                      <method-name>findByName</method-name>
                           <method-params>
                                <method-param>java.lang.String</method-param>
                           </method-params>
                 </query-method>
                 <ejb-ql>
                           <![CDATA[SELECT OBJECT(a) from ProductBean as a where name=?1]]>
                 </ejb-ql>
            </query>
            <query>
                 <query-method>
                      <method-name>findByBasePrice</method-name>
                           <method-params>
                                <method-param>double</method-param>
                           </method-params>
                 </query-method>
                 <ejb-ql>
                           <![CDATA[SELECT OBJECT(a) from ProductBean as a where basePrice = ?1]]>
                 </ejb-ql>
            </query>
            <query>
                 <query-method>
                      <method-name>findExpensiveProducts</method-name>
                           <method-params>
                                <method-param>double</method-param>
                           </method-params>
                 </query-method>
                 <ejb-ql>
                           <![CDATA[SELECT OBJECT(a) from ProductBean as a where basePrice > ?1]]>
                 </ejb-ql>
            </query>
            <query>
                 <query-method>
                      <method-name>findCheapProducts</method-name>
                           <method-params>
                                <method-param>double</method-param>
                           </method-params>
                 </query-method>
                 <ejb-ql>
                           <![CDATA[SELECT OBJECT(a) from ProductBean as a where basePrice < ?1]]>
                 </ejb-ql>
            </query>
                    <query>
                 <query-method>
                      <method-name>findAllProducts</method-name>
                           <method-params>
                                <method-param>double</method-param>
                           </method-params>
                 </query-method>
                 <ejb-ql>
                           <![CDATA[SELECT OBJECT(a) from ProductBean as a where productID IS NOT NULL]]>
                 </ejb-ql>
            </query>
                 </entity>
          </enterprise-beans>
       </ejb-jar>
    This is my jboss.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 3.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd">
    <jboss>
       <unauthenticated-principal>nobody</unauthenticated-principal>
       <enterprise-beans>
          <entity>
             <ejb-name>Product</ejb-name>
             <jndi-name>ProductHome</jndi-name>
              <local-jndi-name>ProductHomeLocal</local-jndi-name>
          </entity>
       </enterprise-beans>
       <resource-managers>
       </resource-managers>
    </jboss>
    This is my jbosscmp-jdbc.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE jbosscmp-jdbc PUBLIC "-//JBoss//DTD JBOSSCMP-JDBC 3.0//EN" "http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_0.dtd">
    <jbosscmp-jdbc>
       <defaults>
         <datasource>java:/OracleDS</datasource>
         <datasource-mapping>Oracle8</datasource-mapping>
       </defaults>
       <enterprise-beans>
          <entity>
             <ejb-name>Product</ejb-name>
             <table-name>ProductTable</table-name>
             <cmp-field>
                <field-name>productID</field-name>
                <column-name>PRODUCTID</column-name>
            </cmp-field>
             <cmp-field>
                <field-name>name</field-name>
                <column-name>NAME</column-name>
            </cmp-field>
            <cmp-field>
                <field-name>description</field-name>
                <column-name>DESCRIPTION</column-name>
            </cmp-field>
            <cmp-field>
                <field-name>basePrice</field-name>
                <column-name>BASEPRICE</column-name>
            </cmp-field>
          </entity>
       </enterprise-beans>
    </jbosscmp-jdbc>

  • Composite Primary Key Error

    I am using Sun One App Server PE8.
    I have a class with a composite primary key field. When I place the following method in my Home interface:
    public MyEjb findByPrimaryKey(MyEjbPrimaryKey pk) throws FinderException, RemoteException;I get the following error when deploying:
    ejbFindByPrimaryKey(EjbPrimaryKey) is already defined in MyEjb1368202910_ConcreteImpl
        public MyEjbPrimaryKey ejbFindByPrimaryKey (MyEjbPrimaryKey key)However, If i remove this method from the Home interface, i get the following error when running the verification tool:
    Error: No single arg findByPrimaryKey(PrimaryKeyClass) method was found in home interface class [ MyEjb ].However, I can still deploy the EAR successfully.
    Another related symptom of this problem, is if I include the following method in my Home interface:
    public MyEjb findByPrimaryKey(String pkField1, String pkField2) throws FinderException, RemoteException;And call this method, I get the following exception at runtime:
    java.rmi.RemoteException: Bean class for ejb [MyEjb] does not define a method corresponding to [Home] interface method [public abstract MyEjb MyEjbHome.findByPrimaryKey(java.lang.String,java
    .lang.String) throws javax.ejb.FinderException,java.rmi.RemoteException]I get these same problems with all EJB's that use composite keys. Has anyone else had this problem?
    Thanks
    toby

    This is a CMP bean, with no ejbFindByPrimaryKey in the Bean class. Below, i have included the Home interface and the Bean class (with unneccessary code removed)
    Thanks for looking at this for me.
    BEAN CLASS
    package lands.mc.bus.prod;
    import java.rmi.*;
    import java.util.*;
    import javax.ejb.*;
    public abstract class TopoMapBean implements EntityBean
      private EntityContext entity;
      public TopoMapBean()
      public void setEntityContext(EntityContext ctx)
        entity = ctx;
      public void unsetEntityContext()
        entity = null;
      public TopoMapPrimaryKey ejbCreate(String mapName, String mapNumber, String mnemonic,String edition, String scale)
      throws CreateException
        // call setters...
        return null;
      public void ejbPostCreate( String mapName,
                                                   String mapNumber,
                                             String mnemonic,
                                             String edition,
                                             String scale )
      removed set/get methods
      public void ejbStore() {}
      public void ejbLoad() {}
      public void ejbActivate() {}
      public void ejbPassivate() {}
      public void ejbRemove() {}
    }HOME INTERFACE
    package lands.mc.bus.prod;
    import java.rmi.*;
    import java.util.*;
    import javax.ejb.*;
    public interface TopoMapHome extends EJBHome
      public TopoMap create(String mapName,
                            String mapNumber,
                            String mnemonic,
                            String edition,
                            String scale
      throws CreateException, RemoteException;
      public TopoMap findByPrimaryKey(String mapNumber, String edition) throws FinderException, RemoteException;
    // doesnt deploy with this signature
    //  public TopoMap findByPrimaryKey(TopoMapPrimaryKey pkey) throws FinderException;
    // have to use this method instead of findByPrimaryKey(String, String) above
      public TopoMap findTopoMap(String mapNumber, String edition) throws FinderException, RemoteException;

  • Error when deploying an CMP-Entity EJB

    Hi ,
    I am unable to deploy a simple example of CMP ,when i select Entity,then select Deployment Settings->Generate Default SQL,
    My SQL Query is:'SELECT OBJECT(p) FROM Product p' for FfindAllProducts().
    I get the error message:
    ERROR:while generating SQL.
    The SELECT clause has a return type that does not match the return type
    of the select query for which it is defined
    EJB QL statement: 'SELECT OBJECT(p)fROM Product p'
    EJB QL method:public abstract java.util.Collection com.aa.ProductHome.findAllProducts() throws javax.ejb.FinderException,java.rmi.RemoteException.
    Followinng are the codes of My bean
    ProductHome.java
    import javax.ejb.*;
    import java.rmi.RemoteException;
    import java.util.Collection;
    public interface ProductHome extends EJBHome
    Product create(String productId,String name , String description , double basePrice) throws CreateException,RemoteException;
    public Product findByPrimaryKey(ProductPK key) throws FinderException,RemoteException;
    public Collection findByName(String name) throws FinderException,RemoteException;
    public Collection findByDescription(String description) throws FinderException,RemoteException;
    public Collection findAllProducts() throws FinderException,RemoteException;
    ProductBean.java
    import javax.ejb.*;
    import java.rmi.RemoteException;
    public class ProductBean implements EntityBean
    protected EntityContext ctx;
    public String productid;
    public String name;
    public String description;
    public ProductBean()
    public String getName() throws RemoteException
    return this.name;
    public void setName(String name) throws RemoteException
    this.name=name;
    public String getDescription() throws RemoteException
    return this.description;
    public void setDescription(String description) throws RemoteException
    this.description=description;
    public String getProductId() throws RemoteException
    return this.productid;
    public void setProductId(String ProductId) throws RemoteException
    this.productid=ProductId;
    public void ejbActivate()
    public void ejbPassivate()
    public void ejbRemove()
    public void ejbLoad()
    public void ejbStore()
    public void setEntityContext(EntityContext ctx)
    this.ctx = ctx;
    public void unsetEntityContext()
    this.ctx = null;
    public void ejbPostCreate(String productId,String name,String description,double baseprice)
    public ProductPK ejbCreate(String productId,String name,String description,double baseprice) throws CreateException,RemoteException
    called ");
    setName(name);
    setProductId(productId);
    setDescription(description);
    return null;
    Product.java
    import javax.ejb.*;
    import java.rmi.RemoteException;
    public interface Product extends EJBObject
    public String getName() throws RemoteException;
    public void setName(String name) throws RemoteException;
    public String getDescription() throws RemoteException;
    public void setDescription(String description) throws RemoteException;
    public String getProductId() throws RemoteException;
    public void setProductId(String productid) throws RemoteException;
    ProductClient.java
    import java.rmi.*;
    import javax.rmi.*;
    import javax.naming.*;
    import javax.ejb.*;
    import java.util.*;
    public class ProductClient
    public static void main(String ars[])
    ProductHome home=null;
    try
    Context initial = new InitialContext();
    Context myEnv = (Context)initial.lookup("java:comp/env");
    Object objref = myEnv.lookup("ejb/TheProduct");
    home = (ProductHome)PortableRemoteObject.narrow(objref,ProductHome.class);
    home.create("123-446-7890","p5-350","350 Mhz Pentium",200 );
    home.create("123-446-7891","p5-400","400 Mhz Pentium",300 );
    home.create("123-446-7892","p5-450","450 Mhz Pentium",400 );
    home.create("123-446-7893","p5-500","500 Mhz Pentium",500 );
    home.create("123-446-7894","p5-550","550 Mhz Pentium",600 );
    Iterator i = home.findByName("p5-400").iterator();
    System.out.println(" Product Match the name of p5-400 " );
    if ( i.hasNext() )
    Product prod = (Product)PortableRemoteObject.narrow(i.next(),Product.class);
    System.out.println(prod.getDescription());
    else
    throw new Exception(" Could not find Product ");
    catch(Exception e)
    System.out.println("Caught Exception " );
    e.printStackTrace();
    finally
    if ( home != null)
    System.out.println(" Destroying all products " );
    try
    Iterator i = home.findAllProducts().iterator();
    while ( i.hasNext() )
    Product prod = (Product)PortableRemoteObject.narrow(i.next(),Product.class);
    if (prod.getProductId().startsWith("123"))
    prod.remove();
    catch (Exception e)
    e.printStackTrace();
    ProductPk.java
    import java.io.Serializable;
    public class ProductPK implements java.io.Serializable
    public String ProductId ;
    public ProductPK(String id)
    this.ProductId = id;
    public ProductPK()
    public String toString()
    return ProductId;
    public int hashCode()
    return ProductId.hashCode();
    public boolean equals(Object Product)
    return ((ProductPK)Product).ProductId.equals(ProductId);

    can u pls tell me u are using ejb1.1 specifications or ejb2.0 specifications.in both cases pls shoe u are descripters so that i can check.

  • Error in deploying a cmp bean in j2ee 1.3

    Hi,
    I am deploying a cmr application using 3 cmp entity beans. while deloyment i get a error for one of the entity bean, studentEJB. the error is :
    For [ StudentEJB ]
    Error: There are no method permissions within this bean [ StudentEJB ]. Transaction attributes must be specified for the methods defined in the remote interface [ LocalStudent ]. Method [ getLastName ] has no transaction attribute defined.
    my LocalStudent file is:
    import javax.ejb.*;
    import java.util.*;
    public interface LocalStudent extends EJBLocalObject
    public String getStudentID();
    public String getFirstName();
    public String getLastName();
    public ArrayList getAddressList();
    public ArrayList getRosterList();
    public void addAddress(LocalAddress address);
    public void addRoster(LocalRoster roster);
    while no errors are coming for the studentID and firstName fields why is the error coming for lastName field ?
    three fields, studentID, firstName and lastName contain similar implementations in the LocalStudent and studentEJB class.
    wiating for an early response...
    Tanmoy

    Hello there!
    I am having a similar problem here also. I am trying to build a lab for test the J2EE tecnology in order for the company I work for switch our Cash Dispenser system to java.
    I have made a very simple entity EJB witch local interface is:
    public interface LabLocal extends EJBLocalObject
    String getExperiment();
    String getDescription();
    void setDescription(String description);
    String getResult();
    void setResult(String result);
    Local home is:
    public interface LabLocalHome extends EJBLocalHome
         LabLocal create( String experiment, String description, String result ) throws CreateException;
         LabLocal findByPrimaryKey( LabPK key ) throws FinderException;
         void remove();
    and the bean itself is:
    public class LabBean implements EntityBean
    private EntityContext ctx;
    private DataSource dataSource;
    public String experiment;
    public String description;
    public String result;
    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#ejbActivate()
    public void ejbActivate() throws EJBException, RemoteException
    // nothing to do here people.
    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#ejbLoad()
    public void ejbLoad() throws EJBException, RemoteException
    LabPK key = (LabPK)ctx.getPrimaryKey();
    Connection con = null;
    PreparedStatement stmt = null;
    ResultSet rs = null;
    try
    con = dataSource.getConnection();
    stmt = con.prepareStatement("SELECT description, result FROM laboratory WHERE experiment = ?");
    stmt.setString(1, key.experiment);
    rs = stmt.executeQuery();
    if( ! rs.next() )
    error( "no data found in ejbLoad for " + key, null);
    this.experiment = key.experiment;
    catch( SQLException se)
    error("Error in ejbLoad" + key, se);
    finally
    closeConnection(con, stmt, rs);
    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#ejbPassivate()
    public void ejbPassivate() throws EJBException, RemoteException
    this.description = null;
    this.result = null;
    this.experiment = null;
    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#ejbRemove()
    public void ejbRemove() throws RemoveException, EJBException, RemoteException
         LabPK key = (LabPK) ctx.getPrimaryKey();
         Connection con = null;
         PreparedStatement stmt = null;
         try
              con = dataSource.getConnection();
              stmt = con.prepareStatement("DELETE FROM laboratory WHERE experiment = ? ");
              stmt.setString(1, key.toString() );
              stmt.executeUpdate();
         catch( SQLException se )
              error( "Error deleting " + key, se );
         finally
              closeConnection(con, stmt, null);
         this.experiment = null;
         this.description = null;
         this.result = null;
    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#ejbStore()
    public void ejbStore() throws EJBException, RemoteException
    Connection con = null;
    PreparedStatement stmt = null;
    try
    con = dataSource.getConnection();
    stmt = con.prepareStatement("UPDATE Laboratory SET description = ? , result = ? WHERE experiment = ? ");
    stmt.setString(1, this.description);
    stmt.setString(2, this.result);
    stmt.setString(3, this.experiment);
    stmt.executeUpdate();
    catch( SQLException se)
    error( "Error processing UPDATE statement.", se);
    finally
    closeConnection(con, stmt, null);
    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#unsetEntityContext()
    public void unsetEntityContext() throws EJBException, RemoteException
    this.ctx = null;
    this.dataSource = null;
    /* (non-Javadoc)
    * @see javax.ejb.EntityBean#setEntityContext(javax.ejb.EntityContext)
    public void setEntityContext(EntityContext arg0) throws EJBException, RemoteException
    this.ctx = arg0;
    InitialContext ic = null;
    try
    ic = new InitialContext();
    dataSource = (DataSource) ic.lookup("java:comp/env/jdbc/teste");
    catch( NamingException ne)
    error( "error looking up depend EJB or resource. ", ne);
    public void error( String message, Exception e)
    throw new EJBException( message, e);
    public void closeConnection( Connection con, PreparedStatement stmt, ResultSet rs )
    try
         if( stmt != null )
         stmt.close();
    catch( SQLException se)
    System.out.println( "Data base error: " + se.toString() );
    try
         if( con != null)
         con.close();
    catch( SQLException se)
    System.out.println( "Data base error: " + se.toString() );
    public LabPK ejbCreate( String experiment, String description, String result ) throws CreateException
    LabPK key = new LabPK( experiment );
    try
    ejbFindByPrimaryKey( key );
    throw new CreateException( "Duplicate lab: " + key);
    catch( FinderException fe ){}
    Connection con = null;
    PreparedStatement stmt = null;
    try
    con = dataSource.getConnection();
    stmt = con.prepareStatement("INSERT INTO laboratory ( experiment, description, result ) VALUES (?, ?, ?) ");
    stmt.setString(1, experiment);
    stmt.setString(2, description);
    stmt.setString(3, result);
    catch( SQLException se )
    error( "Error creating lab: " + key, se);
    finally
    closeConnection(con, stmt, null);
    this.experiment = experiment;
    this.description = description;
    this.result = result;
    return key;
    public void ejbPostCreate(String experiment, String description, String result){}
    public LabPK ejbFindByPrimaryKey( LabPK key ) throws FinderException
         Connection con = null;
         PreparedStatement stmt = null;
         ResultSet rs = null;
         try
              con = dataSource.getConnection();
              stmt = con.prepareStatement("SELECT experiment FROM laboratory WHERE experiment = ?");
              stmt.setString(1, key.experiment );
              rs = stmt.executeQuery();
              if( !rs.next() )
                   throw new FinderException( "Unknown key: " + key );
              return key;
         catch( SQLException se )
              error( "Error in finding primary key for " + key, se );
         finally
         closeConnection(con, stmt, rs);
         return null;
    public String getExperiment()
    return this.experiment;
    public String getDescription()
    return this.description;
    public void setDescription(String description)
    this.description = description;
    public String getResult()
    return this.result;
    public void setResult(String result)
    this.result = result;
    I will omit the PK code in order to not create a longer than necessary post.
    I am using the deploytool�s Graphical interface to generate a standalone jar file. When I run the verify tool I get the following errors:
    For [ D:-Linux-Java-LabJar.jar#LabJar.jar#LabBean ]
    Error: There are no method permissions within this bean [ LabBean ]. Transaction attributes must be specified for the methods defined in the remote interface [ simpleEJB.LabLocal ]. Method [ getDescription ] has no transaction attribute defined.
    For [ D:-Linux-Java-LabJar.jar#LabJar.jar#LabBean ]
    Error: There are no method permissions within this bean [ LabBean ]. Transaction attributes must be specified for the methods defined in the remote interface [ simpleEJB.LabLocal ]. Method [ setDescription ] has no transaction attribute defined.
    For [ D:-Linux-Java-LabJar.jar#LabJar.jar#LabBean ]
    Error: There are no method permissions within this bean [ LabBean ]. Transaction attributes must be specified for the methods defined in the remote interface [ simpleEJB.LabLocal ]. Method [ getResult ] has no transaction attribute defined.
    For [ D:-Linux-Java-LabJar.jar#LabJar.jar#LabBean ]
    Error: There are no method permissions within this bean [ LabBean ]. Transaction attributes must be specified for the methods defined in the remote interface [ simpleEJB.LabLocal ]. Method [ getExperiment ] has no transaction attribute defined.
    For [ D:-Linux-Java-LabJar.jar#LabJar.jar#LabBean ]
    Error: There are no method permissions within this bean [ LabBean ]. Transaction attributes must be specified for the methods defined in the remote interface [ simpleEJB.LabLocal ]. Method [ setResult ] has no transaction attribute defined.
    I�ve read the forum in search for an good answer and found some sugestions to look in the security and transaction tab in order to force the tool to generate the entries for the methods. It did not helped at all.
    I tried to change the defaults in transaction tab from "required" to "mandatory". When I save, the tool presents the root screen of the jar file, but when I go check the values of the transaction atributes, they are again set to "required" .
    In the descriptor viewer for the application descriptor it shows:
    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Sun ONE Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/sunone/appserver/dtds/sun-ejb-jar_2_1-0.dtd"> <sun-ejb-jar> <enterprise-beans> <name>LabJar</name> <unique-id>366779567</unique-id> <ejb> <ejb-name>LabBean</ejb-name> <jndi-name>LabBean</jndi-name> </ejb> </enterprise-beans> </sun-ejb-jar>
    I cant get to edit it when I try.
    I am using the "Deployment Tool for Java 2 Plataform Enterprise Edition 1.4" from the J2EE SDK 1.4_2 running on Windows 2000 SP4.
    Tks in advance,
    Leonardo.
    P.S.: Ok. Isnt it silly. I wrote all that, and then choose "supported" instead of mandatory, saved and verified that it saved the setting indeed. returned to required and runned the test. It worked.

  • Error while deploying the BMP Bean

    Hi
    Here Iam trying to deploy the Account(BMP)Bean in to WebAS
    and the following error is getting while deplying.
    Jun 28, 2005 6:18:42 PM /userOut/deploy (com.sap.ide.eclipse.sdm.threading.DeployThreadManager) [Thread[Deploy Thread,5,main]] INFO:
    [027]Additional log information about the deployment.
    can any one can help me on this?
    thanks in advance.
    Error follows.........
    <!LOGHEADER[START]/>
    <!HELP[Manual modification of the header may cause parsing problem!]/>
    <!LOGGINGVERSION[1.5.3.7185 - 630]/>
    <!NAME[C:\usr\sap\J2E\JC00\SDM\program\log\sdmcl20050628124840.log]/>
    <!PATTERN[sdmcl20050628124840.log]/>
    <!FORMATTER[com.sap.tc.logging.TraceFormatter(%24d %s: %m)]/>
    <!ENCODING[Cp1252]/>
    <!LOGHEADER[END]/>
    Jun 28, 2005 6:18:40 PM  Info: -
    Starting deployment -
    Jun 28, 2005 6:18:40 PM  Info: Loading selected archives...
    Jun 28, 2005 6:18:40 PM  Info: Loading archive 'C:\usr\sap\J2E\JC00\SDM\program\temp\temp54349BankAccountApp.ear'
    Jun 28, 2005 6:18:40 PM  Info: Selected archives successfully loaded.
    Jun 28, 2005 6:18:40 PM  Info: Actions per selected component:
    Jun 28, 2005 6:18:40 PM  Info: Update: Selected development component 'BankAccountApp'/'sap.com'/'localhost'/'2005.06.28.18.18.29' updates currently deployed development component 'BankAccountApp'/'sap.com'/'localhost'/'2005.06.28.17.46.20'.
    Jun 28, 2005 6:18:40 PM  Info: The deployment prerequisites finished withtout any errors.
    Jun 28, 2005 6:18:40 PM  Info: Saved current Engine state.
    Jun 28, 2005 6:18:40 PM  Info: Error handling strategy: OnErrorStop
    Jun 28, 2005 6:18:40 PM  Info: Update strategy: UpdateAllVersions
    Jun 28, 2005 6:18:40 PM  Info: Starting: Update: Selected development component 'BankAccountApp'/'sap.com'/'localhost'/'2005.06.28.18.18.29' updates currently deployed development component 'BankAccountApp'/'sap.com'/'localhost'/'2005.06.28.17.46.20'.
    Jun 28, 2005 6:18:40 PM  Info: SDA to be deployed: C:\usr\sap\J2E\JC00\SDM\root\origin\sap.com\BankAccountApp\localhost\2005.06.28.18.18.29\temp54349BankAccountApp.ear
    Jun 28, 2005 6:18:40 PM  Info: Software type of SDA: J2EE
    Jun 28, 2005 6:18:40 PM  Info: ***** Begin of SAP J2EE Engine Deployment (J2EE Application) *****
    Jun 28, 2005 6:18:41 PM  Info: Begin of log messages of the target system:
    05/06/28 18:18:40 -  ***********************************************************
    05/06/28 18:18:41 -  Start updating EAR file...
    05/06/28 18:18:41 -  start-up mode is lazy
    05/06/28 18:18:41 -  EAR file updated successfully for 170ms.
    05/06/28 18:18:41 -  Start updating...
    05/06/28 18:18:41 -  EAR file uploaded to server for 70ms.
    05/06/28 18:18:41 -  ERROR: Not updated. Deploy Service returned ERROR:
                         java.rmi.RemoteException: Cannot deploy application sap.com/BankAccountApp..
                         Reason: null; nested exception is:
                              java.lang.NullPointerException
                              at com.sap.engine.services.deploy.server.DeployServiceImpl.update(DeployServiceImpl.java:592)
                              at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:1278)
                              at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:294)
                              at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)
                              at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)
                              at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
                              at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
                              at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
                              at java.security.AccessController.doPrivileged(Native Method)
                              at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
                              at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:159)
                         Caused by: java.lang.NullPointerException
                              at com.sap.engine.services.ejb.EJBAdmin.needUpdate(EJBAdmin.java:337)
                              at com.sap.engine.services.deploy.server.application.UpdateTransaction.getContainersWhichNeedUpdate(UpdateTransaction.java:511)
                              at com.sap.engine.services.deploy.server.application.UpdateTransaction.getConcernedContainers(UpdateTransaction.java:467)
                              at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.commonBegin(DeployUtilTransaction.java:356)
                              at com.sap.engine.services.deploy.server.application.UpdateTransaction.begin(UpdateTransaction.java:146)
                              at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:290)
                              at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:323)
                              at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3023)
                              at com.sap.engine.services.deploy.server.DeployServiceImpl.update(DeployServiceImpl.java:580)
                              ... 10 more
                         For detailed information see the log file of the Deploy Service.
    05/06/28 18:18:41 -  ***********************************************************
    Jun 28, 2005 6:18:41 PM  Info: End of log messages of the target system.
    Jun 28, 2005 6:18:41 PM  Info: ***** End of SAP J2EE Engine Deployment (J2EE Application) *****
    Jun 28, 2005 6:18:41 PM  Error: Aborted: development component 'BankAccountApp'/'sap.com'/'localhost'/'2005.06.28.18.18.29':
    Caught exception during application deployment from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Cannot deploy application sap.com/BankAccountApp..
    Reason: null; nested exception is:
         java.lang.NullPointerException
    (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)
    Jun 28, 2005 6:18:42 PM  Info: J2EE Engine is in same state (online/offline) as it has been before this deployment process.
    Jun 28, 2005 6:18:42 PM  Error: -
    At least one of the Deployments failed -

    hi
    i have gone through the visual administrator and in deployments there is not application called BankAccountApp and again i tried to deploy the same  and this time it is giving the different error ...
    Jun 29, 2005 5:08:14 PM /userOut/deploy (com.sap.ide.eclipse.sdm.threading.DeployThreadManager) [Thread[Deploy Thread,5,main]] ERROR:
    [004]Deployment aborted
    Settings
    SDM host : INLD50043555
    SDM port : 50018
    URL to deploy : file:/C:/DOCUME1/c5065576/LOCALS1/Temp/temp20093BankAccountApp.ear
    Result
    => deployment aborted : file:/C:/DOCUME1/c5065576/LOCALS1/Temp/temp20093BankAccountApp.ear
    Aborted: development component 'BankAccountApp'/'sap.com'/'localhost'/'2005.06.28.18.18.29':
    Caught exception during application deployment from SAP J2EE Engine's deploy service:
    java.rmi.RemoteException: Cannot deploy application sap.com/BankAccountApp.. Reason: Incorrect application sap.com/BankAccountApp:Bean AccountBean: The primary key class java.lang.Object is not a legal Value Type in RMI-IIOP.Bean AccountBean: The primary key class java.lang.Object does not define method equals(java.lang.Object). The primary key class must provide suitable implementation of the equals(Object) method. EJB Specification 10.6.13.Bean AccountBean: The primary key class java.lang.Object does not define method hashCode(). The primary key class must provide suitable implementation of the hashCode() method. EJB Specification 10.6.13.Bean AccountBean. Illegal return type for method ejbCreate. The return type must be the entity bean's primary key type. EJB Specification 10.6.4.Bean AccountBean. The return type of ejbFinder methods must be the entity bean's primary key class, java.util.Collection, or java.util.Enumeration, but found com.examples.bmp.Account.Bean AccountBean. Method findByPrimaryKey(<PrimaryKeyClass>) not found in home interface com.examples.bmp.AccountHome. The remote home interface must always include the findByPrimaryKey method, which is always a single-object finder. The method must declare the primary key class as the method argument. EJB Specification 10.6.10.Error in the remote interface com.examples.bmp.Account of bean AccountBean: No corresponding business method in the bean class com.examples.bmp.AccountBean was found for method setAccountID.; nested exception is:      com.sap.engine.services.deploy.container.DeploymentException: <--Localization failed: ResourceBundle='com.sap.engine.services.deploy.DeployResourceBundle', ID='com.sap.engine.services.ejb.exceptions.deployment.EJBDeploymentException: Incorrect application sap.com/BankAccountApp:Bean AccountBean: The primary key class java.lang.Object is not a legal Value Type in RMI-IIOP.Bean AccountBean: The primary key class java.lang.Object does not define method equals(java.lang.Object). The primary key class must provide suitable implementation of the equals(Object) method. EJB Specification 10.6.13.Bean AccountBean: The primary key class java.lang.Object does not define method hashCode(). The primary key class must provide suitable implementation of the hashCode() method. EJB Specification 10.6.13.Bean AccountBean. Illegal return type for method ejbCreate. The return type must be the entity bean's primary key type. EJB Specification 10.6.4.Bean AccountBean. The return type of ejbFinder methods must be the entity bean's primary key class, java.util.Collection, or java.util.Enumeration, but found com.examples.bmp.Account.Bean AccountBean. Method findByPrimaryKey(<PrimaryKeyClass>) not found in home interface com.examples.bmp.AccountHome. The remote home interface must always include the findByPrimaryKey method, which is always a single-object finder. The method must declare the primary key class as the method argument. EJB Specification 10.6.10.Error in the remote interface com.examples.bmp.Account of bean AccountBean: No corresponding business method in the bean class com.examples.bmp.AccountBean was found for method setAccountID.
         at com.sap.engine.services.ejb.deploy.verifier.Verifier.check(Verifier.java:66)
         at com.sap.engine.services.ejb.deploy.DeployAdmin.generate(DeployAdmin.java:253)
         at com.sap.engine.services.ejb.EJBAdmin.deploy(EJBAdmin.java:2133)
         at com.sap.engine.services.ejb.EJBAdmin.makeUpdate(EJBAdmin.java:464)
         at com.sap.engine.services.deploy.server.application.UpdateTransaction.makeComponents(UpdateTransaction.java:374)
         at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.commonBegin(DeployUtilTransaction.java:379)
         at com.sap.engine.services.deploy.server.application.UpdateTransaction.begin(UpdateTransaction.java:146)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:290)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:323)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3023)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.update(DeployServiceImpl.java:580)
         at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:1278)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:294)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:159)
    ', Arguments: []--> : Can't find resource for bundle java.util.PropertyResourceBundle, key com.sap.engine.services.ejb.exceptions.deployment.EJBDeploymentException: Incorrect application sap.com/BankAccountApp:Bean AccountBean: The primary key class java.lang.Object is not a legal Value Type in RMI-IIOP.Bean AccountBean: The primary key class java.lang.Object does not define method equals(java.lang.Object). The primary key class must provide suitable implementation of the equals(Object) method. EJB Specification 10.6.13.Bean AccountBean: The primary key class java.lang.Object does not define method hashCode(). The primary key class must provide suitable implementation of the hashCode() method. EJB Specification 10.6.13.Bean AccountBean. Illegal return type for method ejbCreate. The return type must be the entity bean's primary key type. EJB Specification 10.6.4.Bean AccountBean. The return type of ejbFinder methods must be the entity bean's primary key class, java.util.Collection, or java.util.Enumeration, but found com.examples.bmp.Account.Bean AccountBean. Method findByPrimaryKey(<PrimaryKeyClass>) not found in home interface com.examples.bmp.AccountHome. The remote home interface must always include the findByPrimaryKey method, which is always a single-object finder. The method must declare the primary key class as the method argument. EJB Specification 10.6.10.Error in the remote interface com.examples.bmp.Account of bean AccountBean: No corresponding business method in the bean class com.examples.bmp.AccountBean was found for method setAccountID.
         at com.sap.engine.services.ejb.deploy.verifier.Verifier.check(Verifier.java:66)
         at com.sap.engine.services.ejb.deploy.DeployAdmin.generate(DeployAdmin.java:253)
         at com.sap.engine.services.ejb.EJBAdmin.deploy(EJBAdmin.java:2133)
         at com.sap.engine.services.ejb.EJBAdmin.makeUpdate(EJBAdmin.java:464)
         at com.sap.engine.services.deploy.server.application.UpdateTransaction.makeComponents(UpdateTransaction.java:374)
         at com.sap.engine.services.deploy.server.application.DeployUtilTransaction.commonBegin(DeployUtilTransaction.java:379)
         at com.sap.engine.services.deploy.server.application.UpdateTransaction.begin(UpdateTransaction.java:146)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:290)
         at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:323)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.makeGlobalTransaction(DeployServiceImpl.java:3023)
         at com.sap.engine.services.deploy.server.DeployServiceImpl.update(DeployServiceImpl.java:580)
         at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:1278)
         at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:294)
         at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:183)
         at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:119)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:95)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:159)
    (message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)
    Deployment exception : The deployment of at least one item aborted
    can anyone help me on this.
    Thanks in advance
    Vasu

  • Creating new record in Results Table giving Error

    Hi All,
    On update page there is a Results Table with Add button to create a new row.
    While creating a new record on Results Table gives error
    Attribute set for AccessId in view object XXLCUpdVariablesVO1 failed
    I have checked EO and VO attributes, everything seems to be right.
    Also Updatable is set to 'Always'.
    Still don't know why this error is coming up.
    Plz help to resolve this error.
    Thanks,
    SK

    Ajay,
    XML code
    <?xml version='1.0' encoding='windows-1252' ?>
    <!DOCTYPE Entity SYSTEM "jbo_03_01.dtd">
    <Entity
    Name="XXLCVarAssignmentsEO"
    DBObjectType="table"
    DBObjectName="XXLCOKC_VARIABLE_ASSIGNMENTS"
    AliasName="XXLCVarAssignmentsEO"
    BindingStyle="OracleName"
    UseGlueCode="false"
    RowClass="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEOImpl"
    DefClass="oracle.apps.fnd.framework.server.OAEntityDefImpl"
    CollClass="oracle.apps.fnd.framework.server.OAEntityCache" >
    <DesignTime>
    <Attr Name="_isCodegen" Value="true" />
    <Attr Name="_version" Value="10.1.3.41.57" />
    <AttrArray Name="_publishEvents">
    </AttrArray>
    <Attr Name="_panelSchema" Value="table|alias" />
    <Attr Name="_codeGenFlag2" Value="Init|Delete|Access|Val" />
    </DesignTime>
    <Attribute
    Name="AssignmentId"
    IsNotNull="true"
    ColumnName="ASSIGNMENT_ID"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    SQLType="NUMERIC"
    TableName="XXLCOKC_VARIABLE_ASSIGNMENTS"
    PrimaryKey="true" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22" />
    </DesignTime>
    </Attribute>
    <Attribute
    Name="AssignmentAccess"
    IsNotNull="true"
    Precision="30"
    ColumnName="ASSIGNMENT_ACCESS"
    Type="java.lang.String"
    ColumnType="VARCHAR2"
    SQLType="VARCHAR"
    TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="30" />
    </DesignTime>
    </Attribute>
    <Attribute
    Name="VariableId"
    IsNotNull="true"
    ColumnName="VARIABLE_ID"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    SQLType="NUMERIC"
    TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22" />
    </DesignTime>
    </Attribute>
    <Attribute
    Name="ListValueId"
    IsNotNull="true"
    ColumnName="LIST_VALUE_ID"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    SQLType="NUMERIC"
    TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22" />
    </DesignTime>
    </Attribute>
    <Attribute
    Name="OrganizationId"
    IsNotNull="true"
    Precision="15"
    Scale="0"
    ColumnName="ORGANIZATION_ID"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    SQLType="NUMERIC"
    TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22" />
    </DesignTime>
    </Attribute>
    <Attribute
    Name="TemplateId"
    IsNotNull="true"
    ColumnName="TEMPLATE_ID"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    SQLType="NUMERIC"
    TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22" />
    </DesignTime>
    </Attribute>
    <Attribute
    Name="AuctionHeaderId"
    IsNotNull="true"
    ColumnName="AUCTION_HEADER_ID"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    SQLType="NUMERIC"
    TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22" />
    </DesignTime>
    </Attribute>
    <Attribute
    Name="PoHeaderId"
    IsNotNull="true"
    ColumnName="PO_HEADER_ID"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    SQLType="NUMERIC"
    TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22" />
    </DesignTime>
    </Attribute>
    <Attribute
    Name="CreatedBy"
    IsNotNull="true"
    ColumnName="CREATED_BY"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    SQLType="NUMERIC"
    TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22" />
    </DesignTime>
    </Attribute>
    <Attribute
    Name="CreationDate"
    IsNotNull="true"
    ColumnName="CREATION_DATE"
    Type="oracle.jbo.domain.Date"
    ColumnType="DATE"
    SQLType="DATE"
    TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="7" />
    </DesignTime>
    </Attribute>
    <Attribute
    Name="LastUpdateDate"
    IsNotNull="true"
    ColumnName="LAST_UPDATE_DATE"
    Type="oracle.jbo.domain.Date"
    ColumnType="DATE"
    SQLType="DATE"
    TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="7" />
    </DesignTime>
    </Attribute>
    <Attribute
    Name="LastUpdatedBy"
    IsNotNull="true"
    ColumnName="LAST_UPDATED_BY"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    SQLType="NUMERIC"
    TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22" />
    </DesignTime>
    </Attribute>
    <Attribute
    Name="LastUpdateLogin"
    IsNotNull="true"
    ColumnName="LAST_UPDATE_LOGIN"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    SQLType="NUMERIC"
    TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22" />
    </DesignTime>
    </Attribute>
    <Attribute
    Name="AccessId"
    ColumnName="ACCESS_ID"
    Type="oracle.jbo.domain.Number"
    ColumnType="NUMBER"
    SQLType="NUMERIC"
    TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
    <DesignTime>
    <Attr Name="_DisplaySize" Value="22" />
    </DesignTime>
    </Attribute>
    <Key
    Name="SysC00329905" >
    <AttrArray Name="Attributes">
    <Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.AssignmentAccess" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_checkCondition" Value="&#34;ASSIGNMENT_ACCESS&#34; IS NOT NULL" />
    <Attr Name="_isCheck" Value="true" />
    <Attr Name="_DBObjectName" Value="SYS_C00329905" />
    </DesignTime>
    </Key>
    <Key
    Name="SysC00329906" >
    <AttrArray Name="Attributes">
    <Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.VariableId" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_checkCondition" Value="&#34;VARIABLE_ID&#34; IS NOT NULL" />
    <Attr Name="_isCheck" Value="true" />
    <Attr Name="_DBObjectName" Value="SYS_C00329906" />
    </DesignTime>
    </Key>
    <Key
    Name="SysC00329907" >
    <AttrArray Name="Attributes">
    <Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.ListValueId" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_checkCondition" Value="&#34;LIST_VALUE_ID&#34; IS NOT NULL" />
    <Attr Name="_isCheck" Value="true" />
    <Attr Name="_DBObjectName" Value="SYS_C00329907" />
    </DesignTime>
    </Key>
    <Key
    Name="SysC00329908" >
    <AttrArray Name="Attributes">
    <Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.OrganizationId" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_checkCondition" Value="&#34;ORGANIZATION_ID&#34; IS NOT NULL" />
    <Attr Name="_isCheck" Value="true" />
    <Attr Name="_DBObjectName" Value="SYS_C00329908" />
    </DesignTime>
    </Key>
    <Key
    Name="SysC00329909" >
    <AttrArray Name="Attributes">
    <Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.TemplateId" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_checkCondition" Value="&#34;TEMPLATE_ID&#34; IS NOT NULL" />
    <Attr Name="_isCheck" Value="true" />
    <Attr Name="_DBObjectName" Value="SYS_C00329909" />
    </DesignTime>
    </Key>
    <Key
    Name="SysC00329910" >
    <AttrArray Name="Attributes">
    <Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.AuctionHeaderId" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_checkCondition" Value="&#34;AUCTION_HEADER_ID&#34; IS NOT NULL" />
    <Attr Name="_isCheck" Value="true" />
    <Attr Name="_DBObjectName" Value="SYS_C00329910" />
    </DesignTime>
    </Key>
    <Key
    Name="SysC00329911" >
    <AttrArray Name="Attributes">
    <Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.PoHeaderId" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_checkCondition" Value="&#34;PO_HEADER_ID&#34; IS NOT NULL" />
    <Attr Name="_isCheck" Value="true" />
    <Attr Name="_DBObjectName" Value="SYS_C00329911" />
    </DesignTime>
    </Key>
    <Key
    Name="SysC00329912" >
    <AttrArray Name="Attributes">
    <Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.CreatedBy" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_checkCondition" Value="&#34;CREATED_BY&#34; IS NOT NULL" />
    <Attr Name="_isCheck" Value="true" />
    <Attr Name="_DBObjectName" Value="SYS_C00329912" />
    </DesignTime>
    </Key>
    <Key
    Name="SysC00329913" >
    <AttrArray Name="Attributes">
    <Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.CreationDate" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_checkCondition" Value="&#34;CREATION_DATE&#34; IS NOT NULL" />
    <Attr Name="_isCheck" Value="true" />
    <Attr Name="_DBObjectName" Value="SYS_C00329913" />
    </DesignTime>
    </Key>
    <Key
    Name="SysC00329914" >
    <AttrArray Name="Attributes">
    <Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.LastUpdateDate" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_checkCondition" Value="&#34;LAST_UPDATE_DATE&#34; IS NOT NULL" />
    <Attr Name="_isCheck" Value="true" />
    <Attr Name="_DBObjectName" Value="SYS_C00329914" />
    </DesignTime>
    </Key>
    <Key
    Name="SysC00329915" >
    <AttrArray Name="Attributes">
    <Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.LastUpdatedBy" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_checkCondition" Value="&#34;LAST_UPDATED_BY&#34; IS NOT NULL" />
    <Attr Name="_isCheck" Value="true" />
    <Attr Name="_DBObjectName" Value="SYS_C00329915" />
    </DesignTime>
    </Key>
    <Key
    Name="SysC00329916" >
    <AttrArray Name="Attributes">
    <Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.LastUpdateLogin" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_checkCondition" Value="&#34;LAST_UPDATE_LOGIN&#34; IS NOT NULL" />
    <Attr Name="_isCheck" Value="true" />
    <Attr Name="_DBObjectName" Value="SYS_C00329916" />
    </DesignTime>
    </Key>
    <Key
    Name="SysC00329917" >
    <AttrArray Name="Attributes">
    <Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.AssignmentId" />
    </AttrArray>
    <DesignTime>
    <Attr Name="_isPrimary" Value="true" />
    <Attr Name="_DBObjectName" Value="SYS_C00329917" />
    </DesignTime>
    </Key>
    </Entity>
    XXLCVarAssignmentsEOImpl Code
    package xxlc.oracle.apps.okc.schema.articles.variables.server;
    import oracle.apps.fnd.framework.OAAttrValException;
    import oracle.apps.fnd.framework.OAException;
    import oracle.apps.fnd.framework.server.OADBTransaction;
    import oracle.apps.fnd.framework.server.OAEntityDefImpl;
    import oracle.apps.fnd.framework.server.OAEntityImpl;
    import oracle.jbo.AttributeList;
    import oracle.jbo.Key;
    import oracle.jbo.domain.Date;
    import oracle.jbo.domain.Number;
    import oracle.jbo.server.AttributeDefImpl;
    import oracle.jbo.server.EntityDefImpl;
    // --- File generated by Oracle ADF Business Components Design Time.
    // --- Custom code may be added to this class.
    // --- Warning: Do not modify method signatures of generated methods.
    public class XXLCVarAssignmentsEOImpl extends OAEntityImpl
    public static final int ASSIGNMENTID = 0;
    public static final int ASSIGNMENTACCESS = 1;
    public static final int VARIABLEID = 2;
    public static final int LISTVALUEID = 3;
    public static final int ORGANIZATIONID = 4;
    public static final int TEMPLATEID = 5;
    public static final int AUCTIONHEADERID = 6;
    public static final int POHEADERID = 7;
    public static final int CREATEDBY = 8;
    public static final int CREATIONDATE = 9;
    public static final int LASTUPDATEDATE = 10;
    public static final int LASTUPDATEDBY = 11;
    public static final int LASTUPDATELOGIN = 12;
    public static final int ACCESSID = 13;
    private static OAEntityDefImpl mDefinitionObject;
    /**This is the default constructor (do not remove)
    public XXLCVarAssignmentsEOImpl()
    /**Retrieves the definition object for this instance class.
    public static synchronized EntityDefImpl getDefinitionObject()
    if (mDefinitionObject == null)
    mDefinitionObject =
    (OAEntityDefImpl)EntityDefImpl.findDefObject("xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO");
    return mDefinitionObject;
    /**Add attribute defaulting logic in this method.
    public void create(AttributeList attributeList)
    super.create(attributeList);
    OADBTransaction transaction = getOADBTransaction();
    Number asgId = transaction.getSequenceValue("XXLC_VAR_ASG_SEQ");
    setAssignmentId(asgId);
    /**Add entity remove logic in this method.
    public void remove()
    super.remove();
    /**Add Entity validation code in this method.
    protected void validateEntity()
    super.validateEntity();
    /**Gets the attribute value for AssignmentId, using the alias name AssignmentId
    public Number getAssignmentId()
    return (Number)getAttributeInternal(ASSIGNMENTID);
    /**Sets <code>value</code> as the attribute value for AssignmentId
    public void setAssignmentId(Number value)
    if (value != null)
    OADBTransaction transaction = getOADBTransaction();
    Object[] varKey = {value};
    EntityDefImpl varDefinition = XXLCVarAssignmentsEOImpl.getDefinitionObject();
    XXLCVarAssignmentsEOImpl variable =
    (XXLCVarAssignmentsEOImpl)varDefinition.findByPrimaryKey(transaction, new Key(varKey));
    if (variable != null)
    throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,
    getEntityDef().getFullName(), // EO name
    getPrimaryKey(), // EO PK
    "AssignmentId", // Attribute Name
    value, // Attribute value
    "AK", // Message product short name
    "FWK_TBX_T_EMP_ID_UNIQUE"); // Message name
    setAttributeInternal(ASSIGNMENTID, value);
    /**Gets the attribute value for AssignmentAccess, using the alias name AssignmentAccess
    public String getAssignmentAccess()
    return (String)getAttributeInternal(ASSIGNMENTACCESS);
    /**Sets <code>value</code> as the attribute value for AssignmentAccess
    public void setAssignmentAccess(String value)
    setAttributeInternal(ASSIGNMENTACCESS, value);
    /**Gets the attribute value for VariableId, using the alias name VariableId
    public Number getVariableId()
    return (Number)getAttributeInternal(VARIABLEID);
    /**Sets <code>value</code> as the attribute value for VariableId
    public void setVariableId(Number value)
    setAttributeInternal(VARIABLEID, value);
    /**Gets the attribute value for ListValueId, using the alias name ListValueId
    public Number getListValueId()
    return (Number)getAttributeInternal(LISTVALUEID);
    /**Sets <code>value</code> as the attribute value for ListValueId
    public void setListValueId(Number value)
    setAttributeInternal(LISTVALUEID, value);
    /**Gets the attribute value for OrganizationId, using the alias name OrganizationId
    public Number getOrganizationId()
    return (Number)getAttributeInternal(ORGANIZATIONID);
    /**Sets <code>value</code> as the attribute value for OrganizationId
    public void setOrganizationId(Number value)
    setAttributeInternal(ORGANIZATIONID, value);
    /**Gets the attribute value for TemplateId, using the alias name TemplateId
    public Number getTemplateId()
    return (Number)getAttributeInternal(TEMPLATEID);
    /**Sets <code>value</code> as the attribute value for TemplateId
    public void setTemplateId(Number value)
    setAttributeInternal(TEMPLATEID, value);
    /**Gets the attribute value for AuctionHeaderId, using the alias name AuctionHeaderId
    public Number getAuctionHeaderId()
    return (Number)getAttributeInternal(AUCTIONHEADERID);
    /**Sets <code>value</code> as the attribute value for AuctionHeaderId
    public void setAuctionHeaderId(Number value)
    setAttributeInternal(AUCTIONHEADERID, value);
    /**Gets the attribute value for PoHeaderId, using the alias name PoHeaderId
    public Number getPoHeaderId()
    return (Number)getAttributeInternal(POHEADERID);
    /**Sets <code>value</code> as the attribute value for PoHeaderId
    public void setPoHeaderId(Number value)
    setAttributeInternal(POHEADERID, value);
    /**Gets the attribute value for CreatedBy, using the alias name CreatedBy
    public Number getCreatedBy()
    return (Number)getAttributeInternal(CREATEDBY);
    /**Sets <code>value</code> as the attribute value for CreatedBy
    public void setCreatedBy(Number value)
    setAttributeInternal(CREATEDBY, value);
    /**Gets the attribute value for CreationDate, using the alias name CreationDate
    public Date getCreationDate()
    return (Date)getAttributeInternal(CREATIONDATE);
    /**Sets <code>value</code> as the attribute value for CreationDate
    public void setCreationDate(Date value)
    setAttributeInternal(CREATIONDATE, value);
    /**Gets the attribute value for LastUpdateDate, using the alias name LastUpdateDate
    public Date getLastUpdateDate()
    return (Date)getAttributeInternal(LASTUPDATEDATE);
    /**Sets <code>value</code> as the attribute value for LastUpdateDate
    public void setLastUpdateDate(Date value)
    setAttributeInternal(LASTUPDATEDATE, value);
    /**Gets the attribute value for LastUpdatedBy, using the alias name LastUpdatedBy
    public Number getLastUpdatedBy()
    return (Number)getAttributeInternal(LASTUPDATEDBY);
    /**Sets <code>value</code> as the attribute value for LastUpdatedBy
    public void setLastUpdatedBy(Number value)
    setAttributeInternal(LASTUPDATEDBY, value);
    /**Gets the attribute value for LastUpdateLogin, using the alias name LastUpdateLogin
    public Number getLastUpdateLogin()
    return (Number)getAttributeInternal(LASTUPDATELOGIN);
    /**Sets <code>value</code> as the attribute value for LastUpdateLogin
    public void setLastUpdateLogin(Number value)
    setAttributeInternal(LASTUPDATELOGIN, value);
    /**getAttrInvokeAccessor: generated method. Do not modify.
    protected Object getAttrInvokeAccessor(int index,
    AttributeDefImpl attrDef) throws Exception
    switch (index)
    case ASSIGNMENTID:
    return getAssignmentId();
    case ASSIGNMENTACCESS:
    return getAssignmentAccess();
    case VARIABLEID:
    return getVariableId();
    case LISTVALUEID:
    return getListValueId();
    case ORGANIZATIONID:
    return getOrganizationId();
    case TEMPLATEID:
    return getTemplateId();
    case AUCTIONHEADERID:
    return getAuctionHeaderId();
    case POHEADERID:
    return getPoHeaderId();
    case CREATEDBY:
    return getCreatedBy();
    case CREATIONDATE:
    return getCreationDate();
    case LASTUPDATEDATE:
    return getLastUpdateDate();
    case LASTUPDATEDBY:
    return getLastUpdatedBy();
    case LASTUPDATELOGIN:
    return getLastUpdateLogin();
    case ACCESSID:
    return getAccessId();
    default:
    return super.getAttrInvokeAccessor(index, attrDef);
    /**setAttrInvokeAccessor: generated method. Do not modify.
    protected void setAttrInvokeAccessor(int index, Object value,
    AttributeDefImpl attrDef) throws Exception
    switch (index)
    case ASSIGNMENTID:
    setAssignmentId((Number)value);
    return;
    case ASSIGNMENTACCESS:
    setAssignmentAccess((String)value);
    return;
    case VARIABLEID:
    setVariableId((Number)value);
    return;
    case LISTVALUEID:
    setListValueId((Number)value);
    return;
    case ORGANIZATIONID:
    setOrganizationId((Number)value);
    return;
    case TEMPLATEID:
    setTemplateId((Number)value);
    return;
    case AUCTIONHEADERID:
    setAuctionHeaderId((Number)value);
    return;
    case POHEADERID:
    setPoHeaderId((Number)value);
    return;
    case CREATEDBY:
    setCreatedBy((Number)value);
    return;
    case CREATIONDATE:
    setCreationDate((Date)value);
    return;
    case LASTUPDATEDATE:
    setLastUpdateDate((Date)value);
    return;
    case LASTUPDATEDBY:
    setLastUpdatedBy((Number)value);
    return;
    case LASTUPDATELOGIN:
    setLastUpdateLogin((Number)value);
    return;
    case ACCESSID:
    setAccessId((Number)value);
    return;
    default:
    super.setAttrInvokeAccessor(index, value, attrDef);
    return;
    /**Gets the attribute value for AccessId, using the alias name AccessId
    public Number getAccessId()
    return (Number)getAttributeInternal(ACCESSID);
    /**Sets <code>value</code> as the attribute value for AccessId
    public void setAccessId(Number value)
    setAttributeInternal(ACCESSID, value);
    /**Creates a Key object based on given key constituents
    public static Key createPrimaryKey(Number assignmentId)
    return new Key(new Object[]{assignmentId});
    Thanks,
    SK

Maybe you are looking for