How to switch off pre-moderation of comments?
[Beginners Corner] - Deploy Problem: JBoss, EJB3,
	NetBeans and the web.xml file s
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What is interesting here?
• Duels
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Ñîîáùåñòâà
• Talxy Chat
• Horoscope
• Online
 
Register!

QAIX > Java Programming > [Beginners Corner] - Deploy Problem: JBoss, EJB3, NetBeans and the web.xml file s 26 September 2006 00:26:19

  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Ìîäåðàòîð:

[Beginners Corner] - Deploy Problem: JBoss, EJB3, NetBeans and the web.xml file s

Wls 26 September 2006 00:26:19
 Admittedly, I'm a beginner here, so go gentle on me.

I'm using the NetBeans 5.5 beta 2 with the JBoss 4.0.4 GA installer, which supposedly includes EJB3 stuff, from http://www.netbeans­.org/products/ide/ and so far things had been working perfectly.

That was until I did right clicked "Enterprise Resources > Call Enterprise Bean" from the pop up window in an servlet of an Enterprise Application and referenced a working bean.

Now my question isn't one of using the NetBeans environment, but rather that after it generated the code, which did compile perfectly, I started getting errors that my bean could not be deployed to JBoss due to an error in the web.xml file.

Looking in the web.xml file, which I assume is some kind of deployment file (hey, I said I was new to J2EE), there is a new element in the xml called <ejb-local-ref>. And it's on this xml section that JBoss seems to be choking.

Inside http://www.netbeans­.org/kb/55/ejb30-jbo­ss.html, it suggests that JBoss automatically adds session beans to the JNDI namesspace, and thus one should remove the ejb-local-ref from the web.xml file by going to the WEB-INF folder inside the Web Pages node.

Doing so didn't help, and instead created a new problem with the bean not being bound to a name.
From what I can tell from various Google searches and reading different documents, it seems that not only is NetBeans is generating Java EE 5 code, but deployment notation as well. And, while JBoss is using EJB3, it does not recognize the newer xml syntax.

My problem is fairly obvious, and I'm drowning in a sea of documentation that's in one world or the other, but not bridging the gap between them.

NetBeans is producing this:
javax.naming.Contex­t c = new javax.naming.Initia­lContext();
| return (MyBeanLocal) c.lookup("java:comp­/env/ejb/MyBean");

Which exceptions with a
anonymous wrote : javax.naming.NameNo­tFoundException: ejb not bound

My guess is that I need something inside the web.xml file to do that binding, but I'm just not sure what. I'm also pondering in that there seems to be a jboss.xml file that I could create, but I don't know if this is on the right track or not, either.

Would someone mind pointing me in the right direction?

Many thanks,
-Walt Stoneburner, wls@wwco.com

View the original post : http://www.jboss.co­m/index.html?module=­bb&op=viewtopic&p=39­74036#3974036

Reply to the post : http://www.jboss.co­m/index.html?module=­bb&op=posting&mode=r­eply&p=3974036
Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
respect your talk pals, avoid using obscene language, typing entire messages in CAPS, posting buy/sell ads or violating netiquette or the RF Criminal Code..


QAIX > Java Programming > [Beginners Corner] - Deploy Problem: JBoss, EJB3, NetBeans and the web.xml file s 26 September 2006 00:26:19

see also:
conectividad postgresql con access
crash in LIBPQ_execute_query
Index on a NULL-value
pass tests:
see also:
{Entrance}
Hi, everyone!!!

  Copyright © 2001—2009 QAIX
Idea: Miñhael Monashev
See Help and FAQ in the community support.qaix.com.
Write in the community about the bugs you have noticedbugs.qaix.com.
Write your offers and comments in the communities suggest.qaix.com.
Information for parents.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .