suchi verma

Greenhorn
+ Follow
since Apr 06, 2004
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by suchi verma

WEB.XML
=================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app id="WebApp_ID">
<servlet id="Servlet_1082170647969">
<servlet-name>ClientServlet1</servlet-name>
<servlet-class>beans.ClientServlet1</servlet-class>
</servlet>
<servlet-mapping id="ServletMapping_1082170647971">
<servlet-name>ClientServlet1</servlet-name>
<url-pattern>/ClientServlet1</url-pattern>
</servlet-mapping>
<welcome-file-list id="WelcomeFileList_1082170647972">
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
=================================================
JBOSS-WEB.XML
==================================================
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">
<jboss-web id="jboss-web">
<ejb-ref>
<ejb-ref-name>beans/SimpleBean</ejb-ref-name>
<jndi-name>ejb/SimpleHome</jndi-name>
</ejb-ref>
</jboss-web-app>
====================================================
JBOSS.XML
=====================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss_2_4.dtd">
<jboss id="jboss">
<enterprise-beans id="ejb_bean">
<session id="my_session_ejb">
<ejb-name>beans/SimpleBean</ejb-name>
<jndi-name>ejb/SimpleHome</jndi-name>
</session>
</enterprise-beans>
</jboss>
===========================================================

HERES THE LOG MESSAGE
=======================
5-09 19:23:21,784 INFO [STDOUT] exception isjavax.naming.NameNotFoundException: ejb not bound
2004-05-09 19:23:21,789 INFO [STDOUT] do post exception isjava.lang.NullPointerException

Hope this suffices
21 years ago
hi walker
As u said I undeployed my ejb application and restarted jboss.
Then i deployed my ejb application.
BUT when I call the client servlet I get the follwing error on my log
name.notfound.exception:ejb not bound.
It fails to print the bean message.
What could be the problem???
plz reply.
21 years ago
hi don
i solved the problem....
thnx neways
21 years ago
thnx wallker...
will give it a try.
21 years ago
hi all,
I have deployed my enterprise application on jboss-3.2.2.
It consists of an session bean which is accessed using a Servlet.
The servlet is in a seperate .war file and the ejb's in a .jar file.
However when I call the servlet which inturn calls the session bean.
I get the following error--
javax.naming.NameNotFoundException: ejb not bound
I have double checked my jboss.xml and the servlet lookup().
They both are the same.
The servlet code is-----
public void doGet(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException{

try {
/*Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
props.put(Context.PROVIDER_URL,"localhost:1099");////chetak:8080/
props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming rg.jnp.interfaces");
Context ctx = new InitialContext(props);*/
Context ctx = new InitialContext();
Object obj=ctx.lookup("java:comp/env/ejb/beans/SimpleBean");
SimpleHome home = (SimpleHome)PortableRemoteObject.narrow(obj,SimpleHome.class);
} catch (Exception NamingException) {
System.out.println("initexception is"+NamingException);}

try {
res.setContentType("text/html");
PrintWriter out=res.getWriter();
out.println("calling session bean");
Simple test = home.create();
if (test != null)
out.println("<br>Completed creation of remote EJBObject");
else
out.println("<br>Create returned null");
String s = test.getMessage();
out.println("<br>EJB Message: " + s);
out.close();
----------------------------------------------------------------
jboss.xml
<ejb-ref-name>beans/Simple</ejb-ref-name>
<jndi-name>ejb/beans/SimpleBean</jndi-name>
what could be the problem...
I have been trying this since 2 weeks.
please help!
21 years ago
hi all,
I have succesfully deployed my enterprise application on jboss-3.2.2.
It consists of an session bean which is accessed using a Servlet.
The servlet is in a seperate .war file and the ejb's in a .jar file.
However when I call the servlet which inturn calls the session bean.
I get the following error--
------------------------------------------------------
HTTP Status 405 - HTTP method GET is not supported by this URL
--------------------------------------------------------
the corrresponding servlet code is as follows
package beans;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.rmi.*;
import javax.rmi.*;
import java.util.*;
import javax.naming.*;
import javax.ejb.*;

public class ClientServlet1 extends HttpServlet
{
public void doPost(HttpServletResponse res,HttpServletRequest req)
throws ServletException,IOException
{
doGet(res,req);
}
public void doGet(HttpServletResponse res,HttpServletRequest req)
throws ServletException,IOException{
try {
res.setContentType("text/html");
PrintWriter out=res.getWriter();
Context ctx = new InitialContext();
Object obj=ctx.lookup("java:comp/env/ejb/beans/SimpleBean");
SimpleHome home =
(SimpleHome)PortableRemoteObject.narrow(obj,SimpleHome.class);

Simple test = home.create();
if (test != null)
out.println("<br>Completed creation of remote EJBObject");
else
out.println("Create returned null");
String s = test.getMessage();
out.println(" EJB Message: " + s);
out.close();
}catch(Exception e){System.out.println("exception is"+e);}
}

}
-----------------------------------------------------------------------
I m not able to figure put where the error lies n what it is supposed to mean???
Any help will be greatly appreciated.
thnx
21 years ago
hi all
I am wukin in a development environment where class files get modified periodically.
I would like to know whether jboss supports deployment of SERVLETS in the form of a directory structure(not in a .war/.ear file)..as happens in TOMCAT deployment??
Is there any procedure/directory(for eg web-apps in tomcat) so that we can put the web-inf directory of any application straight in jboss deploy directory and jboss deploys that application.
any help would be greatly appreciated.
thnx
21 years ago
hi amit
thnx for the help.My ejb-jar.xml n jboss.xml are fine as according to your format.
my web.xml is as follows
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE web-app>
- <web-app id="WebApp_ID">
- <servlet id="Servlet_1081713238854">
<servlet-name>ClientServlet1</servlet-name>
<servlet-class>ClientServlet1</servlet-class>
</servlet>
- <servlet-mapping id="ServletMapping_1081713305468">
<servlet-name>ClientServlet1</servlet-name>
<url-pattern>/ClientServlet1</url-pattern>
</servlet-mapping>
- <welcome-file-list id="WelcomeFileList_1081713238855">
<welcome-file>index.html</welcome-file>
</welcome-file-list>
- <ejb-ref id="EjbRef_1081713238858">
<ejb-ref-name>beans.Simple</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>beans.SimpleHome</home>
<remote>beans.Simple</remote>
<ejb-link>Simple</ejb-link>
</ejb-ref>
</web-app>
where all the beans are in beans folder.
after deployment when i try to invoke the servlet client it gives me an error
HTTP 500 NO CONTEXT CONFIGURED
.....Could there be some problem in the jndi settings???
Also is the <ejb-link> tag neccesary in web.xml when both .war n .jar files are in the same .ear file
21 years ago
Hi i am new to jboss.
I have a session bean which I am invoking through a servlet.
The .jar file and . war file is packaged in the same .ear file.
but after deploying the .ear file on jboss server ...the error i get is
----------------------------------------------
javax.naming.NamingException: resource-ref: org.jnp.interfaces.NamingContextFactory has no valid JNDI binding. Check the jboss-web/resource-ref.
---------------------------------------------
is there a problem in the deployment descriptor??
i would also like to know where yhe vendor specific file for eg jboss.xml i s put.
please help.
21 years ago