Home » Fusion Middleware & Colab Suite » Weblogic & Application Server » Oracle 9ias problem
Oracle 9ias problem [message #76811] Tue, 30 September 2003 05:41 Go to next message
Anshul Sehgal
Messages: 1
Registered: September 2003
Junior Member

I have deployed my sample EJB on standalone oc4j.jar using JDeveloper.
I have also successfully tested my EJB application through JDeveloper by
connecting to standalone oc4j.jar.

Now I want to invoke the EJB from a servlet.

I have written the code in the servlet as follows.

Hashtable oEnv = new Hashtable(); // Max needed + 1

oEnv.put(Context.SECURITY_PRINCIPAL, "admin");
oEnv.put(Context.SECURITY_CREDENTIALS, "admin");
oEnv.put(Context.PROVIDER_URL, "ormi://Sanjeev/myejb");
System.out.println("Setting initial context");
InitialContext ic = new InitialContext(oEnv);
System.out.println("looking up");
Object homeObject = ic.lookup("java:comp/env/MyEJBBean");
System.out.println("Look up successful=");
home =
System.out.println("Got home");

It is able to perform look up, but at the time of type casting, I am thrown
java.lang.ClassCastException : MyEJBHome_StatelessSessionHomeWrapper1

The orion-ejb-jar.jar which is generated by the Container by itself has the
following code.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1
runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">

<orion-ejb-jar deployment-version="" deployment-time="f7f191a26c">
<session-deployment name="MyEJBBean" location="MyEJBBean"
persistence-filename="MyEJBBean" />
<security-role-mapping name="<default-ejb-caller-role>"
impliesAll="true" />

I want to know what kind of error is this and what is

For your information, I have deployed EJB using EAR file (that contains the
ejb jar file only and not the war file) on standalone oc4j.jar and I have
placed the servlet in default-web-app directory under WEB-INF/classes.

Re: Oracle 9ias problem [message #77124 is a reply to message #76811] Sun, 12 September 2004 23:41 Go to previous message
Messages: 8
Registered: October 2001
Junior Member
hi ,

same problem i'm also facing, if you have worked out , please guide me .

i'll be oblized ...

Previous Topic: Dot Net API for Oracle AQ
Next Topic: error FRM-92101
Goto Forum:

Current Time: Sun Sep 27 02:55:34 CDT 2020