• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

javax.naming.NameNotFoundException: VBBean not bound

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Friends

I Have one ear project in its EJB part I have different pakages for sesion beans and entities.
But while deploying all entities are successfully deployed , but session beans are not deployed properly
when I am accessing the session beans from a jsp page its throwing this exception.I am looking up session beans
using Intial Context an lookUp method.

But One interesting thing I have seen when i have created that session bean again with other name its working sometimes.
I am not getting what is the problem ?? Why its working with other Name.

This unexpected behavior of Jboss 5.0.1GA I am not getting.
Please help me to sort out this.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you used JNDIView to verify the the name of the EJB you are looking up? Also, the console log in 5.0.1 shows the JNDI names for the EJBs as it deploys them.

Could you post the code that does the name lookup?
 
Ankit Varshney
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes My lookUP code is like This



When I am creating New Session bean its working fine with this lookup Code means I am able to access that bean from servlet properly, but when I am trying to access the existing created session bean (This session Bean containing the references of other session beans means its using other session beans by annotations not this lookup code) its showing this exception.

Please help me to solve this problem...
In last reply you told about "JNDIView to verify the the name of the EJB"
What is this???
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is JNDIView? Let me google that for you: JNDIView (try the first result)

Also, post the resource-ref entries related to this EJB that are in your web.xml and jboss-web.xml file.

I do know know what you mean by "creating New Session bean".
 
Ankit Varshney
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I have identified the problem..

Its becoz term known as "CIRCULAR DEPENDENCY".
Means the session beans having the references of each other like
There are 2 session beans A and B and A has reference of B and B has reference of A
It means its Circular Dependency and JBOSS is failed to deploy both the beans..
Please suggest any solution for this..



Is this a bug in Jboss??
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use the @IgnoreDependency on one of the bean injections. See this for details
 
Ankit Varshney
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks friend,

I have tested @IgnoreDependency.Its working with this annotation.
But I do not want to use @IgnoreDependency because for that I have to change my existing code a lot..
Somewhere I have seen in place of using @IgnoreDependency we can edit the "jboss.xml".
But I did not find the exact structure for editing of "jboss.xml".

Can you please tell me how to use "jboss.xml" in place of @IgnoreDependency..

My Session Beans are described below.
Please post me the "jboss.xml" for these session beans..

Thanks




 
Jaikiran Pai
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Can you please tell me how to use "jboss.xml" in place of @IgnoreDependency..



This is just an example:


For the full xml schema, look at the %JBOSS_HOME%/docs/schema/jboss_5_0.xsd file
 
Ankit Varshney
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks friend,

But I have tried to read that xsd but not able to get the schema..
Can you please post the required jboss.xml?
I have tried also but while runniing server was not able to parse the tags of jboss.xml..

Plese help me..
 
Ankit Varshney
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for help

I have resolved this issue.
But this look littile bit odd as inside <injection-target-name>ejb1Bean</injection-target-name>
this tag you have to mention reference variable name of the dependent bean.
So if i will change my bean's name in the code i have to change this xml file also???

What do you think??
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic