• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

was5.0 local CMP problem

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I use Stateless Session Bean to act as a facade to access a local CMP.
According to was5.0 requirements, I defined ejb-local-ref in the ejb-jar.xml though the 2 beans are in the same jar file(ejb-ref-name is localPerson).
I checked ibm-ejb-jar-bnd.xmi, there are the following bindings:
<ejbRefBindings ..jndiName="localPerson"..
<bindingEjbRef xmi:type="common:EJBLocalRef" ...

I use JNDI name java:comp/env/localPerson to lookup, but got the following exception:
Reference Factory Class Name: com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory
Reference Factory Class Location URLs: <null>
Reference Class Name: java.lang.Object
Type: JndiLookupInfo
Content: JndiLookupInfo: jndiName="local:ejb/localPerson"; providerURL=""; initialContextFactory=""
Exception data follows:
javax.naming.ConfigurationException: NamingManager.getURLContext can not find the factory for this scheme: local
at com.ibm.ws.naming.jndicos.CNContextImpl.checkForUrlContext(CNContextImpl.java:2574)
I really cannot figure out why. Anyone have the same problem?
[ June 08, 2003: Message edited by: Robert Luozn ]
[ June 08, 2003: Message edited by: Robert Luozn ]
[ June 08, 2003: Message edited by: Robert Luozn ]
 
Ranch Hand
Posts: 64
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to define the local reference inside the session bean which you want to call it from.
Hope it helps.
 
Robert Luozn
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, that's exactly the way I did. I'm now wondering the problem is maybe related to the configuration because the exception is ConfigurationException. And I think when NamingManager handle the local Reference, it cannot do with such name as "local:", but I think was ejb container should support local reference without any configuration.
 
Robert Luozn
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Finally I figure out why. it is because the entity bean have both local and remote interface. After I remove the remote interface, it works. But I think EJB spec2.0 do support Entity Bean with both local and remote interface. So I don't know how to explain this. But it's OK, I think, because we prefer local to remote interface for entity bean
 
what if we put solar panels on top of the semi truck trailer? That could power this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic