Sessions And SSL ( BUG !)
Hi there, I am trying to setup an application to be accessed both by HTTP and HTTPS, so i configured two applications with common root ( /webs in my case ). I added shared="true" to web-app.../ to force both applications share their sessions. There are two page types: secured and unsecured. I want to redirect the user transparently to the secured version if he is trying to access a secured page using HTTP, like this: [ .. sec.jsp .. ] if(!request.isSecure()) { response.sendRedirect("https://localhost:439/webs/sec.jsp"); } It is also possible to switch to HTTP is a unsecured page is accessed through HTTPS: [ .. unsec.jsp .. ] if(request.isSecure()) { response.sendRedirect("http://localhost:8080/webs/unsec.jsp"); } It seems that request.isSecure() method is always returning false regardless the request is secure or not. I think it is a bug. I could use request.getServerPort() to detect on which port the page was requested, but this is not so general. How good this approach is ? And one more question: I have a problem with Netscape. Cookies ( used to maintain session) accepted from unsecured site version ( localhost:8080 ), are not sent to secured site version ( localhost:439 ) . How can I force Netscape to use same cookes for both of them ? If I disable cookies and use url rewriting all is working fine ( but this is not a solution ). ( With IE I haven't this problem ) Any suggestion ? Peter
Re: Need Urgent Reply
Hashim Merchant wrote: Hi Fabio, Thanx for your reply. U Told me earlier that u installed the orion1.0.3 and got the server to shutdown and restart. I did the same i got the orion1.0.3 from the url u gave me,i am working on windows NT 4.0 with jdk 1.2.2 i used the command as u told me to ie java -jar admin.jar ormi://localhost:portnumber admin 123 -shutdown but still got the same error what am i missin???I would really appreciate it if u help me out with this. Thanx for your time Hashim Hi there Hashim. For some reason that I don't know, I have the same problem (although with different a different error message) when I try the same configuration under Windows NT 4.0 Server Service Pack 6 with jdk1.2.2 and with jdk1.3. Nevertheless, I am able to run it successfully under Linux and under Windows 2000... Smells like a platform-specific bug... Fábio
RE: java.lang.SecurityException when attempting to run ejb sample app
I just reran the cart and product demos, and both did just fine, with the following command lines and results: D:\orion\demo\ejb\cartjava -classpath ../../../orion.jar;../../../ejb.jar;../.. /../jndi.jar;. CartClient Item not found in cart: Oranges D:\orion\demo\ejb\cartcd ..\product D:\orion\demo\ejb\productjava -classpath ../../../orion.jar;../../../ejb.jar;.. /../../jndi.jar;. ProductClient Enter the id (integer) of the product you want to add: 1 Enter the name for item 1: Gravy Enter the cost for Gravy: 2.15 Product added So I suspect your /orion/config/principals.xml file; is the "admin" user deactivated? Because the "jndi.properties" file for both examples specifies the "admin" user. Arved Sandstrom -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Dan Malks - Java Design Center McLean VA Sent: Tuesday, June 20, 2000 5:14 PM To: Orion-Interest Subject: java.lang.SecurityException when attempting to run ejb sample app Any thoughts appreciated on the following problem. thnx. -dm E:\java\orion\demo\ejb\productls META-INF ProductEJB.class ProductServlet.java Product.class ProductEJB.java jndi.properties Product.java ProductHome.class orion-product.jar ProductClient.class ProductHome.java product.skeleton ProductClient.javaProductServlet.class E:\java\orion\demo\ejb\producte:\java\jdk1.2.2\bin\java -classpath ../../../ori on.jar;../../../ejb.jar;../../jndi.jar;. ProductClient Exception in thread "main" java.lang.SecurityException: Invalid username/passwor d for ejbsamples (admin) at com.evermind.server.rmi.a8.fd(JAX) at com.evermind.server.rmi.a8.fd(JAX) at com.evermind.server.rmi.a8.ez(JAX) at com.evermind.server.rmi.RMIServer.ez(JAX, Compiled Code) at com.evermind.server.rmi.RMIContext.lookup(JAX) at com.evermind.server.Application.ajt(JAX, Compiled Code) at com.evermind.server.ApplicationClientInitialContextFactory.getInitial Context(JAX, Compiled Code) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6 72) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250 ) at javax.naming.InitialContext.init(InitialContext.java:226) at javax.naming.InitialContext.init(InitialContext.java:182) at ProductClient.main(ProductClient.java:18) Dan MalksSun Java Center Enterprise Java Architect703.208.5794
RE: java.lang.SecurityException when attempting to run ejb sample app
The jndi.properties file in the directory for the EJBs has the wrong password. I had the same problem and took me a very long time to figure out. Modify jndi.properties on that directory to have the correct password and your problem will be fixed. David -Original Message- From: Arved Sandstrom [mailto:[EMAIL PROTECTED]] Sent: Wednesday, June 21, 2000 7:23 AM To: Orion-Interest Subject: RE: java.lang.SecurityException when attempting to run ejb sample app I just reran the cart and product demos, and both did just fine, with the following command lines and results: D:\orion\demo\ejb\cartjava -classpath ../../../orion.jar;../../../ejb.jar;../.. /../jndi.jar;. CartClient Item not found in cart: Oranges D:\orion\demo\ejb\cartcd ..\product D:\orion\demo\ejb\productjava -classpath ../../../orion.jar;../../../ejb.jar;.. /../../jndi.jar;. ProductClient Enter the id (integer) of the product you want to add: 1 Enter the name for item 1: Gravy Enter the cost for Gravy: 2.15 Product added So I suspect your /orion/config/principals.xml file; is the "admin" user deactivated? Because the "jndi.properties" file for both examples specifies the "admin" user. Arved Sandstrom -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Dan Malks - Java Design Center McLean VA Sent: Tuesday, June 20, 2000 5:14 PM To: Orion-Interest Subject: java.lang.SecurityException when attempting to run ejb sample app Any thoughts appreciated on the following problem. thnx. -dm E:\java\orion\demo\ejb\productls META-INF ProductEJB.class ProductServlet.java Product.class ProductEJB.java jndi.properties Product.java ProductHome.class orion-product.jar ProductClient.class ProductHome.java product.skeleton ProductClient.javaProductServlet.class E:\java\orion\demo\ejb\producte:\java\jdk1.2.2\bin\java -classpath ../../../ori on.jar;../../../ejb.jar;../../jndi.jar;. ProductClient Exception in thread "main" java.lang.SecurityException: Invalid username/passwor d for ejbsamples (admin) at com.evermind.server.rmi.a8.fd(JAX) at com.evermind.server.rmi.a8.fd(JAX) at com.evermind.server.rmi.a8.ez(JAX) at com.evermind.server.rmi.RMIServer.ez(JAX, Compiled Code) at com.evermind.server.rmi.RMIContext.lookup(JAX) at com.evermind.server.Application.ajt(JAX, Compiled Code) at com.evermind.server.ApplicationClientInitialContextFactory.getInitial Context(JAX, Compiled Code) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6 72) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250 ) at javax.naming.InitialContext.init(InitialContext.java:226) at javax.naming.InitialContext.init(InitialContext.java:182) at ProductClient.main(ProductClient.java:18) Dan MalksSun Java Center Enterprise Java Architect703.208.5794
PLEASE !! simple question concerning orion tags !
Hi, I would like to know what is the use of the tag server host="the.remote.server.com" password="123" port="23791" username="admin" / in rmi.xml Is it possible to stablish some kind of federation or connected servers ?
Using EJBs from another Orion application
Hi everyone, I just started using Orion (after working with several other EJB Servers). I have deployed one ejb application using an .EAR in Orion under the name 'rbs'. I also have a JSP/web application deployed under the name 'dev-rbs' without using an .EAR file. This is to be an updateable application. The JSP developers in my team should be able to replace and add JSP files to the application on-line. My main problem is looking up a session ejb that the application uses in the 'dev-rbs' application. This session ejb comes from the 'rbs' application. I would think that the JSP application is a client for the 'rbs' app (but maybe not in the same container/server), so I shouldn't use the 'java:comp/env' prefix to the JNDI name. What InitialContextFactory should be used ? I don't want to change anything in the 'rbs' application. What has to be added to the descriptors of the 'dev-rbs' application? Thanks for any help, kind regards, Jonathan van Alteren
Re: Orion 1.0 PetStore Demo DB
Sybase; the PetStore seems awfully tied to three db's of which this is one. Hopefully that will change in the next JPS release (or even better; if they'd go CMP when EJB 2.0 is finalized with finder/OR support etc). /Magnus Stenman, the Orion team - Original Message - From: "Kalvar, Kirk" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Tuesday, June 20, 2000 5:52 PM Subject: Orion 1.0 PetStore Demo DB What is the datasource for Orion's website implentation of the PetStore? I've been using hsql but the catalog query doesn't execute properly. I've been using JDBCTest to test the query stmt but something isn't quite right. Kirk S. Kalvar, Software Engineer DRS Electronic Systems Group
Re: PLEASE !! simple question concerning orion tags !
Hi, federations are best created by the cluster tag. add (http://www.orionserver.com/docs/rmi.xml.html for description) cluster username="specialclusterusername" password="12345678..." / in both the server's rmi.xml and set host="a.proper.public.hostname.for.the.machine" in the rmi-server tag for both machines. This should establish a link (them acting together). To then for instance use remote EJBs you set remote="true" in the ejb-module tag in orion-application.xml for your application. I hope it helps. /Magnus stenman, the Orion team - Original Message - From: "Pedro Garcia Lopez" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Wednesday, June 21, 2000 3:16 PM Subject: PLEASE !! simple question concerning orion tags ! Hi, I would like to know what is the use of the tag server host="the.remote.server.com" password="123" port="23791" username="admin" / in rmi.xml Is it possible to stablish some kind of federation or connected servers ?
RE: java.lang.SecurityException when attempting to run ejb sample app
I had suspected the same thing, but could not find any problem with the principal file. Do you see anything suspicious? ?xml version="1.0"? !DOCTYPE principals PUBLIC "//Evermind - Orion Principals//" "http://www.orionserver.com/dtds/principals.dtd" principals groups group name="users" descriptionusers/description permission name="rmi:login" / permission name="com.evermind.server.rmi.RMIPermission" / /group group name="guests" descriptionguests/description /group group name="administrators" descriptionadministrators/description permission name="administration" / permission name="com.evermind.server.AdministrationPermission" / /group /groups users user username="user" password="456" deactivated="true" descriptionThe default user/description group-membership group="users" / group-membership group="guests" / /user user username="anonymous" password="" descriptionThe default guest/anonyomous user/description group-membership group="guests" / /user user username="admin" password="admin" descriptionThe default administrator/description group-membership group="users" / group-membership group="guests" / group-membership group="administrators" / /user /users /principals Thanks, -dm Dan Malks Enterprise Java Architect Sun Java Center 703.208.5794 On Wed, 21 Jun 2000, Arved Sandstrom wrote: I just reran the cart and product demos, and both did just fine, with the following command lines and results: D:\orion\demo\ejb\cartjava -classpath ../../../orion.jar;../../../ejb.jar;../.. /../jndi.jar;. CartClient Item not found in cart: Oranges D:\orion\demo\ejb\cartcd ..\product D:\orion\demo\ejb\productjava -classpath ../../../orion.jar;../../../ejb.jar;.. /../../jndi.jar;. ProductClient Enter the id (integer) of the product you want to add: 1 Enter the name for item 1: Gravy Enter the cost for Gravy: 2.15 Product added So I suspect your /orion/config/principals.xml file; is the "admin" user deactivated? Because the "jndi.properties" file for both examples specifies the "admin" user. Arved Sandstrom -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Dan Malks - Java Design Center McLean VA Sent: Tuesday, June 20, 2000 5:14 PM To: Orion-Interest Subject: java.lang.SecurityException when attempting to run ejb sample app Any thoughts appreciated on the following problem. thnx. -dm E:\java\orion\demo\ejb\productls META-INF ProductEJB.class ProductServlet.java Product.class ProductEJB.java jndi.properties Product.java ProductHome.class orion-product.jar ProductClient.class ProductHome.java product.skeleton ProductClient.javaProductServlet.class E:\java\orion\demo\ejb\producte:\java\jdk1.2.2\bin\java -classpath ../../../ori on.jar;../../../ejb.jar;../../jndi.jar;. ProductClient Exception in thread "main" java.lang.SecurityException: Invalid username/passwor d for ejbsamples (admin) at com.evermind.server.rmi.a8.fd(JAX) at com.evermind.server.rmi.a8.fd(JAX) at com.evermind.server.rmi.a8.ez(JAX) at com.evermind.server.rmi.RMIServer.ez(JAX, Compiled Code) at com.evermind.server.rmi.RMIContext.lookup(JAX) at com.evermind.server.Application.ajt(JAX, Compiled Code) at com.evermind.server.ApplicationClientInitialContextFactory.getInitial Context(JAX, Compiled Code) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6 72) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:250 ) at javax.naming.InitialContext.init(InitialContext.java:226) at javax.naming.InitialContext.init(InitialContext.java:182) at ProductClient.main(ProductClient.java:18) Dan MalksSun Java Center Enterprise Java Architect703.208.5794
Re: PLEASE !! simple question concerning orion tags !
Hi, In this case, 1)Both connected servers in the cluster use the same user database ? 2)Is it stablished a security domain among servers ? I mean, if EJB A in orion A connects to EJB b in Orion B, security constraints will be applied and Orion B will recognize the user as a valid user ? I imagine that if question 1 is yes, then authentication should be unified. 3) Security user information is also propagated from server to server ? If JSP in Orion A connects to EJB in Orion B, will EJB B able to identify the user ? Regards and thank you. Pedro Magnus Stenman wrote: Hi, federations are best created by the cluster tag. add (http://www.orionserver.com/docs/rmi.xml.html for description) cluster username="specialclusterusername" password="12345678..." / in both the server's rmi.xml and set host="a.proper.public.hostname.for.the.machine" in the rmi-server tag for both machines. This should establish a link (them acting together). To then for instance use remote EJBs you set remote="true" in the ejb-module tag in orion-application.xml for your application. I hope it helps. /Magnus stenman, the Orion team - Original Message - From: "Pedro Garcia Lopez" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Wednesday, June 21, 2000 3:16 PM Subject: PLEASE !! simple question concerning orion tags ! Hi, I would like to know what is the use of the tag server host="the.remote.server.com" password="123" port="23791" username="admin" / in rmi.xml Is it possible to stablish some kind of federation or connected servers ?
A bug with admin.jar
HI guys, I think what we have detected here is an orion bug. I have tried using java -jar admin.jar ormi://localhost:portnumber admin 123 -shutdown on Windows 98/NT 4.0 using JDK1.2.2 and it doesen' t work while another person who i got in touch through the mailing list has the same command working on Windows 2000 and Linux. Is there anyone there who could look through this bug and let me know if it is really a bug or i am just doing something wrong. I'd really appreciate it. Thanx for your time Hashim Merchant winmail.dat
memory error in JSP
running the jsp with jdbc and odbc..getting out of memory error. I am running win2000. 128 meg memory the page give me this message: Error parsing JSP page /contactsUpdate/logincontactsList.jsp Syntax error in source The compiler has run out of memory. Consider using the "-J-mxnumber" command line option to increase the maximum heap size. Pleas help me ASAP!! Fred Hosseinzadeh System Programmer Service Automation/Pasadena, Earthlink Inc. Ext : 65852 pagerE-mail: [EMAIL PROTECTED]
Any problem having a ClassLoader in a servlet?
I'm getting a ClassNotFoundException trying to run a servlet (I'm trying to get an enhydra app working under Orion so we can switch). Are there specific Orion issues that would cause this not to work (ie. not allowing custom classloaders in servlets), or am I just not putting the files in the right place? Thanks, -- Joel Shellman Chief Software Architect The virally-driven B2B marketplace for outsourcing projects http://www.ants.com/90589781
SSL Certificate generation
I am trying to get my localhost server set up to use SSL. I went to the Orion web site to the "how to set up a secure site using SSL". I followed the directions step by step. It appeared to work until the final step in "creating a keystore with a certificate". I type this in: keytool -keystore keystore -keyalg "RSA" -import -trustcacerts -file localhost.cer Enter keystore password: secret This is the error I get: keytool error: java.lang.Exception: Failed to establish chain from reply I am using JDK1.3. Any help would be appreciated! Thanks, Jason
RE: SSL Certificate generation
I went to the JavaSoft web site to look at the documentation for the keytool utility. In the how to use it they had -import listed as the first parameter. They did not have -keyalg listed as one of the options that you can use with -import. I removed it from the command line and it imported the certificate. It seems if I type the following: keytool -import -trustcacerts -file localhost.cer -storepass secret it imported the certificate just fine. Has the documentation worked for other people? -Jason -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jason Rowland Sent: Wednesday, June 21, 2000 2:40 PM To: Orion-Interest Subject: SSL Certificate generation I am trying to get my localhost server set up to use SSL. I went to the Orion web site to the "how to set up a secure site using SSL". I followed the directions step by step. It appeared to work until the final step in "creating a keystore with a certificate". I type this in: keytool -keystore keystore -keyalg "RSA" -import -trustcacerts -file localhost.cer Enter keystore password: secret This is the error I get: keytool error: java.lang.Exception: Failed to establish chain from reply I am using JDK1.3. Any help would be appreciated! Thanks, Jason