Re: JDBC type 4

2000-09-29 Thread Jason von Nieda



The JDBC driver you use is dependant on the database you 
are using. Almost all of the major database vendors have JDBC Type 4 drivers and 
most are free. Check out 
http://industry.java.sun.com/products/jdbc/driversfor 
a list of drivers. I have personally used the JDBC drivers for mySQL and Oracle 
under Orion and they work just great.

  - Original Message - 
  From: 
  Amir Peivandi 
  To: Orion-Interest 
  Sent: Friday, September 29, 2000 7:44 
  AM
  Subject: JDBC type 4
  
  Hi
  Is 
  there any tested JDBC type 4 driver for Orion? I used Web Logic's driver but 
  it's too expensive for us so I was wondering if anyone knows about other 
  drivers we can use with Orion.
  
  Regards,
  Amir
  


ANSWER: Orion as a native user not root

2000-09-29 Thread Jason von Nieda

Okay, this keeps coming up, so maybe someone can make it a FAQ and link to
the file I am attaching. Orion does have the ability to run as a native user
under Unix besides root. There are two things you need to do. You have to
get the file attached to this e-mail and read the README to install the
native library, and you need to add a property to the Orion startup such as
this:
java -Dnative.user=username orion.jar
The attached file comes with source so you can compile it on your platform
if a binary isn't included. I cannot remember where I got this file, but it
was linked from www.orionsupport.com a while back. I think it came from
www.orionserver.com somewhere. If someone knows, please post a link. The
authors appear to be Elias Mertensson and Rocky Burt.
--
Jason von Nieda
3Buddies.com

 native_user_support.tar.gz


Re: Orion on Linux NOT as root

2000-09-28 Thread Jason von Nieda

You can run Orion as a native user using some native code that is available
somewher.e Unfortunatly, information on how this was done used to be on
www.orionsupport.com which appears to be down. There is some info in
this e-mail:
http://www.mail-archive.com/orion-interest@orionserver.com/msg01696.html
But I don't know where to get the native library any more. Orion team?
- Original Message -
From: "Markus Holmberg" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Thursday, September 28, 2000 4:46 PM
Subject: Re: Orion on Linux NOT as root


 If you're OS has support for it you can set up packet filtering (aka
 firewalling) rules that forward packets going to the privileged port
 80 to some unprivileged port, for example 8000. Then just make Orion
 listen on that unprivileged port.

 Works like a charm for me.

 In Linux's case I guess ipchains would be used. I can only provide
 instructions for FreeBSD.

 Markus


 On Thu, Sep 28, 2000 at 04:38:12PM -0400, Jim Archer wrote:
  Hi All...
 
  We have been developing under Orion on Windows machines, but the time
came
  last night to start testing on Linux, our intended server platform. We
  installed 1.3.8 on Debian Linux and quickly discovered that it wants to
run
  as root. We really can't allow this.
 
  I went through the list archive and saw a discussion about this issue
from
  last April, but didn't see what the resolution was (if any).
 
  Is there now a way to run Orion on Linux not as root (ideally as user
  nobody) and, if so, is there any doc on this?
 
  Thanks...
 
  Jim
 

 --

 Markus Holmberg |   Give me Unix or give me a typewriter.
 [EMAIL PROTECTED]  |   http://www.freebsd.org/






Problem with PostFileInputStream

2000-09-27 Thread Jason von Nieda

I am trying to read a HTTP uploaded file using FilePostParser and
PostFileInputStream.
I can read the file byte by byte, but if I try to read it in chunks I get an
AIOB exception. Here's my code with a comment on the line that blows up.
More commentary below.
-

Hashtable params = new Hashtable();
Enumeration enumeration = new FilePostParser(req.getInputStream(),
req.getContentLength());
while(enumeration.hasMoreElements()) {
  Object element = enumeration.nextElement();
  if(element instanceof Map.Entry) {
Map.Entry entry = (Map.Entry) element;
params.put(entry.getKey(), entry.getValue());
}
  else if(element instanceof InputStream) {
PostFileInputStream in = (PostFileInputStream) element;
int len;
byte[] b = new byte[1024];
// PROBLEM: read throws an exception
while ((len = in.read(b)) != -1) {
  out.write(b, 0, len);
  }
out.close();
}
  }
---
Now, according to the api docs, a InputStream.read(byte[]) should read in as
many bytes
as available and return the number of bytes read, or -1 if the stream is at
the end.
This is espescially confusing because if I read the file byte by byte, such
as:
while ((len = in.read()) != -1) {
  out.write(len);
  }
It works just fine. Here is the exception I am getting.
-
9/27/00 3:19 PM default: Servlet error
java.lang.ArrayIndexOutOfBoundsException
at java.lang.System.arraycopy(Native Method)
at com.evermind.io.PostFileInputStream.read(JAX)
at java.io.InputStream.read(InputStream.java:91)
at org.ancienttruth.servlets.UploadImage.doPost(UploadImage.java:62)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at com.evermind.server.http.d1.si(JAX)
at com.evermind.server.http.d1.forward(JAX)
at com.evermind.server.http.ed.sp(JAX)
at com.evermind.server.http.ed.so(JAX)
at com.evermind.util.f.run(JAX)
--
I am guessing this is a bug in the implementation, but I just wanted to ask
if there was
anything I am missing first. Thanks!

--
Jason von Nieda
3Buddies.com





Re: One IP - 3 Sites - 3 Domain Names

2000-09-27 Thread Jason von Nieda

Your second example is the correct one. You can also set the host value to
"[ALL]" to make things easier.

- Original Message -
From: "Dave Ford" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Wednesday, September 27, 2000 2:33 PM
Subject: One IP - 3 Sites - 3 Domain Names


 I have one physical machine with one IP address. This one ip address is
 associated with three domain names. Each domain name should pull up a
 different web-site.


 I currently have 3 web-sites defined in server.xml:

 web-site path="c:\@web\@OrionConfig\web-site-1.xml" /
  web-site path="c:\@web\@OrionConfig\web-site-2.xml" /
 web-site path="c:\@web\@OrionConfig\web-site-3.xml" /

 I then have three web-site-x.xml files defined. It's not clear what the
 value of the host and virtual-hosts attributes should be for each of these
 three files. I have read the docs and the faq but still can't get it to
 work.

 I tried this:

 In web-site-1.xml: web-site host="www.domainName1.com" 
 In web-site-2.xml: web-site host="www.domainName2.com" 
 In web-site-3.xml: web-site host="www.domainName3.com" 


 And this:

 In web-site-1.xml: web-site host="63.74.110.162"
 virtual-hosts="www.domainName1.com"
 In web-site-2.xml: web-site host="63.74.110.162"
 virtual-hosts="www.domainName2.com"
 In web-site-3.xml: web-site host="63.74.110.162"
 virtual-hosts="www.domainName3.com"

 It is not obvious to me, based on the docs, how to set this up. Any
 suggestions?

 Dave Ford







Re: Orion Hosting Service

2000-09-18 Thread Jason von Nieda

System.exit() is a SecurityManager protected method. If a security manager
is
installed it will be checked before exit is allowed.

- Original Message -
From: "Robert Krueger" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Monday, September 18, 2000 3:05 AM
Subject: Re: Orion Hosting Service


 At 14:49 18.09.00 , you wrote:
 Try www.netpike.com
 If you see no info on the site about orion, just email them and ask.
 I am hosting my web site there at the moment using orion.
 
 Alex.

 how do they handle the System.exit(0) problem? can you call that from a
 jsp? maybe I missed that but I once noticed that it is possible to take
the
 server down doing that and also remember hearing someone mention that. can
 that be configured?

 regards,

 robert
 (-) Robert Krüger
 (-) SIGNAL 7 Gesellschaft für Informationstechnologie mbH
 (-) Brüder-Knauß-Str. 79 - 64285 Darmstadt,
 (-) Tel: 06151 665401, Fax: 06151 665373
 (-) [EMAIL PROTECTED], www.signal7.de







Re: Clustering and load balancing Howto

2000-09-08 Thread Jason von Nieda

First question! Oo! Oo!
Anyways, you say:
--
If you want to add clustering for the whole website (for all
web-applications), edit the orion-web.xml of the default web-application
(NOTE: it will not be applied to all web-applications previous to Orion
1.3.6). This file is normally located in
orion/application-deployments/default/defaultWebApp/orion-web.xml.
--
Do you perhaps mean global-web-application.xml in orion/config?
My set up doesn't even reference defaultWebApp because I have no use for it.
Or am I missing something here?
Thanks!
P.S. Great doc by the way. Figured most of this out today while
interrogating Magnus, but
it's good to have it all in one place!

- Original Message -
From: "Karl Avedal" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Friday, September 08, 2000 3:57 PM
Subject: Clustering and load balancing Howto


 Hello,

 Finally, the first version of the "Orion Clustering and Load
 Distribution" document is up. You can read it at
 http://www.orionserver.com/howtos/orion-clustering.html

 We will not link it from the site until tomorrow since we want to do
 some more testing on it before we have everyone waste their time trying
 it, just to run into a simple stumbling block. However, you are free to
 read it and try it now, but no guarantees on it being 100 % correct
 until tomorrow (ok, 100% can be hard to guarantee at any time...).

 Suggestions for improvements are happily accepted to
 [EMAIL PROTECTED]

 Regards,
 Karl Avedal







Re: Orion Difficulities....

2000-09-08 Thread Jason von Nieda
Title: Orion RMI Security problem



Remove the port (8080) from your ormi URL. The admin port is 
different from the web port and is configured
in orion/config/rmi.xml

  - Original Message - 
  From: 
  Richard 
  Landon 
  To: Orion-Interest 
  Sent: Friday, September 08, 2000 4:51 
  PM
  Subject: Orion Difficulities
  
  I am 
  have some major problems with the learning curve with this server. I have 
  previously used (succesfully)
  (1) 
  J2EE RI
  (2) 
  Web Logic 5.1
  (3) 
  IAS
  (4) 
  Silverstream
  (5) 
  Gemstone/J
  
  
  I 
  start the server as follows:
  [C:/orion] java -jar orion.jarOrion/1.2.9 
  initialized
  
  I 
  take this to mean the server is running.
  
  I 
  then do a http://blazer.youbet.com:8080 and see 
  the web page.
  (I 
  modified the port since I'm already running Apache on port 
  80).
  
  For 
  example, according to the documentation, to shutdown the 
  server:
  
  [C:/orion] java -jar admin.jar 
  ormi://blazer.youbet.com:8080 admin root -shutdownError: 
  javax.naming.NamingException: Lookup error: java.io.StreamCorruptedException: 
  Caught EOFException while reading the stream header; nested exception 
  is: 
  java.io.StreamCorruptedException: Caught EOFException while reading the stream 
  header
  So 
  after two-days, it is not possible to figure out how to shutdown the 
  server.
  I'll 
  try a little bit long, then remove this server from our vendor 
  list.
  
  
  
  
  
  
  


Clustering problems.

2000-09-07 Thread Jason von Nieda



Hi all. I am having some trouble getting clustering working on 
a fairly simple setup. I am hoping someone can give me some hints as to what I 
am doing wrong. I have two machines each running Orion 1.2.9 with JDK 1.3.0RC on 
Solaris. One is Intel and the other is Sparc. Both of these machines have two 
ethernet interfaces, one for the public Internet and one for the private network 
(which is simply the two machines connected to a hub). 
My first question is; will Orion tell me when a machine joins 
the cluster? Is there any kind of notification at all? 
Secondly; If the above is the case, then I must be configuring 
something wrong. I have tried adding 
cluster id="1" / to server.xml (and id="2" on the 
second machine), I have tried adding cluster username="cluster" 
password="cluster" / to rmi.xml (both with and without id) and I have tried 
adding cluster-config / to one of my orion-web.xml files. No matter what 
I do, I never get any indication that any clustering is happening. 
Which of the above is neccessary, and which is redundant (if 
any)?
Also, do I really need to add cluster-config / to my 
orion-web.xml files? Isn't there a place I can say "make all apps clusterable by 
default"? I currently have about 20 apps installed and this makes it kinda 
annoying :)
Anyway, thanks for the help. I have been beating my head 
against this for a few days. 


Re: Loadbalancer.jar HOWTO?

2000-09-05 Thread Jason von Nieda



I would also love to know at least SOMETHING about this. It 
sounds like something
I could really use but I have been trying to get it do 
something for a few days to no
avail. 

  - Original Message - 
  From: 
  Jen Hsien 
  Huang 
  To: Orion-Interest 
  Sent: Tuesday, September 05, 2000 10:40 
  PM
  Subject: Loadbalancer.jar HOWTO?
  
  How to use the 
  loadbalancer.jar , I can't find any document about it.
  Can anybody explain how to 
  use it in short?
  Regards.,Jen Hsien Huang 
  


Vendor specific data sources?

2000-08-29 Thread Jason von Nieda

Hi everyone.
I am starting to move my legacyish apps over to the data-source.xml method
way of getting connections and have a few questions. 
Before now, I had been using a ConnectionPool of my own design but
it appears that I should be leaving this up to the application server now.
I created a data source in data-sources.xml and it works great, but I have
a question about vendor specific sources. The example data source in
data-sources.xml shows the following:
--
  class="com.evermind.sql.DriverManagerDataSource"
  name="Hypersonic"
  location="jdbc/HypersonicCoreDS"
  xa-location="jdbc/xa/HypersonicXADS"
  ejb-location="jdbc/HypersonicDS"
  connection-driver="org.hsql.jdbcDriver"
  username="sa"
  password=""
  url="jdbc:HypersonicSQL:./database/defaultdb"
  inactivity-timeout="30"
--
But in browsing around the new Oracle drivers, I have noticed a class
called OracleConnectionPoolDataSource (and also OracleDataSource).
I have substituted this class for the Orion DriverManagerDataSource
and it works fine. My question is, should I use the vendor supplied 
data source class or should I use Orion's?
Also, if I use the vendor supplied source, should I bother with
xa-location, ejb-location and pooled-location or should I just use
location?
Thanks in advance!
--
Jason von Nieda
3Buddies.com





Re: Applets?

2000-08-26 Thread Jason von Nieda

Applet classes need to go in the same directory as the HTML file
that starts it, or somewhere within it's path such as:
/html/applet.html
/html/MyApplet.class

or

/html/applet.html
/html/classes/MyApplet.class

The stuff under WEB-INF is not accessible by the browser.

- Original Message - 
From: "true believer" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Saturday, August 26, 2000 4:21 PM
Subject: Applets?


 This may sound like a silly question, but I wouldn't
 ask if I wasn't having a little problem.
 
 I assume to run applets I would put the classes in
 Web-Inf/classes, correct?
 
 If not, can someone point me in the right direction.
 For some reason they can't be found when trying to run
 in the browser.
 
 Thanks!
 
 __
 Do You Yahoo!?
 Yahoo! Mail - Free email you can access from anywhere!
 http://mail.yahoo.com/
 





Re: what are you missing in apache-like functionality?

2000-08-21 Thread Jason von Nieda

Just to repeat what I said before so you don't have to search too long...
PHP is already mapped in Orion. It's in global-web-application.xml so
just copy your *.php and *.php3 files into your web apps directory
and make sure php is in the path and you are good to go.

- Original Message -
From: "Andrew Panagos" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Sunday, August 20, 2000 7:58 PM
Subject: Re: what are you missing in apache-like functionality?


 The reason PHP is important to me is that fact that we have done alot of
 work with PHP, we have quite a significant investment in PHP and there are
 alot more apps out there at the moment written in PHP. Now I want to
migrate
 over to JSP and the J2EE way of doing things but at the same time I don't
 want to abandon what we have labored over.

 As I had asked before, I wanted to know if I could use PHP from the Orion
 server. That would allow me to host my php stuff keep my clients happy and
 migrate stuff over to JSP and others, all with one server app. Well the
 response is yes I can do it ( one reply saying I'm stupid for asking,
though
 he did say he was disturbed so I'll ignore it.;-) ). So I will dig into
the
 past emails and search the config files to get the answer hoping that in
the
 future I could read this in some document saving me the effort of
"wasting"
 peoples time (and especially my time) asking seemingly (but unknowingly)
 obvious questions.

 Thanks for the help ( and any more constructive advice and direction)

 Andrew








Re: load-on-startup initialization called twice

2000-08-21 Thread Jason von Nieda

I have noticed this same behaviour even with the servlet specified
only in one place. The init() method is always called on server
startup and then called again the first time the servlet is accessed.

- Original Message - 
From: "Christian Sell" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Monday, August 21, 2000 12:32 PM
Subject: load-on-startup initialization called twice


 Hello,
 
 I have load-on-startup specified both in default-web-site.xml for the
 web-app and in web.xml for a servlet within the web-app. Now the init()
 method of the servlet gets called twice - once when the app is loaded at
 server startup, and once when the app is first accessed from the browser.
 
 Christian Sell
 
 





Re: what are you missing in apache-like functionality?

2000-08-19 Thread Jason von Nieda

You can use PHP with Orion simply by putting your PHP files 
in your Orion web directories. 
If you look in global-web-application.xml you will see the following
information:
  servlet
   servlet-namephp/servlet-name
   servlet-classcom.evermind.server.http.CGIServlet/servlet-class
   init-param
   param-nameinterpreter/param-name
param-valuephp/param-value
   /init-param
  /servlet

  servlet-mapping
   servlet-namephp/servlet-name
   url-pattern/*.php/url-pattern
  /servlet-mapping

  servlet-mapping
   servlet-namephp/servlet-name
   url-pattern/*.php3/url-pattern
  /servlet-mapping

Which maps *.php and *.php3 to the PHP interpreter.
Just make sure PHP is in your path and it should
work fine.
- Original Message - 
From: "Andrew Panagos" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Saturday, August 19, 2000 8:21 AM
Subject: Re: what are you missing in apache-like functionality?


 List So far
 1) mod_rewrite
 2) mod_expires
 
 3) I would like php to the list so desired Apache to Orion wants. We have
 alot of investment in php files. It would be great to be able to use them
 with Orion instead of having to run Apache and Orion
 
 Andrew
 
 
 





Re: Clustering help..

2000-08-12 Thread Jason von Nieda

Hate to just chime in, but I would love some information on
this as well. Not only instructions and documentation for
it, but a list of clustering features that are supported
would be great too.

- Original Message -
From: "Keven Duffey" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Saturday, August 12, 2000 5:28 PM
Subject: Clustering help..


 Hi,

 I have yet to figure out how to cluster Orion. The documentation still
 leaves a lot to be desired. If I have two separate machines, how do I get
 two Orion servers to talk with one another? Can I have one be the servlet
 engine, and one be th ejb engine? How about fail-over? Ideally I want two
 (or more) web server/servlet engine front-end boxes, and two or more EJB
 boxes. Can someone shed some light on how to get this to work. Initially I
 need the fail-over servlet engines, because I am not doing the EJB stuff
 yet. So how would I set up two boxes to be fail-over, scalable and
 load-balanced with Orion? How do I add more computers to one tier?

 Thanks.







Re: A very interesting problem with JSP's and Finland

2000-08-10 Thread Jason von Nieda

The Orion folks use a code obfuscator on Orion so, many of the
classes are named things like fi, ab, ac, aa, gg and so on.
Although, I am surprised the compiler would complain
about this. Don't really have an answer sadly.

- Original Message -
From: "Aleksi Kallio" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Friday, July 28, 2000 7:27 AM
Subject: A very interesting problem with JSP's and Finland


 There is a very funny bug in Orion. I think it is in JSPservlet, because
it appears only when compiling jsp pages. I have the package fi.infomates in
import clause, which leads to the following error:

 Ambigious name:
 fi is both a class and a package

 After a long search I succeeded to locate the problem to orion.jar, to
com/server/ejb/administeration/fi.class.

 Is it that we Finnish developers aren't allowed to use JSP? :)