Re: Problem starting Orion on linux...
It looks like you are using a kaffe vm, maybe try using a jdk1.2 or higher? Joel On Tue, 9 Oct 2001, Jimbo Jones wrote: I have gotten Orion to start on linux with no problems before, but now out of the blue I cannot do it. At first, it gave me a NoClassDefFoundError for org/xml/something. I thought that was odd, but I put J2EE_HOME/lib/j2ee.jar in my classpath and that fixed that. But now I am getting the following error: [orion@localhost orion]$ java -jar orion.jar Internal error: caught an unexpected exception. Please check your CLASSPATH and your installation. java/lang/NoClassDefFoundError: com/evermind/gui/server/ServiceConsole at java.lang.reflect.Method.invoke(Method.java:native) at kaffe.jar.ExecJarName.main(ExecJarName.java:70) at kaffe.jar.ExecJar.main(ExecJar.java:59) Aborted I can't, for the life of me, figure out where that class is or why I am even getting this error in the first place. I've never seen it before. Thanks, James _ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
RE: How to get the RoleManager
-Original Message- From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED]] I have a feeling if you made app2 the parent app of app1 it might work (they'd probably be the same RoleManager - can't confirm that though). Thanks for the suggestion. We tried it, but it doesn't work. When we go to the second app the login form comes up again. This is a non-standard solution (if a solution at all! ;)), then again if you're using RoleManager you're already using Orion specific code so you probably don't mind too much. At the moment we are looking for *any* solution that will do form-based single signon across two apps on Orion. What is the standard? Cheers, Dave.
Re: Multiple data sources for each application
Hi Atul. Sorry, no I do not know, although I suspect so. We are using BMP Enity Beans, due to the unusual database design (CMP won't handle it). However, our BMP EJB's do automatically deploy, and successfully create and register their own connection pools in JNDI on demand. Otherwise, our entire security and database access framework would be non-functional. You would have to look up the exact sequence of events, but there are a number of function calls made on the EJB during load and activation before any attempt is made to access the database. The exact sequence of calls is specified in the EJB specification. If you were to intercept one of these earlier calls to create your connection, I suspect that would work. We are doing something similiar. -Steve Setlur, Atul (MED) wrote: Steve, Do you know if CMP Entity Beans deploy if the connection pool is established programatically? Because in this approach the connection pool is established, after the EJB jars have been deployed. Thanks, -Atul -Original Message- From: Stephen Davidson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 09, 2001 4:06 PM To: Orion-Interest Subject: Re: Multiple data sources for each application You can also create them programmatically, and then bind them to the JNDI tree. But unless you are doing something really weird (I am working on one such app, multiple database schema with identical tables), I would recommend the approach that Jeff is advocating. -Steve -- Stephen Davidson Java Consultant Delphi Consultants, LLC http://www.delphis.com Phone: 214-696-6224 x208
RE: Problem implementing Custom User Management using SimpleUserM anager
It sounds like some of you may be forgetting to create an initial account in the database ... You can't have a user in principals.xml and expect orion to know where to fetch the authentication information. I have an EJB user manager and to make things easy for my self. I protected a minimal administration site with the xml user manager. This site allows the server administrator to log on and define root user/s who can then access the fully functional user administration and other applications. Justin -Original Message- From: SAURUGGER,PETER (A-PaloAlto,ex2) [mailto:[EMAIL PROTECTED]] Sent: 09 October 2001 06:43 To: Orion-Interest Subject: RE: Problem implementing Custom User Management using SimpleUserM anager I have not tried this yet, but it just occurred to me that the naming.principal is just establishing the jndi security context - it does not do a login. If you want to login, you have to first establish the context with an account in principals.xml, and then use RoleManager.login(...) to login your user. The role manager gets information about the usermanager you registered, the InitialContext has nothing to do with your usermanager. (This is just a Gedankenexperiment - if you try it, let me know whether it actually works) --peter -Original Message- From: Jeff Schnitzer [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 02, 2001 5:15 PM To: Orion-Interest Subject: RE: Problem implementing Custom User Management using SimpleUserManager I am also experiencing this - no matter what I try (and I'm pretty sure I've tried everything), I cannot get an application client user to log in using a custom user manager (either SimpleUserManager-derived or DataSourceUserManager). Note that the application client logs in just fine using admin or any of the principals.xml users. But I get the Invalid username/password exception when trying users produced by the custom user manager. This is with Orion 1.5.2. Does anyone have application clients working with a custom user manager? Jeff -Original Message- From: Adam Maliborski [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 29, 2001 7:09 AM To: Orion-Interest Subject: Problem implementing Custom User Management using SimpleUserManager Hi, I am trying to validate users of my ejb server via a database using the SimpleUserManager. I have extended SimpleUserManager and overridden the three methods and confirmed that they are being called and returning true. I have made the following changes to the descriptors. ORION-APPLICATION.XML orion-application deployment-version=1.5.2 ejb-module remote=false path=ejb.jar / web-module id=web path=web.war / security-role-mapping name=administration group name=administration / /security-role-mapping security-role-mapping name=productbuilder group name=productbuilder / /security-role-mapping security-role-mapping name=enduser group name=enduser / /security-role-mapping persistence path=persistence / library path=c:\test\ejb.jar / principals path=principals.xml / user-manager class=com.test.rms.user.orion.UCIServerUserManager / log file path=application.log / /log namespace-access read-access namespace-resource root= security-role-mapping name=lt;jndi-user-rolegt; group name=administration / group name=productbuilder / group name=enduser / /security-role-mapping /namespace-resource /read-access write-access namespace-resource root= security-role-mapping name=lt;jndi-user-rolegt; group name=administration / group name=productbuilder / group name=enduser / /security-role-mapping /namespace-resource /write-access /namespace-access /orion-application PRINCIPALS.XML principals groups group name=administration permission name=administration / permission name=rmi:login / permission name=com.evermind.server.rmi.RMIPermission / /group group name=productbuilder permission name=rmi:login / permission name=com.evermind.server.rmi.RMIPermission / /group group name=enduser permission name=rmi:login / permission name=com.evermind.server.rmi.RMIPermission / /group /groups users /users /principals ORION-EJB-JAR.XML orion-ejb-jar deployment-version=1.5.2 deployment-time=e93e1950d0 enterprise-beans .. .. (EJB DECLARATION) .. assembly-descriptor security-role-mapping name=administration /security-role-mapping security-role-mapping name=productbuilder /security-role-mapping security-role-mapping name=enduser /security-role-mapping default-method-access
Error Accessing an EJB through a Bean
We created a Bean to access an EJB from JSPs. First we tested the Bean from a Java Client and everything worked fine. Then we copied the Bean to the Orion server and tried to acces the EJB by using a JSP that instanciates the Bean that accesses the EJB. But we can not get it to work. The test with the Java client still works properly. But using the Bean from JSP always creates a ClassCastException. Here's the sniplet from the Bean where the lookup is performed. private static GUIServiceSBHome getHome(){ GUIServiceSBHome toReturn = null; try { Hashtable env = new Hashtable(); //ToDO if this bean runs inside a container this Env property will not be //necessary env.put(Context.INITIAL_CONTEXT_FACTORY, com.evermind.server.rmi.RMIInitialContextFactory); env.put(Context.SECURITY_PRINCIPAL, admin); env.put(Context.SECURITY_CREDENTIALS, xyz); env.put(Context.PROVIDER_URL, ormi://164.139.33.191:23791/bizDataNew); // Replace EJB ModuleName below with the EJB module name identified // in your deployment profile Context ctx = new InitialContext(env); Object ref = ctx.lookup(GUIServiceSB); logger.debug(Got an Object.. Class = + ref.getClass()); toReturn = (GUIServiceSBHome)PortableRemoteObject.narrow(ref, GUIServiceSBHome.class); logger.debug(Lookup5); } catch(Throwable ex){ logger.error( Unable to perform lookup for GUIServiceBean Home interface\nException = + ex.toString() ); } return toReturn; } The logger.debug statements create the following output. From the Client: de.mgi.frontend.GUIServiceProxyBean: Got an Object.. Class = class __Proxy0 de.mgi.frontend.GUIServiceProxyBean: Lookup5 On the Server (Bean used by JSP): de.mgi.frontend.GUIServiceProxyBean: Got an Object.. Class = class GUIServiceSBHome_StatelessSessionHomeWrapper215 de.mgi.frontend.GUIServiceProxyBean: Unable to perform lookup for GUIServiceBean Home interface Exception = java.lang.ClassCastException: GUIServiceSBHome_StatelessSessionHomeWrapper215 was not an instance of interface de.mgi.orca.business_data.ejb.session.gui.GUIServiceSBHome, the interface it implements is de.mgi.orca.business_data.ejb.session.gui.GUIServiceSBHome Next to the relevant question why does the Bean get an exception when it is executed on the server, there are also two more questions that I have when I look at the ouput. 1. Why is the return value of ref.getClass() different? The client and the JSP are accessing the same EJB on the same Orion server. 2. Why does it says the retrieved object is not an instance of the interface ...GUIServiceSBHome but an instance of ...GUIServiceSBHome? For me the two interface classe names look the same. And hint why the bean is not working on the server is greatly appreciated. Peter Cugier Database and Web Technology Consulting Georg-Simon-Ohm-Str. 4, 45701 Herten (GERMANY) Phone: +49(0)209 3593777 Fax: +49(0)209 3593766 E-Mail: [EMAIL PROTECTED]
RE: How to get the RoleManager
Maybe the session=shared attribute would allow you to achieve your goal. Don't know whether its valid only for sharing between http and https sessions -Original Message- From: David Potts [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 10, 2001 5:02 AM To: Orion-Interest Subject: RE: How to get the RoleManager -Original Message- From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED]] I have a feeling if you made app2 the parent app of app1 it might work (they'd probably be the same RoleManager - can't confirm that though). Thanks for the suggestion. We tried it, but it doesn't work. When we go to the second app the login form comes up again. This is a non-standard solution (if a solution at all! ;)), then again if you're using RoleManager you're already using Orion specific code so you probably don't mind too much. At the moment we are looking for *any* solution that will do form-based single signon across two apps on Orion. What is the standard? Cheers, Dave.
Re: Multiple data sources for each application
Hi Jeff. Multiple versions of the same application at the same time? I did not mean to imply that! We only deploy one version of each application, and then let the application decide which database to connect during runtime, based on which user is accessing it at that time. If there is some way for CMP to determine which database it is supposed to connect to at any given time, based on which user is making the call, I would be interested in hearing about it. -Steve J.D. Bertron wrote: I don't think that's weird at all. I've always had applications select the database they connect to at run time, not deployment time. This seems like a major problem to me, with consequences on regression testing etc... It makes no sense to have two identical applications deployed with different datasources.xml, just so the end user can decide which DB to connect to. I can see why it's easier to have it that way from the server end, because you don't have to worry about switching a datasource on an active bean, but that's short sighted. J.D. -Original Message- From: Stephen Davidson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, October 09, 2001 5:06 PM To: Orion-Interest Subject: Re: Multiple data sources for each application You can also create them programmatically, and then bind them to the JNDI tree. But unless you are doing something really weird (I am working on one such app, multiple database schema with identical tables), I would recommend the approach that Jeff is advocating. -Steve Jeff Hubbach wrote: It's at the application level. You specify a data-sources.xml file in the orion-application.xml, and this can be a different data-sources.xml file for each application. Jeff. [snip to save bandwidth] -- Stephen Davidson Java Consultant Delphi Consultants, LLC http://www.delphis.com Phone: 214-696-6224 x208
RE: How to get the RoleManager
inline On Wed, 10 Oct 2001, David Potts wrote: -Original Message- From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED]] I have a feeling if you made app2 the parent app of app1 it might work (they'd probably be the same RoleManager - can't confirm that though). Thanks for the suggestion. We tried it, but it doesn't work. When we go to the second app the login form comes up again. I think this happens becuase there are different cookies being sent for each application context. There is a shared attribute that can be set in the web-site.xml file which may address this. shared is a attribute of the web-app,default-web-app tags here is a link to the description http://www.orionserver.com/docs/web-site.xml.html This is a non-standard solution (if a solution at all! ;)), then again if you're using RoleManager you're already using Orion specific code so you probably don't mind too much. At the moment we are looking for *any* solution that will do form-based single signon across two apps on Orion. What is the standard? Cheers, Dave.
Non Web Application accessing data source
Hi All, How do I lookup datasource from non web application (Class File not Servlet and JSP). I know that we can do it using JNDI. Can I get a sample to do this. Naveen
RE: How to get the RoleManager
Uh, try using the shared session attribute (orion-web.xml) + the same realm name for the login config (web.xml) HTH, JP -Original Message- From: David Potts [mailto:[EMAIL PROTECTED]] Sent: MiƩrcoles, 10 de Octubre de 2001 8:02 To: Orion-Interest Subject: RE: How to get the RoleManager -Original Message- From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED]] I have a feeling if you made app2 the parent app of app1 it might work (they'd probably be the same RoleManager - can't confirm that though). Thanks for the suggestion. We tried it, but it doesn't work. When we go to the second app the login form comes up again. This is a non-standard solution (if a solution at all! ;)), then again if you're using RoleManager you're already using Orion specific code so you probably don't mind too much. At the moment we are looking for *any* solution that will do form-based single signon across two apps on Orion. What is the standard? Cheers, Dave.
Re: Date conversion problem ??
Hi Eddie, The code that Fredrick Lindgren sent to this list looks like the right way of obtaining a java.util.Date from a java.sql.Timestamp. As for your question of why, part of the answer may be that three java classes are somewhat confusing: - java.util.Date (not used by JDBC) contains a date and time down to millisecond precision - java.sql.Date (used by JDBC) contains a date, and inherits from java.util.Date - java.sql.Timestamp (used by JDBC) contains a date and time down to nanosecond precision, and inherits from java.util.Date The javadoc for java.sql.Timestamp explains exactly where it stores the milliseconds (actually nanoseconds). Another question is why Sun decided to write such strange code. I'm afraid I don't have an answer for that! Nick At 10:04 AM 10/8/01 +0200, you wrote: Thanks Frederik, But what I don't understand is why Date only contains the second part and not the millisecond part and when it does ? That is, when I create a Date object and print the millisecond part with the getTime() method, I do see the millisecond part but when I receive something from the database, the millisecond part is zero. Does this mean that is only zero when the date field is handled by the JDBC part ?? Eddie snip
Non Web Application accessing data source
Hi All, How do I lookup datasource from non web application (Class File not Servlet and JSP). I know that we can do it using JNDI. Can I get a sample to do this. Naveen
Message status - undeliverable
The message that you sent was undeliverable to the following: ggounden Information about your message: Subject: RE: How to get the RoleManager
RE: How to get the RoleManager
That won't help - I think shared sessions only work between two WARs in the same app. The only thing I can suggest is using some sort of cookie based system where you track via session ID who is logged in (stored in a hashmap or something), then from each app lookup that hashmap (via JNDI) and log in the user programmatically before they are shown the login page. Very fugly though. SSO is one of J2EE's problems. -mike Mike Cannon-Brookes :: [EMAIL PROTECTED] Atlassian :: http://www.atlassian.com Supporting YOUR J2EE World -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of SAURUGGER,PETER (A-PaloAlto,ex2) Sent: Thursday, October 11, 2001 1:50 AM To: Orion-Interest Subject: RE: How to get the RoleManager Maybe the session=shared attribute would allow you to achieve your goal. Don't know whether its valid only for sharing between http and https sessions -Original Message- From: David Potts [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 10, 2001 5:02 AM To: Orion-Interest Subject: RE: How to get the RoleManager -Original Message- From: Mike Cannon-Brookes [mailto:[EMAIL PROTECTED]] I have a feeling if you made app2 the parent app of app1 it might work (they'd probably be the same RoleManager - can't confirm that though). Thanks for the suggestion. We tried it, but it doesn't work. When we go to the second app the login form comes up again. This is a non-standard solution (if a solution at all! ;)), then again if you're using RoleManager you're already using Orion specific code so you probably don't mind too much. At the moment we are looking for *any* solution that will do form-based single signon across two apps on Orion. What is the standard? Cheers, Dave.
error serializing bean
Does anyone know what this error means? My guess is that it's happening when Orion tries to passivate one of my ejbs. My EJB has, as one of it's instance variables, a jndi Context: public class MyEJB implements SessionBean{ javax.naming.Context namingContext; } The javax.naming.Context type is not Serializable and Orion may be crashing on that. However, according to the ejb spec (6.4.1) it jndi Context should be passivatable. Dave Ford Smart Soft - The Java Training Company http://www.smart-soft.com
Synchronized session bean?
Hi everyone... I thought there was a way to synchonize a session bean such that I suppose you could say that only one user or servlet could use it at a time. Simply put if there's $5 left in the bank, you wouldn't want to have a user withdraw $5 with two different web browsers if they hit submit at the same time... so we kinda want it to be like there's only one teller window, and the servlets have to wait their turn. How to do it kinda escapes me, but let me know if there was something I missed. It would be most appreciated. No need to write volumes of code if you know of a good web site reference for example. Just sent the URL, I'll do the reading from there. Jeff
Re: Synchronized session bean?
El Jeffo ([EMAIL PROTECTED]) wrote: Hi everyone... I thought there was a way to synchonize a session bean such that I suppose you could say that only one user or servlet could use it at a time. Simply put if there's $5 left in the bank, you wouldn't want to have a user withdraw $5 with two different web browsers if they hit submit at the same time... so we kinda want it to be like there's only one teller window, and the servlets have to wait their turn. How to do it kinda escapes me, but let me know if there was something I missed. It would be most appreciated. No need to write volumes of code if you know of a good web site reference for example. Just sent the URL, I'll do the reading from there. Jeff Access to each session bean instance is serialized, but the spec doesn't specifically allow you to say there may only be one instance of a particular session bean class. Access to entity beans is also serialized and you can be certain that, in a a given app server instance (neglecting clustering issues), there's only one instance of a particular entity bean class + primary key. It sounds to me like your talking about something much more like an entity. You can still get the guarantee you're looking for if you access the entity through a session bean, but the guarantee comes from the properties of the entity bean, not the session bean. Does that help any? Gary
Temporary Queue
Has anyone gotten the temmporary queue feature to work in orion? Dave Ford Smart Soft - The Java Training Company http://www.smart-soft.com