Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Exception creating CMP bean using JDeveloper: "Werent current caller"

Status
Not open for further replies.

cey

Programmer
Feb 15, 2002
3
DE
Hi there,

I am trying to run a CMP entity bean on an oc4j server using JDeveloper to create and deploy the bean and a sample application. The bean is created using an existing DB table.

The reading part is all working, I can find a bean using its primary key. But when it comes to creating a new bean I get the following exception:

java.lang.InternalError: Werent current caller, server stacktrace (to disable this message, use -Dejb.assert=false at startup): java.lang.Throwable: Werent current caller
void Person_EntityBeanWrapper4.setEntityBean(javax.ejb.EntityBean)
void com.evermind.server.ejb.EntityEJBHome.passivateAndRelease(com.evermind.server.ejb.EvermindEntityContext, boolean)
void com.evermind.server.ejb.EntityEJBObject.releaseContext(boolean)
de.fiscus.sfs.cmp.Person PersonHome_EntityHomeWrapper6.create(long)
java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[])
void com.evermind.server.rmi.RMICallHandler.run(java.lang.Thread)
void com.evermind.util.ThreadPoolThread.run()

void com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(java.lang.Throwable)
java.lang.Object com.evermind.server.rmi.RMIConnection.invokeMethod(com.evermind.server.rmi.RMIContext, long, long, java.lang.reflect.Method,
java.lang.Object[])
java.lang.Object com.evermind.server.rmi.RemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
java.lang.Object com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(java.lang.Object, java.lang.reflect.Method, java.lang.Object[])
de.fiscus.sfs.cmp.Person __Proxy0.create(long)
void SamplePersonClient2.main(java.lang.String[])

Any idea?

Thank you!
Chris
 
Yes, I did solve the problem.

This happened when I generated an Container Managed Persistence Bean with JDeveloper, and deployed it. I could use that bean with a client and retrieve a specific instance using the home interface's findByPrimaryKey() method. I could not create a new bean using the home interface's create( primaryKey) method. The following Exception occurred:
java.lang.InternalError: Werent current caller

The problem was an SQL Exception that occurred in the CMP area I could not see. To make such SQL Exceptions visible (in my case it was a database constraint violation), set the system variable ejb.assert to false for the OC4J server at startup by modifying the startup command:
java -Dejb.assert=false -jar %OC4J_HOME%\oc4j.jar

This feature is undocumented but working.

Hey, if this works for you let me know.

CU, Chris
 
Hi Chris
I was having a similar problem in using the OC4j as applied to CMP bean.I'm using OC4J on Windows 2000 and was not able to make out as in which file should i change the value of the variable.I shall be highly obliged if u can send me the solution to this problem ASAP.
Thanx and Cheers!!!
Rahul
 
Hi Rahul,

you can't find this variable in a configuration file but you can set it in the environment of the OC4J process. Just add the variable when you start OC4J with the -D option of Java (refer to my last message).

CU, Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top