session bug
Hello everyone! I think I have found bug in orion 1.5.2. There is problem with sessions. When I invalidate session and then get new session, sometimes (not always) I get same invalidated session. Does anybody have same problem? Any solution except that I remove all data from session? Thanks in advance. Here is code that demonstrates bug: session = request.getSession(true); System.out.println("session = request.getSession(false);\t" + session.hashCode()); System.out.println("session = " + session); session.invalidate(); System.out.println("session.invalidate();\t" + session.hashCode()); System.out.println("session = " + session); session = request.getSession(); System.out.println("session = request.getSession();\t" + session.hashCode()); System.out.println("session = " + session); Orion's output: session = request.getSession();2935133 session = HTTP Session AKAEMHOGAJOD session.invalidate(); 2935133 session = HTTP Session AKAEMHOGAJOD session = request.getSession(); 2935133 session = HTTP Session AKAEMHOGAJOD Exception is java.lang.IllegalStateException: Session was invalidated at com.evermind.server.http.EvermindHttpSession.setAttribute(Unknown Source) at isvu.kadrovska.web.command.LoginCommand.execute(LoginCommand.java:161) at isvu.kadrovska.web.Kadrovska.doPost(Kadrovska.java:183) at javax.servlet.http.HttpServlet.service(HttpServlet.java:211) at javax.servlet.http.HttpServlet.service(HttpServlet.java:309) at javax.servlet.http.HttpServlet.service(HttpServlet.java:336) at com.evermind._cxb._abe(Unknown Source) at com.evermind._cxb._uec(Unknown Source) at com.evermind._io._twc(Unknown Source) at com.evermind._io._gc(Unknown Source) at com.evermind._if.run(Unknown Source) With tomcat everything works OK. Tomcat's output: session = request.getSession();7616245 session = org.apache.tomcat.session.StandardSession@7436f5 session.invalidate(); 7616245 session = org.apache.tomcat.session.StandardSession@7436f5 session = request.getSession(); 4461550 session = org.apache.tomcat.session.StandardSession@4413ee Denis Kranjcec
problem with POST (bug?)
Hello everyone! I have very strange problem with my servlet. When I deploy servlet packed in war, servlet never recive POST request. It receive only GET (in HTML is POST). But when I put servlet class in default-web-app everything iw working fine. Do I need to put something in web.xml or somewhere else that I want to use POST? I have used few other servers and I never had similar problem. Here is servlet code: package isvu.studomat.web; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import java.util.*; public class TestOrion extends HttpServlet { private static final String CONTENT_TYPE = "text/html"; public void init(ServletConfig config) throws ServletException { super.init(config); } public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(CONTENT_TYPE); PrintWriter out = response.getWriter(); out.println(""); out.println(""); out.println("Untitled Document"); out.println(""); out.println(""); out.println(""); out.println(""); out.println(" "); out.println(" "); out.println(""); out.println(""); out.println(""); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType(CONTENT_TYPE); PrintWriter out = response.getWriter(); out.println(""); out.println("TestOrion"); out.println(""); out.println("POST request"); out.println("You wrote '" + request.getParameter("text") + "'"); out.println(""); } public void destroy() { } } Thanks in advance Denis Kranjcec
RE: configuration of web tier (JNDI)
Thanks a lot for your example :-) But something is wrong with your example :-( This is output from Orion console: getting reference... Got reference LoginBean EJBHome class LoginHome_StatelessSes ERROR processing request! java.lang.ClassCastException This is html: Could you also send source? How can I explicitly specify server and application where my EJB's are? If I have same ejb in different application I must specify tha application. Thanks again :-) Denis Kranjcec -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Harley Rana Sent: Friday, June 01, 2001 2:59 AM To: Orion-Interest Subject: RE: configuration of web tier (JNDI) Forgot the files!! Hey I've put together an example for you with a EJB that returns a Boolean to a servlet if the user name and pass are "admin" "pass". The changes that I made to the config files are; in server.xml ; in application.xml; in default-web-site.xml; Then just put the 3 files in the application directory, and change the password in the servlet. It should work, let me know how it goes. Harley.
RE: configuration of web tier (JNDI)
Thanks for answer! But I still don't know could I put JNDI properties in web.xml? Could you give me some example? That would be great. Thanks. Denis Kranjcec -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Harley Rana Sent: Wednesday, May 30, 2001 2:05 AM To: Orion-Interest Subject: RE: configuration of web tier (JNDI) Hey Denis, its not to hard. You would package both the seperate tiers files into seperate .ear files, then in a servlet you would access a ejb by creating a properties file with your JNDI settings and setting the url to the machine hosting the ejb tier ( for now would be localhost, but could be anything ), create the InitalContext with the properties, and you can then access the bean on the ejb tier from the web tier. Its all about setting the IntialContex with the url of the right machine. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Denis Kranjcec Sent: Monday, May 28, 2001 7:14 AM To: Orion-Interest Subject: configuration of web tier (JNDI) Hi everyone! I'm new user of Orion and I have one problem. I want to separate web tier and ejb tier. Both tiers will be running in the same server for now, but later they will be on different Orion servers. How can I specify that my web tier make jndi lookup to ejb tier, where is JNDI server...? We have two applications and both have Login bean so I must be able to specify application where my web tier should make lookup. Configuration should be same as that tiers are on different servers. I have read Orion documentation, but there isn't examples, and I'm not able to figure it out how to configure it. Thanks in advance, Denis Kranjcec
configuration of web tier (JNDI)
Hi everyone! I'm new user of Orion and I have one problem. I want to separate web tier and ejb tier. Both tiers will be running in the same server for now, but later they will be on different Orion servers. How can I specify that my web tier make jndi lookup to ejb tier, where is JNDI server...? We have two applications and both have Login bean so I must be able to specify application where my web tier should make lookup. Configuration should be same as that tiers are on different servers. I have read Orion documentation, but there isn't examples, and I'm not able to figure it out how to configure it. Thanks in advance, Denis Kranjcec
Orion & Resin problem
Hi I'm want to use Resin as servlet/jsp container and Orion as ejb container. I followed simple instructions on resin web site on how to connect servlet to ejb but I get ClassCastException. Orion returns __Proxy0 class instead hello.ejb.HelloHome Exception : 500 Servlet Exception javax.servlet.ServletException: Unable to get home interface: java.lang.ClassCastException: __Proxy0 was not an instance of interface hello.ejb.HelloHome, the interfaces it implements is [Ljava.lang.Class;@8b4ad504 at hello.web.HelloServlet.init(HelloServlet.java:48) at com.caucho.server.http.Application.createServlet(Application.java:1731) at com.caucho.server.http.Application.loadServlet(Application.java:1695) at com.caucho.server.http.Invocation.service(Invocation.java, Compiled Code) at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:121) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:238) at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java, Compiled Code) at com.caucho.server.TcpConnection.run(TcpConnection.java, Compiled Code) at java.lang.Thread.run(Thread.java:479) I have copied hello-planet.war to resin. There is answer in resin documentation that I should clear the CLASSPATH environment before starting resin. I have done that but I still get ClassCastException. (I don't understand why should that help but I have tried that) Do you know how to solve that problem? Thanks in advance Denis Kranjcec
No Subject
Hi I'm want to use Resin as servlet/jsp container and Orion as ejb container. I followed simple instructions on resin web site on how to connect servlet to ejb but I get ClassCastException. Orion returns __Proxy0 class instead hello.ejb.HelloHome Exception : 500 Servlet Exception javax.servlet.ServletException: Unable to get home interface: java.lang.ClassCastException: __Proxy0 was not an instance of interface hello.ejb.HelloHome, the interfaces it implements is [Ljava.lang.Class;@8b4ad504 at hello.web.HelloServlet.init(HelloServlet.java:48) at com.caucho.server.http.Application.createServlet(Application.java:1731) at com.caucho.server.http.Application.loadServlet(Application.java:1695) at com.caucho.server.http.Invocation.service(Invocation.java, Compiled Code) at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:121) at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:238) at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java, Compiled Code) at com.caucho.server.TcpConnection.run(TcpConnection.java, Compiled Code) at java.lang.Thread.run(Thread.java:479) I have copied hello-planet.war to resin. There is answer in resin documentation that I should clear the CLASSPATH environment before starting resin. I have done that but I still get ClassCastException. (I don't understand why should that help but I have tried that) Do you know how to solve that problem? Thanks in advance Denis Kranjcec