DriverManagerConnectionPoolConnection not closed, check your code!

2000-11-22 Thread Michael Maram

Hi all

I am receiving the following message a number of times following multiple
user concurrent hits -

DriverManagerConnectionPoolConnection not closed, check your code!

I am physically closing the connection after the process of each request.
What does the close() method on the connection do? Will it free the
connection back to the pool? That's what it should do. Why am I still
getting this message? Below is my data-source definition.

data-source
name="test1"
class="com.evermind.sql.DriverManagerDataSource"
ejb-location="jdbc/OracleDS1"
pooled-location="jdbc/OraclePooledDS1"
xa-location="jdbc/xa/OracleXADS1"
url="jdbc:oracle:thin:@test:1521:pilot"
connection-driver="oracle.jdbc.driver.OracleDriver"
username="test"
password="test"
max-connections="500"
/

PS - I have checked the listings but found no solution.

In anticipation.






Collection of entity beans

2000-11-22 Thread Giorgio Angiolini

Repost for mail server problem (sorry !)
Hello
I have just read the nice  article "Advanced Object-relational mapping"
found in orionsupport.com (thank's Joe Walnes !).

The following types of field can be mapped within entity beans:
1) Simple object and primitives

2) Object

3) Serializable objects (A.K.A BLOB)

4) Entity references

5) Collection

One question: how can I use the container managed persistence with
collection of entity references ?

Thank's a lot !

Giorgio








Re: OpenBSD

2000-11-22 Thread David Smith



I am running the latest orion on FreeBSD 4.2-STABLE, using Sun's JDK1.3
for Linux, and it works a treat.
Mathias Bogaert wrote:

Hello,
Has anyone got Orion running on OpenBSD
(www.openbsd.org), or any other BSD
unix? TIAMathias Bogaert

--
David Smith

Software Development Manager
e-Net Software Ltd
[EMAIL PROTECTED]





Re: Christian Sell et al.... Re: Deploying a servlet ear, war: help an oroin newbie

2000-11-22 Thread Christian Sell

BTW: if the mapping was the problem, you should get a 404 (not found). A 500
indicates something goes wrong INSIDE the servlet

- Original Message -
From: "Mateo Torrealto" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Wednesday, November 22, 2000 7:48 AM
Subject: Christian Sell et al Re: Deploying a servlet ear, war: help an
oroin newbie


 Christian Sell et al,

 Thank you for your help.

 WRT
 "aside its always useful to describe WHAT error you
 are getting /aside"

 Good point. I had a brain brownout.

 The only error I got was from the browser.
 The error was HTTP 500 - Internal server error
 when I posted to
 form
 action="/employee-app/com.objectgeneration.sample.EmployeeForm"
 method="post"

 and the error was also HTTP 500 when I posted to
 form action="/employee-app" method="post"

 I tried your first suggestion, i.e., I posted with
 form
 action="/employee-app/servlet/com.objectgeneration.sample.EmployeeForm"
 method="post"
 with the existing setup and I get
 You guessed it HTTP 500...

 That is okay at least I got the Post format correct.
 So in additon to the problem you helped me with... I
 have yet another problemwhat a mess I am.

 On to your second suggestion. I see that you changed
 the name of the servlet, but I am not sure what else
 you did nor am I sure what is different other than
 the shorter name, i.e., I already had a servlet
 mapping. But just in case I am an idiot (which I wont
 rule out). I followed what you wrote to a tee.
 [opps I just saw that i forgot to include my servlet
 mapping sorry another brain brownout.]

 BTW I also tried someone elses idea of what the
 servlet mapping should look like, and it did not seem
 to work. I think I don't have the post correct for a
 corresponding servlet mapping.

 What would be the post for that mapping?
 i.e., what would the post look like for the mapping
 that you suggested??

 I think it would look like
 form action="/employee-app" method="post"
 or maybe
 form action="/employee-app/" method="post"

 I get a 500 with both of the above.

 I seems like Orion is finding things okay because
 I get this message when it starts up

 Auto-unpacking
 D:\Personal\Proto\CodeGen\Employee3\rel\employee-app.ear...
 done.
 Auto-unpacking
 D:\Personal\Proto\CodeGen\Employee3\rel\employee-app\employee-app
 -web.war... done.
 Auto-deploying employee-app (Assembly had been
 updated)...
 Orion/1.3.8 initialized

 Again it works with the version that I installed in
 the default web application directory.

 The trusty tried and true

 form
 action="/servlet/com.objectgeneration.sample.EmployeeForm"
 method="post"

 The above works.

 Christian thank you for your help.

 --- Mateo Torrealto

 BTW I used ant to build the orion-primer and then some
 other stuff. I am new to Ant, but I dig it. It is like
 make but easy and geared towards java.

 
 
 
  From: "Christian Sell"
  [EMAIL PROTECTED]
  Reply-To: Orion-Interest
  [EMAIL PROTECTED]
  To: Orion-Interest [EMAIL PROTECTED]
  Subject: Re: Deploying a servlet ear, war: help an
  oroin newbie
  Date: Tue, 21 Nov 2000 23:22:39 +0100
  
  aside
  its always useful to describe WHAT error you are
  getting
  /aside
  
  from looking at your files, I see you are missing a
  servlet-mapping entry
  in
  web.xml. In your call to the default-web-app, you
  use the
  (orion-preconfigured) servletmapping to /servlet.
  Now you can do the same
  when calling into your new webapp, by saying
  
  form
 
 action="/employee-app/servlet/com.objectgeneration.sample.EmployeeForm"
  method="post"
  
  (note the "/servlet/" in there), or you can add a
  servlet mapping like the
  following (note that I've also assigned a shorter
  servlet name):
  
  servlet
servlet-nameEmployeeForm/servlet-name
  
 
 servlet-classcom.objectgeneration.sample.EmployeeForm/servlet-class
  /servlet
  servlet-mapping
 servlet-nameEmployeeForm/servlet-name
  url-pattern//url-pattern
  /servlet-mapping
  
  
  - Original Message -
  From: "Matthew TorreAlto"
  [EMAIL PROTECTED]
  To: "Orion-Interest"
  [EMAIL PROTECTED]
  Sent: Tuesday, November 21, 2000 8:19 PM
  Subject: Deploying a servlet ear, war: help an
  oroin newbie
  
  
I am trying to deploy a servlet with Orion. The
  servlet runs fine in
JBuilder. It even runs in Orion if I stick it in
  the default web
  application
directory. But I want to do it right and use the
  ear, war files. (or do
  I)
   
When I run Orion it seems to pick it up the ear
  and war file okay.
Orion finds the ear file and unbundles the war
  file inside.
But. When I post I get an Error...
   
I think I set up the web.xml and application.xml
  just so... I based this
  off
the orion-primer example and I even reused the
  build.xml ant file with
  some
modifications. (I really like ant.) Everything
  builds just groovy. I
  even
check the war and ear files and everything seems
  in 

Re: DriverManagerConnectionPoolConnection not closed, check your code!

2000-11-22 Thread Johan Fredriksson

The error is not in the xml file but the source code.

Had the error a couple of times; solved it by using a

Connection conn = null;
Statement stmt = null;
ResultSet rs = null;
try {
conn = ...
stmt = conn.CreateStatement(); - don't remember if this is correct.
rs = stmt.execute();- something like this.
} catch (SQLException sqle) {
}
finally {
rs.close();
stmt.close();
conn.close(); - in that order...!
}

The idea is to close everything in the finally block and not in the try
block.
- Original Message -
From: "Michael Maram" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Wednesday, November 22, 2000 9:26 AM
Subject: DriverManagerConnectionPoolConnection not closed, check your code!


 Hi all

 I am receiving the following message a number of times following multiple
 user concurrent hits -

 DriverManagerConnectionPoolConnection not closed, check your code!

 I am physically closing the connection after the process of each request.
 What does the close() method on the connection do? Will it free the
 connection back to the pool? That's what it should do. Why am I still
 getting this message? Below is my data-source definition.

 data-source
 name="test1"
 class="com.evermind.sql.DriverManagerDataSource"
 ejb-location="jdbc/OracleDS1"
 pooled-location="jdbc/OraclePooledDS1"
 xa-location="jdbc/xa/OracleXADS1"
 url="jdbc:oracle:thin:@test:1521:pilot"
 connection-driver="oracle.jdbc.driver.OracleDriver"
 username="test"
 password="test"
 max-connections="500"
 /

 PS - I have checked the listings but found no solution.

 In anticipation.







wrong issuer in server certificate

2000-11-22 Thread Matthias Schmitt



 i've made a servercertificate signed with my own CA (using openssl). If i
 connect with orion (https:\\servername) the certificate shows the wrong
 issuer:
 not my CA, but the server.
 What is wrong here ?

 How can i tell the orionserver, which CAs to accept for Clientcertificates?

 Thank you,
 Matthias Schmitt
 ---
 ixmid
 Software Technologie GmbH

  [EMAIL PROTECTED]
 http://www.ixmid.com








database schema mapping and MS SQL Server 7 - does the schema mapping work ? How do I make it work ?

2000-11-22 Thread Somdeth Souvanlasy

Hi,

The orionserver site isn't responding today, so I can't check bugzilla to
see if this is an outstanding bug.

Configuration
Orion 1.4.0
Windows 2000 Professional
Sun JDK 1.3
MS SQL Server 7
BEA Weblogic MSSQLServer 7 type 4 JDBC drivers version 5.1.0 (evaluation
drivers)

Situation
I'm trying to build a CMP entity bean that has a java.sql.Timestamp as one
of the fields deploying the bean works fine - Orion creates the table
with the correct column type for the timestamp field.  However, when I do a
create, I get back the following error:

Error creating EntityBean: Disallowed implicit conversion from data type
varchar to data type timestamp, table 'XX', column 'timeStamp'. Use the
CONVERT function to run this query. Severity 16, State 1, Procedure 'XX
null', Line 1 javax.ejb.CreateException: Error creating EntityBean:
Disallowed implicit conversion from data type varchar to data type
timestamp, table 'XXX', column 'timeStamp'. Use the CONVERT function to
run this query. Severity 16, State 1, Procedure ' null', Line 1
at com.evermind.server.rmi.bd.invokeMethod(JAX)
at com.evermind.server.rmi.a4.invoke(JAX)
at com.evermind.server.rmi.a5.invoke(JAX)
at __Proxy1.create(Unknown Source)
at TestEntityClient.main(TestEntityClient.java:35)

which is a SQL Server error - to me this indicates that the container is
trying to save the timestamp field to the table not as an actual SQL Server
timestamp but as a string (varchar)...

I then looked at the database-schemas\ms-sql.xml file and sure enough, there
was no entry to map java.sql.Timestamp to the timestamp type for SQL Server.
My data-sources.xml file specifies this file as the schema for the data
source that I am using.

I then added this line to the database-schemas\ms-sql.xml

type-mapping type="java.sql.Timestamp" name="timestamp" /

hoping that this would fix the problem, but alas no.

(converting the column in the table to be a varchar works - I can then
create the entity beans and save them to the database, but then the
timeStamp is a varchar, and any queries using the field are string
comparisons - I want to be able to use the native SQL Server timestamp
type)

Does Orion use the mappings from the schema at all ?  Have I specified the
mapping incorrectly ? or is there something else I need to do ?

Any help/ideas would be appreciated,
Somdeth

 winmail.dat


SV: database schema mapping and MS SQL Server 7 - does the schema mapping work ? How do I make it work ?

2000-11-22 Thread Klaus . Myrseth

The easy way is to use java.util.Date instead, this maps to Datetime
datatype, works for me.

Klaus

  -Opprinnelig melding-
 Fra:  Somdeth Souvanlasy [mailto:[EMAIL PROTECTED]] 
 Sendt:22. november 2000 11:37
 Til:  Orion-Interest
 Emne: database schema mapping and MS SQL Server 7 - does the schema
 mapping work ? How do I make it work ?
 
 Hi,
 
 The orionserver site isn't responding today, so I can't check bugzilla to
 see if this is an outstanding bug.
 
 Configuration
 Orion 1.4.0
 Windows 2000 Professional
 Sun JDK 1.3
 MS SQL Server 7
 BEA Weblogic MSSQLServer 7 type 4 JDBC drivers version 5.1.0 (evaluation
 drivers)
 
 Situation
 I'm trying to build a CMP entity bean that has a java.sql.Timestamp as one
 of the fields deploying the bean works fine - Orion creates the table
 with the correct column type for the timestamp field.  However, when I do
 a create, I get back the following error:
 
 Error creating EntityBean: Disallowed implicit conversion from data type
 varchar to data type timestamp, table 'XX', column 'timeStamp'. Use
 the CONVERT function to run this query. Severity 16, State 1, Procedure
 'XX null', Line 1 javax.ejb.CreateException: Error creating
 EntityBean: Disallowed implicit conversion from data type varchar to data
 type timestamp, table 'XXX', column 'timeStamp'. Use the CONVERT
 function to run this query. Severity 16, State 1, Procedure '
 null', Line 1
 at com.evermind.server.rmi.bd.invokeMethod(JAX)
 at com.evermind.server.rmi.a4.invoke(JAX)
 at com.evermind.server.rmi.a5.invoke(JAX)
 at __Proxy1.create(Unknown Source)
 at TestEntityClient.main(TestEntityClient.java:35)
 
 which is a SQL Server error - to me this indicates that the container is
 trying to save the timestamp field to the table not as an actual SQL
 Server timestamp but as a string (varchar)...
 
 I then looked at the database-schemas\ms-sql.xml file and sure enough,
 there was no entry to map java.sql.Timestamp to the timestamp type for SQL
 Server.  My data-sources.xml file specifies this file as the schema for
 the data source that I am using.
 
 I then added this line to the database-schemas\ms-sql.xml
 
 type-mapping type="java.sql.Timestamp" name="timestamp" /
 
 hoping that this would fix the problem, but alas no.
 
 (converting the column in the table to be a varchar works - I can then
 create the entity beans and save them to the database, but then the
 timeStamp is a varchar, and any queries using the field are string
 comparisons - I want to be able to use the native SQL Server timestamp
 type)
 
 Does Orion use the mappings from the schema at all ?  Have I specified the
 mapping incorrectly ? or is there something else I need to do ?
 
 Any help/ideas would be appreciated,
 Somdeth




Re: Instantiate more than one session bean

2000-11-22 Thread Storm Linux User

On Tuesday 21 November 2000 12:47, you wrote:

 Is it possible to instatiate more than one session bean from the same
  class,
 
 for the same session? I'm planning to make a mullti-threaded servlet that

 you mean the same httpsession, don't you?

Yes, the same HttpSession ...

 each thread instantiate one session bean object and works with it.

 could you describe a little more what you're trying to achieve?

I need to execute something concurrently. For this, I need many session beans 
for the same class and then excute these session beans from a multi-threaded 
servlet.

[]s
Guilherme Ceschiatti





Problems with the Orion CMP primer example.

2000-11-22 Thread fresnaULL


Hi,
I'm trying to deploy the Orion CMP primer example. I've follow the
instructions but I've got the following error:

Auto-deploying addressbook (New server version detected)...
Auto-deploying addressbook-ejb.jar (No previous deployment found)... SQL
   error: File input/output error: ./database/defaultdb.properties
Warning: Error creating table: File input/output error:
./database/defaultdb.pro
perties
done
Orion/1.3.8 initialized

I'm sure I've installed Orion properly because I've deployed successfully
the
Orion Primer example.

Thanks in advance







RE: Collection of entity beans

2000-11-22 Thread Mike Cannon-Brookes

just use it as you would any other collection. Orion is smart enough to
persist the primary keys of each entity in the relation.

-mike

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Giorgio
 Angiolini
 Sent: Wednesday, November 22, 2000 7:48 PM
 To: Orion-Interest
 Subject: Collection of entity beans


 Repost for mail server problem (sorry !)
 Hello
 I have just read the nice  article "Advanced Object-relational mapping"
 found in orionsupport.com (thank's Joe Walnes !).

 The following types of field can be mapped within entity beans:
 1) Simple object and primitives

 2) Object

 3) Serializable objects (A.K.A BLOB)

 4) Entity references

 5) Collection

 One question: how can I use the container managed persistence with
 collection of entity references ?

 Thank's a lot !

 Giorgio











RE: -- Arved -- Can you please help me with servlet authentication?

2000-11-22 Thread Arved Sandstrom

Hi, Tim

Our servlet has nothing whatsoever to do with Servlet-2.x style
authentication. We only have one servlet, and our application model is not
predicated on having umpteen JSPs and content pages to jump around to and
set security constraints on. We don't use a jndi.properties for
authentication.

The servlet is dumb, and is primarily concerned with being there as a known
point for receiving requests and issuing responses. There is no great
mystery revealed by indicating that we have an event-based application;
security is naturally event-based (i.e. "You in this role can either send
this event or you can't") from the user viewpoint. Logging in is just
another event - we typically use a form but _we_ create it, and the gathered
username and password are just strings being passed further down into
programmatic RoleManager code (roleManager.login(), in other words).

Our approach to security, IOW, is along the style of isPrincipalInRole(),
not EJB-style fine-grained method permissions. We consider this latter to be
nice in theory but not much use in practice, since it doesn't correspond
well to the granularity of what users do.

Could we set method permissions? Of course - the user is always in some
role, and we are controlling what role they are in. We just happen not to
use this form of security. I might add that the interface to the servlet,
because of an event-handling approach, exposes very few methods and they are
not suitable for EJB-style method permissions type security control anyway.

As far as the problem of N users hitting 1 servlet, if you're doing what we
do then there is no confusion. You end up writing your session management
anyway, to ensure that the servlet, for a given user, is handling off the
requests to a valid and correct SB. The SB in question can retrieve the
correct Principal as required, based on username, and do the role check.

You'll understand that we are using 100% programmatic user management. Also,
I think (in your last few paras) that you are close to answering your own
question. If you've got multiple users and you cannot rely on a
jndi.properties, then by exclusion you must rely on the users to supply
their identity. We use a form to gather the username and password when we
need them; client certs would also work.

HTH, Arved

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Tim Endres
Sent: Tuesday, November 21, 2000 7:07 PM
To: Orion-Interest
Cc: Arved Sandstrom
Subject: RE: -- Arved -- Can you please help me with servlet
authentication?


Hi Arved,

 Although we have a single servlet front-end, and do programmatic
 usermanagement (including login), the actual user manager and role manager
 stuff all happens down in EJB-land (in a session bean being referenced
from
 the servlet). So we do not use JNDI properties at all for authentication,
 except for some secondary application clients.

Are you saying that you simply ignore EJB-based permissions, and manage all
of the access internally in your session beans? This is the approach that I
want to take, but I want to be sure that only my servlets can actually get
to the methods that establish the "user session" upon which all else
depends.

Or are you saying that the servlet hands requests to Session Beans, and then
the SBs are changing the principal via RoleManager.login()?

 So I'm sorry if I gave the wrong impression. Based on user input, the
 servlet is telling the EJB (and dependents) when usermanager things need
to
 be done; the servlet is not actually doing that itself.

Again, are you using your own permission management, or are you using the
EJB permissions? Or are you just talking about user "management"
(add, remove, etc.)?

I am trying to establish user method permissions, not managing users, and I
can not get that to work at all.

 Incidentally, the JNDI lookup that works just fine here is precisely:

 roleManager = (RoleManager)new
 nitialContext().lookup( "java:comp/RoleManager" );

Ah! I will try that. Thanks.

 I might add that we are using the EJBUserManager, and we have found that
the
 programmatic control of groups doesn't work properly, so we hacked a
 workaround (concern when updating or adding users). Otherwise everything
 described above is cool.

Well, this now suggests to me that you are using EJB permissions. Are you
calling RoleManager.login() to change the principal from what the servlet
had established via jndi.properties?

 Assuming you figure out the jndi.properties thing, then you ought to be
able
 to obtain the principal name and the credentials (password) from the
 environment, and pass that info into a session bean that can actually do
the
 usermanager and role manager stuff. IMO.

This is very confusing to me. If I have N users hitting 1 servlet, and that
servlet is establishing the principal from jndi.properties, how in the world
do I establish the user for EJB permissions? When that servlet accesses a
session bean, the SB will see the 

Re: wrong issuer in server certificate

2000-11-22 Thread Ismael Blesa Part

I am also interested on this issue.

Matthias Schmitt wrote:

  i've made a servercertificate signed with my own CA (using openssl). If i
  connect with orion (https:\\servername) the certificate shows the wrong
  issuer:
  not my CA, but the server.
  What is wrong here ?

  How can i tell the orionserver, which CAs to accept for Clientcertificates?

  Thank you,
  Matthias Schmitt
  ---
  ixmid
  Software Technologie GmbH

   [EMAIL PROTECTED]
  http://www.ixmid.com





Problems with the Orion CMP primer example.

2000-11-22 Thread fresnaULL

 
 Hi,
 I'm trying to deploy the Orion CMP primer example. I've follow the
 instructions but I've got the following error:
 
 Auto-deploying addressbook (New server version detected)...
 Auto-deploying addressbook-ejb.jar (No previous deployment found)... SQL
error: File input/output error: ./database/defaultdb.properties
 Warning: Error creating table: File input/output error:
 ./database/defaultdb.pro
 perties
 done
 Orion/1.3.8 initialized
 
 I'm sure I've installed Orion properly because I've deployed successfully
 the Orion Primer example.

 Thanks in advance
 
 
 





Re: Instantiate more than one session bean

2000-11-22 Thread Robert Krueger

At 09:50 22.11.00 , you wrote:
On Tuesday 21 November 2000 12:47, you wrote:

  Is it possible to instatiate more than one session bean from the same
   class,
  
  for the same session? I'm planning to make a mullti-threaded servlet that
 
  you mean the same httpsession, don't you?

Yes, the same HttpSession ...

  each thread instantiate one session bean object and works with it.
 
  could you describe a little more what you're trying to achieve?

I need to execute something concurrently. For this, I need many session beans
for the same class and then excute these session beans from a multi-threaded
servlet.

I was asking about the use case you're modelling, not the particular 
implementation problem. so I still didn't get how the relationship between 
session beans and http-sessions is in your case. what do you mean by 
multi-threaded? multiple http requests executed on the servlet concurrently 
or multiple threads that are started by one http request that invoke 
session bean methods?

robert

[]s
Guilherme Ceschiatti


(-) 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





Threads and EJB stubs

2000-11-22 Thread Daniel G. Koulomzin


Hi all,
 Can multiple threads share one EJBObject? What
about one EJBHome? Are these thread safe?
 Also, what's everone's policy on caching StatelessSessionBeans?
Does your client code tend to hold a reference to a Stateless Session bean
between uses, or do you get a new reference every time?
-Dan
--
Daniel G. Koulomzin
Digital Media On Demand
244 Brighton Ave. 3rd Floor
Allston MA 02134



RE: EJB 2.0

2000-11-22 Thread Tim Drury


Search back through the archives.  There are several
examples and questions w/ answers.  If that doesn't
answer your questions (and the one in your previous
post regarding 1:1), then post just the pertinent
parts of you code for us to look at.

All I know that has been implemented is EJB 2.0 draft
1 entity beans.  Two things that don't work are
bi-directional relationships (bug ?) and dependent-dependent
relationships (bug 185).

-tim


 -Original Message-
 From: Arthur Copeland [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, November 21, 2000 6:52 PM
 To: Orion-Interest
 Subject: EJB 2.0
 
 
 What part of the EJB 2.0 spec has been implemented in
 orion as of 1.4.4.  for example is EQL, Select Methods,
 Home methods, Dependant Object working?  does anyone
 know where i can find the full list of features.  i
 really want to start developing 2.0 compliant beans, but
 can't if i don't know what is working and what isn't.
 
 artie
 




DataSourceConnection not closed

2000-11-22 Thread Daniel G. Koulomzin


Hi all,
I've recently been load-testing my app, and have been getting some strange
problems after between 15 minutes and an hour of tests. My application
uses EJBs that are accessed through Turbine. I'm running RedHat 6.2,
with the Sun jdk1.2.2. The database is Sybase workgroup edition.
I'm using Orion 1.3.8.
The problem is as follows: I am using JMeter to test the performance
of the site under load. When I hit it with 10 threads that pause
approximately 300ms between requests, the thing hums along with decent
performance. However, between 15 minutes and an hour later, it has
what looks to be some sort of lockup (perhaps a DB table is locked, or
is it a thread prob?). Nothing really happens until the transactions
time-out, and then an exception gets thrown (see below). Sometimes,
it will also print "DataSourceConnection was not closed, check your code!"
Well, I did check my code, and I never do any explicit database calls.
In fact, if you look at the stacktrace, you'll see it seems to die in Orion's
generated HomeWrapper. (Of course, this seems to be thread-related,
so just because the process dies there, doesn't mean the problem is there.)
Anyway, multiple threads do share the same EJBHome. Is that legal?
Could this be causing the problem?
Here's that stack trace:
com.evermind.server.rmi.OrionRemoteException: SQL Error opening DataSource:
Timed out waiting for an avai
lable connection after 60 second (connection pool reached max-connections
which was set to 6)
 at com.evermind.server.ejb.DataSourceConnectionContainer.getConnection(JAX)
 at FeatureHome_EntityHomeWrapper12.findRankedFeatures(FeatureHome_EntityHomeWrapper12.java:1645)
 at com.dbusa.webmacro.helpers.feature.FeatureHelper.getRankedFeatures(FeatureHelper.java:61)
 at com.dbusa.webmacro.helpers.feature.FeatureHelper.loadRankedFeatures(FeatureHelper.java:89)
 at com.dbusa.webmacro.helpers.feature.FeatureHelper.loadRankedCommentaries(FeatureHelper.java:103)
 at com.dbusa.webmacro.navigations.MessageBoardTease.doBuildTemplate(MessageBoardTease.java:43)
 at org.apache.turbine.modules.navigations.WebMacroSiteNavigation.doBuildTemplate(WebMacroSiteNavigation.java:117)
 at org.apache.turbine.modules.navigations.TemplateNavigation.doBuild(TemplateNavigation.java:110)
 at org.apache.turbine.modules.navigations.WebMacroSiteNavigation.doBuild(WebMacroSiteNavigation.java:131)
 at org.apache.turbine.modules.Navigation.build(Navigation.java:99)
 at org.apache.turbine.modules.NavigationLoader.eval(NavigationLoader.java:126)
 at org.apache.turbine.util.webmacro.WebMacroNavigation.toString(WebMacroNavigation.java:133)
 at org.webmacro.engine.Variable.write(Variable.java:156)
 at org.webmacro.engine.Block.write(Block.java:56)
 at org.webmacro.engine.WMTemplate.write(WMTemplate.java:251)
 at org.apache.turbine.services.webmacro.TurbineWebMacroService.handleRequest(TurbineWebMacroService.java:237)
 at org.apache.turbine.services.webmacro.TurbineWebMacroService.handleRequest(TurbineWebMacroService.java:208)
 at org.apache.turbine.services.webmacro.TurbineWebMacro.handleRequest(TurbineWebMacro.java:107)
 at org.apache.turbine.modules.layouts.WebMacroSiteLayout.doBuild(WebMacroSiteLayout.java:131)
 at org.apache.turbine.modules.Layout.build(Layout.java:93)
 at org.apache.turbine.modules.LayoutLoader.exec(LayoutLoader.java:120)
 at org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:171)
 at org.apache.turbine.modules.Page.build(Page.java:92)
 at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:119)
 at org.apache.turbine.Turbine.doGet(Turbine.java:366)
 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)
 Nested exception is:
java.sql.SQLException: Timed out waiting for an available connection
after 60 second (connection pool rea
ched max-connections which was set to 6)
 at com.evermind.sql.OrionPooledDataSource.d1(JAX)
 at com.evermind.sql.OrionPooledDataSource.d3(JAX)
 at com.evermind.server.ejb.DataSourceConnection.init>(JAX)
 at com.evermind.server.ejb.DataSourceConnectionContainer.getConnection(JAX)
 at FeatureHome_EntityHomeWrapper12.findRankedFeatures(FeatureHome_EntityHomeWrapper12.java:1645)
 at com.dbusa.webmacro.helpers.feature.FeatureHelper.getRankedFeatures(FeatureHelper.java:61)
 at com.dbusa.webmacro.helpers.feature.FeatureHelper.loadRankedFeatures(FeatureHelper.java:89)
 at com.dbusa.webmacro.helpers.feature.FeatureHelper.loadRankedCommentaries(FeatureHelper.java:103)
 at com.dbusa.webmacro.navigations.MessageBoardTease.doBuildTemplate(MessageBoardTease.java:43)
 at org.apache.turbine.modules.navigations.WebMacroSiteNavigation.doBuildTemplate(WebMacroSiteNavigation.java:117)
 at 

RE: -- Arved -- Can you please help me with servlet authentication?

2000-11-22 Thread Tim Endres

 You'll understand that we are using 100% programmatic user management. Also,
 I think (in your last few paras) that you are close to answering your own
 question. If you've got multiple users and you cannot rely on a
 jndi.properties, then by exclusion you must rely on the users to supply
 their identity. We use a form to gather the username and password when we
 need them; client certs would also work.

Arved,

Thanks for your help so far. I am down to one last problem. We are using
Orion 1.4.0, and there appears to be some sort of bug in the InitialContext.
I am setting up the environment in my servlet:

   Properties env = new Properties();
   env.put(
  "java.naming.factory.initial",
  "com.evermind.server.ApplicationInitialContextFactory" );
   env.put( "java.naming.provider.url", "ormi://localhost/appname" );
   env.put( "java.naming.security.principal", "appuser" );
   env.put( "java.naming.security.credentials", "password" );
   InitialContext iCtx = new InitialContext( env );

No matter how I set up env, it does not work with respect to identity.

When I print out the InitialContext, it has all of my ejb-ref's bound
to it. HOWEVER, it does not have any "environment" established at all
(IOW, iCtx.getEnvironment() gives back an empty Hashtable). And when
I access my SB's, I am considered a 'guest' user. If I take permissions
off the SB's, I am able to access and use them. As soon as I put the
permissions back, I am rejected. It is ignoring my principal and
credentials completely!

Do you establish any identity via the InitialContext in your servlet?

Is this a know bug? I can not find it anywhere in BugZilla, which has
a very poor searching interface.

tim.





jndi entry

2000-11-22 Thread Edmund Cheung

Hi ,

In weblogic, I set the following in the weblogic-ejb-jar.xml

jndi-nameframework.users.usermanagersession.UserManagerHome/jndi-name

And do I set something similar in Orion in order to get it working?

Thanks,

Edmund





Re: Problems with the Orion CMP primer example.

2000-11-22 Thread KirkYarina

Have you created a database directory ($ORION_DIR/database)?  Do you have 
the appropriate permissions on defaultdb.* in it?

At 12:10 PM 11/22/00 +, you wrote:

Hi,
I'm trying to deploy the Orion CMP primer example. I've follow the
instructions but I've got the following error:

Auto-deploying addressbook (New server version detected)...
Auto-deploying addressbook-ejb.jar (No previous deployment found)... SQL
error: File input/output error: ./database/defaultdb.properties
Warning: Error creating table: File input/output error:
./database/defaultdb.pro
 perties
done
Orion/1.3.8 initialized

I'm sure I've installed Orion properly because I've deployed successfully
the
Orion Primer example.

Thanks in advance


Kirk Yarina
[EMAIL PROTECTED]





Re: error instantiating web-app JNDI-context, JSP - EJB

2000-11-22 Thread Garret Wilson

No luck -- I still get the following exception:

javax.naming.NamingException: Error instantiating web-app JNDI-context: No
location specified and no suitable instance of the type 'com.company.Caller'
found for the ejb-ref ejb/Caller
 at com.evermind.server.http.HttpApplication.getEnvironmentContext(JAX)
 at com.evermind.server.g4.fy(JAX)
 at com.evermind.server.g4.lookup(JAX)
 at javax.naming.InitialContext.lookup(InitialContext.java:350)
 at /testdb.jsp._jspService(/testdb.jsp.java:60) (JSP page line 30)
 at com.evermind.server.http.EvermindHttpJspPage.service(JAX)
 at com.evermind.server.http.HttpApplication.wa(JAX)
 at com.evermind.server.http.JSPServlet.service(JAX)
 at com.evermind.server.http.du.rr(JAX)
 at com.evermind.server.http.du.forward(JAX)
 at com.evermind.server.http.d5.rx(JAX)
 at com.evermind.server.http.d5.rw(JAX)
 at com.evermind.util.f.run(JAX)

I also changed the structure so that application.xml points to the web root:

***application.xml***
 module
  web
   web-uriweb/web-uri
  /web
 /module

(Note that this is the same directory pointed to by the web-module
path="..." element in Orion configuration file application.xml for the
default application-- it's unclear to me how these two paths, which seem
redundant, interrelate.)

Garret

- Original Message -
From: "Juan Lorandi (Chile)" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Wednesday, November 22, 2000 12:42 PM
Subject: RE: error instantiating web-app JNDI-context, JSP - EJB


 In ejb-jar.xml


 display-nameCaller/display-name
 ejb-nameCaller/ejb-name

 also, make sure you include the web module in application.xml
 -Original Message-
 From: Garret Wilson [mailto:[EMAIL PROTECTED]]
 Sent: Miércoles, 22 de Noviembre de 2000 15:44
 To: Orion-Interest
 Subject: error instantiating web-app JNDI-context, JSP - EJB


 I've been stuck for days trying to call a sample entity EJB from JSP. (I
 believe this question has been asked before on the list, but I can't find
 any responses.) Specifically, when calling context.lookup() from
testdb.jsp,
 I get the following error:

 javax.naming.NamingException: Error instantiating web-app JNDI-context: No
 location specified and no suitable instance of the type
'com.company.Caller'
 found for the ejb-ref ejb/CallerBean
  at com.evermind.server.http.HttpApplication.getEnvironmentContext(JAX)
 [etc.]

 I know that my ejb-jar.xml file is being located correctly, because Orion
 automatically creates the CMP table (note that I am using a directory
 structure instead of an actual .jar file):

 ***ejb-jar.xml***
   entity
descriptionRepresents a caller in the Voyager system./description
ejb-namecom.company.Caller/ejb-name
homecom.company.CallerHome/home
remotecom.company.Caller/remote
ejb-classcom.company.CallerBean/ejb-class
persistence-typeContainer/persistence-type
prim-key-classcom.company.CallerPK/prim-key-class
 [etc.]

 I also know that my application.xml file works, for the same reason --
 otherwise, the ejb-jar.xml file could not be found and the table created
 automatically:

 ***application.xml***
  module
   ejbejb/ejb
 [etc.]

 Lastly, I know my web.xml file works, at least in part, because the
servlets
 defined in it work correctly. My EJB references in web.xml are as follows:

 ***web.xml***
  ejb-ref
   ejb-ref-nameejb/CallerBean/ejb-ref-name
   ejb-ref-typeEntity/ejb-ref-type
   homecom.company.CallerHome/home
   remotecom.company.Caller/remote

 Why then can't my JSP page access the Caller EJB? Here's the JSP file:

 ***testdb.jsp***
 %@page language="java"%
 %@page import="java.util.Properties"%
 %@page import="javax.ejb.*"%
 %@page import="javax.naming.*"%
 %@page import="javax.rmi.*"%
 %@page import="com.company.*"%
 [cut]
 Context context = new InitialContext();
 Object boundObject = context.lookup("java:comp/env/ejb/CallerBean");
 [etc.]

 The last line gives the error at the start of this message. I've even
tried
 this:

 final Properties properties=new Properties();
 properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,
 "com.evermind.server.ApplicationInitialContextFactory");
 properties.setProperty(Context.PROVIDER_URL,
 "ormi://localhost/voyagerApplication");
 Context context = new InitialContext();

 That gives the same results. Has anyone called EJB from JSP? (Yes, I have
 read all the Orion tutorials. Yes, I've read the J2EE specification, the
 Servlet specification, Java Blueprints, O'Reilly's _Enterprise JavaBeans_,
 the Wrox _Java Server Programming J2EE Edition_, and Wiley's _Mastering
 Enterprise JavaBeans_.)

 Thanks for any help,

 Garret
 [EMAIL PROTECTED]








Re: error instantiating web-app JNDI-context, JSP - EJB -- solved!

2000-11-22 Thread Garret Wilson

Finally! I just now found the problem. I needed to add the following line in
the Orion web-site.xml file:

 web-app application="myApplication" name="web" root="/" /

My test JSP page worked, and since I was calling from within the container I
just need to use InitialContext() without setting properties.

Now, can someone explain to me why there appear to be *four* redundant
references to the same application path? They are:

1. In Orion's server.xml file (doctype: application-server):
application name="myApplication" path="../myApplication/" /

2. Orion's application.xml (doctype: orion-application):
web-module id="defaultWebApp" path="../myApplication/web/" /

3. Orion's web-site.xml file (doctype: web-site):
web-app application="myApplication" name="web" root="/" /

4. The J2EE application.xml file (doctype: application):
modulewebweb-uriweb/web-uri/web/module

Why do these four elements point to the same directory? And why did I need
to have all four defined before my test would work?

Perhaps I don't fully understand the purpose of each of these; I would
*love* an explanation.

Thanks for everyone who responded to my original question.

Garret

- Original Message -
From: "Boris Gertsberg" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Wednesday, November 22, 2000 1:27 PM
Subject: Re: error instantiating web-app JNDI-context, JSP - EJB


 check location="..."  for your bean in orion-ejb-jar.xml

 Try to do
 Context ctx=new InitialContext();
 Object obj=ctx.lookup("com.company.Caller"); // or whatever JNDI name you
 have in location in orion-ejb-jar.xml


 Boris

 P.S. It is very nice that you initialize Properties but you should use
them
 in constructor, i.e.
  Context ctx=new InitialContext(properties);
 As I understand you might need that only if you remotely connect to
 application server. Everything works fine even without it from JSP at
least
 in Orion and WebLogic.

 - Original Message -
 From: "Garret Wilson" [EMAIL PROTECTED]
 To: "Orion-Interest" [EMAIL PROTECTED]
 Sent: Wednesday, November 22, 2000 1:44 PM
 Subject: error instantiating web-app JNDI-context, JSP - EJB


  I've been stuck for days trying to call a sample entity EJB from JSP. (I
  believe this question has been asked before on the list, but I can't
find
  any responses.) Specifically, when calling context.lookup() from
 testdb.jsp,
  I get the following error:
 
  javax.naming.NamingException: Error instantiating web-app JNDI-context:
No
  location specified and no suitable instance of the type
 'com.company.Caller'
  found for the ejb-ref ejb/CallerBean
   at com.evermind.server.http.HttpApplication.getEnvironmentContext(JAX)
  [etc.]
 
  I know that my ejb-jar.xml file is being located correctly, because
Orion
  automatically creates the CMP table (note that I am using a directory
  structure instead of an actual .jar file):
 
  ***ejb-jar.xml***
entity
 descriptionRepresents a caller in the Voyager system./description
 ejb-namecom.company.Caller/ejb-name
 homecom.company.CallerHome/home
 remotecom.company.Caller/remote
 ejb-classcom.company.CallerBean/ejb-class
 persistence-typeContainer/persistence-type
 prim-key-classcom.company.CallerPK/prim-key-class
  [etc.]
 
  I also know that my application.xml file works, for the same reason --
  otherwise, the ejb-jar.xml file could not be found and the table created
  automatically:
 
  ***application.xml***
   module
ejbejb/ejb
  [etc.]
 
  Lastly, I know my web.xml file works, at least in part, because the
 servlets
  defined in it work correctly. My EJB references in web.xml are as
follows:
 
  ***web.xml***
   ejb-ref
ejb-ref-nameejb/CallerBean/ejb-ref-name
ejb-ref-typeEntity/ejb-ref-type
homecom.company.CallerHome/home
remotecom.company.Caller/remote
 
  Why then can't my JSP page access the Caller EJB? Here's the JSP file:
 
  ***testdb.jsp***
  %@page language="java"%
  %@page import="java.util.Properties"%
  %@page import="javax.ejb.*"%
  %@page import="javax.naming.*"%
  %@page import="javax.rmi.*"%
  %@page import="com.company.*"%
  [cut]
  Context context = new InitialContext();
  Object boundObject = context.lookup("java:comp/env/ejb/CallerBean");
  [etc.]
 
  The last line gives the error at the start of this message. I've even
 tried
  this:
 
  final Properties properties=new Properties();
  properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,
  "com.evermind.server.ApplicationInitialContextFactory");
  properties.setProperty(Context.PROVIDER_URL,
  "ormi://localhost/voyagerApplication");
  Context context = new InitialContext();
 
  That gives the same results. Has anyone called EJB from JSP? (Yes, I
have
  read all the Orion tutorials. Yes, I've read the J2EE specification, the
  Servlet specification, Java Blueprints, O'Reilly's _Enterprise
JavaBeans_,
  the Wrox _Java Server Programming J2EE Edition_, and Wiley's _Mastering
  Enterprise JavaBeans_.)
 
  Thanks for any 

RE: Christian Sell et al.... Re: Deploying a servlet ear, war: help an oroin newbie

2000-11-22 Thread Matt Krevs

Are you using IE as your browser?

If so, go to

Tools - Internet options - Advanced

and make sure the "show friendly HTTP error messages" option is turned OFF.
You should get a slightly usefull error message coming back then.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Mateo
Torrealto
Sent: Wednesday, 22 November 2000 4:48 PM
To: Orion-Interest
Subject: Christian Sell et al Re: Deploying a servlet ear, war: help
an oroin newbie


Christian Sell et al,

Thank you for your help.

WRT
"aside its always useful to describe WHAT error you
are getting /aside"

Good point. I had a brain brownout.

The only error I got was from the browser.
The error was HTTP 500 - Internal server error
when I posted to
form
action="/employee-app/com.objectgeneration.sample.EmployeeForm"
method="post"

and the error was also HTTP 500 when I posted to
form action="/employee-app" method="post"

I tried your first suggestion, i.e., I posted with
form
action="/employee-app/servlet/com.objectgeneration.sample.EmployeeForm"
method="post"
with the existing setup and I get
You guessed it HTTP 500...

That is okay at least I got the Post format correct.
So in additon to the problem you helped me with... I
have yet another problemwhat a mess I am.

On to your second suggestion. I see that you changed
the name of the servlet, but I am not sure what else
you did nor am I sure what is different other than
the shorter name, i.e., I already had a servlet
mapping. But just in case I am an idiot (which I wont
rule out). I followed what you wrote to a tee.
[opps I just saw that i forgot to include my servlet
mapping sorry another brain brownout.]

BTW I also tried someone elses idea of what the
servlet mapping should look like, and it did not seem
to work. I think I don't have the post correct for a
corresponding servlet mapping.

What would be the post for that mapping?
i.e., what would the post look like for the mapping
that you suggested??

I think it would look like
form action="/employee-app" method="post"
or maybe
form action="/employee-app/" method="post"

I get a 500 with both of the above.

I seems like Orion is finding things okay because
I get this message when it starts up

Auto-unpacking
D:\Personal\Proto\CodeGen\Employee3\rel\employee-app.ear...
done.
Auto-unpacking
D:\Personal\Proto\CodeGen\Employee3\rel\employee-app\employee-app
-web.war... done.
Auto-deploying employee-app (Assembly had been
updated)...
Orion/1.3.8 initialized

Again it works with the version that I installed in
the default web application directory.

The trusty tried and true

form
action="/servlet/com.objectgeneration.sample.EmployeeForm"
method="post"

The above works.

Christian thank you for your help.

--- Mateo Torrealto

BTW I used ant to build the orion-primer and then some
other stuff. I am new to Ant, but I dig it. It is like
make but easy and geared towards java.




 From: "Christian Sell"
 [EMAIL PROTECTED]
 Reply-To: Orion-Interest
 [EMAIL PROTECTED]
 To: Orion-Interest [EMAIL PROTECTED]
 Subject: Re: Deploying a servlet ear, war: help an
 oroin newbie
 Date: Tue, 21 Nov 2000 23:22:39 +0100
 
 aside
 its always useful to describe WHAT error you are
 getting
 /aside
 
 from looking at your files, I see you are missing a
 servlet-mapping entry
 in
 web.xml. In your call to the default-web-app, you
 use the
 (orion-preconfigured) servletmapping to /servlet.
 Now you can do the same
 when calling into your new webapp, by saying
 
 form

action="/employee-app/servlet/com.objectgeneration.sample.EmployeeForm"
 method="post"
 
 (note the "/servlet/" in there), or you can add a
 servlet mapping like the
 following (note that I've also assigned a shorter
 servlet name):
 
 servlet
   servlet-nameEmployeeForm/servlet-name
 

servlet-classcom.objectgeneration.sample.EmployeeForm/servlet-class
 /servlet
 servlet-mapping
servlet-nameEmployeeForm/servlet-name
 url-pattern//url-pattern
 /servlet-mapping
 
 
 - Original Message -
 From: "Matthew TorreAlto"
 [EMAIL PROTECTED]
 To: "Orion-Interest"
 [EMAIL PROTECTED]
 Sent: Tuesday, November 21, 2000 8:19 PM
 Subject: Deploying a servlet ear, war: help an
 oroin newbie
 
 
   I am trying to deploy a servlet with Orion. The
 servlet runs fine in
   JBuilder. It even runs in Orion if I stick it in
 the default web
 application
   directory. But I want to do it right and use the
 ear, war files. (or do
 I)
  
   When I run Orion it seems to pick it up the ear
 and war file okay.
   Orion finds the ear file and unbundles the war
 file inside.
   But. When I post I get an Error...
  
   I think I set up the web.xml and application.xml
 just so... I based this
 off
   the orion-primer example and I even reused the
 build.xml ant file with
 some
   modifications. (I really like ant.) Everything
 builds just groovy. I
 even
   check the war and ear files and everything seems
 in order.
  
   I've enclosed what I 

RE: Deploying a servlet ear, war: help an oroin newbie

2000-11-22 Thread Matt Krevs

i guess mapping a servlet to '/' would also be an alternative to specifying
a welcome file list in web.xml

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Christian Sell
Sent: Wednesday, 22 November 2000 6:01 PM
To: Orion-Interest
Subject: Re: Deploying a servlet ear, war: help an oroin newbie


Matt,

good question, indeed. In fact I copied the wrong example. The one you are
asking about makes the EmployeeForm servlet the default servlet for this
web-app (but ONLY for this web-app. "/" stands for the root of the web-app).
That means it takes the place of the usual "index.html" file and can be
invoked by simply giving

form action="/employee-app" method="post"

To only achieve callability by

form action="/employee-app/EmployeeForm" method="post"

you would have to specify "/EmployeeForm/*" as servlet mapping (that is the
example I have working).

regards

- Original Message -
From: "Matt Krevs" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Wednesday, November 22, 2000 1:04 AM
Subject: RE: Deploying a servlet ear, war: help an oroin newbie


 Christian/anyone else

 I noticed your servlet mapping is

 servlet-mapping
   servlet-nameEmployeeForm/servlet-name
url-pattern//url-pattern
 /servlet-mapping

 What effect does specifying '/' as the url-pattern have?
 Specifically what effect does it have on the action string in a HTML form?
 What would happen if you had another servlet mapping (for another servlet)
 and had '/' as the url pattern?









Re: Christian Sell et al.... Re: Deploying a servlet ear, war: help an oroin newbie

2000-11-22 Thread Mateo Torrealto

Excellent that narrows it down
i guess i need to start putting some print statements
and see where the servlet is dying. i'll write some
things out to the log
is there a way to run orion so that it shows the
server interacting with the lifecycle methods of the
servlet.

weird...

thanks for your help

the servlet works in the default web directory

btw is there any deployment tools for orion (other
than ant)

do the deployment tools for the j2eesdk work for
orion...
it seems like they should and they are free to
developers hm maybe i should try
those. 

i am screwing up somewhere.

thanks again for your help

--- Christian Sell [EMAIL PROTECTED]
wrote:
 BTW: if the mapping was the problem, you should get
 a 404 (not found). A 500
 indicates something goes wrong INSIDE the servlet
 
 - Original Message -
 From: "Mateo Torrealto" [EMAIL PROTECTED]
 To: "Orion-Interest"
 [EMAIL PROTECTED]
 Sent: Wednesday, November 22, 2000 7:48 AM
 Subject: Christian Sell et al Re: Deploying a
 servlet ear, war: help an
 oroin newbie
 
 
  Christian Sell et al,
 
  Thank you for your help.
 
  WRT
  "aside its always useful to describe WHAT error
 you
  are getting /aside"
 
  Good point. I had a brain brownout.
 
  The only error I got was from the browser.
  The error was HTTP 500 - Internal server error
  when I posted to
  form
 

action="/employee-app/com.objectgeneration.sample.EmployeeForm"
  method="post"
 
  and the error was also HTTP 500 when I posted to
  form action="/employee-app" method="post"
 
  I tried your first suggestion, i.e., I posted with
  form
 

action="/employee-app/servlet/com.objectgeneration.sample.EmployeeForm"
  method="post"
  with the existing setup and I get
  You guessed it HTTP 500...
 
  That is okay at least I got the Post format
 correct.
  So in additon to the problem you helped me with...
 I
  have yet another problemwhat a mess I am.
 
  On to your second suggestion. I see that you
 changed
  the name of the servlet, but I am not sure what
 else
  you did nor am I sure what is different other
 than
  the shorter name, i.e., I already had a servlet
  mapping. But just in case I am an idiot (which I
 wont
  rule out). I followed what you wrote to a tee.
  [opps I just saw that i forgot to include my
 servlet
  mapping sorry another brain brownout.]
 
  BTW I also tried someone elses idea of what the
  servlet mapping should look like, and it did not
 seem
  to work. I think I don't have the post correct for
 a
  corresponding servlet mapping.
 
  What would be the post for that mapping?
  i.e., what would the post look like for the
 mapping
  that you suggested??
 
  I think it would look like
  form action="/employee-app" method="post"
  or maybe
  form action="/employee-app/" method="post"
 
  I get a 500 with both of the above.
 
  I seems like Orion is finding things okay because
  I get this message when it starts up
 
  Auto-unpacking
 

D:\Personal\Proto\CodeGen\Employee3\rel\employee-app.ear...
  done.
  Auto-unpacking
 

D:\Personal\Proto\CodeGen\Employee3\rel\employee-app\employee-app
  -web.war... done.
  Auto-deploying employee-app (Assembly had been
  updated)...
  Orion/1.3.8 initialized
 
  Again it works with the version that I installed
 in
  the default web application directory.
 
  The trusty tried and true
 
  form
 

action="/servlet/com.objectgeneration.sample.EmployeeForm"
  method="post"
 
  The above works.
 
  Christian thank you for your help.
 
  --- Mateo Torrealto
 
  BTW I used ant to build the orion-primer and then
 some
  other stuff. I am new to Ant, but I dig it. It is
 like
  make but easy and geared towards java.
 
  
  
  
   From: "Christian Sell"
   [EMAIL PROTECTED]
   Reply-To: Orion-Interest
   [EMAIL PROTECTED]
   To: Orion-Interest
 [EMAIL PROTECTED]
   Subject: Re: Deploying a servlet ear, war: help
 an
   oroin newbie
   Date: Tue, 21 Nov 2000 23:22:39 +0100
   
   aside
   its always useful to describe WHAT error you
 are
   getting
   /aside
   
   from looking at your files, I see you are
 missing a
   servlet-mapping entry
   in
   web.xml. In your call to the default-web-app,
 you
   use the
   (orion-preconfigured) servletmapping to
 /servlet.
   Now you can do the same
   when calling into your new webapp, by saying
   
   form
  
 

action="/employee-app/servlet/com.objectgeneration.sample.EmployeeForm"
   method="post"
   
   (note the "/servlet/" in there), or you can add
 a
   servlet mapping like the
   following (note that I've also assigned a
 shorter
   servlet name):
   
   servlet
 servlet-nameEmployeeForm/servlet-name
   
  
 

servlet-classcom.objectgeneration.sample.EmployeeForm/servlet-class
   /servlet
   servlet-mapping
 
 servlet-nameEmployeeForm/servlet-name
   url-pattern//url-pattern
   /servlet-mapping
   
   
   - Original Message -
   From: "Matthew TorreAlto"
   [EMAIL PROTECTED]
   To: 

RE: error instantiating web-app JNDI-context, JSP - EJB -- solved!

2000-11-22 Thread Duffey, Kevin

Hmm..as far as I know, orion-web.xml is created for you when you deploy your
app. You shouldn't have to ever do anything in it. I am able to access my
Session EJB via my action class (don't want to do it in jsp...thats bad). I
am anxious to get entity beans working with Interbase 6 via JDBC2.0. I am
hoping this works..I just got the Interclient 2.0 beta driver. What database
are you using anyways? I really want to figure out how to use entity beans
with CMP, but my worry is that some searching criteria I need to do on some
tables will not be so easy with CMP and Entity beans. Do you know how to get
around this?



 -Original Message-
 From: Garret Wilson [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, November 22, 2000 2:10 PM
 To: Orion-Interest
 Subject: Re: error instantiating web-app JNDI-context, JSP - EJB --
 solved!
 
 
 Finally! I just now found the problem. I needed to add the 
 following line in
 the Orion web-site.xml file:
 
  web-app application="myApplication" name="web" root="/" /
 
 My test JSP page worked, and since I was calling from within 
 the container I
 just need to use InitialContext() without setting properties.
 
 Now, can someone explain to me why there appear to be *four* redundant
 references to the same application path? They are:
 
 1. In Orion's server.xml file (doctype: application-server):
 application name="myApplication" path="../myApplication/" /
 
 2. Orion's application.xml (doctype: orion-application):
 web-module id="defaultWebApp" path="../myApplication/web/" /
 
 3. Orion's web-site.xml file (doctype: web-site):
 web-app application="myApplication" name="web" root="/" /
 
 4. The J2EE application.xml file (doctype: application):
 modulewebweb-uriweb/web-uri/web/module
 
 Why do these four elements point to the same directory? And 
 why did I need
 to have all four defined before my test would work?
 
 Perhaps I don't fully understand the purpose of each of these; I would
 *love* an explanation.
 
 Thanks for everyone who responded to my original question.
 
 Garret
 
 - Original Message -
 From: "Boris Gertsberg" [EMAIL PROTECTED]
 To: "Orion-Interest" [EMAIL PROTECTED]
 Sent: Wednesday, November 22, 2000 1:27 PM
 Subject: Re: error instantiating web-app JNDI-context, JSP - EJB
 
 
  check location="..."  for your bean in orion-ejb-jar.xml
 
  Try to do
  Context ctx=new InitialContext();
  Object obj=ctx.lookup("com.company.Caller"); // or whatever 
 JNDI name you
  have in location in orion-ejb-jar.xml
 
 
  Boris
 
  P.S. It is very nice that you initialize Properties but you 
 should use
 them
  in constructor, i.e.
   Context ctx=new InitialContext(properties);
  As I understand you might need that only if you remotely connect to
  application server. Everything works fine even without it 
 from JSP at
 least
  in Orion and WebLogic.
 
  - Original Message -
  From: "Garret Wilson" [EMAIL PROTECTED]
  To: "Orion-Interest" [EMAIL PROTECTED]
  Sent: Wednesday, November 22, 2000 1:44 PM
  Subject: error instantiating web-app JNDI-context, JSP - EJB
 
 
   I've been stuck for days trying to call a sample entity 
 EJB from JSP. (I
   believe this question has been asked before on the list, 
 but I can't
 find
   any responses.) Specifically, when calling context.lookup() from
  testdb.jsp,
   I get the following error:
  
   javax.naming.NamingException: Error instantiating web-app 
 JNDI-context:
 No
   location specified and no suitable instance of the type
  'com.company.Caller'
   found for the ejb-ref ejb/CallerBean
at 
 com.evermind.server.http.HttpApplication.getEnvironmentContext(JAX)
   [etc.]
  
   I know that my ejb-jar.xml file is being located 
 correctly, because
 Orion
   automatically creates the CMP table (note that I am using 
 a directory
   structure instead of an actual .jar file):
  
   ***ejb-jar.xml***
 entity
  descriptionRepresents a caller in the Voyager 
 system./description
  ejb-namecom.company.Caller/ejb-name
  homecom.company.CallerHome/home
  remotecom.company.Caller/remote
  ejb-classcom.company.CallerBean/ejb-class
  persistence-typeContainer/persistence-type
  prim-key-classcom.company.CallerPK/prim-key-class
   [etc.]
  
   I also know that my application.xml file works, for the 
 same reason --
   otherwise, the ejb-jar.xml file could not be found and 
 the table created
   automatically:
  
   ***application.xml***
module
 ejbejb/ejb
   [etc.]
  
   Lastly, I know my web.xml file works, at least in part, 
 because the
  servlets
   defined in it work correctly. My EJB references in web.xml are as
 follows:
  
   ***web.xml***
ejb-ref
 ejb-ref-nameejb/CallerBean/ejb-ref-name
 ejb-ref-typeEntity/ejb-ref-type
 homecom.company.CallerHome/home
 remotecom.company.Caller/remote
  
   Why then can't my JSP page access the Caller EJB? Here's 
 the JSP file:
  
   ***testdb.jsp***
   %@page language="java"%
   %@page 

Re: server.xml fails -validateXML

2000-11-22 Thread Saphari.com - www.saphari.com

no it isn't your fault sun hasn't made the dtd available
yet and they have also changed the source of the dtd in
proposed final draft.

artie

Quoting Hani Suleiman [EMAIL PROTECTED]:

 I'm trying to ensure that my EJB 2.0 ejb-jar.xml files
validate according
 to the appropriate dtd, so I tried to run orion with
the -validateXML
 option. However, this gets as far as server.xml before
spiting out the
 following error:

 Error initializing server: Fatal error at line 59 in
 file:/home/hani/orion/config/server.xml: Next
character must be
 ";" terminating reference to parameter entity "true".

 I assumed it's my fault, but when I tried a 'clean'
server.xml (from
 http://www.orionserver.com/orion/config/server.xml) I
get the same
 error. Any ideas anyone?

 Hani



 




Re: server.xml fails -validateXML

2000-11-22 Thread Hani Suleiman

The error was actually reported to be in server.xml, so it never got
to validating the ejb-jar.xml.

Anyways, the dtd at http://java.sun.com/dtd/ejb-jar_2_0.dtd is the final
one isn't it?

On Wed, 22 Nov 2000, Arthur Copeland wrote:

 no it isn't your fault sun hasn't made the dtd available
 yet and they have also changed the source of the dtd in
 proposed final draft.
 
 artie
 
 Quoting Hani Suleiman [EMAIL PROTECTED]:
 
  I'm trying to ensure that my EJB 2.0 ejb-jar.xml files
 validate according
  to the appropriate dtd, so I tried to run orion with
 the -validateXML
  option. However, this gets as far as server.xml before
 spiting out the
  following error:
 
  Error initializing server: Fatal error at line 59 in
  file:/home/hani/orion/config/server.xml: Next
 character must be
  ";" terminating reference to parameter entity "true".
 
  I assumed it's my fault, but when I tried a 'clean'
 server.xml (from
  http://www.orionserver.com/orion/config/server.xml) I
 get the same
  error. Any ideas anyone?
 
  Hani
 
 
 
  
 
 





Re: error instantiating web-app JNDI-context, JSP - EJB -- solved!

2000-11-22 Thread Garret Wilson

Kevin,

- Original Message -
From: "Duffey, Kevin" [EMAIL PROTECTED]
To: "Orion-Interest" [EMAIL PROTECTED]
Sent: Wednesday, November 22, 2000 5:49 PM
Subject: RE: error instantiating web-app JNDI-context, JSP - EJB -- solved!


 Hmm..as far as I know, orion-web.xml is created for you when you deploy
your
 app. You shouldn't have to ever do anything in it.

I don't think I mentioned orion-web.xml. I mentioned web-site.xml, which in
the original \orion\config directory is named default-web-site.xml.

 I am able to access my
 Session EJB via my action class (don't want to do it in jsp...thats bad).

Yep; I was just testing the configuration, and that seemed easiest through
JSP.

 I
 am anxious to get entity beans working with Interbase 6 via JDBC2.0. I am
 hoping this works..I just got the Interclient 2.0 beta driver. What
database
 are you using anyways?

HypersonicSQL

 I really want to figure out how to use entity beans
 with CMP, but my worry is that some searching criteria I need to do on
some
 tables will not be so easy with CMP and Entity beans. Do you know how to
get
 around this?

I haven't performed any complex searches, yet.

Garret

  -Original Message-
  From: Garret Wilson [mailto:[EMAIL PROTECTED]]
  Sent: Wednesday, November 22, 2000 2:10 PM
  To: Orion-Interest
  Subject: Re: error instantiating web-app JNDI-context, JSP - EJB --
  solved!
 
 
  Finally! I just now found the problem. I needed to add the
  following line in
  the Orion web-site.xml file:
 
   web-app application="myApplication" name="web" root="/" /
 
  My test JSP page worked, and since I was calling from within
  the container I
  just need to use InitialContext() without setting properties.
 
  Now, can someone explain to me why there appear to be *four* redundant
  references to the same application path? They are:
 
  1. In Orion's server.xml file (doctype: application-server):
  application name="myApplication" path="../myApplication/" /
 
  2. Orion's application.xml (doctype: orion-application):
  web-module id="defaultWebApp" path="../myApplication/web/" /
 
  3. Orion's web-site.xml file (doctype: web-site):
  web-app application="myApplication" name="web" root="/" /
 
  4. The J2EE application.xml file (doctype: application):
  modulewebweb-uriweb/web-uri/web/module
 
  Why do these four elements point to the same directory? And
  why did I need
  to have all four defined before my test would work?
 
  Perhaps I don't fully understand the purpose of each of these; I would
  *love* an explanation.
 
  Thanks for everyone who responded to my original question.
 
  Garret
 
  - Original Message -
  From: "Boris Gertsberg" [EMAIL PROTECTED]
  To: "Orion-Interest" [EMAIL PROTECTED]
  Sent: Wednesday, November 22, 2000 1:27 PM
  Subject: Re: error instantiating web-app JNDI-context, JSP - EJB
 
 
   check location="..."  for your bean in orion-ejb-jar.xml
  
   Try to do
   Context ctx=new InitialContext();
   Object obj=ctx.lookup("com.company.Caller"); // or whatever
  JNDI name you
   have in location in orion-ejb-jar.xml
  
  
   Boris
  
   P.S. It is very nice that you initialize Properties but you
  should use
  them
   in constructor, i.e.
Context ctx=new InitialContext(properties);
   As I understand you might need that only if you remotely connect to
   application server. Everything works fine even without it
  from JSP at
  least
   in Orion and WebLogic.
  
   - Original Message -
   From: "Garret Wilson" [EMAIL PROTECTED]
   To: "Orion-Interest" [EMAIL PROTECTED]
   Sent: Wednesday, November 22, 2000 1:44 PM
   Subject: error instantiating web-app JNDI-context, JSP - EJB
  
  
I've been stuck for days trying to call a sample entity
  EJB from JSP. (I
believe this question has been asked before on the list,
  but I can't
  find
any responses.) Specifically, when calling context.lookup() from
   testdb.jsp,
I get the following error:
   
javax.naming.NamingException: Error instantiating web-app
  JNDI-context:
  No
location specified and no suitable instance of the type
   'com.company.Caller'
found for the ejb-ref ejb/CallerBean
 at
  com.evermind.server.http.HttpApplication.getEnvironmentContext(JAX)
[etc.]
   
I know that my ejb-jar.xml file is being located
  correctly, because
  Orion
automatically creates the CMP table (note that I am using
  a directory
structure instead of an actual .jar file):
   
***ejb-jar.xml***
  entity
   descriptionRepresents a caller in the Voyager
  system./description
   ejb-namecom.company.Caller/ejb-name
   homecom.company.CallerHome/home
   remotecom.company.Caller/remote
   ejb-classcom.company.CallerBean/ejb-class
   persistence-typeContainer/persistence-type
   prim-key-classcom.company.CallerPK/prim-key-class
[etc.]
   
I also know that my application.xml file works, for the
  same reason --
otherwise, the ejb-jar.xml file could not 

Problem - Calling EJB in Orion from Resin

2000-11-22 Thread Santosh Kumar





The first mail dint seem to get through. I am 
sending this again!!

  
  Hi All,
  
   I am onto an interesting task of 
  using resin as the EJB client for Orion.
  Everything seems to be in line but i dont know 
  why i get this problem when
  i run the orion-primer example EJB with the 
  servlet part executing on the RESIN.
  javax.servlet.ServletException: Unable to get home interface: javax.naming.NameNotFoundException: expected intermediate context in `ejb/HelloHome'
	at hello.web.HelloServlet.init(HelloServlet.java:47)
	at com.caucho.server.http.Application.loadServlet(Application.java:1504)
	at com.caucho.server.http.Invocation.service(Invocation.java:207)
	at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:142)
	at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:211)
	at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:145)
	at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
	at java.lang.Thread.run(Thread.java:484)
Servlet code:public void init(ServletConfig config) throws ServletException { // Get the initial JNDI context using our settings Context context; try { context = new InitialContext(); } catch (Throwable exception) { throw new ServletException( "Unable to get initial JNDI context: " + exception.toString()); } // Get a reference to the Hello home interface HelloHome helloHome; try { Object boundObject = context.lookup("java:comp/env/ejb/HelloHome"); helloHome = (HelloHome) PortableRemoteObject.narrow(boundObject, HelloHome.class); } catch (Throwable exception) { throw new ServletException( "Unable to get home interface: " + exception.toString()); }WEB.xml (which resin specifies to add in its app)?xml version="1.0" encoding="UTF-8"?web-appclasspath id='WEB-INF/classes/orion.jar'/classpath id='WEB-INF/classes/mail.jar'/classpath id='WEB-INF/classes/ejb.jar'/jndi-link jndi-namejava:comp/env/ejb/jndi-name jndi-factorycom.evermind.server.rmi.RMIInitialContextFactory /jndi-factory init-param java.naming.provider.url="ormi://3.209.125.41/orion-primer"/ init-param java.naming.security.principal="admin"/ init-param java.naming.security.credentials="123"//jndi-link/web-appat the orion side i have made this change(true - false) in principal.xml (I am not sure whether i should do this or not)user username="admin" password="123" deactivated="false"descriptionThe default administrator/descriptiongroup-membership group="administrators" /group-membership group="guests" /group-membership group="users" //userThese are the only two things that i have done ..What i dont understand is why am i getting this error
  Unable to get home interface:
  javax.naming.NameNotFoundException: expected intermediate context in 
  `ejb/HelloHome'
  
  
  I think there is some problem in which the initialcontext is 
  set..probably i should
  modify the wayInitialContext is 
  set..
  
  
  Please Help me!!!
  
  
  Regards,
  Santosh.
   
  Santosh Kumar 
  C 
  == Senior Systems 
  Engineer 
  == Wipro 
  Technologies 
  == 1-8-448, Laxmi Building, S.P. 
  Road, 
  == Begumpet, Secunderabad - 500 
  003 
  == A.P, 
  India. 
  == Phone@: 91407896008 Ext 
  4511 
  == Fax @: 
  91407896123 
  == eMail@: [EMAIL PROTECTED] 
  == url @: http://www.wipro.com 
  == The World's First SEI CMM Level 5 Software Services 
  Company 
   
  


Calling EJB in Orion from Resin -Problem,

2000-11-22 Thread Santosh Kumar



Hi All,

 I am onto an interesting task of 
using resin as the EJB client for Orion.
Everything seems to be in line but i dont know 
why i get this problem when
i run the orion-primer example EJB with the 
servlet part executing on the RESIN.
javax.servlet.ServletException: Unable to get home interface: javax.naming.NameNotFoundException: expected intermediate context in `ejb/HelloHome'
	at hello.web.HelloServlet.init(HelloServlet.java:47)
	at com.caucho.server.http.Application.loadServlet(Application.java:1504)
	at com.caucho.server.http.Invocation.service(Invocation.java:207)
	at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:142)
	at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:211)
	at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:145)
	at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
	at java.lang.Thread.run(Thread.java:484)
Servlet code:public void init(ServletConfig config) throws ServletException { // Get the initial JNDI context using our settings Context context; try { context = new InitialContext(); } catch (Throwable exception) { throw new ServletException( "Unable to get initial JNDI context: " + exception.toString()); } // Get a reference to the Hello home interface HelloHome helloHome; try { Object boundObject = context.lookup("java:comp/env/ejb/HelloHome"); helloHome = (HelloHome) PortableRemoteObject.narrow(boundObject, HelloHome.class); } catch (Throwable exception) { throw new ServletException( "Unable to get home interface: " + exception.toString()); }WEB.xml (which resin specifies to add in its app)?xml version="1.0" encoding="UTF-8"?web-appclasspath id='WEB-INF/classes/orion.jar'/classpath id='WEB-INF/classes/mail.jar'/classpath id='WEB-INF/classes/ejb.jar'/jndi-link jndi-namejava:comp/env/ejb/jndi-name jndi-factorycom.evermind.server.rmi.RMIInitialContextFactory /jndi-factory init-param java.naming.provider.url="ormi://3.209.125.41/orion-primer"/ init-param java.naming.security.principal="admin"/ init-param java.naming.security.credentials="123"//jndi-link/web-appat the orion side i have made this change(true - false) in principal.xml (I am not sure whether i should do this or not)user username="admin" password="123" deactivated="false"descriptionThe default administrator/descriptiongroup-membership group="administrators" /group-membership group="guests" /group-membership group="users" //userThese are the only two things that i have done ..What i dont understand is why am i getting this error
 Unable to get home interface:
 javax.naming.NameNotFoundException: expected intermediate context in 
`ejb/HelloHome'


I think there is some problem in which the initialcontext is 
set..probably i should
modify the wayInitialContext is set..


Please Help me!!!


Regards,
Santosh.
 
Santosh Kumar 
C 
== Senior Systems 
Engineer 
== Wipro 
Technologies 
== 1-8-448, Laxmi Building, S.P. 
Road, 
== Begumpet, Secunderabad - 500 
003 
== A.P, 
India. 
== Phone@: 91407896008 Ext 
4511 
== Fax @: 
91407896123 
== eMail@: [EMAIL PROTECTED] 
== url @: http://www.wipro.com 
== The World's First SEI CMM Level 5 Software Services 
Company 
 



Problem - Calling EJB in Orion from Resin

2000-11-22 Thread Santosh Kumar



The first mail dint seem to get through. I am 
sending this again!!

  
  Hi All,
  
   I am onto an interesting task of 
  using resin as the EJB client for Orion.
  Everything seems to be in line but i dont know 
  why i get this problem when
  i run the orion-primer example EJB with the 
  servlet part executing on the RESIN.
  javax.servlet.ServletException: Unable to get home interface: javax.naming.NameNotFoundException: expected intermediate context in `ejb/HelloHome'
	at hello.web.HelloServlet.init(HelloServlet.java:47)
	at com.caucho.server.http.Application.loadServlet(Application.java:1504)
	at com.caucho.server.http.Invocation.service(Invocation.java:207)
	at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:142)
	at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:211)
	at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:145)
	at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
	at java.lang.Thread.run(Thread.java:484)
Servlet code:public void init(ServletConfig config) throws ServletException { // Get the initial JNDI context using our settings Context context; try { context = new InitialContext(); } catch (Throwable exception) { throw new ServletException( "Unable to get initial JNDI context: " + exception.toString()); } // Get a reference to the Hello home interface HelloHome helloHome; try { Object boundObject = context.lookup("java:comp/env/ejb/HelloHome"); helloHome = (HelloHome) PortableRemoteObject.narrow(boundObject, HelloHome.class); } catch (Throwable exception) { throw new ServletException( "Unable to get home interface: " + exception.toString()); }WEB.xml (which resin specifies to add in its app)?xml version="1.0" encoding="UTF-8"?web-appclasspath id='WEB-INF/classes/orion.jar'/classpath id='WEB-INF/classes/mail.jar'/classpath id='WEB-INF/classes/ejb.jar'/jndi-link jndi-namejava:comp/env/ejb/jndi-name jndi-factorycom.evermind.server.rmi.RMIInitialContextFactory /jndi-factory init-param java.naming.provider.url="ormi://3.209.125.41/orion-primer"/ init-param java.naming.security.principal="admin"/ init-param java.naming.security.credentials="123"//jndi-link/web-appat the orion side i have made this change(true - false) in principal.xml (I am not sure whether i should do this or not)user username="admin" password="123" deactivated="false"descriptionThe default administrator/descriptiongroup-membership group="administrators" /group-membership group="guests" /group-membership group="users" //userThese are the only two things that i have done ..What i dont understand is why am i getting this error
  Unable to get home interface:
  javax.naming.NameNotFoundException: expected intermediate context in 
  `ejb/HelloHome'
  
  
  I think there is some problem in which the initialcontext is 
  set..probably i should
  modify the wayInitialContext is 
  set..
  
  
  Please Help me!!!
  
  
  Regards,
  Santosh.
   
  Santosh Kumar 
  C 
  == Senior Systems 
  Engineer 
  == Wipro 
  Technologies 
  == 1-8-448, Laxmi Building, S.P. 
  Road, 
  == Begumpet, Secunderabad - 500 
  003 
  == A.P, 
  India. 
  == Phone@: 91407896008 Ext 
  4511 
  == Fax @: 
  91407896123 
  == eMail@: [EMAIL PROTECTED] 
  == url @: http://www.wipro.com 
  == The World's First SEI CMM Level 5 Software Services 
  Company 
   
  


Please help with JNDI-JMS problem

2000-11-22 Thread Werner Bohl

Please help me:

An application client I deployed on 1.4.4 finds references for my remote
ejb's, but it does not get a reference to the remote TopicConnectionFactory.
Run locally works fine.

Thanks in advance,

Werner Bohl
Organization for Tropical Studies
Costa Rica





Security and UserManager and all that?

2000-11-22 Thread Kevin Duffey

Can someone kindly explain to me what is the purpose of using the security
roles, user managers and all that in the descriptor files? I quite honestly
don't understand it. I mean..if I have a web-app that has a login screen
that uses EJB to look up a login name and password in a database to allow
someone in, why would there be server-level security and role facilities?

Thanks.





R: Calling EJB in Orion from Resin -Problem,

2000-11-22 Thread Montebove Luciano

Substitute  
 
 Object boundObject = context.lookup("java:comp/env/ejb/HelloHome");
with
 Object boundObject = context.lookup("java:comp/env/ejb/Hello");
 
Luciano 
 
 
 -Messaggio originale-
Da: Santosh Kumar [mailto:[EMAIL PROTECTED]]
Inviato: mercoledì 22 novembre 2000 13.23
A: Orion-Interest
Oggetto: Calling EJB in Orion from Resin -Problem,


Hi All,
 
   I am onto an interesting task of using resin as the EJB client for Orion.
Everything seems to be in line but i dont know why i get this problem when
i run the orion-primer example EJB with the servlet part executing on the
RESIN.
 
javax.servlet.ServletException: Unable to get home interface:
javax.naming.NameNotFoundException: expected intermediate context in
`ejb/HelloHome' at hello.web.HelloServlet.init(HelloServlet.java:47) at
com.caucho.server.http.Application.loadServlet(Application.java:1504) at
com.caucho.server.http.Invocation.service(Invocation.java:207) at
com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:142) at
com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:211) at
com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:145) at
com.caucho.server.TcpConnection.run(TcpConnection.java:139) at
java.lang.Thread.run(Thread.java:484)
Servlet code:
public void init(ServletConfig config) throws ServletException {
  // Get the initial JNDI context using our settings
  Context context;
  try {
 context = new InitialContext();
  }
  catch (Throwable exception) {
 throw new ServletException(
"Unable to get initial JNDI context: " + exception.toString());
  }
  // Get a reference to the Hello home interface
  HelloHome helloHome;
  try {
 Object boundObject = context.lookup("java:comp/env/ejb/HelloHome");
 helloHome = (HelloHome) PortableRemoteObject.narrow(boundObject,
 
HelloHome.class);
  }
  catch (Throwable exception) {
 throw new ServletException(
"Unable to get home interface: " + exception.toString());
  }
WEB.xml (which resin specifies to add in its app)
?xml version="1.0" encoding="UTF-8"?
web-app
classpath id='WEB-INF/classes/orion.jar'/
classpath id='WEB-INF/classes/mail.jar'/
classpath id='WEB-INF/classes/ejb.jar'/
jndi-link
  jndi-namejava:comp/env/ejb/jndi-name
  jndi-factorycom.evermind.server.rmi.RMIInitialContextFactory
  /jndi-factory
  init-param java.naming.provider.url="ormi://3.209.125.41/orion-primer"/
  init-param java.naming.security.principal="admin"/
  init-param java.naming.security.credentials="123"/
/jndi-link
/web-app
at the orion side i have made this change(true - false) in principal.xml (I
am not sure whether i should do this or not)
user username="admin" password="123" deactivated="false"
   descriptionThe default administrator/description
   group-membership group="administrators" /
   group-membership group="guests" /
   group-membership group="users" /
  /user
These are the only two things that i have done ..What i dont understand is
why am i getting this error
Unable to get home interface:
javax.naming.NameNotFoundException: expected intermediate context in
`ejb/HelloHome'
 
 
I think there is some problem in which the initialcontext is set..probably i
should
modify the way  InitialContext is set..
 
 
Please Help me!!!
 
 
Regards,
Santosh.

===
=  Santosh Kumar C=
=  Senior Systems Engineer=
=  Wipro Technologies =
=  1-8-448, Laxmi Building, S.P. Road,=
=  Begumpet, Secunderabad - 500 003   =
=  A.P, India.=
=  Phone@: 91407896008 Ext 4511   =
=  Fax  @: 91407896123=
=  eMail@:  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]
=
=  url  @:  http://www.wipro.com http://www.wipro.com
=
=  The World's First SEI CMM Level 5 Software Services Company=
===