Skip to Main Content

E-Business Suite

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

OAF popup saves changes in my EO when run from my local jDeveloper, but not when deployed to my dev env

RLChristensonAug 30 2024 — edited Sep 4 2024

Hello, I've authored a popup region in my page, with a Save button that invokes a save method in the AMImpl. This works fine when I run from my desktop in jDeveloper 10.1.3.5.0.3. I make changes to fields and click SAve, and I immediately see the changes in the back end database table.

I then copy project contents (webui dir, server dir) up to the dev environment, load the pages and regions into the library, and access the same page via ORacle Apps 12.2.9. I execute the exact same steps, but the changes do not save. I've tried it 2 ways, with a manual SQL update, and with the simple transaction commit (see save methods below)

Why would a simple save method in the AMImpl not work from the server? Thanks all/anyone!


public void saveBundle() { 

System.out.println("am.savingBundle"); 
try { 
getTransaction().commit(); 
System.out.println("am.savingBundle SAVED"); 

} catch (Exception e) { 
// the only constraint is a Unique index on BUNDLE_NAME 
// if we get here, must be duplicate Submittal Name 
e.printStackTrace(); 
throw new OAException("Duplicate Submittal Name detected. Enter a unique name."); 
} 
System.out.println("am.savingBundle SAVED2"); 

}
    public void manualSaveBundle() {
        Connection conn = this.getOADBTransaction().getJdbcConnection();
        String Query = " UPDATE xxmes.xxmes_dpa_bundles SET bundle_name = :2, completed_flag = :3, certifier_name = :4, reviewer_name = :5, comments = :6, book_header_id = :7 WHERE bundle_id =:1";  
        PreparedStatement stmt;
        MES_DPABundlesVORowImpl bunrow = (MES_DPABundlesVORowImpl)this.getMES_DPABundlesVO1().getCurrentRow();
        int bundleID = bunrow.getBundleId().intValue();
        int newBook = bunrow.getBookHeaderId().intValue();
        String newName = bunrow.getBundleName();
        String newStatus = bunrow.getCompletedFlag();
        String newCertifier = bunrow.getCertifierName();
        String newReviewer = bunrow.getReviewerName();
        String newComments = bunrow.getComments();
        
        try {
            stmt = conn.prepareStatement(Query);
            stmt.setInt(1, bundleID);
            stmt.setString(2, newName);
            stmt.setString(3, newStatus);
            stmt.setString(4, newCertifier);
            stmt.setString(5, newReviewer);
            stmt.setString(6, newComments);
            stmt.setInt(7, newBook);
            stmt.executeUpdate();
            conn.commit();
    
        } catch (SQLException e) {
            System.out.println("failure in manualSaveBundle"); 
            e.printStackTrace();
            throw new OAException("Exception:" + e.getMessage());
    
        }
    }
Comments
Post Details
Added on Aug 30 2024
1 comment
115 views