I want to call a Java method from a trigger. 1. I have written a trigger upon insertion of a table; it will call...
By submitting your email address, you agree to receive emails regarding relevant topic offers from TechTarget and its partners. You can withdraw your consent at any time. Contact TechTarget at 275 Grove Street, Newton, MA.
a stored procedure of Oracle. 2. I have written a stored procedure in Oracle which will call the Java method. But, it is giving the error that the class file does not exist. What do I have to do?
Can you run your Java stored procedure manually from SQL*Plus? I'd start debugging the problem there. If the Java stored proc can be run manually, then it is most likely a permissions problem. The owner of the trigger must be granted EXECUTE permissions to this Java stored proc directly, not through a role. Triggers and other stored procs cannot see permissions that are granted through a role.
For More Information
- Dozens more answers to tough Oracle questions from Brian Peasland are available.
- The Best Oracle Web Links: tips, tutorials, scripts, and more.
- Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
- Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
- Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.
Dig Deeper on Oracle database design and architecture
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.