posted 17 years ago
Hi folks,
I am new to Oracle AS. I am stuck with a few problems after successful deployment:
1. I have a session bean called 'BusinessDelegate' that exposes the remote interface and calls all other session beans through their respective local interfaces. This 'BusinessDelegate' is therefore the ONLY bean that is visible to the web project. I am calling it from ActionClass through this code:
1. BusinessDelegateHome businessDelegateHome = (BusinessDelegateHome)ServiceLocator.getInstance().getLocalHome("BusinessDelegateBean");
2. BusinessDelegate delegate = businessDelegateHome.create();
The log shows a ClassCast exception is thrown after statement 1. The code works perfectly in JDev.
Web.xml for the web module (relevant portions):
<ejb-ref>
<ejb-ref-name>BusinessDelegateBean</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>org.rbi.rpcd.util.BusinessDelegateHome</home>
<remote>org.rbi.rpcd.util.BusinessDelegate</remote>
<ejb-link>BusinessDelegate</ejb-link>
</ejb-ref>
The ejb-jar.xml of the bean project (relevant portions):
<session>
<description>Session Bean ( Stateless )</description>
<display-name>BusinessDelegate</display-name>
<ejb-name>BusinessDelegate</ejb-name>
<home>org.rbi.rpcd.util.BusinessDelegateHome</home>
<remote>org.rbi.rpcd.util.BusinessDelegate</remote>
<ejb-class>org.rbi.rpcd.util.BusinessDelegateBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
.....
(contains other local ejb-refs).
The error message includes this:
"java.lang.ClassCastException: BusinessDelegateHome_StatelessSessionHomeWrapper531" on the line (1) above.
Please tell me why this is failing in AS when it executes fine in JDev. Any insight is appreciated. TIA.
[ July 07, 2006: Message edited by: Harish Verma ]
[ July 07, 2006: Message edited by: Harish Verma ]