nerdexam
Oracle

1Z0-860 · Question #289

The execution of the find method in the following code throws an exception: 11. em.find(Customer.class, custld); 12. //Where em is a reference to a extended scoped entity manager. Which scenario can…

The correct answer is D. The data type of custld is NOT a valid type for the Customer entity primary key. See the full explanation below for the reasoning.

Question

The execution of the find method in the following code throws an exception: 11. em.find(Customer.class, custld); 12. //Where em is a reference to a extended scoped entity manager. Which scenario can cause the exception?

Exhibit

1Z0-860 question #289 exhibit

Options

  • AThe find method was called without a transaction.
  • BThe entity corresponding to the requested primary key has been removed.
  • CThe entity corresponding to the requested primary key has been detached.
  • DThe data type of custld is NOT a valid type for the Customer entity primary key.

How the community answered

(28 responses)
  • A
    7% (2)
  • B
    14% (4)
  • C
    4% (1)
  • D
    75% (21)

Community Discussion

No community discussion yet for this question.

Full 1Z0-860 Practice