Sitemap

Amicuk Programming Answers

Calling EJB from Java Stored Procedures

2015-10-11   Views:7

Advertisement

Hi, I am trying to call an Enterprise Java Bean from stored procedure. This stored procedure calls a java program. As long as it is a simple java program it works fine and loadjava.exe does not give any problem (neither compile-time nor run-time). It

Hi,
I am trying to call an Enterprise Java Bean from stored procedure. This stored procedure calls a java program. As long as it is a simple java program it works fine and loadjava.exe does not give any problem (neither compile-time nor run-time).
It is not working when I am trying to call EJB from it. It is giving compile-time error.
If anybody has implemented the same please suggest how to go forward.
thanks in advance,
Shashank Agarwal

The replay answer
Advertisement
I tried the same thing without any luck. I assume you are using OC4J for your EJB ...
The compiling issue may be because you don't have the classes in your EJB client jar loaded into the database. Once those classes are loaded, you should loadjava without any problem.
However, you won't be able to call the EJB server because the EJB client (your Java code in the DB) will need the OC4J environment (oc4j.jar). I have tried to load oc4j.jar into the DB as well, and that was a big mess and nothing worked. My DB is 8.1.7, maybe the new 9i have OC4J libs bundled?!?
I looked around and only found 2 alternatives:
1. Write a JSP page that acts like an EJB client, then use URLConnection in your DB java code to send params to the JSP for it to invlode the EJB
2. Replace the JSP with RMI code, and use RMI instead of URLConnection in your DB code to invloke the EJB client.
If you find any other solution, please share it here.
Good luck!
Hi,
I am trying to call an Enterprise Java Bean from stored procedure. This stored procedure calls a java program. As long as it is a simple java program it works fine and loadjava.exe does not give any problem (neither compile-time nor run-time).
It is not working when I am trying to call EJB from it. It is giving compile-time error.
If anybody has implemented the same please suggest how to go forward.
thanks in advance,
Shashank Agarwal

Go to See the other 2 answers

Calling EJB from Java Stored Procedures

Category:DefaultRelease time:2015-10-11Views:130

Hi, I am trying to call an Enterprise Java Bean from stored procedure. This stored procedure calls a java program. As long as it is a simple java program it works fine and loadjava.exe does not give any problem (neither compile-time nor run-time). It[More]

EJB calling Java Stored Procedure / Problem sending mail

Category:DefaultRelease time:2015-10-11Views:130

I have a test code very similar to the sample - actually copied it from there. When i want to send a mail from my 9iR2 database, i get the following exception: javax.mail.NoSuchProviderException: No provider for Address type: rfc822 at javax.mail.Ses[More]

How to call EJB deployed on OC4J from java stored procedure?

Category:DefaultRelease time:-0001-11-30Views:130

Hello, I'd like to call EJB from java stored procedure. My example works fine from command line, but the problem seems to be with deployment of this code into database. Especialy I'm wondering how to reference jars like oc4jclient.jar, ejb.jar, ... f[More]

Calling an EJB deployed in OC4J from a Java Stored Procedure

Category:DefaultRelease time:-0001-11-30Views:130

Hi all, Well, I've been trying to figure this out for a bit now and haven't come up with a solution. I have a Java Stored Procedure in a 9i database and would like to call an EJB deployed in the OC4J Container but DO NOT want to load the various Orio[More]

Java Stored Procedure calling HTTP Servlet in Weblogic

Category:DefaultRelease time:2015-10-11Views:130

I am currently working on an e-commerce application for a brick-n-mortar electronics store. The store currently has an Oracle database that contains all of the products the store sells. The e-commerce site will have a separate Oracle database. Both d[More]

Parameter length limition passing to java stored procedure! help

Category:DefaultRelease time:-0001-11-30Views:130

hi: i am working with java stored procedure to do some resource consuming work. i have to pass a long string (varch2) or bytes(log raw) which is larger than 32k which is the limitation set by oracle. is there a walk around? another question: i have t[More]

Weblogic 6.1 & Oracle Java Stored Procedures

Category:DefaultRelease time:-0001-11-30Views:130

Hi all I need to access a EJB deployed into Weblogic 6.1 (It's a mail sender EJB) when an event occurs in a Oracle 8.1.7 DataBase (when a table were updated). I think the only way to do it is firing a trigger, this trigger uses a Java Stored Procedur[More]

Error while deploying a Java Stored Procedure using JDeveloper

Category:DefaultRelease time:2015-10-11Views:130

Hi, I was going thru the Oracle By Example article: "Developing SQL and PL/SQL with JDeveloper". (http://www.oracle.com/technology/obe/obe9051jdev/ide1012/plsqlobe/obeplsql.htm) One of the items in this article is - "Creating and Deploying[More]

Error while executing java stored procedure from a pl/sql procedure

Category:DefaultRelease time:2015-10-11Views:130

We have a requirement where we need to execute JAVA code stored in an Oracle database (Java Stored Procedure). This code uses some JAR files which we have already loaded without any errors in the database. The class file was also loaded in the databa[More]

Unable to access Custom UDTs returned from a Java Stored Procedure

Category:DefaultRelease time:2015-10-11Views:130

Hi, I have a UDT in the DB :- create type contactrecord as object ( CN_ID NUMBER(8), CN_TITLE VARCHAR2(40), CN_FIRST_NAME VARCHAR2(25) and this is the corresponding java class ContactDetails.java that maps to this UDT, that I loaded in the Aurora VM.[More]

ORA-04030: out of process memory when using Java Stored Procedures

Category:DefaultRelease time:2015-10-11Views:130

Hello, I have a problem using Java Stored Procedures in Oracle 10g. My Java application performs http posts to a webservice and the response is parsed in order to populate some DB tables. There is a scheduled job which calls the Java Stored Procedure[More]

Hot
Hi all, we want to improve our reporting activities, we have 3 production and relational oracle databases and we want to elaborate 1 database as reporting database with historized and aggregated data responding to our reporting needs. The database we [More]
I have been running firefox now for about 4 years and love it. Recently I tried signing on and it just runs a blank page. I uninstalled it and re installed it to no avail. I have it on my allow list for my fire wall , and have tried all the fixes tha [More]
Hi everyone, I am new to Swing and facing an issue which might appear simple to you people. I have a Login Screen. When user supply credentials and press the login button, the next page is displayed which has a logout button. If user clicks this logo [More]
I have some jsf code like this: <af:commandLink text="#{row.name}" action="detail"> and I want to change the commandLink's action dynamic,so I write such code: CoreCommandLink ccl=new CoreCommandLink(); but I can't write ccl.setA [More]
I'm still using PSE 7.0. Secunia PSI told me, that the .exe file is unsecure and I should apply the patch mentioned above. I did so and afterwards the system told me the program is uptodate. So did PSE 7.0 when I looked for updates. But still Secunia [More]
Since upgrading to Mavericks I am no longer able to drag/move application windows to adjacent desktops. The only way to do it now it to move applications around in Mission Control which feels very cumbersome and un-intuative. Is this a "feature" [More]
Hi all, the result is a very large it will take more than one jsp page in this senario how we will display the result in more than one jsp page. Thanks in Advance.The magic word is "paging". Look around using this keyword. Basically it's all abo [More]
Hi, When i am enterying vendor invoice and customer invoice then i am getting following error. Item category 04000 not allowed in accounting transaction 0200/0001 Message no. GLT2001 Diagnosis The online document splitting is active in your system. H [More]
why do we use ejbCreate() method? what does it returns?People think its easier to get answers handed tothem instead of looking...I do my best to disabuse them of that notion.I've given up on that idea, too much hard work. Instead I've just written of [More]
when is the next update for iphone carrier setting?I cant change my carrier to 2g!!!There is only 3g or LTE available for me.Carrier Settings are dependent entirely on your carrier.  2G is old outdated and slow etc, most carriers are phasing out thei [More]