Solved

Client program of ejb not getting excuted thru normal java class , app server used is weblogic5.1

Posted on 2001-07-19
9
171 Views
Last Modified: 2013-11-24
0
Comment
Question by:paraggadhia
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
9 Comments
 
LVL 92

Expert Comment

by:objects
ID: 6297561
more info pls.
0
 

Expert Comment

by:LG_Goundalkar
ID: 6298030
Please Give Details
0
 

Author Comment

by:paraggadhia
ID: 6298266
What are the additional information required ?
0
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

Expert Comment

by:LG_Goundalkar
ID: 6298315
1. Is the EJB is properly Deployed ??
2. Details about the EJB u have developed.
3. How are u making the call to the call to the EJB which u have deployed in Weblogic.

Thanks
LGG
0
 

Author Comment

by:paraggadhia
ID: 6298367
1. The EJB is properly deployed and it works fine when I  call my client from jsp. The client for calling from jsp works fine and is a bit different from the client which I have written to excute ejb from jsp.

2. The EJB which I have developed is an enitity bean.

3. Following is the code for calling ejb.
import javax.ejb.*;
import java.rmi.*;
import javax.rmi.*;
import java.util.*;
import javax.naming.*;
import java.io.*;
import cfl.*;
import weblogic.rmi.*;

public class XMLClient implements Serializable
{
     public static void main(String[] args)
     {
       try
       {
      Properties p=new Properties();
       p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
       p.put(Context.PROVIDER_URL,"t3://msukdws9:7001");
      InitialContext ic=new InitialContext(p);

       System.out.println("After InitialContext");

       Object ref=ic.lookup("jndiCFLXMLResponse");

      CFLXMLResponseHome mh=(CFLXMLResponseHome)PortableRemoteObject.narrow(home,CFLXMLResponseHome.class);        
       
       System.out.println("After Lookup");

       CFLXMLResponseHome mh=(CFLXMLResponseHome)PortableRemoteObject.narrow(ref,CFLXMLResponseHome.class);
       CFLXMLResponse m=mh.create("getPvt_String_xmlresp_respID()");

  }
       catch(Exception e)
       {
         System.out.println("Exception caught:"+e.toString());
      }

     }
}



0
 
LVL 92

Expert Comment

by:objects
ID: 6300469
How about what the error is?
0
 

Author Comment

by:paraggadhia
ID: 6301348
------------------------ERROR STARTS HERE -----------------

Exception caught:javax.naming.ConfigurationException [Root exception is weblogic.rmi.ServerException: A remote exception occurred while executing the method on the remote object
 - with nested exception:
[weblogic.rmi.MarshalException: error marshalling return
 - with nested exception:
[weblogic.rmi.server.ExportException: A description for cfl.CFLXMLResponseBeanHomeImpl was found but it could not be read due to: [Failed to find a stub for [class cfl.CFLXMLResponseBeanHomeImpl] implements at least one interface [interface cfl.CFLXMLResponseHome] which extends Remote.]
weblogic.rmi.StubNotFoundException: Failed to find a stub for [class cfl.CFLXMLResponseBeanHomeImpl] implements at least one interface [interface cfl.CFLXMLResponseHome] which extends Remote.
        at weblogic.rmi.extensions.BasicDescriptor.<init>(BasicDescriptor.java:25)
        at weblogic.rmi.extensions.BasicRuntimeDescriptor.<init>(BasicRuntimeDescriptor.java:34)
        at weblogic.rmi.internal.DescriptorManager.resolveClass(DescriptorManager.java:52)
        at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:36)
        at weblogic.rmi.internal.DescriptorManager.getDescriptor(DescriptorManager.java:27)
        at weblogic.rmi.internal.OIDManager.getRequestDispatcher(OIDManager.java:193)
        at weblogic.rmi.internal.OIDManager.getReplacement(OIDManager.java:182)
        at weblogic.rmi.internal.OIDManager.replaceObject(OIDManager.java:84)
        at weblogic.common.internal.WLObjectOutputStreamBase.replaceObject(WLObjectOutputStreamBase.java:1158)
        at weblogic.common.internal.WLObjectOutputStreamBase.writeObject(WLObjectOutputStreamBase.java:998)
        at weblogic.common.internal.WLObjectOutputStreamBase.writeObjectWL(WLObjectOutputStreamBase.java:166)
        at weblogic.rmi.extensions.AbstractOutputStream2.writeObject(AbstractOutputStream2.java:82)
        at weblogic.jndi.toolkit.BasicWLContext_WLSkel.invoke(BasicWLContext_WLSkel.java:77)
        at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerObjectAdapter.java, Compiled Code)
        at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicRequestHandler.java:69)
        at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:15)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled Code)


------------------------ERROR ENDS HERE -------------------
0
 
LVL 5

Expert Comment

by:vemul
ID: 7669634
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
- To be PAQ'ed and points refunded
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER !

vemul
Cleanup Volunteer
0
 

Accepted Solution

by:
SpideyMod earned 0 total points
ID: 7714639
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange
0

Featured Post

Learn by Doing. Anytime. Anywhere.

Do you like to learn by doing?
Our labs and exercises give you the chance to do just that: Learn by performing actions on real environments.

Hands-on, scenario-based labs give you experience on real environments provided by us so you don't have to worry about breaking anything.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question