Help coderanch get a
new server
by contributing to the fundraiser
  • 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
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

ERROR DURING DEPLOYMENT OF SESSION BEANS!!HELP

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What information is getting logged to the console and/or server.log?
 
suchi verma
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi don
i solved the problem....
thnx neways
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How did you solve the problem?
reply
    Bookmark Topic Watch Topic
  • New Topic