Data persistance in entity

Hello.
I will like to know about the persistance of an entity ejb.
Lets say that we have a value taken from a table X. The ejb proceses the
data in the table for lets say, a given event X. This information can be
changed via PL/SQL if there is an event Z generated that same instant
that the ejb is called via Web App. When the data is changed via PL/SQL
there is no replication in the ejb since these do not know what data was
changed. While the user is manipulating this ejb, he will see non-up to
date info unless the ejb is pasivated. But the most delicated part is,
if the user commits another data in the same ejb, that entire info will
be copied to the table by the entity. This means that the data written
by PL/SQL will be overwriten. By design, this field (value X) is common
and is updated by the ejb and by PL/SQL.
please help.
Ricardo Madariaga
OMEGA Computacion Ltda.
Avenida Providencia #1760 of.1303. Piso 13
Tel: +56-2-2350615 Anexo 19
Fax: +56-2-2350629
[email protected]
www.omegacl.cl

Hello
How do we set 'pessimistic locking'. Is it in the weblogic-ejb-jar.xml
as the tag 'concurrency-strategy'. The BEA docs recomend letting the
database handle it as:
<entity-descriptor>
<entity-cache>
<concurrency-strategy>Database</concurrency-strategy>
</entity-cache>
</entity-descriptor>
Or must we implement the code for a version control, following the
'version number pattern'? Is this pattern documented in
developer.java.sun.com.? I cant seem to find it.
Thank you
Bob Lee wrote:
Well, the solution depends on your transaction settings.
If you use pessimistic locking, the data will be locked by the EJB until the
EJB's tx commits. Other access to that data will be blocked.
You are describing optimistic locking, where multiple tx can update the data
concurrently. In this case you need to use the version number pattern. You
store a version number with your data. Each time you update the data, you
increment the version. When you go to update the data, you compare the
version of the data when you first queried it to the current version. If
they are different, you abort the update.
Bob
"Ricardo Madariaga" <[email protected]> wrote in message
news:[email protected]...
Hello.
I will like to know about the persistance of an entity ejb.
Lets say that we have a value taken from a table X. The ejb proceses the
data in the table for lets say, a given event X. This information can be
changed via PL/SQL if there is an event Z generated that same instant
that the ejb is called via Web App. When the data is changed via PL/SQL
there is no replication in the ejb since these do not know what data was
changed. While the user is manipulating this ejb, he will see non-up to
date info unless the ejb is pasivated. But the most delicated part is,
if the user commits another data in the same ejb, that entire info will
be copied to the table by the entity. This means that the data written
by PL/SQL will be overwriten. By design, this field (value X) is common
and is updated by the ejb and by PL/SQL.
please help.
Ricardo Madariaga
OMEGA Computacion Ltda.
Avenida Providencia #1760 of.1303. Piso 13
Tel: +56-2-2350615 Anexo 19
Fax: +56-2-2350629
[email protected]
www.omegacl.cl

Similar Messages

  • How to persist an entity with (any) Serializable Java Object as a field?

    Hello,
    I've understood, that in addition to basic and primary types, an entity bean can have basically any serializable object as its field. I just can't get it working. All I want, is just to have an entity bean with, for example, a HashMap or Properties as one of the its fields. And afterwards, when I'd query the bean again from the persistent storage, it would have the HashMap or Properties fields set just as they were while persisting the bean. So the basic functionality.
    So far, the only way I've gotten this working, is by defining the field as byte[] and then by using ObjectInput/OutputStreams and ByteArrayInput/OutputStreams I can read/write my HashMap or Properties as a byte[] and persist the entity... Not very clever, is it :)
    I've tried to annotate the field with @Lob but it eventually ends up with casting problems when fetching the data from the persistent storage, because TopLink gets a blob, a byte array from the persistent storage and doesn't know how to convert it into HashMap or Properties like I want it to.
    This was close to mine, but still didn't get it working..
    http://forum.java.sun.com/thread.jspa?threadID=749447&messageID=4287919
    ps. Working with AS PE9, MySQL and PostgreSQL..
    Best regards,
    Samuli

    Hello,
    Sorry, I'm not sure what you mean. The ID used for the entity does not need to match the actual database constraints, so you can use any mapping in the entity as the ID as long as its value will be unique. If it is not unique, you will run into problems when EclipseLink thinks the entity already exists, performing an update instead of an insert.
    Can you describe the performance problems you are having, and what type of sequencing you are using? It is possible to improve performance using batch writing and sequence pre-allocation.
    See http://wiki.eclipse.org/Optimizing_the_EclipseLink_Application_(ELUG)#How_to_Use_Batch_Writing_for_Optimization
    and http://wiki.eclipse.org/Optimizing_the_EclipseLink_Application_(ELUG)#Table_11-11 for some of the options available.
    Best Regards,
    Chris

  • How to make data persist in form?

    Hi
    I've made multiple forms for a Web site. Each form is within its own module. The problem is the data entered into a form disappears as soon as the user shifts to another form (and consequently, another module). How to make the data persist in the form even if the user shifts away to another module? I've tried using a Model to hold the data but the data didn't stay in the text fields.
    <fx:Declarations>
         <fx:Model  id="babyModel1">
              <BabyForm>
                   <CleaningProducts>{babyCleanProd.text}</CleaningProducts>
                   <BabyProducts>{babyProd.text}</BabyProducts>
              </BabyForm>
         </fx:Model>
    </fx:Declarations>
    <mx:Form id="babyQuestionnaire" x="140" y="40" >
         <mx:FormItem width="100%" label="Baby Cleaning Products1">
              <s:RichEditableText 
                   id="babyCleanProd"
                   width="200"
                   height="100"
                   backgroundColor="#ffffff"
                   paddingLeft="4" paddingRight="4" paddingTop="4" paddingBottom="4"
                   color="#222222"
                   />
         </mx:FormItem>
         <mx:FormItem width="100%" label="Baby Products1">
              <s:RichEditableText  id="babyProd"
                       width="200"
                        height="100"
                        backgroundColor="#ffffff"
                        paddingLeft="4" paddingRight="4" paddingTop="4" paddingBottom="4"
                        color="#222222"/>
             </mx:FormItem>
    </mx:Form>
    Any solutions? The data persists in the text fields if the forms are all in the same central application but then there's lots of code for each form.
    Thanks for your attention.
    Kearney

    I thought ModuleLoader could only load one Module at a time, and unloaded the current Module when called to load the next Module. This app has only one ModuleLoader, which loads various modules as different states are called.
    If the Model to hold the form data is in the shell application, how to wire each Model to each Form (assuming the forms are still in various modules)?
    Thanks.
    Kearney

  • JTable data persistance problem

    i have large number of rows to be displayed in a JTable , the user can configure the number of rows he
    wants to view , the table will have next and previous buttonns to navigate to the different pages , i have
    solved the problem by reading data from. a 2 dimensional object array according to the user choice , the
    next and the previous buttons are working , but the problem is there is no data persistance for example if
    the user deletes 2 rows from the 1st page and goes to the 2nd page , when he comes back again to the 1st
    page the deleted elements are still there. I am using an my own model which implements abstract table model.It would b gr8 if any one can send the code.Thanks in advance.

    Are you removing the rows from your Object Array?
    if so, you are rigth now, you must to use at you model
            fireTableDataChanged();When you change data from your object array.
    Hope this helps...

  • Data Persistency Query

    What is the meaning of :
    Data Persistency
    Does it mean that this data is available till it is consumed by any
    process.
    What exactly does persistency relate to.

    By the way, any "what is" question is a sure indicator that you ought to use Google.
    http://www.google.com/search?q="what+is+data+persistence"

  • How to persist local entity reference?

    I had a remote entity bean A hold a reference to a remote entity bean B's handle. Now I change them to local entity beans. But Local entity bean doesn't support Handle and I found local entity stub is not even Serializable (WebSphere5.0). How do I persist local entity bean B's reference? This is kind of non-container managed relationship. Why ejb2.0 spec doesn't support local entity Handle? How do you do non-container managed relationship without handle?

    "I had a remote entity bean A hold a reference to a remote entity bean B's handle."
    You hold a reference; as in an instance variable? If so, how did you use the handle? What did you do with the reference when the entity was stored or passivated?
    "Now I change them to local entity beans. But Local entity bean doesn't support Handle... Why ejb2.0 spec doesn't support local entity Handle? "
    Handle objects are intended to assist with holding for long-lived references to remote objects by avoiding the potential problems associated with holding a reference directly to the remote object. Since there are no concerns with respect to working remotely, Local objects do not need a Handle. Just hold reference to the Local directly, like you would any other object.
    "...and I found local entity stub is not even Serializable."
    Well of course not, it's not a remote object. One of the main points driving the use of local interfaces is to limit access to components. Hence only components within the same JVM as the Local can access it.
    "How do I persist local entity bean B's reference?"
    What do you mean by "persist"? Were you actually storing the Handle object into the database?! If so, then I see why you wanted a serializable Local Handle.

  • Deployment failed: No config data persisted for component apache

    When we are deploying the ear file we are getting the following error.
    Deployment failed: No config data persisted for component apache, transaction ID 10.236.30.86.43c315.fd76033ac1.-7ff4

    Exactly the same problem...
    Impossible de deploy a new app.
    Write down that I also can't cancel a deployment, i get the message :
    No ApplicationInfo is associated with application named: AppName

  • JPA - Cannot Persist Detached Entity (Java EE 5)

    Hi All,
    I need your advice on identify what appears to be a persisting a detached School (ManyToMany) entity but could not understand why this is occurring:
    1.     The data supplied is made up of detail between counties and surrounding schools. There are a dozen of schools on average in any county. However, there
    will be some over-lapping schools that are a long the border of adjacent counties. For instance, county 1 consists of A, B, C, D, E, F, G, H, I, J, K, L schools while county 2
    (next to each other) is made up of M, N, B, O, P, Q, R, E, S, T, U, H schools. The common ones are B, E and H and are stored as duplicate records in the
    SCHOOL table.
    2.     
    3.     Lets look at the following code snippets on my attempt to come up with a solution without success still for quite sometime:  
    4.      
    5.     @Entity 
    6.     @IdClass(CountyPK.class)  
    7.     @Table(name="COUNTY", catalog="CountyDB", schema="")  
    8.     public class County implements Serializable {  
    9.           
    10.         @Id 
    11.         @Column(name="ZIPCODE")  
    12.         private String zipcode;  
    13.      
    14.         @Id 
    15.         @Column(name="COUNTY")  
    16.         private String county;  
    17.      
    18.         @Id 
    19.         @Enumerated(EnumType.STRING)  
    20.         @Column(name="STATE")  
    21.         @ManyToMany(cascade={CascadeType.PERSIST}, fetch=FetchType.EAGER)  
    22.         @JoinTable(name="COUNTY_SCHOOL", catalog="CountyDB", schema="",  
    23.                    joinColumns={@JoinColumn(name="ZIPCODE", referencedColumnName="ZIPCODE"),  
    24.                                 @JoinColumn(name="COUNTY", referencedColumnName="COUNTY"),  
    25.                                 @JoinColumn(name="STATE", referencedColumnName="STATE")},  
    26.                    inverseJoinColumns={@JoinColumn(name="SCHOOL", referencedColumnName="ID")})  
    27.         private Set<School>; schools = new HashSet<School>();  
    28.         public Set<School> getSchools()  
    29.         {  
    30.         return schools;  
    31.         }  
    32.         public void setSchools(Set<School> hotels)  
    33.         {  
    34.         this.schools = schools;  
    35.         }  
    36.     }  
    37.      
    38.     @Entity 
    39.     @Table(name="SCHOOL", catalog="CountyDB", schema="")  
    40.     public class School implements Serializable {  
    41.      
    42.         @Id 
    43.         @GeneratedValue(strategy = GenerationType.IDENTITY)  
    44.         @Column(name="ID")  
    45.         private int id;  
    46.      
    47.         @Column(name="SCHOOL_NAME")  
    48.         private String schoolName;  
    49.      
    50.         @ManyToMany(mappedBy="schools", cascade={CascadeType.ALL}, fetch=FetchType.EAGER)  
    51.         private Set<County> counties = new HashSet<County>();  
    52.         public Set<County> getCounties()  
    53.         {  
    54.         return counties;  
    55.         }  
    56.         public void setCounties(Set<County> counties)  
    57.         {  
    58.         this.counties = counties;  
    59.         }  
    60.      
    61.     @Stateless 
    62.     public class CountyBean implements CountyRemote {  
    63.           
    64.         @PersistenceContext(unitName="CountyDB-PU") private EntityManager manager;  
    65.           
    66.         public void createCounty(County county)  
    67.         {  
    68.             manager.persist(county);  
    69.             manager.flush();
    70.         }  
    71.      
    72.         public void saveOrUpdateCounty(County county)  
    73.         {  
    74.             manager.merge(county);
    75.             manager.flush();
    76.         }  
    77.      
    78.      
    79.         public County findCounty(String zipcode, String county, State state)  
    80.         {  
    81.             CountyPK pk = new CountyPK(zipcode, county, state);  
    82.             return manager.find(County.class, pk);  
    83.         }  
    84.           
    85.         public List fetchCountiesWithRelationships()  
    86.         {  
    87.           List list = manager.createQuery("SELECT DISTINCT c FROM County c LEFT JOIN FETCH c.counties").getResultList();  
    88.           for (Object obj : list)  
    89.           {  
    90.              County county = (County)obj;  
    91.           }  
    92.           return list;  
    93.        }  
    94.      
    95.     @Stateless 
    96.     public class SchoolBean implements SchoolRemote {  
    97.           
    98.         @PersistenceContext(unitName="CountyDB-PU") private EntityManager manager;  
    99.           
    100.         public void createSchool(School school)  
    101.         {  
    102.             manager.persist(school);  
    103.         }  
    104.      
    105.         public void saveOrUpdateSchool(School school)  
    106.         {  
    107.             manager.merge(school);  
    108.         }  
    109.      
    110.         public School findSchool(int school_id)  
    111.         {  
    112.             return manager.find(School.class, school_id);  
    113.         }  
    114.      
    115.         public School findSchool(String schoolName)  
    116.         {  
    117.             School school = null;
    118.             Query query = manager.createQuery("Select s FROM School s where s.schoolName = :schoolName");
    119.             query.setParameter("schoolName", schoolName);
    120.             List list = query.getResultList();
    121.             for (Object obj : list)
    122.             {
    123.                 school = (School)obj;
    124.                 if (school.getSchoolName().matches(schoolName))
    125.                     return school;
    126.             }
    127.             return school;   
    128.         }  
    129.                 
    130.         public List fetchSchoolsWithRelationships()  
    131.         {  
    132.              List list = manager.createQuery("SELECT DISTINCT s FROM School s LEFT JOIN FETCH s.schools").getResultList();  
    133.              for (Object obj : list)  
    134.              {  
    135.                  School school = (School)obj;  
    136.              }  
    137.              return list;  
    138.         }  
    139.     }  
    140.      
    141.     public class ApplicationClientAddCounty {  
    142.      
    143.         @EJB 
    144.         private static CountyRemote remoteCountybean;  
    145.         @EJB 
    146.         private static SchoolRemote remoteSchoolbean;  
    147.      
    148.         public static void main(String[] args)
    149.         {  
    150.             BufferedReader br = new BufferedReader(new FileReader("COUNTY.XML"));   
    151.             while (countyList_iterator.hasNext())  
    152.             {  
    153.                 County county = new County();  
    154.                 county.setZipcode(((org.jdom.Element)countyList_iterator.next()).getChild("zipcode");  
    155.                 while (schoolList_iterator.hasNext())  
    156.                 {  
    157.                     String school_name = ((org.jdom.Content)schoolsList_iterator.next()).getValue();  
    158.                     if (school_name.length() != 0)  
    159.                     {  
    160.                          School school = null;  
    161.                          if (!school_name.contains("Schools:"))  
    162.                          {  
    163.                               school = remoteSchoolbean.findSchool(school_name);
    164.                               if (school == null)
    165.                               {
    166.                                   school = new School();
    167.                                   school.setSchoolName(school_name);
    168.                               }
    169.                               county.getSchools().add(school);  
    170.                           }  
    171.                      }
    172.                 }  
    173.            }  
    174.            remoteCountybean.createCounty(county);
    175.     } Below is the a simplistic set of the data available which resulted in deplicate School records being persisted:
    COUNTY
    ID     Name
    1     County 1
    2     County 2
    COUNTY_SCHOOL
    ID     COUNTY_ID     SCHOOL_ID
    1     County 2     1
    2     County 1     2
       SCHOOL
    ID     Name
    1     School A
    2     School A
    Yet I wanted only a single normalized School to be generated instead:
    COUNTY
    ID     Name
    1     County 1
    2     County 2
    COUNTY_SCHOOL
    ID     COUNTY_ID     SCHOOL_ID
    1     County 1     1
    2     County 2     1
       SCHOOL
    ID     Name
    1     School A    I am not clear on why the following behavior is taking place within JPA:
    ( i ) The ID for County 1 in COUNTY_SCHOOL is 2 instead of 1. Vice versa for County 2.
    ( ii ) More importantly, why is School A being populated twice even though the data is identical.
    There appears to be some transactional issue/delay using the container managed JTA. Another intriguing symptom is that the following exception occurred after having taken out the @GeneratedValue(strategy = GenerationType.IDENTITY) in School.java in the hope that only a single record is generated:
    *EJB5018: An exception was thrown during an ejb invocation on [CountyBean]*
    javax.ejb.TransactionRolledbackLocalException: Exception thrown from bean; nested exception is: javax.persistence.EntityExistsException:
    *Exception Description: Cannot persist detached object [domain.School@ce9fa6].*
    Class> domain.School Primary Key> [0]
    javax.persistence.EntityExistsException:
    *Exception Description: Cannot persist detached object [domain.School@ce9fa6].*
    Class> domain.School Primary Key> [0]
    at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerImpl.persist(EntityManagerImpl.java:224)
    at com.sun.enterprise.util.EntityManagerWrapper.persist(EntityManagerWrapper.java:440)
    at ejb.CountyBean.createCounty(CountyBean.java:18)
    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:597)
    oracle.toplink.essentials.exceptions.ValidationException
    *... 38 more*
    On the other hand, another database exception occurred when directly persisting County & School using remoteCountybean.createCounty(county) as opposed to sending it through a message queue with sendJMSMessageToMyQueue(county) which works:
    *02/02/2011 5:22:14 PM com.sun.enterprise.appclient.MainWithModuleSupport <init>*
    WARNING: ACC003: Application threw an exception.
    javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.RemoteException: null; nested exception is:
    javax.persistence.EntityExistsException:
    *Exception Description: Cannot persist detached object [domain.School@1fcea34].*
    Class> domain.School Primary Key> [1]
    Caused by: javax.ejb.EJBException: nested exception is: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
    java.rmi.RemoteException: null; nested exception is:
    javax.persistence.EntityExistsException:
    *Exception Description: Cannot persist detached object [domain.School@1fcea34].*
    Class> domain.School Primary Key> [1]
    at ejb._CountyRemote_Wrapper.createCounty(ejb/_CountyRemote_Wrapper.java)
    at addCounty(localImportCounty.java:296)I am running JDK1.6.0_17, GF 2.1 on XP. This is a Java EE 5 Enterprise Application.
    It would be much appreciated for some guidance in an unfamiliar territory. I have had many attempts and read up quite a number of similar threats
    But none offer concrete results.
    Thanks in advance,
    Jack

    Hi,
    A minor correction of the last statement in ApplicationClientAddCounty class below:
    141.     public class ApplicationClientAddCounty {  
    142.      
    143.         @EJB 
    144.         private static CountyRemote remoteCountybean;  
    145.         @EJB 
    146.         private static SchoolRemote remoteSchoolbean;  
    147.      
    148.         public static void main(String[] args)
    149.         {  
    150.             BufferedReader br = new BufferedReader(new FileReader("COUNTY.XML"));   
    151.             while (countyList_iterator.hasNext())  
    152.             {  
    153.                 County county = new County();  
    154.                 county.setZipcode(((org.jdom.Element)countyList_iterator.next()).getChild("zipcode");  
    155.                 while (schoolList_iterator.hasNext())  
    156.                 {  
    157.                     String school_name = ((org.jdom.Content)schoolsList_iterator.next()).getValue();  
    158.                     if (school_name.length() != 0)  
    159.                     {  
    160.                          School school = null;  
    161.                          if (!school_name.contains("Schools:"))  
    162.                          {  
    163.                               school = remoteSchoolbean.findSchool(school_name);
    164.                               if (school == null)
    165.                               {
    166.                                   school = new School();
    167.                                   school.setSchoolName(school_name);
    168.                               }
    169.                               county.getSchools().add(school);  
    170.                           }  
    171.                      }
    172.                 }
    173.                remoteCountybean.createCounty(county);
    173.            }  
    174.     } Thanks,
    Jack

  • Persistency in entity service

    Hi all,
    am facing a problem with entity servie persistence.
    I have created an entity service and am accessing this service in a webdynpro component. I have created all the UI elements(view) i need.I also bound these elements to the context.I also added parameters to the"CREATE" method which is built in method of entity service.But  If i want to store the data in local persistency,the "CREATE "method is not allowing to do so....Is there any way to access that "CREATE" method in my application...plz help me out.....
    points will be awarded....................

    Hi,
    you have to publish your busniss object as webservice.
    Than create a Webservice Destination in your NWA.
    Now you should import the Webservice as model in your WebDynpro Project.
    So you can use your entity service in your WebDynpro Apllication.
    regards,
    robin

  • Issues in persisting dynamic entity and view objects using MDS

    Hi All,
    I'm trying to create dynamic entity and view objects per user session and to persist these objects throughout the session, I'm trying to use MDS configurations(either file or Database) in adf-config.xml.
    I'm facing following two errors while trying to run the app module:
    1. MDS error (MetadataNotFoundException): MDS-00013: no metadata found for metadata object "/model/DynamicEntityGenModuleOperations.xml"
    2. oracle.mds.exception.ReadOnlyStoreException: MDS-01273: The operation on the resource /sessiondef/dynamic/DynamicDeptEntityDef.xml failed because source metadata store mapped to the namespace / DEFAULT is read only.
    I've gone through the following links which talks about the cause of the issue, but still can't figure out the issue in the code or the config file. Please help if, someone has faced a similar issue.
    [http://docs.oracle.com/cd/E28271_01/doc.1111/e25450/mds_trouble.htm#BABIAGBG |http://docs.oracle.com/cd/E28271_01/doc.1111/e25450/mds_trouble.htm#BABIAGBG ]
    [http://docs.oracle.com/cd/E16162_01/core.1112/e22506/chapter_mds_messages.htm|http://docs.oracle.com/cd/E16162_01/core.1112/e22506/chapter_mds_messages.htm]
    Attached is the code for dynamic entity/view object generation and corresponding adf-config.xml used.
    ///////////App Module Implementation Class/////////////////////////
    public class DynamicEntityGenModuleImpl extends ApplicationModuleImpl implements DynamicEntityGenModule {
    private static final String DYNAMIC_DETP_VO_INSTANCE = "DynamicDeptVO";
    * This is the default constructor (do not remove).
    public DynamicEntityGenModuleImpl() {
    public ViewObjectImpl getDepartmentsView1() {
    return (ViewObjectImpl) findViewObject("DynamicDeptVO");
    public void buildDynamicDeptComp() {
    ViewObject internalDynamicVO = findViewObject(DYNAMIC_DETP_VO_INSTANCE);
    if (internalDynamicVO != null) {
    System.out.println("OK VO exists, return Defn- " + internalDynamicVO.getDefFullName());
    return;
    EntityDefImpl deptEntDef = buildDeptEntitySessionDef();
    ViewDefImpl viewDef = buildDeptViewSessionDef(deptEntDef);
    addViewToPdefApplicationModule(viewDef);
    private EntityDefImpl buildDeptEntitySessionDef() {
    try {
    EntityDefImpl entDef = new EntityDefImpl(oracle.jbo.server.EntityDefImpl.DEF_SCOPE_SESSION, "DynamicDeptEntityDef");
    entDef.setFullName(entDef.getBasePackage() + ".dynamic." + entDef.getName());
    entDef.setName(entDef.getName());
    System.out.println("Application Module Path name: " + getDefFullName());
    System.out.println("EntDef :" + entDef.getFileName() + " : " + entDef.getBasePackage() + ".dynamic." + entDef.getName());
    entDef.setAliasName(entDef.getName());
    entDef.setSource("DEPT");
    entDef.setSourceType("table");
    entDef.addAttribute("ID", "ID", Integer.class, true, false, true);
    entDef.addAttribute("Name", "NAME", String.class, false, false, true);
    entDef.addAttribute("Location", "LOCATION", Integer.class, false, false, true);
    entDef.resolveDefObject();
    entDef.registerSessionDefObject();
    entDef.writeXMLContents();
    entDef.saveXMLContents();
    return entDef;
    } catch (Exception ex) {
    System.out.println(ex.getLocalizedMessage());
    return null;
    private ViewDefImpl buildDeptViewSessionDef(EntityDefImpl entityDef) {
    try {
    ViewDefImpl viewDef = new oracle.jbo.server.ViewDefImpl(oracle.jbo.server.ViewDefImpl.DEF_SCOPE_SESSION, "DynamicDeptViewDef");
    viewDef.setFullName(viewDef.getBasePackage() + ".dynamic." + viewDef.getName());
    System.out.println("ViewDef :" + viewDef.getFileName());
    viewDef.setUseGlueCode(false);
    viewDef.setIterMode(RowIterator.ITER_MODE_LAST_PAGE_FULL);
    viewDef.setBindingStyle(SQLBuilder.BINDING_STYLE_ORACLE_NAME);
    viewDef.setSelectClauseFlags(ViewDefImpl.CLAUSE_GENERATE_RT);
    viewDef.setFromClauseFlags(ViewDefImpl.CLAUSE_GENERATE_RT);
    viewDef.addEntityUsage("DynamicDeptUsage", entityDef.getFullName(), false, false);
    viewDef.addAllEntityAttributes("DynamicDeptUsage");
    viewDef.resolveDefObject();
    viewDef.registerSessionDefObject();
    viewDef.writeXMLContents();
    viewDef.saveXMLContents();
    return viewDef;
    } catch (Exception ex) {
    System.out.println(ex.getLocalizedMessage());
    return null;
    private void addViewToPdefApplicationModule(ViewDefImpl viewDef) {
    oracle.jbo.server.PDefApplicationModule pDefAM = oracle.jbo.server.PDefApplicationModule.findDefObject(getDefFullName());
    if (pDefAM == null) {
    pDefAM = new oracle.jbo.server.PDefApplicationModule();
    pDefAM.setFullName(getDefFullName());
    pDefAM.setEditable(true);
    pDefAM.createViewObject(DYNAMIC_DETP_VO_INSTANCE, viewDef.getFullName());
    pDefAM.applyPersonalization(this);
    pDefAM.writeXMLContents();
    pDefAM.saveXMLContents();
    ////////adf-config.xml//////////////////////
    <?xml version="1.0" encoding="windows-1252" ?>
    <adf-config xmlns="http://xmlns.oracle.com/adf/config" xmlns:config="http://xmlns.oracle.com/bc4j/configuration" xmlns:adf="http://xmlns.oracle.com/adf/config/properties"
    xmlns:sec="http://xmlns.oracle.com/adf/security/config">
    <adf-adfm-config xmlns="http://xmlns.oracle.com/adfm/config">
    <defaults useBindVarsForViewCriteriaLiterals="true"/>
    <startup>
    <amconfig-overrides>
    <config:Database jbo.locking.mode="optimistic"/>
    </amconfig-overrides>
    </startup>
    </adf-adfm-config>
    <adf:adf-properties-child xmlns="http://xmlns.oracle.com/adf/config/properties">
    <adf-property name="adfAppUID" value="TestDynamicEC-8827"/>
    </adf:adf-properties-child>
    <sec:adf-security-child xmlns="http://xmlns.oracle.com/adf/security/config">
    <CredentialStoreContext credentialStoreClass="oracle.adf.share.security.providers.jps.CSFCredentialStore" credentialStoreLocation="../../src/META-INF/jps-config.xml"/>
    </sec:adf-security-child>
    <persistence-config>
    <metadata-namespaces>
    <namespace metadata-store-usage="mdsRepos" path="/sessiondef/"/>
    <namespace path="/model/" metadata-store-usage="mdsRepos"/>
    </metadata-namespaces>
    <metadata-store-usages>
    <metadata-store-usage default-cust-store="true" deploy-target="true" id="mdsRepos">
    <metadata-store class-name="oracle.mds.persistence.stores.file.FileMetadataStore">
    <property name="metadata-path" value="/tmp"/>
    <!-- <metadata-store class-name="oracle.mds.persistence.stores.db.DBMetadataStore">
    <property name="jndi-datasource" value="jdbc/TestDynamicEC"/>
    <property name="repository-name" value="TestDynamicEC"/>
    <property name="jdbc-userid" value="adfmay28"/>
    <property name="jdbc-password" value="adfmay28"/>
    <property name="jdbc-url" value="jdbc:oracle:thin:@localhost:1521:XE"/>-->
    </metadata-store>
    </metadata-store-usage>
    </metadata-store-usages>
    </persistence-config>
    </adf-config>
    //////////////////////////////////////////////////////////////////////////////////////////////////////////

    Hi Frank,
    I m trying to save entity and view object xml by calling writeXMLContents() and saveXMLContents() so that these objects can be retrieved using the xmls later on.
    These methods internally use MDS configuration in adf-config.xml, which is creating the issue.
    Please share your thoughts on resolving this or if, there is any other way of creating dynamic entity/view objects for db tables created at runtime.
    Nik

  • 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)

  • How to Insert the System Date in the entity object

    Hello,
    I have the problem - in entity object I have one attribute as 'Created_Date' in the <entity>Impl.java,
    to this attribute I want to assign the value as a System Date. Could someone please let me know how to do this?
    Thanks

    Hint for all who are trying another solution. You might think it's easier to assign a SystemDate using this method:row.setDate(new Timestamp(System.currentTimeMillis())); But unfortunately this solution has a real gotcha! Doing this you are writing an Attribute with a precision of milliseconds. Unfortunately the SQL-Date type can hold only full seconds. So this solution sometimes leads to the Problem that BC4J complains that "someon else has changed the row" (in reality the database has simply stripped off the seconds).
    Even if you are trying to convert the Timestamp to an oracle.jbo.domain.Date like this Date myDate = new Timestamp(System.currentTimeMillis()));
    row.setDate(myDate); you will not be able to solve the problem. 'myDate' still holds the milliseconds, it only doesn't display them. You might still discover that BC4J complains for modified rows.
    So the solution given by Faraz is definitively the best solution, even if it looks complicated, as it strips off the milliseconds.

  • How to Enter the existing data  in the entity beans?

    hello
    my problem is as follows--
    i am creating a CMP entity bean.in these beans client create the data instances using create() function.
    now a entity bean will be created for the newly created data and it's EJBObject will also be formed.
    now we will be able to perform finder methods over them.
    remember these data has been newly created in the database.
    but now if i want to perform the finder methods on the
    existing data in the database( i don't need to use create() fn as i am not "creating" the data.). how will i perform the query over the existing data.
    basically i have to make a CMP bean to extract the data corresponding to a particular condition , from the database table. i don't want to create the data in the database but just find out what data satisfies my condition.
    thanking you
    Prashant

    All I say here is based on limited knowledge on 1.1 ejb specification. There could be improvements on 2.0 spec. 1.1 specification does not formaly provide how the finders should work for container managed beans. It leaves it at the hand of bean providers. Currently bean providers describes the finers in a description of the Entity Bean. Refer to documentation accompanied with application server you are using.
    I attach the famous bank account example in weblogic server.
    <finder-list>
    <finder>
    <method-name>findBigAccounts</method-name>
    <method-params>
    <method-param>double</method-param>
    </method-params>
    <finder-query><![CDATA[(> balance $0)]]></finder-query>
    </finder>
    </finder-list>
    Method definition in Home inteface is
    public Enumeration findBigAccounts(double balanceGreaterThan)
    throws FinderException, RemoteException;

  • Datasocket Server data persists

    If I write to the datasocket server, the data that was written will persist until it is overwritten. This allows it to be read my mulitple readers I guess. In my situation, however, I need to have the data on the server "erased" after it is read one time. Is there a server manager setting that will allow this?

    Hi,
    I think that Data Sockets are not that smart. They work as a global variable; what you write them, they stay until the Data Socket server is shutdown. What I did once was making the reader read the value and overwriting with a 0 value which would be the signal that there's no new value to be read. Another option is the writer to add a prefix to the real data (a 1 for instance) so the writer writes "1 + the data" and the reader reads it and writes a zero instead. The reader knows that if the string starts with 1, it has sense, filters it and uses the data. If it starts with zero, there's no new value to be read.
    Makes any sense?
    Marce

  • WCF Data Service from Entity Framework 5 in SharePoint 2013

    not sure which forum is best, so im going to throw it in here.
    I am working on a proof of concept. I want to create a WCF Data Service within sharepoint 2013. not only do i want to do that, i want to use the Entity Framework 5 to expose the data via OData. Now, I have crawled the internet and seen various examples of
    how to create wcf data services and wcf services in sharepoint 2010/2013. and have tried to apply those as needed to create this POC. So.. what I have done so far. 
    MonitoringData.cs
    [BasicHttpBindingServiceMetadataExchangeEndpoint]
    [AspNetCompatibilityRequirements(RequirementsMode = AspNetCompatibilityRequirementsMode.Required)]
    [System.Runtime.InteropServices.Guid("0185abf6-e8b8-42e2-9965-6bb644338077")]
    public class MonitoringData : DataService<MonitoringServiceEntities>
    // This method is called only once to initialize service-wide policies.
    public static void InitializeService(DataServiceConfiguration config)
    // TODO: set rules to indicate which entity sets and service operations are visible, updatable, etc.
    // Examples:
    config.SetEntitySetAccessRule("*", EntitySetRights.AllWrite);
    config.SetServiceOperationAccessRule("*", ServiceOperationRights.All);
    config.DataServiceBehavior.MaxProtocolVersion = DataServiceProtocolVersion.V3;
    MonitoringData.svc:
    <%@ServiceHost Language="C#" Debug="true"
    Service="$SharePoint.Type.0185abf6-e8b8-42e2-9965-6bb644338077.AssemblyQualifiedName$"
    Factory="Microsoft.SharePoint.Client.Services.MultipleBaseAddressDataServiceHostFactory, Microsoft.SharePoint.Client.ServerRuntime, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
    upon deployment, this error when hitting the https://server/_vti_bin/poc/monitoringdata.svc/$metadata
    "The type 'xxxxxxxx', provided as the Service attribute value in the ServiceHost directive, or provided in the configuration element system.serviceModel/serviceHostingEnvironment/serviceActivations could
    not be found."
    Breaking out the google-fu, i found that adding the dll to the <compilation> section was needed for the web.config. so i did that. and now i just get a blank screen with no errors.
    so i crack open fiddler. i see the following 
    200 http
    tunnel to
    server:443 0
    401 https
    server /_vti_bin/poc/monitoringdata.svc/$metadata
    16
    401
    https server
    /_vti_bin/poc/monitoringdata.svc/$metadata
    0
    404
    https server
    /_vti_bin/poc/monitoringdata.svc/$metadata
    0
    best i can see is that im either not authorized, and its returning null (which shouldnt be the case) or something is just busted.
    The goal is to use ntml auth and https to connect to this service. any ideas?

    One thing I found was that it's never worth the trouble to place the WCF service in a web site running SharePoint, it's better to place it in a dedicated web site, as described in this article:
    http://sharepointdragons.com/2011/10/07/parallel-programming-in-sharepoint-2010-the-back-to-the-future-pattern/
    It's usually too much work to get the web.config settings right because of the settings it inherits from its parents.
    Kind regards,
    Margriet Bruggeman
    Lois & Clark IT Services
    web site: http://www.loisandclark.eu
    blog: http://www.sharepointdragons.com
    I'll say that it is one solution to move the WCF Service outside of sharepoint. but my "1000 mile" requirements makes this a necessity. 
    To broaden the scope of what I am doing, I have a custom SharePoint Service Application. this custom application has a proxy that used a restful interface. Now, with all the methods i will have to write (over 100, x3 for all of the "proxy to a proxy" scenarios)
    I wanted to explore the idea of using odata. so i can use the various clients to write their own queries instead of me writing them all and exposing them. especially since its all linq queries to a database underneath. I feel that I am missing some specific
    component to make this work, and its surely due to my incomplete knowledge of WCF or EF.

Maybe you are looking for

  • Aging report logic

    Hi, There is an requirement where i need to generate report on aging.. ie.. amount unpaid by the customer to be identified on different aging 0-15 days 16-30 days 31-45 days 56-90 days so the output of the report show be like above on different again

  • Problem updating to Mavericks.  "To update this application sign in to the account you used to purchase it."

    I attempted to update to Mavericks, but my MacBook Pro froze for more than an hour after the download.  I restarted the computer, and now when I try to update, I get the message:  "You have updates for other accounts.  To update this application, sig

  • Shipping tab not appearing in PO

    Dear Sir, I hv made all the relevend configuration and vendor creation for PO but still shipping tab not appearing in po. I dont know wht step i hv missed out, please advise what should i do. Looking forward for your quick response on th same. Regard

  • Streaming live videos on flex mobile

    Hi I have a flex mobile application targeting the mobile tablets and I was wondering if you guys know of any tutorial about putting live feed videos on flex, I have this code that I'm using on my flex 3 to target mac and pc that uses on adobe air, th

  • Picture doesn't open in Elements

    my student is trying to send picture to 'edit with PS Elements', but the picture doesn't automatically open in Elements as it does on my computer.  Thoughts?? Thanks, Karen