• 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

ejb stateless example

 
Ranch Hand
Posts: 930
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am working on below example

http://stackoverflow.com/questions/27519075/how-to-create-ejb-3-2-stateless-bean-project-and-running-it-on-wildfly-8

my code is same as in above link.

when i run Test main class getting below error


ejb:/EJBTest//SLBean!com.example.ejbtest.SLBeanRemote
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
     at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
     at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
     at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
     at javax.naming.InitialContext.lookup(Unknown Source)
     at com.example.ejbtest.Test.main(Test.java:30)


please advise.

I am attaching structure.


I tried one other example on same Wildfly 10 server as below






my jndi bindings from server are


/*
* java:global/GreetEJBProjectStaless/GreetBean!com.gp.GreetBean
* java:app/GreetEJBProjectStaless/GreetBean!com.gp.GreetBean
* java:module/GreetBean!com.gp.GreetBean
* java:global/GreetEJBProjectStaless/GreetBean!com.gp.GreetBeanRemote
* java:app/GreetEJBProjectStaless/GreetBean!com.gp.GreetBeanRemote
* java:module/GreetBean!com.gp.GreetBeanRemote
* java:jboss/exported/GreetEJBProjectStaless/GreetBean!com.gp.
* GreetBeanRemote
*/


i am ataching my project structure for this second example as well.

please advise on how to resolve these issues?
strEjb.png
[Thumbnail for strEjb.png]
ex 1
strEjb2.png
[Thumbnail for strEjb2.png]
ex2
 
sai rama krishna
Ranch Hand
Posts: 930
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please advise
 
I carry this gun in case a vending machine doesn't give me my fritos. This gun and this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic