Re: idea=$395.00USD was: RE: Java IDE?
IDEA has rediculously high ROI. And it's normally high productivity is skyrocketed if you are refactoring because of all the advanced refactoring features it has. IDEA was written by people who apparently actually use the editor they're selling. JBuilder is probably used for JBuilder, too, but look at how long it takes Borland to crank out new useless features; Intellij does it every week. I've used JBuilder for years, and have recommended it often. However, IDEA is simply way more productive, and appropriate to the way I work. Refactoring is the major advantage IDEA has over anything else I've tried (which includes codeguide). I am now more evolutionary in my programming approach, iterating toward the proper packaging and naming of things later in the project when the issues of feasibility and functionality have been settled. Often the cost/tediousness of repackaging classes (for example) in a normal IDE, is such that you just avoid it, if at all possible. I'm an independent contract developer, and I normally pick up free or inexpensive software tools (Net beans, jedit, ant, Metamill, etc). For me to commit US$400.00 to an IDE is sincere testimony to the productivity of IDEA. It has saved me probably a hundred hours development time in the last 6 months, and my products are better structured than they would otherwise be. However, I wish intellij would drop the price. More developers (including clients - why dont you use our jDeveloper?) should know the joy of immediate refactoring. Oh well, its intellij's business model. I suppose those excluded by the current pricing will just have to wait a few months for the open source and competitors (Borland ?) to come up to speed. Bill Winspur.
Re: Deploying components common to EJB-tier and WEB-tier
I have been putting the shared classes in an extension that I build into both the ear and the war. - Original Message - From: Sanjay Kumar Pandey [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Tuesday, March 05, 2002 10:27 PM Subject: Deploying components common to EJB-tier and WEB-tier Hi, I'm sanjay joining you guys for the first time. Query: -- If I have some components that are common to both web-tier and ejb-tier, which would be the ideal place to store them(other than ../j2ee/home/lib) ?? Can I put them(the .jar file having the common components) in the same ear file as the .jar(for ejbs) and .war(for web components) files and be able to invoke them from both the web tier and ejb tier. Can you please tell me how the components can be invoked if I follow this approach. Thanx in advance, Sanjay
Re: Uploading files to Orion webserver with MultipartParser API
I've had numerous weird and transient problems with IE 5.5. Yesterday, getting set up at a client site, I could not download j2sdk1.4 from sun, and had to go to a machine with IE5.0 to get it. However, IE5.5 was able to download netbeans just fine. The Sys Admin guys dont think its a firewall problem. It will probably work OK today if things go the way they have in the past. - Original Message - From: Justin Crosbie [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Wednesday, February 27, 2002 2:17 AM Subject: RE: Uploading files to Orion webserver with MultipartParser API Hi Thanks for that, I wasn't aware of those classes, I gave them a go. Similar problem. Different error, but its occasionally failing. I also tried the non-brand-specific UploadServlet.java, similar results. However, I have gotten closer. It was failing on Internet Explorer 5.5. I tried Netscape 4.7, and it seemed fine. I tried it on 5.0 and IE 6 and it seemed fine. So it appears that it is a problem with IE 5.5. Very strange... Thanks for the help, much appreciated. Justin P.S. this is my second attempt at posting this, it appears the list does not pick up everything that is posted. -Original Message- From: Joan Josep Iglesias [mailto:[EMAIL PROTECTED]] Sent: 22 February 2002 09:33 To: Orion-Interest Subject: Re: Uploading files to Orion webserver with MultipartParser API Hi, I'm trying to upload files to my server, but I'm using the orion libreries to do it http://kb.atlassian.com/content/orionsupport/articles/fileupload.html Why don't you try with those libraries? Joan
Re: EJB from an Applet
You may want to check this approach to applet/ejb interaction: http://developer.java.sun.com/developer/technicalArticles/RMI/rmi/ The unstated fact seems to be, that applet-ejb communication is not explicitly supported in J2EE, unlike the client/ejb situation which is configurable via the application-client.xml configuration file (I'm not a netbeans user, but this may be how your netBeans ide can get to your ejbs). Another excellent reference on this issue is the 'Applet-Servlet Communication' chapter in Java Servlet Programming, by Jason Hunter and William Crawford (Pub. O'Reilly). Bill. - Original Message - From: Oscar Radio [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Wednesday, February 20, 2002 1:34 AM Subject: EJB from an Applet Hi all, I'm developing an application using swing that executes remotes EJB. The applications works fine if I executed from NetBeans, but if I executed from an applet it gives me the next error: JERP.Applets.CO.bin.ConexionServidorEJB.jndiContext-javax.naming.InitialCon text@5e2ccd java.lang.ClassCastException at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(Unknown Source) at javax.rmi.PortableRemoteObject.narrow(Unknown Source) at JERP.Applets.CO.bin.PanelAccesoJERP.inicializarComponentes(PanelAccesoJERP.j ava:142) at JERP.Applets.CO.bin.PanelAccesoJERP.init(PanelAccesoJERP.java:69) at JERP.Applets.CO.bin.AccesoJERP.inicializarComponentes(AccesoJERP.java:71) at JERP.Applets.CO.bin.AccesoJERP.init(AccesoJERP.java:56) at applet.init(applet.java:82) at sun.applet.AppletPanel.run(Unknown Source) at java.lang.Thread.run(Unknown Source) The same code with JBoss it works. These are the jars that I put in netbeans and in the jre: ejb.jar jdbc.jar jta.jar mail.jar orion.jar Thanks, Oscar.
Re: url.openConnection() doesn't allow to pass objects or attributes
This article is an excellent intro to posting objects: http://developer.java.sun.com/developer/technicalArticles/RMI/rmi/ Bill. - Original Message - From: prasanth sb [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Sunday, February 10, 2002 4:15 AM Subject: Re: url.openConnection() doesn't allow to pass objects or attributes I used doPost only but still it doesn't. From: Kesav Kumar [EMAIL PROTECTED] Reply-To: Orion-Interest [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Subject: Re: url.openConnection() doesn't allow to pass objects or attributes Date: Sun, 3 Feb 2002 08:23:09 -0800 I just noticed one more thing with your servlet. It seems that you are using doGet method in your servlet. If you do a post request through URL you need to write doPost method in your servlet. -kesav kumar [EMAIL PROTECTED] - Original Message - From: prasanth sb [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Sunday, February 03, 2002 2:51 AM Subject: Re: url.openConnection() doesn't allow to pass objects or attributes I set the doOuptut parameters ,but still in orion it is not working. Can you please help me in this? From: Kesav Kumar [EMAIL PROTECTED] Reply-To: Orion-Interest [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Subject: Re: url.openConnection() doesn't allow to pass objects or attributes Date: Sat, 26 Jan 2002 08:12:31 -0800 For Posting data from through URLs you have to set doOutput to true. con.setDoOutput(true); con.setDoInput(true); Once you set the above you can get the OutputStream associated with connection and send parameters. For more info read the article at JavaWorld http://www.javaworld.com/javaworld/javatips/jw-javatip34.html -kesav kumar - Original Message - From: prasanth sb [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Saturday, January 26, 2002 1:27 AM Subject: url.openConnection() doesn't allow to pass objects or attributes Hello dear friends, Please help me with a strange problem happening with orion. I am calling url.openConnection() to a servlet page.When I call this, the call goes to doGet method of the servlet. But it has to go to the doPost method. Second problem is I am able to read the values from the callee servlet. But I am not able to pass the values to the callee servlet.I am trying to pass objects in a stream.I have seen this problem reported in the mailing list. Can anyone help me in this? Please find the sample code, Caller Servlet URLConncetion con =url.openConnection(http://ipname:port/Servlet1;); ObjectOutputStream os = new ObjectOutputStream(con.getOutputStream()); os.writeObject(string object); Callee servlet(Servlet1.java) public void doGet(HttpServletRequest req,HttpServletResponse res) { ObjectInputStream ois = new ObjectInputStream(req.getInputStream()); ois.readObject();//This line , it prints null.It wont print the string //string object.But if I return values from the servlet1, then Caller servlet is able to read. Can some one throw some light on this. _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com _ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx _ Join the world's largest e-mail service with MSN Hotmail. http://www.hotmail.com
Re: Shutdown causes Address in use: JVM_Bind
Stephen, Andrew, After I posted this issue, I noticed that the problem was application dependent, i.e. when my web appwas invoked from an applet, shutdown and startup work as advertised. However, when the web appwas invoked frommy client app, in which I use a URLConnection object to talk to the web-app, subsequent shutdown and startup exhibited the address-in-use problem. The fixwas to do a disconnect() on the client app's URLConnection (casting it to an HttpURLConnection). The implication is that the browser (IE 5.0) is already well-behaved in this regard, so applets did not exhibit the problem. As to why this client-side problem affected the webserver, Iassumeit is because the web-server and client share the same TCP stack (I'm developing in loopback mode at present). I'll check that assumption later on, when Ideploy tothe real server. Bill. - Original Message - From: Bill Winspur To: Orion-Interest Sent: Thursday, February 07, 2002 1:11 AM Subject: Shutdown causes Address in use: JVM_Bind I'm running Orion 1.5.3 on Nt4/SP6, and jdk1.3.1_01. The command I use to shut the server down is: C:\jdk1.3.1_01\bin\java.exe -jar admin.jar ormi://localhost admin pwd -shutdown After a shutdown, starting the server always produces the following on the orion console. Error starting HTTP-Server: Address in use: JVM_BindOrion/1.5.3 initialized My work-around is to boot windows, very tedious. The command I use to start the server is: C:\jdk1.3.1_01\bin\java.exe "-jar" "orion.jar" I had a look thru the archive but the search keys 'Shutdown', and various substrings of the serverconsolelog, above, did notreveal any solutions. Is there an alternative way of shutting down the server, that releases the tcp/ip binding ? TIA Bill.
Shutdown causes Address in use: JVM_Bind
I'm running Orion 1.5.3 on Nt4/SP6, and jdk1.3.1_01. The command I use to shut the server down is: C:\jdk1.3.1_01\bin\java.exe -jar admin.jar ormi://localhost admin pwd -shutdown After a shutdown, starting the server always produces the following on the orion console. Error starting HTTP-Server: Address in use: JVM_BindOrion/1.5.3 initialized My work-around is to boot windows, very tedious. The command I use to start the server is: C:\jdk1.3.1_01\bin\java.exe "-jar" "orion.jar" I had a look thru the archive but the search keys 'Shutdown', and various substrings of the serverconsolelog, above, did notreveal any solutions. Is there an alternative way of shutting down the server, that releases the tcp/ip binding ? TIA Bill.
Re: Class.newInstance() Fails with InstantiationException.
Thank you Stephen. That nailed it. The problem was not so obvious to me. Although the API doc for Class.newInstance(), does not state it explicitly, you must code a no-args constructor into the class to instantiate it using newInstance(). Replacing my 1 arg constructor witha no-argconstructor and a setter method fixed my problem. The behaviour of of Class.newInstance() and Class.create(object), which implements programmaticinstantiation using constructors with arguments,is documented in theJava Tutorial. RYFM strikes again. - Original Message - From: "Stephen Davidson" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Tuesday, February 05, 2002 9:08 AM Subject: Re: Class.newInstance() Fails with InstantiationException. Obvious Question hj (in this case, com.wynnon.appletChannel.test.EchoingPort) does have a no-arg constructor, right? In other words, Object obj = new EchoingPort() is legal? /Obvious Question -Steve Bill Winspur wrote: The echoing port never gets instantiated, the attempt to instantiate, by invoking Class.newInstance(), throws an InstantiationException. However, if you are asking what is the function of EchoingPort? ... it is a test stub for for the session side of an http tunneling package to support applet/client access to ejb's via http. The relevant code follows: /** * Instantiates the session port if not yet done */ private void instantiateIt(String className) throws Exception {Class hj = null; try { hj = Class.forName(className); System.out.println( "class: " + hj + "\n. isInterface: " + hj.isInterface() + "\n. isArray: " + hj.isArray() + "\n. isPrimitive: " + hj.isPrimitive() + "\n. isAbstract: " + Modifier.isAbstract(hj.getModifiers()) + "\n. isFinal: " + Modifier.isFinal(hj.getModifiers()) + "\n. isNative: " + Modifier.isNative(hj.getModifiers()) + "\n. isPrivate: " + Modifier.isPrivate(hj.getModifiers()) + "\n. isProtected: " + Modifier.isProtected(hj.getModifiers()) + "\n. isPublic: " + Modifier.isPublic(hj.getModifiers()) + "\n. isStatic: " + Modifier.isStatic(hj.getModifiers()) + "\n. isStrict: " + Modifier.isStrict(hj.getModifiers()) + "\n. isStrict: " + Modifier.isStrict(hj.getModifiers()) + "\n. isTransient: " + Modifier.isTransient(hj.getModifiers()) + "\n. isVolatile: " + Modifier.isVolatile(hj.getModifiers()) ); try { Object oj = hj.newInstance(); trace("obj: "+ oj); trace("Instantiated: " + hj); } catch (InstantiationException e) { throw new Exception( "Cant instantiate a session object: " + e); } catch (IllegalAccessException e) { throw new Exception( "Cant instantiate a session object" + e); } } catch (Exception ex) { throw new Exception( "Failed to instantiate className: " + className + "\n" + ex.toString() ); } } private void trace(String s) { System.out.println(s); } [snip to save bandwidth] -- Stephen Davidson Java Consultant Delphi Consultants, LLC http://www.delphis.com Phone: 214-696-6224 x208
Class.newInstance() Fails with InstantiationException.
I have a servlet that would instantiate anobject, if everything worked. Unfortunately, it fails with the following exception from the Class.newInstance() method: java.lang.InstantiationException: com.wynnon.appletChannel.test.EchoingPort where EchoingPort is the class I would instantiate from. The api says this about the Exception thrown by newInstance(): InstantiationException - Thrown if this Class represents an abstract class, an interface, an array class, a primitive type, or void; or if the instantiation fails for some other reason. I printed all the modifiers for the the class, and it is not an interface, not abstract, etc. The odd thing is, if I run the instantiation code outside orion,EchoingPort instantiates properly. Questions Does orion intervene somehow in the instantiation process ? Does anybody have a clue what I'm doing wrong ?
Subject: Classpath Structure Error?
SYMPTOMS When I invoke my webapp, the first request to the server causes the front servlet to throw a class-def-not-found exception for the app's session class, which it loads dynamically. The class in question is in fact present in the app's war file, in the web-inf classes directory. To nail the problem down, I printed the jvm's class path, immediately before the attempt to load the session class. With newline chars inserted after each ';' for legibility, the classpath looks like this: classpath: orion.jar; C:\j2ee\home\ejb.jar; C:\j2ee\home\activation.jar; C:\j2ee\home\jdbc.jar; C:\j2ee\home\jndi.jar; C:\j2ee\home\jta.jar; C:\j2ee\home\mail.jar; C:\j2ee\home\xerces.jar; C:\j2ee\home\tools.jar; C:\j2ee\home\lib; C:\j2ee\home\lib\aplWeb.jar; C:\j2ee\home\lib\classes12.jar; C:\j2ee\home\lib\p6spy.jar; C:\j2ee\home\applications\podAdmin-eap\podAdmin-ejb.jar; ; C:\j2ee\home\applications\podAdmin-eap\podAdmin-web\WEB-INF\classes The not-found class resides in the WEB-INF/classes directory, which for a reason not known to me, has a null element immediately before it on the classpath. Everything else on the classpath looks reasonable to me. QUESTIONS Would this null element hide my app classes from the system class loader ? If the null element is to blame how might it have gotten into the class path ? BACKGROUND (The only thing I did was ...) -- This app used to work, before I refactored my ejb classes into an abstract superclass and app-specific subclasses. The super class implements connection to a single datasource, and a few generic business methods such as getDbDate(), getDbName(), etc. Concrete subclasses implement the app-specific business methods. Everything runs smoothly during build and deploy of the ear file, then at run time the class-loading problem shows up. SPECULATION --- Given that orion builds the runtime classpath for an application, and that it generates stubs and skeletons from ejb remote interface class files, is my refactored config of classes the problem ? The null entry on the path comes right after the entry inserted by Orion for my ejb jar. Does orion (or the spec) constrain how an ejb Remote and Bean are configured ? Can they be split into super and sub-classes ? Should I report this as a bug ? DETAILS --- The exception thrown is: java.lang.ClassNotFoundException: com.allipl.podadmin.PodAdminSession The war file structure (per winzip) contains: PodAdminSession.classJava Class 09/23/2001 6:23 PM WEB-INF\classes\com\allipl\podadmin\ PodAdminStateMachine.class Java Class 09/23/2001 6:23 PM WEB-INF\classes\com\allipl\podadmin\ Thanks in advance for any suggestions or diagnosis, Bill.
RE: Newbie question
Orion is simply an J2EE server (http, jsp and servlets, ejbs, jndi, jms), plus a relatively immature gui console. It is not a development environment. Many folks use ANT from apache.org as a make-like facility for coordinating compiles, and builds of ear files from compiled classes. Hot deployment by dropping an ear into orion/applications/ works well. Hope this helps. I user Jbuilder for GUI construction, and idea-intellij for most other coding. Hope this helps. -Original Message- From: Pito Salas [mailto:[EMAIL PROTECTED]] Sent: Friday, September 21, 2001 3:41 PM To: Orion-Interest Subject: Newbie question I've been working with the Sun J2EE RI. What is the Orion analog to the Swing deployment application for Orion. Mainly I am looking for a tool to (semi-) automate the creation of EARS, WARS, the various .xml files etc. Thanks, Pito THIS MESSAGE IS INTENDED ONLY FOR THE ADDRESSEE, IT MAY CONTAIN PRIVILEGED OR CONFIDENTIAL INFORMATION. ANY UNAUTHORISED DISCLOSURE IS STRICTLY PROHIBITED. IF YOU HAVE RECEIVED THIS MESSAGE IN ERROR, PLEASE NOTIFY US IMMEDIATELY SO THAT WE MAY CORRECT OUR INTERNAL RECORDS. PLEASE THEN DELETE THE ORIGINAL EMAIL. THANK YOU
Classpath Structure Problem ?
SYMPTOMS When I invoke my webapp, the first request to the server causes the front servlet to throw a class-def-not-found exception for the app's session class, which it loads dynamically. The class in question is in fact present in the app's war file, in the web-inf classes directory. To nail the problem down, I printed the jvm's class path, immediately before the attempt to load the session class. With newline chars inserted after each ';' for legibility, the classpath looks like this: classpath: orion.jar; C:\j2ee\home\ejb.jar; C:\j2ee\home\activation.jar; C:\j2ee\home\jdbc.jar; C:\j2ee\home\jndi.jar; C:\j2ee\home\jta.jar; C:\j2ee\home\mail.jar; C:\j2ee\home\xerces.jar; C:\j2ee\home\tools.jar; C:\j2ee\home\lib; C:\j2ee\home\lib\aplWeb.jar; C:\j2ee\home\lib\classes12.jar; C:\j2ee\home\lib\p6spy.jar; C:\j2ee\home\applications\podAdmin-eap\podAdmin-ejb.jar; ; C:\j2ee\home\applications\podAdmin-eap\podAdmin-web\WEB-INF\classes The not-found class resides in the WEB-INF/classes directory, which for a reason not known to me, has a null element immediately before it on the classpath. Everything else on the classpath looks reasonable to me. QUESTIONS Would this null element hide my app classes from the system class loader ? If the null element is to blame how might it have gotten into the class path ? BACKGROUND (The only thing I did was ...) -- This app used to work, before I refactored my ejb classes into an abstract superclass and app-specific subclasses. The super class implements connection to a single datasource, and a few generic business methods such as getDbDate(), getDbName(), etc. Concrete subclasses implement the app-specific business methods. Everything runs smoothly during build and deploy of the ear file, then at run time the class-loading problem shows up. SPECULATION --- Given that orion builds the runtime classpath for an application, and that it generates stubs and skeletons from ejb remote interface class files, is my refactored config of classes the problem ? The null entry on the path comes right after the entry inserted by Orion for my ejb jar. Does orion (or the spec) constrain how an ejb Remote and Bean are configured ? Can they be split into super and sub-classes ? Should I report this as a bug ? DETAILS --- The exception thrown is: java.lang.ClassNotFoundException: com.allipl.podadmin.PodAdminSession The war file structure (per winzip) contains: PodAdminSession.classJava Class 09/23/2001 6:23 PM WEB-INF\classes\com\allipl\podadmin\ PodAdminStateMachine.class Java Class 09/23/2001 6:23 PM WEB-INF\classes\com\allipl\podadmin\ Thanks in advance for any suggestions or diagnosis, Bill.
RE: Too Many Open Files?
I realize I'm a bit late responding to this (been in summer mode), but yes - a webmin module would be fine. -Original Message- From: Michael J. Cannon [mailto:[EMAIL PROTECTED]] Sent: Wednesday, August 08, 2001 4:37 PM To: Orion-Interest Subject: Re: Too Many Open Files? Would there be interest in a Webmin .wbm module for this and other functionality (also might open the db and console in the web page). Of course, would be SSL enabled. Mike - Original Message - From: Curt Smith [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Wednesday, August 08, 2001 2:55 PM Subject: Re: Too Many Open Files? What about being able to open port 80 as non-root? curt Eddie Post [EMAIL PROTECTED] 08/08/01 11:38AM My experience to overcome this problem: Make absolutely sure you don't run Orion as root, such that all java processes are killed nicely and they don't keep on running. They told me that even with su -, java sees the real owner the initiated this (I still have to get deeper into this). After I just started Orion from the command prompt as normal user, this problem disappeared. I used to start Orion with su - in a start-up script. Eddie THIS MESSAGE IS INTENDED ONLY FOR THE ADDRESSEE, IT MAY CONTAIN PRIVILEGED OR CONFIDENTIAL INFORMATION. ANY UNAUTHORISED DISCLOSURE IS STRICTLY PROHIBITED. IF YOU HAVE RECEIVED THIS MESSAGE IN ERROR, PLEASE NOTIFY US IMMEDIATELY SO THAT WE MAY CORRECT OUR INTERNAL RECORDS. PLEASE THEN DELETE THE ORIGINAL EMAIL. THANK YOU
Servlet Mapping Recursion Problem
In my web.xml I set up the servlet mapping, for a (front) servlet to handle all requests for the web app, to '/'. This works to the extent that all requests are passed to the servlet. BUT... if I do a forward to another resource from the servlet, the servlet's doGet() method is invoked recursively with no response generated until the jvm runs out of memory. The same thing happens with a url-pattern of '/*'. If the servlet itself generates html output, that works. If I map my servlet to a specific resource, like /index.html, forwarding works fine, but the servlet cant handle all requests and 'http://myhost/myapp' returns 'no directory browsing'. The url-pattern '/' seems like a valid directory specification (as per the servlet 2.2 spec, 'Servlet Mapping Techniques') and a front component, handling all requests is fundamental in the j2EE blueprints (http://java.sun.com/j2ee/blueprints/index.html, section 10.6), so my approach seems architecturally reasonable. I've looked thru the archives and found two reports of the same problem. A proposed workaround from Magnus seems to recommend explicitly mapping every request your app generates (which would make the web.xml coding difficult to maintain in a large app) pendng the delivery of 'filters', perhaps in Servlet 2.3. I dont really understand what Magnus is suggesting: PS: If you're bound to 2.2 or lower then you will not be able to use Filters, in that case you'd have to apply a more complex solution with duplicate resource roots and so on. It looks like 'no front servlets on Orion' to me, but I hope I'm wrong. I was not able to find any references to the problem on bugzilla, but I'm not very adept with its query interface. My hunch is that Orion's request dispatcher is invoked in two contexts (from a client, and from a forward) and does not distinguishbetween them when it comes to selectinga resource to respond to the client. Ifthe dispatcher ignored mapping in the forward context and just accepted the specified resource, the recursion problem would vanish and the front servlet would trap ALL client requests as per the blueprint architecture. Just a hunch, things are probably not that simple. Does anyone know if this is a problem with other webservers ? My experience with Apache was all static pages. My environment is NT4(sp6), Orion 1.4.8, IE 5.00, JDK 1.2.2. Also, if somebody is actually using the front servlet pattern and univeral mapping on Orion, and could let me know how to set it up and/or get around the recursion I'd be a happy camper. TIA, Bill.
Re: Servlet Mapping Recursion Problem
Thanks Joni, very elegant. I've started down that route (ie. having externally visible urls that are different to the internally visible urls), but hadn't thought of driving the whole thing off a configuration file. Neat. The application provider could package it with the app, leaving the front servlet truly generic. Also, the *.html servlet-mapping hides *.gif resource mapping, etc. from the servlet.. And reason number four to like this approach is: it should work on any webserver. After my previous post I discovered that recursion doesn't just happen if the '/' is mapped to your front servlet (it seems obvious now). If you map 'myUrl' to your front servlet, and then forward to 'myUrl', you also get recursion and a crash. Its been a good day, Bill. - Original Message - From: Joni Suominen [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Friday, May 11, 2001 11:48 AM Subject: Re: Servlet Mapping Recursion Problem Hi Bill! I am using a front servlet pattern with Orion. I use Struts but I suppose this approach should work in any framework. 1. The front servlet mapping in web.xml: servlet-mapping servlet-nameaction/servlet-name url-pattern*.html/url-pattern /servlet-mapping So all the requests ending to .html are processed by the front-end servlet. 2. All the valid URL's are mapped in an xml config file. The front servlet initializes its state by reading this file in a startup. An entry in this file looks like: actionpath=/faq type=org.shiftctrl.general.interaction.EmptyAction forward name=success path=/faq.jsp/ /action This means that the request http://myserver.com/faq.html is first processed by front servlet. The servlet searches its configured mapping and forwards the request. In this case it would forward the request to faq.jsp. I haven't had problems with this setup and I really like it for following reasons: 1. It is easy pipeline actions. Just configure the mapping so that its forward part points to another mapping. 2. You can hide the technology being used. Clients only see URLs which are always ending .html (so .jsps are not exposed outside, their function is only to provide the view part in MVC pattern) 3. It is possible to dynamically change the URL mapping by calling appropriate methods in front servlet. -- Joni [EMAIL PROTECTED] Bill Winspur wrote: In my web.xml I set up the servlet mapping, for a (front) servlet to handle all requests for the web app, to '/'. This works to the extent that all requests are passed to the servlet. BUT... if I do a forward to another resource from the servlet, the servlet's doGet() method is invoked recursively with no response generated until the jvm runs out of memory. The same thing happens with a url-pattern of '/*'. If the servlet itself generates html output, that works. If I map my servlet to a specific resource, like /index.html, forwarding works fine, but the servlet cant handle all requests and 'http://myhost/myapp' returns 'no directory browsing'. The url-pattern '/' seems like a valid directory specification (as per the servlet 2.2 spec, 'Servlet Mapping Techniques') and a front component, handling all requests is fundamental in the j2EE blueprints (http://java.sun.com/j2ee/blueprints/index.html, section 10.6), so my approach seems architecturally reasonable. I've looked thru the archives and found two reports of the same problem. A proposed workaround from Magnus seems to recommend explicitly mapping every request your app generates (which would make the web.xml coding difficult to maintain in a large app) pendng the delivery of 'filters', perhaps in Servlet 2.3. I dont really understand what Magnus is suggesting: PS: If you're bound to 2.2 or lower then you will not be able to use Filters, in that case you'd have to apply a more complex solution with duplicate resource roots and so on. It looks like 'no front servlets on Orion' to me, but I hope I'm wrong. I was not able to find any references to the problem on bugzilla, but I'm not very adept with its query interface. My hunch is that Orion's request dispatcher is invoked in two contexts (from a client, and from a forward) and does not distinguish between them when it comes to selecting a resource to respond to the client. If the dispatcher ignored mapping in the forward context and just accepted the specified resource, the recursion problem would vanish and the front servlet would trap ALL client requests as per the blueprint architecture. Just a hunch, things are probably not that simple. Does anyone know if this is a problem with other webservers ? My experience with Apache was all static pages. My environment is NT4(sp6), Orion 1.4.8, IE 5.00, JDK 1.2.2. Also, if somebody is actually using the front servlet pattern and univeral mapping on Orion, and could let me know how
Re: Basic Authentication
I 've learned how to get basic authentication going, given Brian's suggestion, and a little more trial and error. Things that I would like to add to the authentication-primer at jollem (if I had the time this week) include: 1. You need the login-config tag in web.xml 2. you need the security-role-mapping tag in orion-application.xml. 3. I also needed to understand the scope of the url-pattern '/' entered in web.xml. It protects everything but the root, to protect that too you need to enter '*' as the url-pattern. I suppose 'x' means directory x, and 'x\' means the content of directory x. In a url-pattern, '*' seems to mean 'whatever the root directory is'. Given the above and appropriate group and user defns in orion\config\principals things work OK. I've attached a zip of my test-app's application's xml files. Bill. - Original Message - From: Bill Winspur [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Sunday, May 06, 2001 11:24 PM Subject: Re: Basic Authentication Thanks Brian. Yup, authentication probably does need that login-config tag, aargh ! However, I must have other problems because Orion continues to blithely respond to my supposedly protected URL without a hint of an authentication dialog. I'll experiment further. Bill. - Original Message - From: Brian Adair [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Monday, May 07, 2001 7:34 PM Subject: Re: Basic Authentication Bill, Looks like your missing the login-config element in web.xml. Try this: web-app ... login-config auth-methodBASIC/auth-method realm-nameHead Count Application/realm-name /login-config ... /web-app -- Brian Adair Software Developer Telepak.net http://www.telepak.net Bill Winspur wrote: I want to implement basic authentication and used the primer at http://www.jollem.com/~ernst/orion-security-primer/ as a guide, but have not managed to password protect page one so far. The URL I'm trying to protect responds normally with no login dialog being presented, i.e. my security constraints are apparently malformed, and are being ignored. The primer shows how: a) users are assigned to groups (user, principals.xml), b) how security-role's are defined by a web app (security-role, web.xml). c) how web-resource-collection's are defined and d) and how the role a permitted user must have to access a resource is bound to the resource (security-constraint, web.xml). However, the primer does not show the xml to assign roles to groups, although it asserts that this needs to be done: A security role is mapped to users indirectly, via user groups. Should group/security-role binding be done via the security-role-mapping tag in orion-application.xml, or is there some other linkage I am unaware of ? I inserted the following in the orion-application.xml, after deployment: security-role-mapping impliesAll=true name=sr_headcounter group name=gr_headcounters / /security-role-mapping but it made no difference to my test case. The authentication dialog did not appear. I have appended content of the relevant xml files from my test case below, and the ear is atached). If anyone can shed any light on why I cannot trigger authentication, much TIA. I'm running NT4 sp6, JDK1.2.2, Orion 1.4.5, and IE 5.00. IE's user authentication option is set to Automatic logon only in Intranet zone. I'm signed on to NT under a user-id that should not be able to load the first (and only) page of the test-case app. - My principals.xml is as follows: ?xml version=1.0? !DOCTYPE principals PUBLIC file://Evermind - Orion Principals// http://www.orionserver.com/dtds/principals.dtd; principals groups group name=administrators descriptionadministrators/description permission name=administration / permission name=com.evermind.server.AdministrationPermission / /group group name=guests descriptionguests/description /group group name=users descriptionusers/description permission name=rmi:login / permission name=com.evermind.server.rmi.RMIPermission / /group group name=gr_headcounters descriptionusers of the headcount application/description /group /groups users user username=admin password=xxx descriptionThe default administrator/description group-membership group=administrators / group-membership group=guests / group-membership group=users / /user user username=user password= deactivated=true descriptionThe default user/description group-membership group=guests / group-membership group=users / /user user username=anonymous password= descriptionThe default guest/anonyomous user/description group
Crimson Crash
This popped up on about my third sever restart after upgrading to 1.4.8. Given Sun's interest in this event, I thought Magnus, et al, might also be interested. Ironically, the url below for advising sun returns an Internal server error :-) - A nonfatal internal JIT (3.10.107(x)) error 'Relocation error: NULL relocation target' has occurred in : 'org/apache/crimson/parser/Parser2.maybeComment (Z)Z': Interpreting method. Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi Warning: Error reading transaction-log file (/C:/orion/persistence/transaction.state) for recovery: premature end of fileForced or abrubt (crash etc) server shutdown detected, starting recovery process...Recovery completed, 0 connections committed and 0 rolled back...Orion/1.4.8 initialized - Incidentally, I'm in the process of debugging a front servlet that does forwarding - no deiberate exploitation of Crimson's features. Hope I dont see this again :-( Bill.
Re: Crimson Crash
FYI: Every time Orion starts up now, the previously posted message appears: --- A nonfatal internal JIT (3.10.107(x)) error 'Relocation error: NULL relocation target' has occurred in : 'org/apache/crimson/parser/Parser2.maybeComment (Z)Z': Interpreting method. Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi --- Apart from this Orion seems to be doing what I expect it to do. Sun will be contacting me. Bill. - Original Message - From: Bill Winspur To: Orion-Interest Sent: Wednesday, May 09, 2001 9:13 AM Subject: Crimson Crash This popped up on about my third sever restart after upgrading to 1.4.8. Given Sun's interest in this event, I thought Magnus, et al, might also be interested. Ironically, the url below for advising sun returns an Internal server error :-) - A nonfatal internal JIT (3.10.107(x)) error 'Relocation error: NULL relocation target' has occurred in : 'org/apache/crimson/parser/Parser2.maybeComment (Z)Z': Interpreting method. Please report this error in detail to http://java.sun.com/cgi-bin/bugreport.cgi Warning: Error reading transaction-log file (/C:/orion/persistence/transaction.state) for recovery: premature end of fileForced or abrubt (crash etc) server shutdown detected, starting recovery process...Recovery completed, 0 connections committed and 0 rolled back...Orion/1.4.8 initialized - Incidentally, I'm in the process of debugging a front servlet that does forwarding - no deiberate exploitation of Crimson's features. Hope I dont see this again :-( Bill.
Re: common practice for configuring orion app/web-site
I prefer to do lots of little apps tied togoether by the data they share in an enterprise database (I'll admit the term enterprise database is optimistic but I've just done two years at a client who started his IT shop from scratch, so I'm spoiled). The many apps to one db patttern was practical, even pre-j2ee, and I find the the servlet/jsp/jdbc paradigm conceptually covers that pattern and allows better implementation patterns (eg front servlet) in the middle tier. I'm just getting into ejbs and expect to share them between web-tier apps. Discussion on this list indicates that it can be done, using orion. Thus, in the ideal world, I expect to develop lots of little apps using fewer ejbs against very few enterprise databases. Unless there are technology constraints I dont know about, I will DEFINITELY NOT go down the path of one humongous app. That way lies maintenance madness. Much better to learn techniques for efficiently sharing extensions, ejbs, database, etc. in a deliberately modular way. My 2c Bill. - Original Message - From: darl zero [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Wednesday, May 09, 2001 2:42 PM Subject: common practice for configuring orion app/web-site Hi, This might be sort of a newbie question or just a very general one. I tried looking through archives before posting but no luck, maybe someone has a quick anwser. I would like to know if most of you break up your projects into a lot of small apps and bind this to a web-site, or do most of you just pile all the apps into one big one.. so that there is only one application running on one default-web-site. -p __ Do You Yahoo!? Yahoo! Auctions - buy the things you want at great prices http://auctions.yahoo.com/
Re: broken default web app - not found
Joey, I had the same problem (basic understanding missing), but got around it and did a howto (attached). Hope this helps. Like you I wanted to keep the jsp examples. I repackaged them as a war file (not covered in the howto, degrading the examples, to a 'normal' web-app. There were a few changes required in the confiiguration - minor - making an href relative I think. Good luck, Bill. - Original Message - From: joey sark [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Wednesday, May 02, 2001 4:56 PM Subject: broken default web app - not found I managed to deploy a website/app but in so doing, broke the default website with all the nice jsp examples. I would like to use that default app to test and learn about jsp and plug modified versions into my app. now i get this error from orion: Error initializing site Default Orion WebSite: No application named 'default' found in the server how do i unbreak the default web app and keep it working alongside my app - and KISS? thanks in advance. Joey, newbie in distress relevent config files: orion/config/server.xml: ... global-application name=pussycat path=application.xml / !-- global-application name=default path=application.xml / can't do this-- global-web-app-config path=global-web-application.xml / web-site path=./pussycat-web-site.xml / web-site path=./default-web-site.xml / ... orion/config/application.xml: ... orion-application web-module id=pussycat path=../applications/pussycat / web-module id=defaultWebApp path=../applications/default-web-app / ... orion/config/default-web-site.xml: ... web-site host=[all] port=80 display-name=Default Orion WebSite default-web-app application=default name=defaultWebApp / /web-site orion/config/pussycat-web-site.xml: ... web-site host=[all] port=80 display-name=Pussycat Web Study virtual-hosts=localhost default-web-app application=pussycat name=pussycat / !-- default-web-app application=pussycat name=defaultWebApp / can't do this-- ... /web-site server.xml: ... application-server application-directory=../applications deployment-directory=../application-deployments ... global-application name=pussycat path=application.xml / !-- global-application name=default path=application.xml / can't do this-- global-web-app-config path=global-web-application.xml / web-site path=./pussycat-web-site.xml / web-site path=./default-web-site.xml / ... end Get free email and a permanent address at http://www.netaddress.com/?N=1 howto-welcome-app.zip
Basic Authentication
I want to implement basic authentication and used the primer at http://www.jollem.com/~ernst/orion-security-primer/ as a guide, but have not managed to password protect page one so far. TheURL I'm trying to protect responds normally with no login dialog being presented, i.e. my security constraints are apparently malformed, and are being ignored. The primer shows how: a) users are assigned to groups (user, principals.xml), b) how security-role's are definedby a web app (security-role, web.xml). c) how web-resource-collection's are defined and d) and howthe role a permitted user must have to access a resource isbound to the resource (security-constraint, web.xml). However, the primerdoes not show the xml to assign roles to groups, although it asserts that this needs to be done: A security role is mapped to users indirectly, via user groups. Shouldgroup/security-role binding be done via the security-role-mapping tag in orion-application.xml, or is there some other linkage I am unaware of ? I inserted the following inthe orion-application.xml, after deployment: security-role-mapping impliesAll="true" name="sr_headcounter" group name="gr_headcounters" / /security-role-mapping but it made no differenceto my test case.The authentication dialog did not appear. I have appended content of the relevant xml files from my test case below, and theear is atached). If anyone can shed any light on why I cannot trigger authentication, much TIA. I'm running NT4 sp6, JDK1.2.2, Orion 1.4.5, and IE 5.00. IE's user authentication option is set to Automatic logon only in Intranet zone. I'm signed on to NT under a user-id that should not be able to load the first (and only) page of the test-case app. - My principals.xml is as follows: ?xml version="1.0"?!DOCTYPE principals PUBLIC "file://Evermind - Orion Principals//" "http://www.orionserver.com/dtds/principals.dtd" principalsgroupsgroup name="administrators"descriptionadministrators/descriptionpermission name="administration" /permission name="com.evermind.server.AdministrationPermission" //groupgroup name="guests"descriptionguests/description/groupgroup name="users"descriptionusers/descriptionpermission name="rmi:login" /permission name="com.evermind.server.rmi.RMIPermission" //groupgroup name="gr_headcounters" descriptionusers of the headcount application/description/group/groupsusersuser username="admin" password="xxx"descriptionThe default administrator/descriptiongroup-membership group="administrators" /group-membership group="guests" /group-membership group="users" //useruser username="user" password="" deactivated="true"descriptionThe default user/descriptiongroup-membership group="guests" /group-membership group="users" //useruser username="anonymous" password=""descriptionThe default guest/anonyomous user/descriptiongroup-membership group="guests" //useruser username="hcounter" password="xxx"descriptionHeadcount Joe - a test identity/descriptiongroup-membership group="guests" /group-membership group="users" /group-membership group="gr_headcounters" //user/users/principals --- my web.xml is as follows: ?xml version="1.0"?!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN" "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd" web-app display-nameAuthenticate Web Application/display-name servlet servlet-namecom.allipl.authenticate.FrontServlet/servlet-name descriptionServlet that demands browser credentials/description servlet-classcom.allipl.authenticate.FrontServlet/servlet-class /servlet servlet-mapping servlet-namecom.allipl.authenticate.FrontServlet/servlet-name!-- url-pattern appears to be relative to the context root specified in config/default-website.xml -- url-pattern//url-pattern /servlet-mapping security-role role-namesr_headcounter/role-name /security-role security-constraint web-resource-collection web-resource-nameFront Servlet/web-resource-name url-pattern//url-pattern http-method*/http-method/web-resource-collectionauth-constraint role-namesr_headcounter/role-name/auth-constraint/security-constraint /web-app my app's application.xml ?xml version="1.0"?!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd" application display-nameAuthentication Experimental Application)/display-name module web web-uriauthenticate-web.war/web-uri context-root/authenticate/context-root /web /module /application - the orion-generated, orion-application.xml: ?xml version="1.0"?!DOCTYPE orion-application PUBLIC "-//Evermind//DTD J2EE Application runtime 1.2//EN" "http://www.orionserver.com/dtds/orion-application.dtd" orion-application deployment-version="1.4.5"web-module id="authenticate-web" path="authenticate-web.war"
Re: Basic Authentication
Thanks Brian. Yup, authentication probably does need that login-config tag, aargh ! However, I must have other problems because Orion continues to blithely respond to my supposedly protected URL without a hint of an authentication dialog. I'll experiment further. Bill. - Original Message - From: Brian Adair [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Monday, May 07, 2001 7:34 PM Subject: Re: Basic Authentication Bill, Looks like your missing the login-config element in web.xml. Try this: web-app ... login-config auth-methodBASIC/auth-method realm-nameHead Count Application/realm-name /login-config ... /web-app -- Brian Adair Software Developer Telepak.net http://www.telepak.net Bill Winspur wrote: I want to implement basic authentication and used the primer at http://www.jollem.com/~ernst/orion-security-primer/ as a guide, but have not managed to password protect page one so far. The URL I'm trying to protect responds normally with no login dialog being presented, i.e. my security constraints are apparently malformed, and are being ignored. The primer shows how: a) users are assigned to groups (user, principals.xml), b) how security-role's are defined by a web app (security-role, web.xml). c) how web-resource-collection's are defined and d) and how the role a permitted user must have to access a resource is bound to the resource (security-constraint, web.xml). However, the primer does not show the xml to assign roles to groups, although it asserts that this needs to be done: A security role is mapped to users indirectly, via user groups. Should group/security-role binding be done via the security-role-mapping tag in orion-application.xml, or is there some other linkage I am unaware of ? I inserted the following in the orion-application.xml, after deployment: security-role-mapping impliesAll=true name=sr_headcounter group name=gr_headcounters / /security-role-mapping but it made no difference to my test case. The authentication dialog did not appear. I have appended content of the relevant xml files from my test case below, and the ear is atached). If anyone can shed any light on why I cannot trigger authentication, much TIA. I'm running NT4 sp6, JDK1.2.2, Orion 1.4.5, and IE 5.00. IE's user authentication option is set to Automatic logon only in Intranet zone. I'm signed on to NT under a user-id that should not be able to load the first (and only) page of the test-case app. - My principals.xml is as follows: ?xml version=1.0? !DOCTYPE principals PUBLIC file://Evermind - Orion Principals// http://www.orionserver.com/dtds/principals.dtd; principals groups group name=administrators descriptionadministrators/description permission name=administration / permission name=com.evermind.server.AdministrationPermission / /group group name=guests descriptionguests/description /group group name=users descriptionusers/description permission name=rmi:login / permission name=com.evermind.server.rmi.RMIPermission / /group group name=gr_headcounters descriptionusers of the headcount application/description /group /groups users user username=admin password=xxx descriptionThe default administrator/description group-membership group=administrators / group-membership group=guests / group-membership group=users / /user user username=user password= deactivated=true descriptionThe default user/description group-membership group=guests / group-membership group=users / /user user username=anonymous password= descriptionThe default guest/anonyomous user/description group-membership group=guests / /user user username=hcounter password=xxx descriptionHeadcount Joe - a test identity/description group-membership group=guests / group-membership group=users / group-membership group=gr_headcounters / /user /users /principals --- my web.xml is as follows: ?xml version=1.0? !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.2//EN http://java.sun.com/j2ee/dtds/web-app_2_2.dtd; web-app display-nameAuthenticate Web Application/display-name servlet servlet-namecom.allipl.authenticate.FrontServlet/servlet-name descriptionServlet that demands browser credentials/description servlet-classcom.allipl.authenticate.FrontServlet/servlet-class /servlet servlet-mapping servlet-namecom.allipl.authenticate.FrontServlet/servlet-name !-- url-pattern appears to be relative to the context root specified in config/default-website.xml -- url-pattern//url-pattern /servlet-mapping security-role role-namesr_headcounter
Re: remote deployment, how?
Yeah, it might be. Will do. - Original Message - From: "elephantwalker" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Tuesday, April 17, 2001 1:37 AM Subject: RE: remote deployment, how? Bill, This sounds like a bug. Could you log this in bug-zilla so Magnus et al can get this one fixed? This seems to work for us. Regards, The Elephantwalker -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Bill Winspur Sent: Tuesday, April 17, 2001 12:15 AM To: Orion-Interest Subject: Re: remote deployment, how? I dont like the underscore prefixing either, particularly in my development environment. At present, on my development wkstation, I manually replace the ear file in orion/applications while the server is running. This triggers auto-unpack and redeploy without underscore renaming. Previously, I used the -deploy option of the admin.jar utility which does result in underscore renaming. Slamming an ear into the running server like this does avoid renaming behavior, but I've found that it does not work on all our development wkstations, for reasons I have not nailed down. In some cases, auto-unpack fails with a diagnostic like 'zip file format error', when the file is flawless. The work-around in that case is to stop the server replace the ear file in orion/applications and then startup the server. I intend to put the work around into our ant deployment script (let it stop and startup orion) but have not done so yet. I've used admin.jar across the network ok, so given a shared file system, this klunky approach should work as a remote deployment technique for enterprise apps that does not result in underscore renaming. For our initial production application, the *shutdown, replace ear, startup* approach will probably be an acceptable protocol that fits into our weekly change-management process. For subsequent, high availability applications we will probably be looking at another server for production, unless Orion has a more convenient hot-deploy capability by then. - Original Message - From: "Koster, K.J." [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Friday, April 13, 2001 2:14 PM Subject: remote deployment, how? Dear All, I would like to be able to deploy an .ear remotely (the servers run FreeBSD, some of the development workstations use Windows). I found that admin.jar can do this, and that the new application is indeed uploaded to the server. It is not automatically deployed in place of the old one. What I do now (more or less) is this: java -jar admin.jar ormi://bladibla admin passwd \ -deploy -file doc.ear -deploymentName doc I see that the new file shows up in $ORION/applications, prefixed with an underscore. Repeatedly deploying the same file gives me lots of folders with ever more underscores (_doc, __doc, ___doc, etc), but changes to .jsp files in the .ear are not visible over the web. What I want to do is upload a new version of the application archive in place of the old one, auto-deploying the thing. Question is: how do I do that? Kees Jan You are only young once, but you can stay immature all your life.
Re: remote deployment, how?
Thanks Daniele, the problem was solved with a copy to a mangled name then move (rename), but that was the clue, Bill. - Original Message - From: "Daniele Arduini" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Tuesday, April 17, 2001 5:30 AM Subject: Re: remote deployment, how? Hi Bill, please, see comments inline: Bill Winspur wrote: I dont like the underscore prefixing either, particularly in my development environment. At present, on my development wkstation, I manually replace the ear file in orion/applications while the server is running. This triggers auto-unpack and redeploy without underscore renaming. Previously, I used the -deploy option of the admin.jar utility which does result in underscore renaming. Slamming an ear into the running server like this does avoid renaming behavior, but I've found that it does not work on all our development wkstations, for reasons I have not nailed down. In some cases, auto-unpack fails with a diagnostic like 'zip file format error', when the file is flawless. The work-around in that case is to stop the server replace the ear file in orion/applications and then startup the server. I guess the auto-unpack fails because the file isn't totally transferred when Orion try to use it. The simple work-around is to copy it to a temporary filename and then rename it to the real .ear. See below for a better (IMHO) solution for deploy an application. I intend to put the work around into our ant deployment script (let it stop and startup orion) but have not done so yet. I've used admin.jar across the network ok, so given a shared file system, this klunky approach should work as a remote deployment technique for enterprise apps that does not result in underscore renaming. For our initial production application, the *shutdown, replace ear, startup* approach will probably be an acceptable protocol that fits into our weekly change-management process. For subsequent, high availability applications we will probably be looking at another server for production, unless Orion has a more convenient hot-deploy capability by then. Thers is no need to use the Orion's "-admin" option to deploy an application. I usually rely on the auto-deploy feature of Orion which trigger timestamp changes on the .ear file. A remote deployment is easy if you use the "rsync" utility (http://rsync.samba.org) that provides fast incremental file transfer over the network. Rsync mangle the file name until the trasfer is complete so there is non need to perform an additional rename of the file or a restart of the server. For better security you can tunnel the rsync traffic over an encrypted channel with "ssh" (http://openssh.org). This is the ant target I use for remote (or local) deployment: target name="deploy" depends="all" exec failonerror="true" executable="rsync" arg line="-azv -e ssh" / arg value="${app-ear.file}" / arg value="${deploy.app-ear.dir}" / /exec /target Hope this helps. Regards, Daniele Arduini -- Daniele Arduini [EMAIL PROTECTED] CINETICA s.r.l. via III settembre, 11 - 47891 Dogana (Repubblica di San Marino) TEL: (+39) 0549 970848 FAX: (+39) 0549 970849 FAX: (+39) 02 700 443 884
Re: OrionSupport - if you care about the 'Orion community', read it! WAS RE: productive comment.
Mike, went to the egroup on yahoo, signed up, but could not see any buttons/links to check/post messages. I have a 'howto setup a custom welcome-app' doc to submit for what its worth. Bill - Original Message - From: "Mike Cannon-Brookes" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Friday, April 13, 2001 7:52 PM Subject: OrionSupport - if you care about the 'Orion community', read it! WAS RE: productive comment. Ok, I feel it's time for me to step in here as one of the 'Joe Co.' people. Firstly, everyone calm down. As Hani said yesterday, every few weeks this whole "Orion support sucks, my boss won't buy Orion without support, I'm having a whinge" thread starts up again. Calm down and read the archives people ;) THE SITUATION: With regard to the future of OrionSupport, here are the things I _know_ are currently happening: - As far as I know it, Joe is on holidays which is probably why he's not answering his email - he hasn't been on IRC for about a week. Everyone just calm down ;) - The domain IS owned by IronFlare / Orion. As far as I know this was done by the previous owners so that it would always be an Orion support site. I have no problems with this at all, the guys have given us free reign over the content / production of the site. - The site IS down now, I'm not sure why. It seems to me Joe's machine has fallen over but we'll know when we get back. Meanwhile there is an archive of all content up to March 18th kindly hosted at www.theculprit.com - There ARE moves in progress to upgrade the site. As Hani said in a previous email it currently runs on lots of OpenSymphony technologies ( http://www.opensymphony.com - see gratuitous-OpenSymphony-plug at the end of this email) like SiteMesh, OSCache and Clickstream. I'm in the process of upgrading it to use OSContent so we'll have a fully fledged CMS with community features to boot. This will take a week or two at the least. THE PROBLEM: - The above measures are purely technical and won't help the Orion community in and of themselves. OrionSupport's biggest problem so far has been GETTING PEOPLE TO CONTRIBUTE. JoeO says this better than I could in his rant http://www.theculprit.com/www.orionsupport.com/articles/vision-2.html . BASICALLY if noone contributes the site will continue to move ahead at it's trickling pace. - HOWEVER if lots of people take 5 minutes to note down the problem they just solved, the bug they worked around, their expertise on a particular area, their knowledge of using Orion with software X - we can really produce a very useful support resource very fast indeed. Keep reading for how you can help. THE SOLUTION: I suggest we move discussion of this off the list (the last 48 hours has driven me nuts with the lack of Orion questions and the volume of "me too, Orion support sucks, I'm complaining and not doing anything about it" emails. If you don't like it, join those who are trying to do something about it! I've set up an egroup (still can't bring myself to call it a Yahoo! Group yet) for discussing it here http://groups.yahoo.com/group/orionsupport The manifesto of the group is: "A group for the authors and users of OrionSupport ( http://www.orionsupport.com ) to discuss content needed, moves ahead etc. NOTE: This is not a group for people looking for support for Orion. See http://www.orionserver.com for that" I hope you'll all join up and that together we can make OrionSupport an even better resource for the community. -mike gratuitous-OpenSymphony-plug If anyone else has some spare time and wants to help out the most advanced Open Source J2EE project out there, OpenSymphony is it ;) Check it out at http://www.opensymphony.com , help by downloading, using, testing, developing, documenting or even just suggesting ideas - let me know where you can help! For an example site running with ALL the OS technologies on Orion (OSContent for content management, community, user management, SiteMesh for layout, OSCache for speed, Formtags, OSCore for functionality / properties / personalisation) see http://ausralia.internet.com (This plug is sheerly to show off the technology, not for the extra page views - it's Australian new so who is likely to be interested anyway ;)) /gratuitious-OpenSymphony-plug -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Michael J. Cannon Sent: Saturday, April 14, 2001 10:24 AM To: Orion-Interest Subject: RE: productive comment. Fine, but OrionSupport.com is _already_ owned by Joe Co. and they are not responding (I sent them a letter and am sending another off-line). Michael J. Cannon -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Stan Ng Sent: Friday, April 13, 2001 5:37 PM To: Orion-Interest Subject: Re: productive comment. I'm all for this idea. Orionsupport
Re: configuring jndi
I'm interested. What was the problem ? Bill. - Original Message - From: "Christy Nicklas" [EMAIL PROTECTED] To: "Orion-Interest" [EMAIL PROTECTED] Sent: Thursday, April 05, 2001 2:50 PM Subject: RE: configuring jndi Actually, you can ignore my earlier message, as I found the immediate problem, although a pointer on how to configure jndi in general would probably still be helpful. --Christy
Localhost and IP Yield Different Pages
I've just wasted an hour or so debugging a non-existent problem with my default-app configuration that was caused by IE's page cache ! It had locked onto a page for http://localhostwhich it presented instead of the page I'd confugured. Short of persuading MS to get out of the html page-caching business (and the filesystem caching busines while they're at it), does anybody know how to flush all of IE's 'performance-boosting' (hah!), caches ?
Re: admin.jar deploy failed after autoupdate
I was doing autoupdate to a 1.3.8 installation - after re-installing at the 1.4.5 level the problem is gone. - Original Message - From: Bill Winspur To: Orion-Interest Sent: Monday, March 26, 2001 12:14 PM Subject: admin.jar deploy failed after autoupdate I've been using admin.jar to deploy my appsfor several months, but it failed after I did an autoupdate on my server (about Mar 13th). The failuremessages areendless repetition of: at com.evermind.server.ApplicationServerSystemProperties.getProperty(JAX)at java.lang.System.getProperty(System.java:562)at com.evermind.server.Application.w8(JAX)at com.evermind.server.ApplicationServerSystemProperties.getProperty(JAX)at java.lang.System.getProperty(System.java:562)at com.evermind.server.Application.w8(JAX)at com.evermind.server.ApplicationServerSystemProperties.getProperty(JAX)at java.lang.System.getProperty(System.java:562)at com.evermind.server.Application.w8(JAX) In the interim, I've been shutting down the server, replacing the ear file in orion/applications and restarting, which works fine, except that I have to shutdown and restart. Incidentally, an advantage of the approach is that it avoids admin.jar's habit of renaming previous deployment (by prepending '_' to the app name) instead of replacing it. The NT command to invoke admin jar was: F:\swd\jEapps\orion-primer-eapjava -jar c:\orion\admin.jar ormi://localhost/ admin pwd -deploy -file F:\swd\jEapps\orion-primer-eap\rel\primer-ep.ear -deploymentName primer-eap Is this hangup in the admin.jar command a known bug? Thanks for your attention Bill.
admin.jar deploy failed after autoupdate
I've been using admin.jar to deploy my appsfor several months, but it failed after I did an autoupdate on my server (about Mar 13th). The failuremessages areendless repetition of: at com.evermind.server.ApplicationServerSystemProperties.getProperty(JAX)at java.lang.System.getProperty(System.java:562)at com.evermind.server.Application.w8(JAX)at com.evermind.server.ApplicationServerSystemProperties.getProperty(JAX)at java.lang.System.getProperty(System.java:562)at com.evermind.server.Application.w8(JAX)at com.evermind.server.ApplicationServerSystemProperties.getProperty(JAX)at java.lang.System.getProperty(System.java:562)at com.evermind.server.Application.w8(JAX) In the interim, I've been shutting down the server, replacing the ear file in orion/applications and restarting, which works fine, except that I have to shutdown and restart. Incidentally, an advantage of the approach is that it avoids admin.jar's habit of renaming previous deployment (by prepending '_' to the app name) instead of replacing it. The NT command to invoke admin jar was: F:\swd\jEapps\orion-primer-eapjava -jar c:\orion\admin.jar ormi://localhost/ admin pwd -deploy -file F:\swd\jEapps\orion-primer-eap\rel\primer-ep.ear -deploymentName primer-eap Is this hangup in the admin.jar command a known bug? Thanks for your attention Bill.