Win a copy of Murach's MySQL this week in the JDBC and Relational Databases forum!
  • 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Problem: creating EJBs in Client in Weblogic7.0

Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an architecture where I use a java class for creating an ejb. This java class is called from a jsp. Now, in the class, I am
creating an ejb in the following manner. However, i get a peculiar problem:
When running the code, it only runs till the statement "Debug 1(which prints out the following stmnt.)", and then absolutely nothing happens. Even trying to catch
a generic Exception yields nothing.
Debug 1- ... ejb.MoveMosBean_krugnk_HomeImpl@92023
Thanks in advance for your help.

try {
MoveMosUtil.log("making connection to SecureWay directory");
//empty contructor used to initialise bean
//InitialContext initial = getInitialContext();
InitialContext initial = new InitialContext();
Object objref = initial.lookup("java:comp/env/ejb/MoveMos");
System.out.println("Debug 1 - objref looked up :" + objref.toString());
MoveMosHome home = (MoveMosHome)PortableRemoteObject.narrow(objref, MoveMosHome.class);
System.out.println("Debug 2 - home initialised");
remote = (MoveMosRemote) home.create();
System.out.println("Debug 3 - remote variable initilised and connection to SecureWay Created");
catch (ClassCastException x)
{MoveMosUtil.log("ERROR - Class cast exception thrown");
catch (LinkException x)
{MoveMosUtil.log("ERROR - Couldn't get MoveMos home: ["+x.getLinkResolvedName()+" resolved, "+x.getLinkRemainingName()+" remaining]. Explanation: "+x.getLinkExplanation());
throw new EJBException("ERROR - Couldn't get MoveMos home: ["+x.getLinkResolvedName()+" resolved, "+x.getLinkRemainingName()+" remaining]. Explanation: "+x.getLinkExplanation());
catch (NamingException x)
{MoveMosUtil.log("ERROR - Couldn't get MoveMos home ["+x.getClass().getName()+"]: "+x.getMessage());
throw new EJBException("ERROR - Couldn't get MoveMos home ["+x.getClass().getName()+"]: "+x.getMessage());
catch (CreateException x)
{MoveMosUtil.log("ERROR - Couldn't get MoveMos. "+x.getMessage());
throw new EJBException("ERROR - Couldn't get MoveMos. "+x.getMessage());
catch (Exception e) {
MoveMosUtil.log("Error in makeConnection procedure");

The .xmls are as follows:
That's my roommate. He's kinda weird, but he always pays his half of the rent. And he gave me this tiny ad:
a bit of art, as a gift, the permaculture playing cards
    Bookmark Topic Watch Topic
  • New Topic