Hi,

I have created a test Entity CMP bean, and can get a servlet talking to it,
using a SQL Server database no problem at all. I don't have a
resource-ref-mapping set up in the ejb-jar.xml file for this bean, however I
only have one datasource set up so I assume Orion just defaults it to using
that one? (seems to anyway).

So far so good. But now I've got some 3rd party EJB (v1.0 - is this the
problem?) session beans that I am trying to deploy. I've got them deploying
OK, they get a resource-ref-mapping that looks fine, but when they try to
access the database (after being called by a servlet) I get the following
exception:

com.evermind.server.rmi.OrionRemoteException:
com.sterling.component.PersistenceRuntimeException: Persistence requires a
component context that contains a JDBC connection. The specified component
context was created without specifying a JDBC URL and/or JDBC driver.;
nested exception is:
        com.sterling.component.PersistenceRuntimeException: Persistence requires a
component context that contains a JDBC connection.  The specified component
context was created without specifying a JDBC URL and/or JDBC driver.

In my servlet, I do not set up any of the context - I just call:
Context ctx = new InitialContext();


We've had this working with a servlet under WebLogic 4.5.1 with something
like the following:

Properties env = new Properties();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.T3InitialContextFactory");
env.put(Context.PROVIDER_URL, "jdbc:inetdae:localhost?database=lgfg");
Context ctx = new InitialContext(env);


I'm not sure what to put for the INITIAL_CONTEXT_FACTORY with Orion, but if
I just set the PROVIDER_URL I get this exception:

com.evermind.server.rmi.OrionRemoteException:
com.sterling.component.PersistenceRuntimeException: Persistence requires a
component context that contains a JDBC connection. The specified component
context was created without specifying a JDBC URL and/or JDBC driver.;
nested exception is: com.sterling.component.PersistenceRuntimeException:
Persistence requires a component context that contains a JDBC connection.
The specified component context was created without specifying a JDBC URL
and/or JDBC driver.

Slightly different, slightly closer?

What I don't understand is why these EJB's are ignoring the
resource-ref-mapping. Could someone please explain to me a bit more about
how this actually works, before I tear all my hair out? I'm assuming it's
something in the 3rd party code that's chosing to ignore the mapping and do
it the hard way, which is fine if I can get it to work by specifying the
correct context for them...

Any ideas, hints, thoughts?

Thank you for your troubles.

Chris Miller




Reply via email to