Common Entity Object

Hi,
I am using JDeveloper 11.1.1.6
This is my issue; I have a viewObject which contains three (3) fields that I need to use in ALL my EntityObjects. I started by just creating a transient attributes and populating those 3 fields with a viewAccessor and then using them on my EO without problems. The thing is that for each EO I need to create those transient attributes and I believe that there have to be more effective and cleaner solutions.
What can I do to have those three attributes accessible and available for all the EO on my appModule? Those three attributes are coming from a query in DB and mostly contains information about the person who is logged in.
I wanted to implement a solution; something like an Entity Object (global) with those three attributes and the instantiating it in the rest of my EO and call something like myEO.getMyVariableOne, myEO.getMyVariableTwo and myEO.getMyVariableThree but that is not possible. So the other option is creating the view object and instantiating that viewObject on my EO.
But what do you think is the best practice???
Thanks in advance.

Hi Again,
I forgot to say that all my EO extend MyCustomEOImpl. Do you think that is a good practice to import my VO (which I am just using to retrieve my fields and not for UI) and set the variables in MyCustomEOImpl so all my EO can access them via inheritance???
What other options would you guys recommend?
Thank you
Edited by: Alejandro T. Lanz on Nov 5, 2012 11:30 AM

Similar Messages

  • How to add row in multiple view object based on common entity object.

    Hi ,
    I have
    Jdeveloper version - 10.1.3.3.0
    Oracle Database - 11g R2
    I have a situation where i have to show data from one table in three adf tables on jsf page depending on a flag value in a column in table. For this purpose i have done the following steps
    a) Created an entity object on the database table .
    b) Created three view objects on this entity object and edited the view object's SQL and included the where clause
                       WHERE  A.USER_PERSONAL_NO = :P_USER_PERSONAL_NO AND
                           A.AUTH_TYPE = 'LF'
                       The auth_type cloumn decided in which view object the data will be shown
    Now, when i query the data from database by executing the query of these view objects the data is shown correctly in all three view objects. Till here there seems every thing ok
    Now , i have to provide the logic to add records in the adf tables for this i have provided add button in action facet of all three tables which are binded to methods in managed bean,
    when i add a record in a adf table by add button the new row which is created is shown in all three tables . I cant understand why this is happening , please help me to solve this problem.
    How can i make it possible so that the record appears only in that adf table in which the record is added.
    The method for adding record is
                Row rw = currentAM.getWfRecommAuths().createRow();
                rw.setAttribute("UserPersonalNo",this.getQuery_personal_no().getValue());
                rw.setAttribute("AuthPersonalNo","");
                rw.setAttribute("AuthType","LX");
                currentAM.getWfRecommAuths().last();
                currentAM.getWfRecommAuths().insertRow(rw);
               Please help , thanks in advance.

    Hi,
    have a look at polymorphic view objects
    http://download.oracle.com/docs/cd/E21764_01/web.1111/b31974/bcadvvo.htm#CEGDCCCB
    Frank

  • Help: 'JBO-26080: Error while selecting entity object' on RefreshDataSource

    Hi all,
    The Problem:
    My page throws out a JBO-26080 error on the RefreshDataSource Tag. This only happens the second time it needs to be refreshed, i.e. the second time the form is submitted to processRequest.jsp (see Background Info below). In my testing I have found that it is definately the RefreshDataSource tag.
    Any help will be much appreciated.
    Background Info:
    I have 2 JSP's, 1 (report.jsp) that displays a table and 1 (processReport.jsp) that runs a stored procedure, implemented as a method in the Application Module, to select data for the table.
    The method in the application module:
    public void doCurrencyCalc()
    CallableStatement st=null;
    try // 1
    String stmt = "BEGIN CONVERT_MONEY(?,?,?,?,?,?,?,?);END;";
    int nParam = 3;
    System.out.println("** SQL = " + stmt);
    DBTransaction tr = getDBTransaction();
    st=tr.createCallableStatement(stmt,DBTransaction.DEFAULT);
    st.setString(1, getWB());
    System.out.println(" > WB = " + getWB());
    st.setLong(2, getKpi());
    System.out.println(" > Kpi = " + getKpi());
    for(int i=0; i<6; i++)
    if(getWbSel(i+1)) st.setString(nParam,String.valueOf(getWbNo(i+1)));
    else st.setString(nParam,null);
    nParam++;
    } // for i
    st.executeUpdate();
    System.out.println("** Calculation Complete");
    } // try 1
    catch(SQLException s)
    throw new JboException(s);
    } // catch SqlException
    finally
    try{if(st!=null)st.close();}
    catch(SQLException s){      }
    } // finally
    } // end doCurrencyCalc
    The processReport jsp:
    <%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
    <%@ page contentType="text/html;charset=windows-1252"%>
    <%@ page import="za.org.saawu.ibs.bc4j.common.IBSbc4jModule"%>
    <jbo:ApplicationModule id="IBSbc4jModule" configname="za.org.saawu.ibs.bc4j.IBSbc4jModule.IBSbc4jModuleLocal" releasemode="Stateful" /><%
    IBSbc4jModule app = (IBSbc4jModule)IBSbc4jModule.useApplicationModule(true);
    String strDisplay = new String(request.getParameter("btnDisplay").toString());
    if(request.getParameter("KPIGroup")!="-1") {
    app.setKpiGroup(new Long(request.getParameter("KPIGroup")).longValue());
    if(request.getParameter("Kpi")!="-1") app.setKpi(new Long(request.getParameter("Kpi")).longValue());
    else app.setKpi(0l);
    String strParams[] = request.getParameterValues("wbsel");
    app.resetWBSel();
    if(strParams.length>0) {
    for(int nCount=0; nCount<strParams.length; nCount++) {
    int nWBNo = app.findWB(strParams[nCount]);
    if(nWBNo>-1) app.setWBSel(nWBNo+1,true);
    } // for
    app.doCurrencyCalc();
    } else {
    session.setAttribute("info","NO_WBSEL");
    } // if strParams length is 0
    if(strDisplay.compareToIgnoreCase("TABLE")==0) {
    session.setAttribute("info","REFRESH_TABLE");
    } else if(strDisplay.compareToIgnoreCase("GRAPH")==0){
    session.setAttribute("info","REFRESH_GRAPH");
    } // if the request btnDisplay is TABLE
    } else {
    session.setAttribute("info","NO_KPIGROUP");
    } // if the KPIGroup was selected
    %>
    <jbo:DataSource id="srcOutput" appid="IBSbc4jModule" viewobject="OutputView" />
    <jbo:RefreshDataSource datasource="srcOutput" />
    <jsp:forward page="report.jsp" />
    <jbo:ReleasePageResources />
    The report jsp is a form that has some input selections and the DataTable tag

    Michael:
    'JBO-26080' means that something was wrong with the SQL statement issued to get the data for an entity object.
    You need the detail exception stack trace to see what went wrong at the JDBC level. Take a look to see if the exception reported on your browser has detail exception info on it.
    If not, you should run your middle tier app with diagnostic turned on. This will output lots of diag info on console and you should get the detail exception in it. Please take a look at the detail exception. If you can't make sense out of the exception, post it to this thread.
    To turn on diagnostic, you need to specify
    -Djbo.debugoutput=console
    as one of the JVM switches.
    If you're invoking your app (middle-tier app) from command line,
    include -Djbo.debugoutput=console as in
    java.exe -Djbo.debugoutput=console ...
    If you're running your app from within JDev:
    1. Select the project.
    2. Do right mouse click and select "Project Settings..."
    3. On the Settings dialog, select Configurations/Runner.
    4. In the righthand side pane, you should see a textbox for "Java
    Options". Please add the following JVM switch:
    -Djbo.debugoutput=console
    Then, rerun. The run command should include
    -Djbo.debugoutput=console as in
    "D:\JDev9i\jdk\bin\javaw.exe" -Djbo.debugoutput=console -classpath ...
    Thanks.
    Sung

  • ClassNotFound Exception integrating Coherence and Eclipselink with composite key entity objects

    I am hooking up coherence as an L2 cache for eclipselink in weblogic 12c (using the latest released weblogic and eclipselink 2.4.2.v20130514-5956486).  I have my application war and coherence gar packaged in the same EAR file.  For Entity Objects with single primary keys (Longs) coherence integration works as expected.  However I have several multi-part key Entity Objects that use an IdClass to represent the key.  When these objects get serialized, coherence throws a class not found exception.  I'm assuming its because the cachekey used is an instance of my applications IdClass, and the weblogic classloader doesn't have access to this.  Since eclipselink hides the cache integration with coherence, I cannot pass my classloader off to coherence (as i do with other caches i'm using directly with coherence).
    How can I get around this problem? 
    I saw this option in ExternalizableHelper.xml, but modifying it directly had no effect:
      <!-- if deploying Coherence in CLASSPATH and deploying application
           classes within a hot-redeployable archive (e.g. ".ear"), set this to
           true -->
      <!-- *** WARNING *** all cluster nodes must use the same setting -->
      <force-classloader-resolving>false</force-classloader-resolving>
    Here is the stack trace:
    ClassLoader: null) java.io.IOException: readObject failed: java.lang.ClassNotFoundException: com.oracle.pgbu.common.data.OverlayIdClass
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:270)
      at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:623)
      at weblogic.coherence.service.internal.io.WLSObjectInputStream.resolveClass(WLSObjectInputStream.java:45)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1610)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
      at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1704)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1342)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
      at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2262)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2393)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2315)
      at oracle.eclipselink.coherence.integrated.internal.cache.RelationshipUpdateProcessor.readExternal(RelationshipUpdateProcessor.java:82)
      at com.tangosol.util.ExternalizableHelper.readExternalizableLite(ExternalizableHelper.java:2086)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2390)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at oracle.eclipselink.coherence.integrated.cache.WrapperSerializer.deserialize(WrapperSerializer.java:79)
      at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2791)
      at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:266)
    ClassLoader: null
      at com.tangosol.util.Base.ensureRuntimeException(Base.java:286)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:50)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onInvokeRequest(PartitionedCache.CDB:61)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$InvokeRequest.run(PartitionedCache.CDB:1)
      at com.tangosol.coherence.component.util.DaemonPool.add(DaemonPool.CDB:20)
      at com.tangosol.coherence.component.util.DaemonPool.add(DaemonPool.CDB:1)
      at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:2)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:38)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:23)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)
      at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:51)
      at java.lang.Thread.run(Thread.java:724)
    Caused by: java.io.IOException: readObject failed: java.lang.ClassNotFoundException: com.oracle.pgbu.common.data.OverlayIdClass
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:270)
      at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:623)
      at weblogic.coherence.service.internal.io.WLSObjectInputStream.resolveClass(WLSObjectInputStream.java:45)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1610)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
      at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1704)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1342)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
      at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2262)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2393)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2315)
      at oracle.eclipselink.coherence.integrated.internal.cache.RelationshipUpdateProcessor.readExternal(RelationshipUpdateProcessor.java:82)
      at com.tangosol.util.ExternalizableHelper.readExternalizableLite(ExternalizableHelper.java:2086)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2390)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at oracle.eclipselink.coherence.integrated.cache.WrapperSerializer.deserialize(WrapperSerializer.java:79)
      at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2791)
      at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:266)
    ClassLoader: null
      at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2270)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2393)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2315)
      at oracle.eclipselink.coherence.integrated.internal.cache.RelationshipUpdateProcessor.readExternal(RelationshipUpdateProcessor.java:82)
      at com.tangosol.util.ExternalizableHelper.readExternalizableLite(ExternalizableHelper.java:2086)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2390)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at oracle.eclipselink.coherence.integrated.cache.WrapperSerializer.deserialize(WrapperSerializer.java:79)
      at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2791)
      at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:266)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$InvokeRequest.deserializeProcessor(PartitionedCache.CDB:7)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onInvokeRequest(PartitionedCache.CDB:37)
      ... 10 more

    I am hooking up coherence as an L2 cache for eclipselink in weblogic 12c (using the latest released weblogic and eclipselink 2.4.2.v20130514-5956486).  I have my application war and coherence gar packaged in the same EAR file.  For Entity Objects with single primary keys (Longs) coherence integration works as expected.  However I have several multi-part key Entity Objects that use an IdClass to represent the key.  When these objects get serialized, coherence throws a class not found exception.  I'm assuming its because the cachekey used is an instance of my applications IdClass, and the weblogic classloader doesn't have access to this.  Since eclipselink hides the cache integration with coherence, I cannot pass my classloader off to coherence (as i do with other caches i'm using directly with coherence).
    How can I get around this problem? 
    I saw this option in ExternalizableHelper.xml, but modifying it directly had no effect:
      <!-- if deploying Coherence in CLASSPATH and deploying application
           classes within a hot-redeployable archive (e.g. ".ear"), set this to
           true -->
      <!-- *** WARNING *** all cluster nodes must use the same setting -->
      <force-classloader-resolving>false</force-classloader-resolving>
    Here is the stack trace:
    ClassLoader: null) java.io.IOException: readObject failed: java.lang.ClassNotFoundException: com.oracle.pgbu.common.data.OverlayIdClass
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:270)
      at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:623)
      at weblogic.coherence.service.internal.io.WLSObjectInputStream.resolveClass(WLSObjectInputStream.java:45)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1610)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
      at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1704)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1342)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
      at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2262)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2393)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2315)
      at oracle.eclipselink.coherence.integrated.internal.cache.RelationshipUpdateProcessor.readExternal(RelationshipUpdateProcessor.java:82)
      at com.tangosol.util.ExternalizableHelper.readExternalizableLite(ExternalizableHelper.java:2086)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2390)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at oracle.eclipselink.coherence.integrated.cache.WrapperSerializer.deserialize(WrapperSerializer.java:79)
      at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2791)
      at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:266)
    ClassLoader: null
      at com.tangosol.util.Base.ensureRuntimeException(Base.java:286)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:50)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onInvokeRequest(PartitionedCache.CDB:61)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$InvokeRequest.run(PartitionedCache.CDB:1)
      at com.tangosol.coherence.component.util.DaemonPool.add(DaemonPool.CDB:20)
      at com.tangosol.coherence.component.util.DaemonPool.add(DaemonPool.CDB:1)
      at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheKeyRequest.onReceived(DistributedCacheKeyRequest.CDB:2)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:38)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:23)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)
      at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:51)
      at java.lang.Thread.run(Thread.java:724)
    Caused by: java.io.IOException: readObject failed: java.lang.ClassNotFoundException: com.oracle.pgbu.common.data.OverlayIdClass
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:270)
      at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:623)
      at weblogic.coherence.service.internal.io.WLSObjectInputStream.resolveClass(WLSObjectInputStream.java:45)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1610)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1515)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1769)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1348)
      at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1704)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1342)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370)
      at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2262)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2393)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2315)
      at oracle.eclipselink.coherence.integrated.internal.cache.RelationshipUpdateProcessor.readExternal(RelationshipUpdateProcessor.java:82)
      at com.tangosol.util.ExternalizableHelper.readExternalizableLite(ExternalizableHelper.java:2086)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2390)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at oracle.eclipselink.coherence.integrated.cache.WrapperSerializer.deserialize(WrapperSerializer.java:79)
      at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2791)
      at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:266)
    ClassLoader: null
      at com.tangosol.util.ExternalizableHelper.readSerializable(ExternalizableHelper.java:2270)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2393)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2315)
      at oracle.eclipselink.coherence.integrated.internal.cache.RelationshipUpdateProcessor.readExternal(RelationshipUpdateProcessor.java:82)
      at com.tangosol.util.ExternalizableHelper.readExternalizableLite(ExternalizableHelper.java:2086)
      at com.tangosol.util.ExternalizableHelper.readObjectInternal(ExternalizableHelper.java:2390)
      at com.tangosol.util.ExternalizableHelper.readObject(ExternalizableHelper.java:2336)
      at oracle.eclipselink.coherence.integrated.cache.WrapperSerializer.deserialize(WrapperSerializer.java:79)
      at com.tangosol.util.ExternalizableHelper.deserializeInternal(ExternalizableHelper.java:2791)
      at com.tangosol.util.ExternalizableHelper.fromBinary(ExternalizableHelper.java:266)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$InvokeRequest.deserializeProcessor(PartitionedCache.CDB:7)
      at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onInvokeRequest(PartitionedCache.CDB:37)
      ... 10 more

  • Extended but NOT polymorphic Entity Object ?

    Hi,
    We are trying to implement the OO features of ADF BC, i.e : Inheritance and Polymorphism, to reuse the logic in EO. I need some confirmation below to make sure we apply it correctly :
    1) We can Extend Entity Object WITHOUT assigning any discriminator, can't we ?
    (this is what I call Extended but NOT polymorphic )
    If the answer is yes , then I have further question :
    2) In our Order Processing module of our ERP application, there are following entity object : SalesOrder, Invoice, SalesReturn, CreditNote
    And there are four underlying database tables : SalesOrder, Invoice, SalesReturn, CreditNote.
    They are surely DIFFERENT transaction BUT they have COMMON attributes (and validation), This is why I call it "Extended but NOT polymorphic".
    The common attributes are :
    - DocID (PK)
    - DocNumber
    - DocDate
    - Warehouse
    - Customer
    - Salesman
    - TermOfPayment
    - DueDate
    So I create one BaseOrderEntity as super class entity. Then I create four entity objects that extend the base entity :
    Entity : SalesOrder, Extend : BaseOrderEntity, Database Object : SalesOrder
    Entity : Invoice, Extend : BaseOrderEntity, Database Object : Invoice
    Entity : SalesReturn, Extend : BaseOrderEntity, Database Object : SalesReturn
    Entity : CreditNote, Extend : BaseOrderEntity, Database Object : CreditNote
    Is this the correct way to apply it ?
    In other word, is this the correct use case ?
    Thank you very much,
    xtanto.

    Starting in JDeveloper 10.1.2, the ADF runtime throws an error if it detects that you have a superclass and subclass entity objects without properly-configured discriminator attributes. If you do not intend to instantiate the superclass, just assign it a descriminator attribute with a value that will never occur in real-life, like NULL or 'x' or whatever.
    It will be simplest if all your family of subclasses were stored in the same table, although that is not required. It simply makes the polymorphic queries easier.
    If you want to avoid the runtime check for the discriminator's being properly configured, because you know that your application will never run the chance of loading the same row into the entity cache as two different entity definition types, then you can get a property jbo.abstract.base.check in your configuration (or as a System property) to the value false and then the check is not performed.

  • Sharing same entity object with multiple viewobject problem.

    Dear All,
    I have a common entity entity object, that i am using in 4 different vo(only the where clause is different),
    I have created 4 af:table from corrosponding vos, when i am inserting some records in any of the vo then all the vo is showing the same records.. even through each vo is having separate where clause,
    But when i do this with separate eo for each vo then it works fine..
    Here i just want to do with the single eo being shared by different vo of same kind.. except where clause, Also i want to know why this issue is comming on insert? is it normal expected behaviour ? If yes then how to overcome this problem..? Pls provide any good suggestions if you have..
    Thanks & Regards.
    Santosh.

    Hi Sacha,
    Thanks.. i read it and found following
    You can globally disable this feature by setting the jbo.viewlink.consistent to the value false in your configuration. Conversely, you could globally enable this >feature by setting jbo.viewlink.consistent to the value true, but Oracle does not recommend doing this. Doing so would force view link consistency to be set >on for view objects with secondary entity usages that are not marked as a reference which presently do not support the view link consistency feature well.Now i am thinking to set it false.. but as doc says but Oracle does not recommend doing this. Doing so would force view link consistency to be set on for view objects with secondary entity usages that are not marked as a reference which presently do not support the view link consistency feature well,
    With what option should i go...?
    go with separate eo and vo..?
    Regards,
    Santosh.

  • Error while deleting a row from the Entity Object

    Hi OAF Guys,
    i am unable to delete the newly created row from the entity object.
    let me explain my scenario.
    1. i have a table of which some of the columns are mandatory.
    2. I am writing the code in the validateEntity to check wether the user really enter anything into the fields.
    3. My problem is, when the user creates row and wanted to delete the row without entering any details, the validate entity of the EO gets fired which will not allows to delete the row.
    Is there any workaround for this problem.
    Regards,
    Nagesh Manda.

    Hi Tapash,
    I am very sorry for not providing you the complete details of my scenario. Here i am explaining
    1. what code you have placed while creating the row and in validation method on EOImpl.
    while creating a new row i am initializing the primary key of the EO with the sequence value.
    2.When you say, you are unable to delete the row, are you getting a error message ? if yes, custom message or fwk error ?
    its not the fwk error, its the custom message which wrote in my validateEntity method of EO to check whether the user had entered all the necesary columns or not.
    3.How are you trying to delete the row ?
    while the user clicks on the delete switcher i am getting the primary key of the row and searching for the row in the vo and finally deleting it.
    The problem arises when the user creates a row, and later doesnt want to enter the details and delete it. Here while deleting the row the validateEntity method of the EO gets fired and doesnt allow me to do so :(.
    Any way appreciate your help tapash.
    Regards,
    Nagesh Manda.

  • Refreshing Entity Objects after Altering the table

    Hi,
    My Entity Object is based on a table... and View Objects on the Entity Objects. Now if I alter the table (just changing the width of the column), that change is not visible on the Entity Object. Is there any way I can automatically refresh the Entity Objects after altering the table(only column width is changed).
    (Changes made to Entity Objects manually are reflected in the View Object correctly.)
    Regards
    Faiyaz

    'changing the width of the column' means changing the size of the column in the table description in the database. For e.g.. In the original table I had a column OIL_KEY NUMBER(6). Now I change the column to be of size 12 i.e. OIL_KEY NUMBER(12). This does not get refreshed in the Entity Object.

  • Two View Objects & One Entity Object

    Has anyone ever had it where they create a row from a view object, set some attributes, insert it into that view object, and it shows up in another view object (as well as the one the row was actually inserted on)? Both of these view objects are using the same single entity object, it's just that their where clauses are slightly different. When I do a commit and then executeQuery, all is good and the new row only shows up in the intended view object.
    Here is the code in my app module to do a row insertion on one of the view objects.
    public void addQCNote(int userID, Number theStudyID, String theNote)
              try
                   //StudyFtsViewObjImpl freeTextVO = getStudyFtsViewObj();
                   StudyFtsQCOnlyViewObjImpl freeTextVO = getStudyFtsReadOnlyViewObj();
                   freeTextVO.setWhereClauseParam(0, theStudyID);
                   DBSequence freeTextTypeCode = null;
                   StudyFTSQCCodeValueViewObjImpl freeTextCodeValue = getStudyFTSCodeValueViewObj();
                   freeTextCodeValue.executeQuery();
                   Row[] freeTextCodeValueCurrentRowArray = freeTextCodeValue.getAllRowsInRange();
                   // There SHOULD only be one ... but if there is more, pick one - geeez.
                   for (int i = 0; i < freeTextCodeValueCurrentRowArray.length; i++)
                        Row currentFTRow = freeTextCodeValueCurrentRowArray[0];
                        freeTextTypeCode = ((DBSequence) (currentFTRow.getAttribute(StudyFTSQCCodeValueViewObjRowImpl.CODEVALUE1)));
                   Row freeTextRow = freeTextVO.createRow();
                   // Sets up default values for insertion into db at commit time
                   freeTextRow.setAttribute(StudyFtsQCOnlyViewObjRowImpl.PARENTENTITYID, theStudyID);
                   freeTextRow.setAttribute(StudyFtsQCOnlyViewObjRowImpl.PARENTENTITYNAME, "STUDY");
                   freeTextRow.setAttribute(StudyFtsQCOnlyViewObjRowImpl.FREETEXT, theNote);
                   freeTextRow.setAttribute(StudyFtsQCOnlyViewObjRowImpl.FREETEXTTYPECD, freeTextTypeCode);
                   freeTextRow.setAttribute(StudyFtsQCOnlyViewObjRowImpl.CREATEDID, new Number(userID));
                   freeTextVO.insertRow(freeTextRow);
                   freeTextVO.setCurrentRow(freeTextRow);
              catch (Exception ex)
                   System.out.println("Exception in AR3MainAppModule.addQCNote: " + ex.toString());
    -brian

    Did you read this?
    Re: Row created in one ViewObject added to all VOs based on the same Entity
    Why don't you search this forum before posting?
    Sascha

  • Uix two view-objects on one entity-object synchronize

    Hi All
    I want to add some uix pages to an old project using ADF UIX and Business Components.
    I have an entity object to a table witch about 50 fields.
    Now I create two view objects due to a better performance. One witch seven attributes for the overwiew and one with all attributes for the detail page.
    They are related via a view link.
    I create the overview as a read-only-table and the detail-page as an input-form.
    The proplem is that the synchronization don't work. The detail page shows the first dataset ever.
    Has anyone a solution or a tip where I can found that?
    Is where a performance problem if I use one view-object for both pages?
    Thanks in advance
    Roger

    Use custom DataAction for the first page:
    package controller;
    import oracle.adf.controller.struts.actions.DataAction;
    import oracle.adf.controller.struts.actions.DataActionContext;
    public class Class1 extends DataAction
      protected void validateModelUpdates(DataActionContext actionContext)
         //super.validateModelUpdates(actionContext);
          // put you custom validation here
    }http://www.oracle.com/technology/products/jdev/collateral/papers/10g/ADFBindingPrimer/index.html#usingdataaction
    Message was edited by:
    Sasha
    Message was edited by:
    Sasha

  • Can Designer generate ADF Entity Objects, View Objects and Apps Module ?

    Hi all,
    On what way can Designer integrate with JDeveloper (+ ADF) ?
    Can Designer generate ADF Entity Objects, View Objects and Apps Module ?
    Thank you for your help,
    xtanto

    Designer itself has no direct integration with JDeveloper. However, there are three options. First of all, you can get a JDeveloper extension (download this separately) that lets you create a Connection to a Designer repository. From that Connection you can find modules that you defined in Designer and generate Entity and View objects for the tables and columns that you used in those modules, and an Application Module. It does not create JSPs or other user interface objects.
    Another option is to buy JHeadstart from Oracle. This contains a set of code generators and ADF extensions that include an ability to get information from a Designer repository. JHeadstart works fine for non-Designer users too, but was built by the same people who wrote Designer Headstart - they know the repository API intimately.
    The third option is to download Oracle Designer Extension Builder (ODEB) which was just recently made available. This is a product of a collaboration between Designer users from the Oracle Development Tools Users Group (ODTUG) and Oracle to extend the capabilities of Designer with user written tools and utilities. You could use ODEB to write your own generators for ADF Business Components. Or you could wait and see if someone else in the user community does this. I hope that you or whoever does such a generator will be willing to share it with us all.

  • Problem with using multiple Entity Objects in a view Object.

    Hi
    Thank you for reading my post
    I have create 3 Business components for 3 of my database tables and now
    I must add 3 tables in a View object so i used Jdeveloper Wizard to create the View Object.
    -I Add Entity Objects which are business components to this view (In Step 2 of the Create Vview Object wizard).
    -In step 3 that I add Attributes all my attributes are marked as Transient
    Can some one explain why it happens?
    I need one of those tables to be updateable and two other tables are not updateable.
    What should should i do to achieve this?
    I should say that tables does not have any database relation (Foreign Key I Mean).
    Thanks.

    Hi user505214
    When you created your VO, on selecting the second EO, you'll note at the bottom of the same page on the wizard/editor, checkboxes for updatable or by reference. By default reference is checked and this will make your second EO's attributes transient.
    In the JDeveloper Developer's Guide for 4GL/Forms programmers, the following sections outline the difference between updatable or by reference:
    7.5 Including Reference Entities in Join View Objects
    27.9 Creating a View Object with Multiple Updatable Entities
    Make sure to read 27.9 if updatable is what you want as it indicates you may need to add some additional code.
    Hope this helps.
    CM.

  • Error while creating new entity object.

    Hi all
    I'm using Jdev 11.1.1.3. I want to create an entity object and Jdev issues an information error saying "Either this is not a valid name or an object with that name already exists."
    I found that if the package I'm targeting for the new entity is called "com.test.model.whatever" I cannot create a EO called "Whatever".
    I can't find any reference in the fusion developer guide that constraints the entity names to be allowed.
    Is there a way to circumvent this issue or is this the way it should be?

    Sudipto and Suresh, thank you very much for your replies.
    I know that changing the package or entity name would work, but was expecting some other kind of workaround, something like giving a full qualified name on some xml or something to avoid the name clash or whatever the problem is.
    I do not like packing all the entities together as it goes against my best practice of packing things that change together on the same package. Also I don't like suffix or prefix class names as it goes against my best practice of short descriptive names.
    So well, I will have to tinker the names some more and meet you guys half way.
    I will now mark this thread as answered, thanks again.

  • Error while saving data using two entity objects (EO)

    Hi All,
    i am using two entity objects for saving the date in two different tables.
    on my page i am having two tables and two save buttons for saving the data in the respective tables.
    if i am not entering any data on the first table and putting valid data on the second table and click on the save button.
    it is going into error saying "Null Pointer Exception"..
    i am using getTransaction.commit() in my AM.
    so it is trying to save all the data in both the tables.
    i want to commit data of the respective table for which the save button is clicked.
    Waiting for ur reply

    Hi,
    i am using the following code for saving the data in the AM
    // TO SAVE THE JOB ASSIGNMENT DETAILS
    public void saveJobAssignmentDetails(String projectId)
    EmpAssignmentVOImpl empAssignVO = getEmpAssignmentVO1();
    getTransaction().commit(); // Line where i am getting the error
    rowNumberCountJobAssign = 0; // IN JOB ASSIGNMENT
    // EXECUTING THE DISPLAY FUNCTION AGAIN SO TAHT ALL SAVED FIELD ARE READONLY AS REQUIRED
    displayJobAssign(projectId);
    if(empAssignVO.getRowCount() != 0)
    throw new OAException("Job assignment details have been saved successfully. ",OAException.CONFIRMATION);
    Stack trace :
    oracle.apps.fnd.framework.OAException: oracle.jbo.DMLException: JBO-26041: Failed to post data to database during "Insert": SQL Statement "BEGIN INSERT INTO pa_job_bill_rate_overrides(START_DATE_ACTIVE,LAST_UPDATE_DATE,LAST_UPDATED_BY,CREATION_DATE,CREATED_BY,LAST_UPDATE_LOGIN,BILL_RATE_UNIT,PROJECT_ID,RECORD_VERSION_NUMBER,JOB_BILL_RATE_OVERRIDE_ID,RATE_CURRENCY_CODE) VALUES (:1,:2,:3,:4,:5,:6,:7,:8,:9,:10,:11) RETURNING JOB_BILL_RATE_OVERRIDE_ID, JOB_ID, START_DATE_ACTIVE, LAST_UPDATE_DATE, LAST_UPDATED_BY, CREATION_DATE, CREATED_BY, LAST_UPDATE_LOGIN, RATE, BILL_RATE_UNIT, PROJECT_ID, TASK_ID, END_DATE_ACTIVE, RECORD_VERSION_NUMBER, RATE_CURRENCY_CODE, DISCOUNT_PERCENTAGE, RATE_DISC_REASON_CODE INTO :12, :13, :14, :15, :16, :17, :18, :19, :20, :21, :22, :23, :24, :25, :26, :27, :28; END;".
         at oracle.apps.fnd.framework.OAException.wrapperInvocationTargetException(OAException.java:972)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:210)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:152)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:721)
         at tcsl.oracle.apps.pa.jobBillRateAndAssignment.webui.jobBillRateAndAssignmentCO.processFormRequest(jobBillRateAndAssignmentCO.java:357)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:799)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1118)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2633)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659)
         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-01400: cannot insert NULL into ("PA"."PA_JOB_BILL_RATE_OVERRIDES"."JOB_ID")
    ORA-06512: at line 1
         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.executeNonQuery(OracleStatement.java:2154)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2036)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2880)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:622)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:698)
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:371)
         at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:5108)
         at tcsl.oracle.apps.pa.jobBillRateAndAssignment.schema.server.JobBillRateEOImpl.doDML(JobBillRateEOImpl.java:124)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:4015)
         at oracle.apps.fnd.framework.server.OAEntityImpl.postChanges(OAEntityImpl.java:1676)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:2694)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2540)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1783)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:1976)
         at oracle.apps.fnd.framework.server.OADBTransactionImpl.commit(OADBTransactionImpl.java:680)
         at tcsl.oracle.apps.pa.jobBillRateAndAssignment.server.jobBillRateAndAssignmentAMImpl.saveJobAssignmentDetails(jobBillRateAndAssignmentAMImpl.java:772)
         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 oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:189)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:152)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:721)
         at tcsl.oracle.apps.pa.jobBillRateAndAssignment.webui.jobBillRateAndAssignmentCO.processFormRequest(jobBillRateAndAssignmentCO.java:357)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:799)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1118)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2633)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659)
         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-01400: cannot insert NULL into ("PA"."PA_JOB_BILL_RATE_OVERRIDES"."JOB_ID")
    ORA-06512: at line 1
         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.executeNonQuery(OracleStatement.java:2154)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2036)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2880)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:622)
         at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:698)
         at oracle.jbo.server.OracleSQLBuilderImpl.doEntityDML(OracleSQLBuilderImpl.java:371)
         at oracle.jbo.server.EntityImpl.doDML(EntityImpl.java:5108)
         at tcsl.oracle.apps.pa.jobBillRateAndAssignment.schema.server.JobBillRateEOImpl.doDML(JobBillRateEOImpl.java:124)
         at oracle.jbo.server.EntityImpl.postChanges(EntityImpl.java:4015)
         at oracle.apps.fnd.framework.server.OAEntityImpl.postChanges(OAEntityImpl.java:1676)
         at oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(DBTransactionImpl.java:2694)
         at oracle.jbo.server.DBTransactionImpl.postChanges(DBTransactionImpl.java:2540)
         at oracle.jbo.server.DBTransactionImpl.commitInternal(DBTransactionImpl.java:1783)
         at oracle.jbo.server.DBTransactionImpl.commit(DBTransactionImpl.java:1976)
         at oracle.apps.fnd.framework.server.OADBTransactionImpl.commit(OADBTransactionImpl.java:680)
         at tcsl.oracle.apps.pa.jobBillRateAndAssignment.server.jobBillRateAndAssignmentAMImpl.saveJobAssignmentDetails(jobBillRateAndAssignmentAMImpl.java:772)
         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 oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:189)
         at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:152)
         at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:721)
         at tcsl.oracle.apps.pa.jobBillRateAndAssignment.webui.jobBillRateAndAssignmentCO.processFormRequest(jobBillRateAndAssignmentCO.java:357)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:799)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processFormRequest(OAPageLayoutHelper.java:1118)
         at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processFormRequest(OAPageLayoutBean.java:1579)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processFormRequest(OAFormBean.java:395)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:995)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequestChildren(OAWebBeanHelper.java:961)
         at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:816)
         at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:363)
         at oracle.apps.fnd.framework.webui.beans.OABodyBean.processFormRequest(OABodyBean.java:363)
         at oracle.apps.fnd.framework.webui.OAPageBean.processFormRequest(OAPageBean.java:2633)
         at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1659)
         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)

  • Problem while setting new value to entity object attribute in doDML meathod

    Hi all,
    I am overriding the entity objects doDML method for generating the value of Sequence Number just before insert .
    For this puropose i am using doDML method. I am fetching the maximum value for the sequence number feild from the table by a prepared statement
    and then incrementing that value by one.
        protected void doDML(int operation, TransactionEvent e) {
            if (operation == DML_INSERT) {
                // code for getting the max+1 of sequence number before insert
                //command executes.
                try {
                    System.out.println("Inside doDML Method");
                    String sql =
                        "select nvl(max(seq_no),0)+1  from WF_LEAVE_HDR where org_unit_code = " +
                        this.getOrgUnitCode();
                    PreparedStatement pstmt =
                        getDBTransaction().createPreparedStatement(sql, 0);
                    ResultSet rs = pstmt.executeQuery();
                    rs.next();
                    Integer newSeqNo =rs.getInt(1); //(Number)rs.getString(0);
                    //this.setSeqNo(new Number(newSeqNo));
                    setAttributeInternal("SeqNo",new Number(newSeqNo));
                    System.out.println("Value of new seq no is -->>"+getSeqNo());
                } catch (Exception excpt) {
                    System.out.println("Inside catch block ");
                    excpt.printStackTrace();
            super.doDML(operation, e);
        }i am getting the value correct by using the sql statement but while i am using setAttributeInternal("SeqNo",new Number(newSeqNo));
    it is giving an error and value for new sequence no is not passed to the seq no feild of the entity object. I have tried this.setSeqNo(new Number(newSeqNo))
    but it is also not wotrking .
    Any one please help , I am using Jdeveloper 10.1.3
    Thanks all in advance.

    iloveoracle,
    Sigh... in addition to doing this in doDML (which Dimitar points out is the wrong place to do this)... you are making a huge huge mistake.
    select nvl(max(seq_no),0)+1  from WF_LEAVE_HDRWhat happens when two people do this at around the same time? You don't do any locking, so you will get two rows with the same SeqNo. This is absolutely the wrong way of doing sequence numbers. The best way of doing this would be to use real sequence numbers (an Oracle sequence) and ignore the fact that there will be gaps. If you insist on using your approach, you MUST LOCK THE ENTIRE TABLE before you try to do your little max() + 1 trick, otherwise you run the very real risk of getting duplicate SeqNos. OK, I see that you are trying to do sequences by org_unit_code, so you don't have to lock the whole table, but you do have to have some way of holding a lock. You must also write some code to be able to handle an "unable to get the lock because someone else already holds it" type of situation.
    <rant>
    I have seen so many people try to do this little max() + 1 trick. It DOES NOT, WILL NOT work until you handle locking properly. One question that I often ask when I interview database developers is about generating "gapless" sequences; unless the job is for a brand-new-with-absolutely-no-experience trainee, answering "select max() + 1" without any mention of concurrency issues would be grounds for an immediate rejection of the candidate. Seriously. Have a run over to http://asktom.oracle.com and search for "gapless" if you'd like to see a more strongly worded rant.
    </rant>
    Bottom line, just use an Oracle sequence if it's at all possible; otherwise, be prepared to write some bunches of code to deal with locking.
    John

Maybe you are looking for