What would you do to execute the procedure successfully?

There is a Java class file in your system and you publish it using the following command:
CREATE OR REPLACE PROCEDURE ccformat
(x IN OUT VARCHAR2)
AS LANGUAGE JAVA
NAME ‘FormatCreditCardNo.formatCard(java.lang.String[])’;
However, you receive the following error when executing the CCFORMAT procedure:
ERROR at line 1:
ORA-29540: class FormatCreditCardNo does not exist
ORA-06512: at “SH.CCFORMAT”, line 1
ORA-06512: at line 1
What would you do to execute the procedure successfully?

There is a Java class file in your system and you publish it using the following command:
CREATE OR REPLACE PROCEDURE ccformat
(x IN OUT VARCHAR2)
AS LANGUAGE JAVA
NAME ‘FormatCreditCardNo.formatCard(java.lang.String[])’;
However, you receive the following error when executing the CCFORMAT procedure:
ERROR at line 1:
ORA-29540: class FormatCreditCardNo does not exist
ORA-06512: at “SH.CCFORMAT”, line 1
ORA-06512: at line 1
What would you do to execute the procedure successfully?

A.
Change the listener configuration.

B.
Create a directory object and link it to the Java class file.

C.
Rebuild the Java class file when the database instance is running.

D.
Use the loadjava utility to load the Java class file into the database.



Leave a Reply 3

Your email address will not be published. Required fields are marked *


ja

ja

http://docs.oracle.com/database/121/JJDEV/chfive.htm#JJDEV13249

To call a Java stored procedure, you must publish it through a call specification.

Before you can call Java stored procedures, you must load them into Oracle Database instance and publish them to SQL. Loading and publishing are separate tasks. Many Java classes, which are referenced only by other Java classes, are never published.

To load Java stored procedures automatically, you can use the loadjava tool. It loads Java source, class, and resource files into a system-generated database table, and then uses the SQL CREATE JAVA {SOURCE | CLASS | RESOURCE} statement to load the Java files into Oracle Database instance. You can upload Java files from file systems, popular Java IDEs, intranets, or the Internet.

The following steps are involved in creating, loading, and calling Java stored procedures:

Step 1: Create or Reuse the Java Classes
Step 2: Load and Resolve the Java Classes
Step 3: Publish the Java Classes
Step 4: Call the Stored Procedures