Skip to Main Content

Java Development Tools

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!

Create new record using EJB - Error message "getClientId should not be called while the view is bein

Eddie PhanOct 27 2016 — edited Nov 10 2016

Hi All,

I've have a client who has insisted using JPA and EJB's to persist data to the database instead of using the in built View/Entity Objects. Which is not a big deal, just a little more cumbersome.

Any who, the issue i am having is that i get the following error:

<org.apache.myfaces.trinidad.component.UIXComponentBase> <UIXComponentBase> <getClientId> <getClientId should not be called while the view is being constructed. Component ID: j_id9>

<oracle.adf.view> <Utils> <buildFacesMessage> <ADF: Adding the following JSF error message: null>

java.lang.NullPointerException

- I've created the Entity Classes using the "Entities from Table" wizard. This entity class seems to have been generated ok.

- I've then created the Session beans based of the Entity class that i just created above.

- From the session bean i've created a data control.

- i created a taskflow which uses fragments and created a new JSF page.

- i've then dragged and dropped the datacontrol onto the page fragement as a ADF Table, no issues and the table is populated with data ok

- i then dragged and dropped the Create operation binding from the data control to the page as an ADF buttonĀ 

- once the application is deployed, the issue arises when i click on the button and the error occurs

Using the Shay's youtube clip (https://www.youtube.com/watch?v=VyPOhmWD5Y0 ) at 1:08 he drags and drops the button onto the page - however, when i do the same, it does not and the error is generated.

The strange is when i click on the "Create" button again, it works... what??

From searching on the OTN forum, it seems this is dating back to JDev 11g.

i can confirm there is no component ID named j_id9

i can confirm that i am NOT using any declarative components

i can confirm that my application has nothing to do with clients

Anyone able to help out?

This post has been answered by Eddie Phan on Nov 10 2016
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 8 2016
Added on Oct 27 2016
6 comments
1,512 views