Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting error while deploying EJB

 
Kamal Kumawat
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Initially i was getting JNDI Naming Lookup Exception
nut when I added jars I am getting error shown below :

java.lang.NullPointerException
at com.sun.enterprise.naming.impl.SerialContext.getRemoteProvider(SerialContext.java:297)
at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:271)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:430)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at app.test.SimpleBeanClient.runTest(SimpleBeanClient.java:11)
at app.test.SimpleBeanClient.main(SimpleBeanClient.java:19)
javax.naming.NamingException: Lookup failed for 'ejb/SimpleBeanJNDI' in SerialContext [Root exception is javax.naming.NamingException: Unable to acquire SerialContextProvider for SerialContext [Root exception is java.lang.NullPointerException]]
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:442)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at app.test.SimpleBeanClient.runTest(SimpleBeanClient.java:11)
at app.test.SimpleBeanClient.main(SimpleBeanClient.java:19)
Caused by: javax.naming.NamingException: Unable to acquire SerialContextProvider for SerialContext [Root exception is java.lang.NullPointerException]
at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:276)
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:430)
... 3 more
Caused by: java.lang.NullPointerException
at com.sun.enterprise.naming.impl.SerialContext.getRemoteProvider(SerialContext.java:297)
at com.sun.enterprise.naming.impl.SerialContext.getProvider(SerialContext.java:271)
... 4 more


I am GlasFish Tool bundel v3/EJBv3.0
Assuming that EJBv3.0 need no Entry in EJB-jar.xml





[devaka: added code tags]
 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The better option is toprovide the same name for the bean and the MappedName and made a lookup with that .

It works that way .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic