Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8689799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:44:43+00:00 2026-06-12T23:44:43+00:00

I’m now trying to learn Oracle ADF and I’m getting a NullPointerException while running

  • 0

I’m now trying to learn Oracle ADF and I’m getting a NullPointerException while running the following code on a Java bean.
Can you help me figure out what I’m doing wrong please? This is being invoked from a button on a JSPX page.

public String cb1_action() {
    try{
        BindingContext bindingctx = BindingContext.getCurrent();
        BindingContainer bindings = bindingctx.getCurrentBindingsEntry();
        DCBindingContainer bindingsImpl = (DCBindingContainer)bindings;
        DCIteratorBinding iter = bindingsImpl.findIteratorBinding("ViewObj1Iterator");


        Row row = iter.getCurrentRow();

        row.setAttribute("Id", 123);
        row.setAttribute("Nome", "Pedro Teste");

    }
    catch(Exception e) {
        System.out.println("Excepcao em: ");
        e.printStackTrace();
    }

    return null;
}

According to the Stack trace, the error occurs on the first row.setAttribute() line.
Also, I’m using the latest version of JDeveloper with the integrated WebLogic server.

Best regards,

Pedro

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:44:44+00:00Added an answer on June 12, 2026 at 11:44 pm

    Ok, so here’s how I figured out how to get around this:

    First, I asked jDeveloper to generate a class for the Application Module.
    In that class, I added the following methods:

    public void testEntityObject()
    {
        System.out.println("Let's try our Entity Object...");
    
        try
        {
            EntityDefImpl entity = TesteEOImpl.getDefinitionObject();
            TesteEOImpl ti = (TesteEOImpl)entity.createInstance2(getDBTransaction(), null);
            ti.setId(new BigDecimal(123));
            ti.setNome("Entity Object test...");
    
            getDBTransaction().commit();
    
            System.out.println("Looks good :-)");
        }
        catch(Exception e) 
        {
            System.out.println("It seems something went wrong :-(");
            e.printStackTrace();
        }
    }
    
    public void testViewObject() {
        System.out.println("Let's try our View Object...");
    
                ViewObjectImpl vo = this.getTeste1();
    
            try{
                Row row = vo.createRow();
                row.setAttribute("Id", 234);
                row.setAttribute("Nome", "VO test");
                vo.insertRow(row);
                getDBTransaction().commit();
                System.out.println("Looks good :-)")
            }
            catch(Exception e) {
                System.out.println("It seems something went wrong :-(");
                e.printStackTrace();
            }
    
        }
    

    These methods are being called by a managed bean that is connected to two buttons on the page. This managed bean has the following methods. I’ll post just one of them as only the method names change:

    public String cb1_action() {
    
        try{
        FacesContext fctx = FacesContext.getCurrentInstance(); 
        BindingContext bindingContext = BindingContext.getCurrent();
        DCDataControl dc = bindingContext.findDataControl("AppModuleAMDataControl");
        AppModuleAMImpl am = (AppModuleAMImpl)dc.getDataProvider();
    
    
        am.criarTesteComEntityObject();
        }
        catch(Exception e) {
            e.printStackTrace();
        }
    
        return null;
    }
    

    I know this is not rocket science or anything but it took a while for me to get there…
    Basically, your answers helped me a lot to go and investigate what was happening. The cause? Poor design! ADF is supposed to be organized…
    Thank you everyone! 😀

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
this is what i have right now Drawing an RSS feed into the php,
I am trying to render a haml file in a javascript response like so:
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have a French site that I want to parse, but am running into
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.