Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 12-15-2003, 03:01 PM   #1
Registered: Dec 2002
Location: Bangalore, India
Distribution: Ubuntu 5.*
Posts: 241

Rep: Reputation: 30
Angry Jboss hell with ejbs plz help

i am trying to call a stateless EJB from a ActionServlet (struts) the app
server i use is jboss 2.4.x, I dont know what is wrong but .. the application
throws error during startup :'(

this is the relevant log...

[01:11:11,562,EmbeddedCatalinaServiceSX] linkEjbRefs
[01:11:11,573,EmbeddedCatalinaServiceSX] Linking ejb-ref: ejb/LoginBean to JNDI
name: null
[01:11:11,601,EmbeddedCatalinaServiceSX] Failed to setup web application ENC
javax.naming.NamingException: ejb-ref: ejb/LoginBean, expected jndi-name in

the commands i used to make the ejb-jar, war and ear files are

jar cvfM rave.war WEB-INF/ images/ *.jsp *.css

jar cvfM rave-ejb.jar META-INF/ejb-jar.xml raveEjb/*.class

jar cvfM rave.ear META-INF/application.xml META-INF/jboss.xml
META-INF/jboss-web.xml rave.war rave-ejb.jar

the contents of the XML files are
<description>EJBs for Rave</description>
<display-name>Rave EJB</display-name>

<?xml version="1.0" encoding="Cp1252"?>

<?xml version="1.0" encoding="UTF-8"?>

WEB.XML(relevant part)

this is my ejb access code

//Properties for jboss
Properties props = new Properties();
props.put(Context.PROVIDER_URL, "localhost:1099");

//obtain a jndi server reference
Context ctx = new InitialContext(props);

//Get a home Interface reference
Object loginEjbObj = ctx.lookup("java:comp/env/ejb/LoginBean");

//Typecast this object into a home interface type
//use this if we use remote home method
LoginHome home =

//Obtain a remote interface
Login loginObj = home.create();

// Call the EJB's validation method

if(loginObj.validateUser(s_user_Name, s_password))

Can anyone tell me why on earth do i get the exception ?????


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible to do this with EJBs? eantoranz Programming 1 04-24-2005 12:16 AM
Problem deploying EJBs on JBoss eantoranz Programming 1 04-15-2005 02:46 PM
EJB: Problem with concurrent calls to EJBs (according to JBoss) eantoranz Programming 0 03-14-2005 12:10 PM
Why the hell is linux running so slow! plz help sendas4 Linux - General 9 08-02-2004 09:00 PM
Where are EJBs classes defined? eantoranz Programming 2 04-25-2004 12:01 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:35 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration