• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Bear Bibeault
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • salvin francis
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
Bartenders:
  • Jj Roberts
  • Carey Brown
  • Scott Selikoff

Exception in client program of ejb using weblogic5.1

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am trying to execute an ejb on weblogic5.1 thru a normal java class and am getting the following error.
------------------------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 -------------------------------------
I am attching the code along with this mail.
We are at the mid of the project and have got stucked at this point. Ur quick help will be warmly appreciated.
----------------------------------------------------------------
The client code which I am using is given below.
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());
}
}
}

 
Ranch Hand
Posts: 228
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi what do u mean by line 26 of the code where u are trying to narrow a home obj to Home.class whereas the def for home does not exist.........please clarify that 1st
sahil
 
parag gadhia
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sahil, I am posting the code again, in the above code i missed out to delete the line as I was trying with lot's of examples :
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(ref,CFLXMLResponseHome.class);

System.out.println("After Lookup");
CFLXMLResponse m=mh.create("getPvt_String_xmlresp_respID()");
}
catch(Exception e)
{
System.out.println("Exception caught:"+e.toString());
}
}
}
 
I'm gonna teach you a lesson! Start by looking at this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic