OR mapping (1/* relationship between 2 entity beans)

2001-10-03 Thread George Mardale

Hello everyone,

I have an OR mapping that involves 2 entity beans, named Group and User,
like in the following example:

public class GroupBean implements EntityBean
{
...
List users;



public addUser(User user)
{

users.add(user);
}
}

So, I have an 1/* relationship.

What I want to know is what modifications do I have to made to
orion-ejb-jar.xml to reflect this OR mapping? On the orionsupport site,
there are 2 example for advanced OR mapping, one involving a relationship
between 2 entity bean, but in an one/one relationship (one entity bean has
as an attribute other entity bean, not a list of them), and one involving a
relationship between an entity bean and a regular JavaBean (not an entity
bean). I tried to combine those two to solve my situation, but it didn't
worked out.

If you are kind enough to give me an example, I will greatly appreciated.

Thanks for listening,

George.






ANNOUNCE: Atlassian-Orion Knowledge Base

2001-10-03 Thread Mike Cannon-Brookes

It's been a long time coming, but Atlassian is proud to announce the launch
of the official Orion knowledge base!

http://kb.atlassian.com

The knowledge base is the most comprehensive collection of Orion
documentation and articles available anywhere, and it will grow continually
as we add more content.

There are currently 4 main content areas:
1. Atlassian articles- these are articles and HOWTOs by Atlassian
2. Atlassian-Orion docs  - the OrionServer documentation - updated, cleaned
and corrected by Atlassian
3. OrionServer API docs  - the OrionServer JavaDocs
4. OrionSupport articles - articles contributed by developers to
OrionSupport.com

Many other content areas are scheduled to be added in the near future.

Our aim is to let developers find answers and contribute useful tips they
find in particular articles.

For those reasons, the knowledge base also has:
1. Search- There is a full text search of the entire knowledge base, or
just a specific content area.
2. Directory - A categorical, topical index of all content in the KB.
3. Annotate  - Every document in the KB can be annotated by you, the
developer, with useful tips!

Try it out today:

http://kb.atlassian.com

After you've had a chance to look around, we'd love your feedback
(http://kb.atlassian.com/about/feedback.jsp or email us
mailto:[EMAIL PROTECTED]) - to improve this as a resource for
all Orion developers!

Enjoy!

-mike

Mike Cannon-Brookes :: [EMAIL PROTECTED]

Atlassian :: http://www.atlassian.com
 Supporting YOUR J2EE World






Re: Design strategy

2001-10-03 Thread George Mardale

Hello Daniel,

What I said about those 2 tables, was strictly Orion-related. You are right,
in designing relational databases, a n-m relationship will be normalized by
introducing 1 (one) table and two 1-n relationships between the existing 2
tables (Group, User) and the new one (let's say GroupUser). Thus, we will
avoid redundancy.

In Orion, as far as I know, if I use something like this:

public class GroupBean 
{
...
List users;
...
}

public class UserBean...
{
...
List groups;

}

to simulate a *-* relationship, Orion will create, by OR mapping, a table
for my first 1-* relationship Group-User (let's say the table is named
Group_users) and another table for my other 1-* relationship User-Group
(let's say the table is named Users_group). Of course, these 2 tables
(Group_users and Users_group) are identical, but I think Orion will not know
that these two 1-n relationships represent in fact one n-m relationship.

Please be advised that his is only my supposition about Orion. I don't know
if I'm right about this one but I'll be glad if someone can clarify this
issue for me. I was trying to find out for some days, how Orion handles *-*
relationships, but I wasn't lucky to find something useful.

best regards,
George.

- Original Message -
From: Daniel Lopez [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Tuesday, October 02, 2001 5:04 PM
Subject: Re: Design strategy


 Hi George,

 I don't know about EJB, as we don't use them, but having an extra table to
 represent an n-m relationship is a well stablished technique when
designing
 relational databases. AFAIK there's no other way to do that while
providing
 db-enforced consistency and avoiding redundancy. You represent a logical
n-m
 relationship, you create a new table that implements two real 1-n
relationships,
 thus creating one extra table. I don't see where you get two extra tables
per
 relationship from.
 regards,
 D.

 George Mardale wrote:

  Hello Owen,
 
  Thank you for your kind response. Yesterday, while waiting for a
response on
  the Orion mailing list, we thought of a design somehow close to yours.
We
  thought that using 3 different tables (ClassRoles, GroupRoles,
UserRoles)
  was a good ideea.
 
  But today, we came up with a solution that we thought would benefit of
  Orion's powerful features. Thanks to Alex Paransky who helped us a lot,
we
  tried to redesign the system, using OR mapping. So, we designed
something
  like this:
 
  public class GroupBean implements EntityBean
  {
  ...
  List users; //1..* relationship with UserBean
  }
 
  public class UserBean implements EntityBean
  {
  
  List groups; //1..* relationship with GroupBean
  }
 
  Practically, we broke every  *..* relationship (in this case Group(*) -
  User(*)) into two 1..* relationships. And so on, for every relationship
that
  we have:
  Class(1) - Group(*)
  User(*) - Role(*)
  Group(*) - Role(*)
  Class(*) - Role(*)
 
  As far as I know, Orion will create an additional table in the database
that
  will store the relationship. For example, for users attribute in
GroupBean,
  it will create a new table Group_users, besides the existing Group and
User
  tables. Practically, for every *-* relationship will have 2 more tables
in
  the database. Is that correct?
 
  What I want to know is if this design is correct. Are there any
drawbacks
  that would make this system work unproperly (may be some OR mapping
  problems)?
 
  Tkanks,
  George.
 
  - Original Message -
  From: Owen Fellows [EMAIL PROTECTED]
  To: Orion-Interest [EMAIL PROTECTED]
  Sent: Tuesday, October 02, 2001 10:58 AM
  Subject: RE: Design strategy
 
   Hello,
  
   We have done a similar thing were we don't know the type of class
assign
  the
   role except at runtime.
  
   The solution we used was to have an Object Type table (contain Class,
  Group,
   User).
   Then created a interface which was Roleable (i.e. this class can have
a
  role
   assigned).
   In the database you can store each assignment in a different table
   (ClassRoles, GroupRoles, UserRoles),
   or have a generic table that stores Roleable_id, Role_id and
  Object_type_id.
  
   This does have drawbacks e.g. the Database does not have enforced
   consistence as the Roleable_id is not a foreign key on any one table.
It
   may also be slower to retrieve the Roles for a particular (Class,
Group,
   User) as you will have to lookup it object type and then its roles.
(You
   could always cache object types as there will not be that many).
  
   I'm sure you can implement a Bean with the above functionality (we
haven't
   used beans for this so I can help there).
  
   Hope this is of some help.
  
   Owen
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED]]On Behalf Of George
Mardale
   Sent: 02 October 2001 06:06
   To: Orion-Interest
   Subject: RE: Design strategy
  
  
   Hello Alex,
  
   Thank you for your 

RE: Design strategy

2001-10-03 Thread BRICKER_JONATHAN_E

I would think that is this better done with LDAP and defined roles and groups. Then use the J2EE security linked to the LDAP to control access. 

Remember that Entity beans represent data in the database. Unless each of these things are actual data then it should not be an entity bean.

Jonathan Bricker
Lilly Research Labs
Java ATG






Alex Paransky [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
10/02/01 05:06 PM
Please respond to Orion-Interest


To:Orion-Interest [EMAIL PROTECTED]
cc:
Subject:RE: Design strategy



1) It seemed to me that a class was merely a container of N groups. From
your example, it seems that group (chemistry professor) was just a
sub-group of a group called (Professor). In other words:

Professor
 |
 +-- Chemistry Professor

I was not aware of other fields in the Class, and this was the reason for
the suggestion. Since you can still attach roles to the groups, from the
example above Chemistry Professor could inherit the roles from the
Professor Group

2) You can use standard many/many relationships for this. I have had
limited success with this.

-AP_


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of George Mardale
Sent: Monday, October 01, 2001 10:06 PM
To: Orion-Interest
Subject: RE: Design strategy


Hello Alex,

Thank you for your prompt response. Your suggestions are excellent.

You're right, the analysis is not correct. I tried to reduce the problem to
a
simple example. To avoid complexity, I just limited the relationships to
1..*.
Maybe the example is not the best, but I only wanted to know if I could
model
the Abstract being bean in Orion.

There are still 2 issues we are unclear about:
1. what are the advantages of dumping entity Class? (Class has specific
fields
that Group does not have)
2. could you please detail the best way to implement a *-* relationship in
Orion?

Thanks,
George.






javax.naming

2001-10-03 Thread Nusairat, Joseph F.
Title: javax.naming





javax.naming  what happened to this in the 1.3 release??


what did it get replaced by


Joseph Faisal Nusairat, Sr. Project Manager
WorldCom
tel: 614-723-4232
pager: 888-452-0399
textmsg: [EMAIL PROTECTED]





New Release????

2001-10-03 Thread Stephen Davidson

My original post never appeared, so I am reposting...

-Steve
---BeginMessage---

Greetings.

A new release was recently announced, but I have been unable to find it
on the website.  The only thing I have been able to find any references
to is the 1.5.2 build, which has been around for a while.

If somebody could provide a link, it would be greatly appreciated.

Thanks,
Steve
-- 
Stephen Davidson
Java Consultant
Delphi Consultants, LLC
http://www.delphis.com
Phone: 214-696-6224 x208

---End Message---


RE: OR mapping (1/* relationship between 2 entity beans)

2001-10-03 Thread Alex Paransky

Orion is pretty good as far as keeping the relationships in
orion-ejb-jar.xml current.  We have not been using BMP, but mostly 2.0 style
CMP, and this particular area has been working for us without a flaw.

-AP_

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of George Mardale
Sent: Wednesday, October 03, 2001 2:18 AM
To: Orion-Interest
Subject: OR mapping (1/* relationship between 2 entity beans)


Hello everyone,

I have an OR mapping that involves 2 entity beans, named Group and User,
like in the following example:

public class GroupBean implements EntityBean
{
...
List users;



public addUser(User user)
{

users.add(user);
}
}

So, I have an 1/* relationship.

What I want to know is what modifications do I have to made to
orion-ejb-jar.xml to reflect this OR mapping? On the orionsupport site,
there are 2 example for advanced OR mapping, one involving a relationship
between 2 entity bean, but in an one/one relationship (one entity bean has
as an attribute other entity bean, not a list of them), and one involving a
relationship between an entity bean and a regular JavaBean (not an entity
bean). I tried to combine those two to solve my situation, but it didn't
worked out.

If you are kind enough to give me an example, I will greatly appreciated.

Thanks for listening,

George.








RE: Design strategy

2001-10-03 Thread Alex Paransky

Yes, I have noticed the same behavior in 2.0 CMP style beans.  What I have
been doing is simply alerting orion-ejb-jar.xml, and changing one of the
tables into another one.  So, instead of 2 tables, there is actually 1
table.  I am not sure, if this is working correctly during transaction, in
other words, I think orion still keeps two separate relationships in memory
until a commit is done.  So GroupBean.add(user), will not find group in
the user entity until a commit and update to the relational table.  This
is somewhat frustrating and I am hoping will get fixed with the next release
of Orion (not clear when that will happen since we have not seen any updates
for over 9 months now!).

-AP_



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of George Mardale
Sent: Wednesday, October 03, 2001 5:49 AM
To: Orion-Interest
Subject: Re: Design strategy


Hello Daniel,

What I said about those 2 tables, was strictly Orion-related. You are right,
in designing relational databases, a n-m relationship will be normalized by
introducing 1 (one) table and two 1-n relationships between the existing 2
tables (Group, User) and the new one (let's say GroupUser). Thus, we will
avoid redundancy.

In Orion, as far as I know, if I use something like this:

public class GroupBean 
{
...
List users;
...
}

public class UserBean...
{
...
List groups;

}

to simulate a *-* relationship, Orion will create, by OR mapping, a table
for my first 1-* relationship Group-User (let's say the table is named
Group_users) and another table for my other 1-* relationship User-Group
(let's say the table is named Users_group). Of course, these 2 tables
(Group_users and Users_group) are identical, but I think Orion will not know
that these two 1-n relationships represent in fact one n-m relationship.

Please be advised that his is only my supposition about Orion. I don't know
if I'm right about this one but I'll be glad if someone can clarify this
issue for me. I was trying to find out for some days, how Orion handles *-*
relationships, but I wasn't lucky to find something useful.

best regards,
George.

- Original Message -
From: Daniel Lopez [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Tuesday, October 02, 2001 5:04 PM
Subject: Re: Design strategy


 Hi George,

 I don't know about EJB, as we don't use them, but having an extra table to
 represent an n-m relationship is a well stablished technique when
designing
 relational databases. AFAIK there's no other way to do that while
providing
 db-enforced consistency and avoiding redundancy. You represent a logical
n-m
 relationship, you create a new table that implements two real 1-n
relationships,
 thus creating one extra table. I don't see where you get two extra tables
per
 relationship from.
 regards,
 D.

 George Mardale wrote:

  Hello Owen,
 
  Thank you for your kind response. Yesterday, while waiting for a
response on
  the Orion mailing list, we thought of a design somehow close to yours.
We
  thought that using 3 different tables (ClassRoles, GroupRoles,
UserRoles)
  was a good ideea.
 
  But today, we came up with a solution that we thought would benefit of
  Orion's powerful features. Thanks to Alex Paransky who helped us a lot,
we
  tried to redesign the system, using OR mapping. So, we designed
something
  like this:
 
  public class GroupBean implements EntityBean
  {
  ...
  List users; //1..* relationship with UserBean
  }
 
  public class UserBean implements EntityBean
  {
  
  List groups; //1..* relationship with GroupBean
  }
 
  Practically, we broke every  *..* relationship (in this case Group(*) -
  User(*)) into two 1..* relationships. And so on, for every relationship
that
  we have:
  Class(1) - Group(*)
  User(*) - Role(*)
  Group(*) - Role(*)
  Class(*) - Role(*)
 
  As far as I know, Orion will create an additional table in the database
that
  will store the relationship. For example, for users attribute in
GroupBean,
  it will create a new table Group_users, besides the existing Group and
User
  tables. Practically, for every *-* relationship will have 2 more tables
in
  the database. Is that correct?
 
  What I want to know is if this design is correct. Are there any
drawbacks
  that would make this system work unproperly (may be some OR mapping
  problems)?
 
  Tkanks,
  George.
 
  - Original Message -
  From: Owen Fellows [EMAIL PROTECTED]
  To: Orion-Interest [EMAIL PROTECTED]
  Sent: Tuesday, October 02, 2001 10:58 AM
  Subject: RE: Design strategy
 
   Hello,
  
   We have done a similar thing were we don't know the type of class
assign
  the
   role except at runtime.
  
   The solution we used was to have an Object Type table (contain Class,
  Group,
   User).
   Then created a interface which was Roleable (i.e. this class can have
a
  role
   assigned).
   In the database you can store each assignment in a different table
   

Re: New Release????

2001-10-03 Thread Ray Harrison

The release was only announced as coming within the next few days - which is 
certainly not
specific. They've had to re-write a bit of the core parts for spec purposes so there 
is certainly
testing they need to do before it gets out to us...

Hopefully - within the next few days!

Cheers
Ray
--- Stephen Davidson [EMAIL PROTECTED] wrote:
 My original post never appeared, so I am reposting...
 
 -Steve

 ATTACHMENT part 2 message/rfc822 
 Date: Tue, 02 Oct 2001 17:07:45 -0500
 From: Stephen Davidson [EMAIL PROTECTED]
 Organization: Delphi Consultants, LLC
 To: Orion-Interest [EMAIL PROTECTED]
 Subject: New Release
 
 Greetings.
 
 A new release was recently announced, but I have been unable to find it
 on the website.  The only thing I have been able to find any references
 to is the 1.5.2 build, which has been around for a while.
 
 If somebody could provide a link, it would be greatly appreciated.
 
 Thanks,
 Steve
 -- 
 Stephen Davidson
 Java Consultant
 Delphi Consultants, LLC
 http://www.delphis.com
 Phone: 214-696-6224 x208
 


__
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com




RE: New Release????

2001-10-03 Thread Juan Lorandi (Chile)

no new release...

always check out
http://www.orionserver.com/orion/changes.txt

also, you can download orion.jar from

http://www.orionserver.com/orion/orion.jar

(that's what autoupdate does, BTW)

No new release or further comments from magnus yet.

 -Original Message-
 From: Stephen Davidson [mailto:[EMAIL PROTECTED]]
 Sent: MiƩrcoles, 03 de Octubre de 2001 10:22
 To: Orion-Interest
 Subject: New Release
 
 
 My original post never appeared, so I am reposting...
 
 -Steve
 




Protocol violation w/ Oracle

2001-10-03 Thread Chad Cromwell

Does any noe know why i would get this error

servlet to session bean to oracle db

i do get a connection then when i try to create a
preparedStatement this happens


thanks chad

java.sql.SQLException: Protocol violation
at
oracle.jdbc.dbaccess.DBError.check_error(DBError.java:631)
at
oracle.jdbc.ttc7.O3log.receive2nd(O3log.java, Compiled
Code)
at
oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:214)
at
oracle.jdbc.driver.OracleConnection.init(OracleConnection.java:142)

at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:214)
at
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:193)
at
com.evermind.sql.DriverManagerDataSource.getConnection(Unknown
Source
)
at
com.evermind.sql.DriverManagerConnectionPoolDataSource.getPooledConne
ction(Unknown Source)
at
com.evermind.sql.OrionPooledDataSource._bgb(Unknown
Source)
at com.evermind._jb._bgb(Unknown Source)
at
com.evermind.sql.OrionPooledDataSource.getConnection(Unknown
Source)
at
com.evermind.sql.DriverManagerXADataSource._bvc(Unknown
Source)
at com.evermind._vn._bl(Unknown Source)
at com.evermind._lo.createStatement(Unknown
Source)
at com.evermind._lo.createStatement(Unknown
Source)
at
com.dumc.servlet.AddContact.doPost(AddContact.java,
Compiled Code)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind._cxb._abe(Unknown Source)
at com.evermind._cxb._uec(Unknown Source)
at com.evermind._io._twc(Unknown Source)
at com.evermind._io._gc(Unknown Source)
at com.evermind._if.run(Unknown Source)
OrionCMTConnection not closed, check your code!
LogicalDriverManagerXAConnection not closed, check
your code!
Created at:
java.lang.Throwable: OrionCMTConnection created
at com.evermind._wp.init(Unknown Source)
at
com.evermind.sql.OrionCMTDataSource.getConnection(Unknown
Source)
at
com.dumc.servlet.AddContact.doPost(AddContact.java,
Compiled Code)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind._cxb._abe(Unknown Source)
at com.evermind._cxb._uec(Unknown Source)
at com.evermind._io._twc(Unknown Source)
at com.evermind._io._gc(Unknown Source)
at com.evermind._if.run(Unknown Source)



__
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com




Displaying errors in JSP

2001-10-03 Thread EXT-Vaze, Vinay G

If I have a code block such as


%
  try {


  }
  catch (Exception e) {

 }
%


inside a JSP, how do I output error to either the browser or
to the server console ?

--
Vinay Vaze

M/S : 7H-80
Phone  : (425)-865-2929
Email   : [EMAIL PROTECTED]







Can't get client app to work

2001-10-03 Thread Lorenc, Swavek

I am trying to get to work the examples from Ed Roman's book Mastering
Enerprise Java Beans.
One of his examples is CountBean client application.

Here is what I have done so far.

I have Orion installed in 
D:\Program Files\SPSSWeb\Orion

J2EE sdk installed in
C:\j2sdkee1.2.1

Java SDK installed in
C:\jdk1.3

I created classes CountBean, CountHome, Count in a package session.count and
located them 
in c:\orionapp\classes\session\count. In the same directory I also have
CountClient class.
I compiled allclasses from C:\orionapp\classes.

Using Sun's deploytool I crated the Mastering.ear file containing
ejb-jar-ic.jar
app-client-ic.jar
META-INF\MANIFEST.MF
META-INF\applicatioin.xml
META-INF\sun-j2ee-ri.xml

I deployed the application into Orion and got the following confirmation:
Auto-deploying mastering (Assembly had been updated)...
Auto-deploying ejb-jar-ic.jar (ejb-jar.xml had been touched since the
previous d
eployment)... done.
Auto-deploying app-client-ic.jar (Previous deployment not found)... done.

I extracted the files contained int the app-client-ic.jar into
c:\orionapp\classes.

Now I am trying to run the client application like this and get the
following error:

C:\orionapp\classesjava -classpath
c:\orionapp\classes\;C:\orionapp\orionlib\or
ion.jar session.count.CountClient
javax.naming.NameNotFoundException: Count_JNDIName not found
at com.evermind.server.rmi.RMIContext.lookup(Unknown Source)
at com.evermind._dkb.lookup(Unknown Source)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at session.count.CountClient.main(CountClient.java:15)


The code in CountClient.java that tries to look up the CountHome object
looks like this:
package session.count;

import javax.ejb.*;
import javax.naming.*;
import java.util.Properties;

public class CountClient 
{
public static void main(String [] args)
{
try
{
Properties props = System.getProperties();
Context ctx = new InitialContext(props);
CountHome home = (CountHome) ctx.lookup(Count_JNDIName);


According to some postings in this mail list when the client application is
looking up
ejbs it shouldn't use the java:comp/env prefixed names.

Here is the contents of the various xml files (minus the headers).  All of
these files were
created either by deploytool or by Orion's deployment process.

c:\orionapp\classes\META-INF\application-client.xml
-
application-client
  display-nameCountClient/display-name
  descriptionDescription entered via New Client Application
Wizard/description
  env-entry
descriptionSome environment entry/description
env-entry-namexyz/env-entry-name
env-entry-typejava.lang.String/env-entry-type
env-entry-value6/env-entry-value
  /env-entry
  ejb-ref
descriptionmain EJB referenced in the code/description
ejb-ref-namesession.count.CountBean/ejb-ref-name
ejb-ref-typeSession/ejb-ref-type
homesession.count.CountHome/home
remotesession.count.Count/remote
  /ejb-ref
/application-client


c:\orionapp\classes\META-INF\orion-application-client.xml
-
orion-application-client
ejb-ref-mapping name=session.count.CountBean location=Count /
/orion-application-client


c:\orionapp\classes\jndi.properties
-
#Orion JNDI properties
#Tue Oct 02 17:57:23 CDT 2001
java.naming.provider.url=ormi\://127.0.0.1\:23791/mastering
java.naming.factory.initial=com.evermind.server.ApplicationClientInitialCont
extFactory
java.naming.security.principal=admin
java.naming.security.credentials=123


c:\orionapp\classes\META-INF\sun-j2ee-ri.xml
-
j2ee-ri-specific-information
  app-client
ejb-ref
  ejb-ref-namesession.count.CountBean/ejb-ref-name
  jndi-nameCount_JNDIName/jndi-name
/ejb-ref
  /app-client
/j2ee-ri-specific-information


I have been trying to solve this problem for the last 2 days by looking on
Orion's site,
this site, javasoft site but I can't figure out what is wrong.  It seems to
me that 
JNDI doesn't have the right name or maybe the xml files don't contain the
right information.

Please help.

Thank you
Swavek





RE: javax.naming

2001-10-03 Thread Tucker, James
Title: javax.naming



Umm..it's in the rt.jar.. right where it has always has 
been...

  -Original Message-From: Nusairat, Joseph F. 
  [mailto:[EMAIL PROTECTED]]Sent: Wednesday, October 03, 2001 
  8:49 AMTo: Orion-InterestSubject: 
  javax.naming
  javax.naming  what happened to this in the 1.3 
  release?? 
  what did it get replaced by 
  Joseph Faisal Nusairat, Sr. Project Manager WorldCom tel: 614-723-4232 pager: 888-452-0399 textmsg: 
  [EMAIL PROTECTED] 


RE: Displaying errors in JSP

2001-10-03 Thread The elephantwalker

for the terminal, you can use System.out.println(e.getMessage()) in the
catch phrase

for the jsp, you will need to initialize some string variable in the catch
block and then use in the html ...

%
   String error = ;
   try {

   }

catch (Exception e){
error = e.getMessage();
 }
%

...html stuff
p%=error%/p

But this isn't really always necessary. Orion will spit out the error in the
jsp if you don't catch it...since there is a try/catch built around every
jsp page. Try it...do something silly in the jsp page to create a Null
Pointer Error, and watch the fireworks in the browser. As long as you don't
have a 500 error page, your jsp Null Pointer Error will be in the browser.

regards,

the elephantwalker
www.elephantwalker.com


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of EXT-Vaze,
Vinay G
Sent: Wednesday, October 03, 2001 9:09 AM
To: Orion-Interest
Subject: Displaying errors in JSP


If I have a code block such as


%
  try {


  }
  catch (Exception e) {

 }
%


inside a JSP, how do I output error to either the browser or
to the server console ?

--
Vinay Vaze

M/S : 7H-80
Phone  : (425)-865-2929
Email   : [EMAIL PROTECTED]








Re: NullPointerException and DataSource

2001-10-03 Thread Chad Cromwell

Perry did you fin out the answer to this i'm running
into the same problem


data-sources
!--
An example/default DataSource that uses an ordinary
JDBC-driver (in this case hsql) to create the
connections. 
This tag creates all the needed kinds
of data-sources, transactional, pooled and EJB-aware
sources.
The source generally used in application code is the
EJB
one - it provides transactional safety and
connection pooling.
--
data-source
class=com.evermind.sql.DriverManagerDataSource
name=Oracle
schema=database-schemas/oracle.xml 
location=jdbc/OracleCoreDS
xa-location=jdbc/xa/OracleXADS
ejb-location=jdbc/OracleDS
connection-driver=oracle.jdbc.driver.OracleDriver
url=jdbc:oracle:thin:@localhost:1521:ORACLE8  

username=scott
password=tiger
/
/data-sources

thanks chad
java.sql.SQLException: Protocol violation
at
oracle.jdbc.dbaccess.DBError.check_error(DBError.java:631)
at
oracle.jdbc.ttc7.O3log.receive2nd(O3log.java, Compiled
Code)
at
oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:214)
at
oracle.jdbc.driver.OracleConnection.init(OracleConnection.java:142)

at
oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
va:214)
at
oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:193)
at
java.sql.DriverManager.getConnection(DriverManager.java:457)
at
java.sql.DriverManager.getConnection(DriverManager.java:137)
at
com.dumc.servlet.AddContact.doPost(AddContact.java,
Compiled Code)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:211)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:309)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
at com.evermind._cxb._abe(Unknown Source)
at com.evermind._cxb._uec(Unknown Source)
at com.evermind._io._twc(Unknown Source)
at com.evermind._io._gc(Unknown Source)
at com.evermind._if.run(Unknown Source)

--- Perry Hoekstra [EMAIL PROTECTED] wrote:
 Greet the sun all:
 
 I am trying to execute a Oracle query using a data
 source an I am 
 receiving the following NullPointerException:
 

testCreateAuditLog(com.ingenix.hisit.subrotrack.test.audit.ejb.AuditLogTest)java.lang.NullPointerException
   at
 com.evermind.sql.OrionPooledDataSource._bsb(Unknown
 Source)
   at
 com.evermind.sql.OrionPooledDataSource._brb(Unknown
 Source)
   at com.evermind._wp._pud(Unknown Source)
   at com.evermind._wp._bl(Unknown Source)
   at com.evermind._lo.createStatement(Unknown Source)
   at 

com.ingenix.hisit.subrotrack.audit.dao.AuditEventDAOImpl.generateAuditEventId(Unknown
 
 Source)
   at 

com.ingenix.hisit.subrotrack.test.SubroTestUtils.getAuditRawData(Unknown
 
 Source)
   at 

com.ingenix.hisit.subrotrack.test.audit.ejb.AuditLogTest.beginCreateAuditLog(Unknown
 
 Source)
   at 

org.apache.cactus.AbstractTestCase.callBeginMethod(AbstractTestCase.java:203)
   at 

org.apache.cactus.AbstractTestCase.runGenericTest(AbstractTestCase.java:404)
   at

org.apache.cactus.ServletTestCase.runTest(ServletTestCase.java:130)
   at

org.apache.cactus.AbstractTestCase.runBare(AbstractTestCase.java:371)
   at

com.ingenix.hisit.subrotrack.test.audit.ejb.AuditLogTest.main(Unknown
 
 Source)
 
 If I do a toString on the database connection, I
 see:
 
 [jdbc/OracleDS connection]
 
 I have tried both PreparedStatement and
 CreateStatement.
 
 What other things can I try in order to debug this
 problem?
 
 
 -- 
 Perry Hoekstra
 E-Commerce Architect
 Talent Software Services
 [EMAIL PROTECTED]
 
 


__
Do You Yahoo!?
Listen to your Yahoo! Mail messages from any phone.
http://phone.yahoo.com




RE: Displaying errors in JSP

2001-10-03 Thread Juan Lorandi (Chile)

BTW, if you use IE, disable 'friendly HTTP error messages'. This option, in
its active state will prevent the error page to display in the browser.

JP

 -Original Message-
 From: The elephantwalker [mailto:[EMAIL PROTECTED]]
 Sent: MiƩrcoles, 03 de Octubre de 2001 13:21
 To: Orion-Interest
 Subject: RE: Displaying errors in JSP
 
 
 for the terminal, you can use 
 System.out.println(e.getMessage()) in the
 catch phrase
 
 for the jsp, you will need to initialize some string variable 
 in the catch
 block and then use in the html ...
 
 %
String error = ;
try {
 
}
 
 catch (Exception e){
 error = e.getMessage();
  }
 %
 
 ...html stuff
 p%=error%/p
 
 But this isn't really always necessary. Orion will spit out 
 the error in the
 jsp if you don't catch it...since there is a try/catch built 
 around every
 jsp page. Try it...do something silly in the jsp page to create a Null
 Pointer Error, and watch the fireworks in the browser. As 
 long as you don't
 have a 500 error page, your jsp Null Pointer Error will be in 
 the browser.
 
 regards,
 
 the elephantwalker
 www.elephantwalker.com
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of EXT-Vaze,
 Vinay G
 Sent: Wednesday, October 03, 2001 9:09 AM
 To: Orion-Interest
 Subject: Displaying errors in JSP
 
 
 If I have a code block such as
 
 
 %
   try {
 
 
   }
   catch (Exception e) {
 
  }
 %
 
 
 inside a JSP, how do I output error to either the browser or
 to the server console ?
 
 --
 Vinay Vaze
 
 M/S : 7H-80
 Phone  : (425)-865-2929
 Email   : [EMAIL PROTECTED]
 
 
 
 
 




RE: Displaying errors in JSP

2001-10-03 Thread Michael Laccetti

System.out.print() - server console
out.print() - HTML page

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of EXT-Vaze,
Vinay G
Sent: Wednesday, October 03, 2001 12:09
To: Orion-Interest
Subject: Displaying errors in JSP


If I have a code block such as


%
  try {


  }
  catch (Exception e) {

 }
%


inside a JSP, how do I output error to either the browser or
to the server console ?

--
Vinay Vaze

M/S : 7H-80
Phone  : (425)-865-2929
Email   : [EMAIL PROTECTED]








Re: Displaying errors in JSP

2001-10-03 Thread Stephen Davidson

Response Inlined.
EXT-Vaze, Vinay G wrote:
 
 If I have a code block such as
 
 %
   try {
 
   }
   catch (Exception e) {
e.printStackTrace(); //This should write the stack trace of the
exception to the console.
 
  }
 %
 
 inside a JSP, how do I output error to either the browser or
 to the server console ?
 
 --
 Vinay Vaze
 
 M/S : 7H-80
 Phone  : (425)-865-2929
 Email   : [EMAIL PROTECTED]

-- 
Stephen Davidson
Java Consultant
Delphi Consultants, LLC
http://www.delphis.com
Phone: 214-696-6224 x208




Re: Can't get client app to work

2001-10-03 Thread Stephen Davidson

Greetings, Swavek.

I think the problem may be your orion-ejb-jar.xml file.  If you do not
have one (you did not post one), Orion will autogenerate one for you
based (loosely) on your ejb-jar.xml file.  It is similar to the one for
the J2EE server, and the details are available on the Orion
Documentation web pages.  The file that orion generates will, if left to
its own devices, give your ejbs JNDI names that end in EJB.  In this
case, for you to access your EJB, you would most likely have to look for
CountEJB.  Even if you do specify one, Orion will still create and use
its own, but will use yours as the template.  What happens is that when
it generates the stub and skeleton files, these generated files are what
is actually stored as the home and remote interfaces in the xml file. 
If it is reading yours, it will set the JNDI names as you specify.  Use
your OrionConsole to examine what Orion thinks your Jar file looks like.

If you want to change the JNDI name of something that Orion has
autogenerated info for, you will have to make sure that all of the
temp files are deleted.  There seem to be two sets, one in the
ORION_HOME/application-deployments directory, and one with the .ear file
(if you are using ear files).

Regards,
Steve

Lorenc, Swavek wrote:
 
 I am trying to get to work the examples from Ed Roman's book Mastering
 Enerprise Java Beans.
 One of his examples is CountBean client application.
 
 Here is what I have done so far.
 
 I have Orion installed in
 D:\Program Files\SPSSWeb\Orion
 
 J2EE sdk installed in
 C:\j2sdkee1.2.1
 
 Java SDK installed in
 C:\jdk1.3
 
 I created classes CountBean, CountHome, Count in a package session.count and
 located them
 in c:\orionapp\classes\session\count. In the same directory I also have
 CountClient class.
 I compiled allclasses from C:\orionapp\classes.
 
 Using Sun's deploytool I crated the Mastering.ear file containing
 ejb-jar-ic.jar
 app-client-ic.jar
 META-INF\MANIFEST.MF
 META-INF\applicatioin.xml
 META-INF\sun-j2ee-ri.xml
 
 I deployed the application into Orion and got the following confirmation:
 Auto-deploying mastering (Assembly had been updated)...
 Auto-deploying ejb-jar-ic.jar (ejb-jar.xml had been touched since the
 previous d
 eployment)... done.
 Auto-deploying app-client-ic.jar (Previous deployment not found)... done.
 
 I extracted the files contained int the app-client-ic.jar into
 c:\orionapp\classes.
 
 Now I am trying to run the client application like this and get the
 following error:
 
 C:\orionapp\classesjava -classpath
 c:\orionapp\classes\;C:\orionapp\orionlib\or
 ion.jar session.count.CountClient
 javax.naming.NameNotFoundException: Count_JNDIName not found
 at com.evermind.server.rmi.RMIContext.lookup(Unknown Source)
 at com.evermind._dkb.lookup(Unknown Source)
 at javax.naming.InitialContext.lookup(InitialContext.java:350)
 at session.count.CountClient.main(CountClient.java:15)
 
 The code in CountClient.java that tries to look up the CountHome object
 looks like this:
 package session.count;
 
 import javax.ejb.*;
 import javax.naming.*;
 import java.util.Properties;
 
 public class CountClient
 {
 public static void main(String [] args)
 {
 try
 {
 Properties props = System.getProperties();
 Context ctx = new InitialContext(props);
 CountHome home = (CountHome) ctx.lookup(Count_JNDIName);
 
 According to some postings in this mail list when the client application is
 looking up
 ejbs it shouldn't use the java:comp/env prefixed names.
 
 Here is the contents of the various xml files (minus the headers).  All of
 these files were
 created either by deploytool or by Orion's deployment process.
 
 c:\orionapp\classes\META-INF\application-client.xml
 -
 application-client
   display-nameCountClient/display-name
   descriptionDescription entered via New Client Application
 Wizard/description
   env-entry
 descriptionSome environment entry/description
 env-entry-namexyz/env-entry-name
 env-entry-typejava.lang.String/env-entry-type
 env-entry-value6/env-entry-value
   /env-entry
   ejb-ref
 descriptionmain EJB referenced in the code/description
 ejb-ref-namesession.count.CountBean/ejb-ref-name
 ejb-ref-typeSession/ejb-ref-type
 homesession.count.CountHome/home
 remotesession.count.Count/remote
   /ejb-ref
 /application-client
 
 c:\orionapp\classes\META-INF\orion-application-client.xml
 -
 orion-application-client
 ejb-ref-mapping name=session.count.CountBean location=Count /
 /orion-application-client
 
 c:\orionapp\classes\jndi.properties
 -
 #Orion JNDI properties
 #Tue Oct 02 17:57:23 CDT 2001
 java.naming.provider.url=ormi\://127.0.0.1\:23791/mastering
 

I've screwed up a component DD???? NamingException: Cannot lookup java:comp/env attributes, not in a valid component

2001-10-03 Thread Curt Smith



I've 
got two apps deployed as expaned directories. XML files are similar since 
they're 
similar apps.

But 
one does not allow any context lookups and one does? 
orionconsole can't
access 
the context and EJB's in the broken app but can in the other. It gets 
these
naming 
exceptions in the orion console log.

What 
could be off in my deployment descriptors ???

Thanks!!

curt


javax.naming.NamingException: Cannot 
lookup java:comp/env attributes, not in a valid 
component at 
com.evermind.server.Application.getEnvironmentContext(Application.java:1669) 
at 
com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:104) 
at 
com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:63) 
at 
javax.naming.InitialContext.lookup(InitialContext.java:350) 
at 
gov.ga.gdc.bm.security.dao.ValidateLoginManager.getDatasource(ValidateLoginManager.java:365) 
at 
gov.ga.gdc.bm.security.dao.ValidateLoginManager.getDBConnection(ValidateLoginManager.java:400) 
at 
gov.ga.gdc.bm.security.dao.ValidateLoginManager.checkPassword(ValidateLoginManager.java:227) 
at 
gov.ga.gdc.bm.security.dao.ValidateLoginManager$UserWrapper.authenticate(ValidateLoginManager.java:305) 
at 
com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:346) 
at 
com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)


RE: I've screwed up a component DD???? NamingException: Cannot lookup java:comp/env attributes, not in a valid component

2001-10-03 Thread The elephantwalker



What 
happened when you deployed? Did you get any error messages? It looks like your 
datasource jndi name is wrong in the offending appalmost like it isn't even 
deployed.

Check 
out the name of your datasource in your resource tag. This is where it is 
blowing up. For example, if this is in a servlet, there should be a resource tag 
in the web.xml file. If this is in an ejb, then there is a resource tag in the 
ejb-jar.xml file.

We 
need a little more to go on, though. 

You 
can go to www.elephantwalker.com, 
and post a request. After you post a request, you can actually attach files to 
your request...

regards,

the 
elephantwalker
www.elephantwalker.com


  -Original Message-From: 
  [EMAIL PROTECTED] 
  [mailto:[EMAIL PROTECTED]]On Behalf Of Curt 
  SmithSent: Wednesday, October 03, 2001 1:21 PMTo: 
  Orion-InterestSubject: I've screwed up a component DD 
  NamingException: Cannot lookup java:comp/env attributes, not in a valid 
  component
  I've 
  got two apps deployed as expaned directories. XML files are similar 
  since they're 
  similar apps.
  
  But 
  one does not allow any context lookups and one does? 
  orionconsole can't
  access the context and EJB's in the broken app but 
  can in the other. It gets these
  naming exceptions in the orion console 
  log.
  
  What 
  could be off in my deployment descriptors ???
  
  Thanks!!
  
  curt
  
  
  javax.naming.NamingException: 
  Cannot lookup java:comp/env attributes, not in a valid 
  component at 
  com.evermind.server.Application.getEnvironmentContext(Application.java:1669) 
  at 
  com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:104) 
  at 
  com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:63) 
  at 
  javax.naming.InitialContext.lookup(InitialContext.java:350) 
  at 
  gov.ga.gdc.bm.security.dao.ValidateLoginManager.getDatasource(ValidateLoginManager.java:365) 
  at 
  gov.ga.gdc.bm.security.dao.ValidateLoginManager.getDBConnection(ValidateLoginManager.java:400) 
  at 
  gov.ga.gdc.bm.security.dao.ValidateLoginManager.checkPassword(ValidateLoginManager.java:227) 
  at 
  gov.ga.gdc.bm.security.dao.ValidateLoginManager$UserWrapper.authenticate(ValidateLoginManager.java:305) 
  at 
  com.evermind.server.rmi.RMIConnection.run(RMIConnection.java:346) 
  at 
  com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)


Can't get client app to work

2001-10-03 Thread Xiaowen Wang

I think it might be that sun-j2ee-ri.xml is specifying the jndi name,
ejb-ref name binding, whereas orion is not parsing that file. I think
you have to do it in orion-ejb-jar.xml to do the things equivalent to
sun-j2ee-ri.xml does. You can find the orion-ejb-jar.xml in
orion\application-deployments\your-app-name\your-ejb-jar-name\ . Copy
it to your codebase and change it.
Xiaowen




URGENT! JNI problem on Orion-Could Not Get Class for Java ....

2001-10-03 Thread YiYi Mao

We're having a problem running JNI (C++) from Orion enviorment. The original
error message is:
C++ CommIFCMSListener::processEvent - Could Not Get Class For Java
CMSListener Object.

The JNI method is called from a Java class, not EJB. The Java application is
deployed into Orion Server.
The JNI code runs fine outside of Orion, as well as on Borland AppServer.

The problem seems to be, not able to find the call back Java enviornment
from native to Java. From Java to native is fine.

We're under pressure now to re-host our application on Orion. Please help as
soon as you can

Sincerely,

YiYi





Servlet expiration

2001-10-03 Thread Kipnis, Adam

Does anyone know how to configure Orion so the servlet container never
expires initialized servlets?

Adam Kipnis
JAMDAT Mobile
[EMAIL PROTECTED]
310.636.3126

Why document? If it was hard to write, it should be hard to understand!
-Me





Reg: Does any one has the BenchMarks of OC4J with Application Servers

2001-10-03 Thread Venkata_Nallam

Dear all,
Does any one of our group have bench mark reports of OC4J wrt other
Application Servers mainly WebLogic, Iplanet and IBM Web Sphere.

Can we get the performance reports of OC4J and how much load it can
handle.

Please help in regard..



With warm regards

Venkata