jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicholas Lesiecki" <n...@eblox.com>
Subject RE: Thanks a lot Vincent ...but it did not solve the problem
Date Thu, 27 Jun 2002 20:53:49 GMT
Have you considered it being a classloader issue?

Cheers,

nick

-----Original Message-----
From: Sathiyamurthy_Ramachandran@i2.com
[mailto:Sathiyamurthy_Ramachandran@i2.com]
Sent: Thursday, June 27, 2002 3:38 AM
To: Cactus Users List
Subject: Thanks a lot Vincent ...but it did not solve the problem


Hi Vincent,


Thanks a lot for ur attentiona and effort. but ,  even though I have
included  the below info in web. xml... it gives the same exception :
ClassacastException  ( To me also, it seems to be from   Webligic) But I
have a Bean (Implementing Remote Interface  ) deployed which runs
successfully and then  runns  my next Client which has a Local Interface-
.Its for the local Interface it throws exception:


Testcase: testRunme took 0.172 sec   Caused an ERROR
 mysample2.SSBBean_1rky_LocalHomeImpl

 java.lang.ClassCastException: mysample2.SSBBean_1rky_LocalHomeImpl

     at mysample2.SSBClient.runme(SSBClient.java:66)
     at mysample2.TestSSBClient.testRunme(TestSSBClient.java:50)
     at java.lang.reflect.Method.invoke(Native Method)
     at org.apache.cactus.AbstractTestCase.runServerTest(AbstractTest
24)
     at org.apache.cactus.AbstractTestCase.runBareServerTest(Abstract
va:490)
     at org.apache.cactus.server.AbstractTestCaller.doTest(AbstractTe
va:148)
     at org.apache.cactus.server.AbstractTestController.dispatch79_ha
(AbstractTestController.java;org/apache/cactus/util/log/LogAspect.jav

     at org.apache.cactus.server.AbstractTestController.around79_hand
bstractTestController.java;org/apache/cactus/util/log/LogAspect.java(



Because I am using the Local Object, I  included in my web.xml  as

  <ejb-ref>
        <ejb-ref-name>SSB</ejb-ref-name>
        <ejb-ref-type>Session</ejb-ref-type>
        <local-home>mysample.TestSSBLocalHome</local-home>
        <local>mysample.TestSSBLocal</local>
    </ejb-ref>

Do u  have any  Sample Bean  (Implementing  EJB Local Interface )  as  jar
wehihc u have tested..... porbably can u post over the Cactus mailing list
 PL...?

Thanks,
Sathiya







"Vincent Massol" <vmassol@octo.com>
06/27/2002 03:30 AM
Please respond to "Cactus Users List"


        To:     "'Cactus Users List'" <cactus-user@jakarta.apache.org>
        cc:
        Subject:        Testing Local EJB w/ WL6.1 (was RE: Hello Mr
Vincent..Ur Attn. pl.....)


Hi Sathiya,

You seem to *really* be looking for an answer seen the repetitive emails
... ;-)

I don't know what your problem is and I believe it is not Cactus
related. The best I can do is show you how I've done it using WL 6.1

1/ You call your local EJB from a test class that extends
ServletTestCase
2/ In your web.xml, you need to have a reference to the local bean
you're calling. Ex:

  <ejb-ref>
    <ejb-ref-name>CustomerSession</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.xxx.host.bedrock.control.CustomerSessionHome</home>
    <remote>com.xxx.host.bedrock.control.CustomerSessionLocal</remote>
  </ejb-ref>

3/ You then need to map the JNDI name using the app server proprietary
conf file (called weblogic.xml for WL). Ex:

<weblogic-web-app>
  <reference-descriptor>

    <ejb-reference-description>
      <ejb-ref-name>
        CustomerSession
      </ejb-ref-name>
      <jndi-name>
        CustomerSession
      </jndi-name>
    </ejb-reference-description>
[...]

4/ Then perform the lookup. Ex:

CustomerSessionHome customerHome = (CustomerSessionHome) (
    new InitialContext().lookup(
        "CustomerSession"));
CustomerSession customer = customerHome.create();
Customer.xxx();

Hope it helps
-Vincent

> -----Original Message-----
> From: Sathiyamurthy_Ramachandran@i2.com
> [mailto:Sathiyamurthy_Ramachandran@i2.com]
> Sent: 26 June 2002 15:19
> To: Cactus Users List
> Subject: Hello Mr Vincent..Ur Attn. pl.....
>
> Hi Vincent,
>
> I am trying to run a testclient to test EJBLocalObject interface.
>
> Lookup is fine but when I get a home interface refernce, an
exceptionis
> thrown as " Class cast exception..................." . Once This is
> solved, my  EJB LocalObjectTesting  get successfully over Using the
Cactus
> ( which  is  only  tools supporintg my reqment....).
>
> Any idea why this happens. : can u pl.  send a code samplet  how to
code a
> client for EJBLocalObject ( incae mine is wrong)
> My client code is as below:
>
>
>
> ......
>         Context ctx = new InitialContext();
>         home = (TestSSBLocalHome)ctx.lookup("TestSSB.Test");
>         tLocal = home.create();
>         output= tLocal.printSomething("IQUOTE");
>         expected = "IQUOTEIQUOTE";
>         System.out.println("Expceted / outpur from BEAN Client is
> .........V: " + output);
> .......
> My exception is as below :
>
>
>
> 19:44:44,585 [main] DEBUG mysample.TestingSSBClient       -
-------------
> Test: testRunme
> 19:44:44,741 [main] DEBUG mysample.TestingSSBClient       - Exception
in
> test
> java.lang.ClassCastException:
mysample.TestSSBBean_406vao_LocalHomeImpl
>         at mysample.TestSSBClient.runme(TestSSBClient.java:67)
>         at
mysample.TestingSSBClient.testRunme(TestingSSBClient.java:50)
>         at java.lang.reflect.Method.invoke(Native Method)
>         at
>
org.apache.cactus.AbstractTestCase.runServerTest(AbstractTestCase.java:5
24
> )
>         at
>
org.apache.cactus.AbstractTestCase.runBareServerTest(AbstractTestCase.ja
va
> :490)
>         at
>
org.apache.cactus.server.AbstractTestCaller.doTest(AbstractTestCaller.ja
va
> :148)
>         at
>
org.apache.cactus.server.AbstractTestController.dispatch79_handleRequest
(A
>
bstractTestController.java;org/apache/cactus/util/log/LogAspect.java(1k)
:1
> 23)
>         at
>
org.apache.cactus.server.AbstractTestController.around79_handleRequest(A
bs
>
tractTestController.java;org/apache/cactus/util/log/LogAspect.java(1k):1
14
> 7)
>         at
>
org.apache.cactus.server.AbstractTestController.handleRequest(AbstractTe
st
> Controller.java;org/apache/cactus/util/log/LogAspect.java(1k):101)
>         at
>
org.apache.cactus.server.ServletTestRedirector.dispatch88_doPost(Servlet
Te
> stRedirector.java;org/apache/cactus/util/log/LogAspect.java(1k):132)
>         at
>
org.apache.cactus.server.ServletTestRedirector.around88_doPost(ServletTe
st
> Redirector.java;org/apache/cactus/util/log/LogAspect.java(1k):1147)
>         at
>
org.apache.cactus.server.ServletTestRedirector.doPost(ServletTestRedirec
to
> r.java;org/apache/cactus/util/log/LogAspect.java(1k):118)
>         at
>
org.apache.cactus.server.ServletTestRedirector.dispatch87_doGet(ServletT
es
> tRedirector.java;org/apache/cactus/util/log/LogAspect.java(1k):105)
>         at
>
org.apache.cactus.server.ServletTestRedirector.around87_doGet(ServletTes
tR
> edirector.java;org/apache/cactus/util/log/LogAspect.java(1k):1147)
>         at
>
org.apache.cactus.server.ServletTestRedirector.doGet(ServletTestRedirect
or
> .java;org/apache/cactus/util/log/LogAspect.java(1k):101)
>         at
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>         at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
>
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
ja
> va:265)
>         at
> weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:21)
>         at
>
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:
27
> )
>         at
>
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
et
> Context.java:2501)
>         at
>
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
ja
> va:2204)
>         at
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
>
>
> Thanks Vincent,
> sathiya


--
To unsubscribe, e-mail:
<mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:cactus-user-help@jakarta.apache.org>





--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message