SV: Initial context problem.

2002-05-02 Thread Jesper Rasmussen

Hi Alex,
Thanks - i got an answer from Scott that solved the problem. I did not
want to burden the list so i did not send reply to the list, as i do
now.

No the code is not the correct code, but pseudo real code - that is a
bit copy-paste and a bit of editing.
It was only ment to be informative.
Heh and no the code in the catch block is not there. I just pasted it so
simulate/explain the problem.

Next time (if a such arises) ill be sure to paste correct code :)

cheers
Jesper

-Oprindelig meddelelse-
Fra: Alex Paransky [mailto:[EMAIL PROTECTED]]
Sendt: 1. maj 2002 17:06
Til: Orion-Interest
Emne: RE: Initial context problem.


Not sure if the code you pasted is correct, however, you are missing a
new
keyword in front of the InitialContext().  Also, in your second
try/catch
block you are missing a call to new InitialContext().  I might be picky,
but
the source code you posted is not at all the source code that you are
using
(unless are you using a strange version of the Java Complier).

Can you isolate your problem into a small piece of code that works, and
try
to post again?

Thanks.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/profile/apara_personal

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jesper
Rasmussen
Sent: Wednesday, May 01, 2002 3:10 AM
To: Orion-Interest
Subject: Initial context problem.


Hi all,
Im trying to make an application which askes for the login and password
to connect to the application deployed on 1.5.4 orion server.

It works fine if i specify the correct login(admin). However if I uses
some wrong cridentials(admin1) i get an exception which also is fine.

HOWEVER when i try to login again, without restarting the application)
using the correct info I still get the old exception
(javax.naming.AuthenticationException: Invalid username/password for
beansApp (admin1)).

If i close the app and login again with the correct it works fine.

to me it seems like the enviroment i pass to the constructor of
InitialContext is ignored the second time.

I have tried to use close() to no avail.

Does anyone have a clue?? Thanks!

cheers
JEsper

--more or less the code that cause the bug!
server=ormi://127.0.0.1/beansApp;
login=admin1;
password=123;
env = new java.util.Hashtable();
env.put(java.naming.provider.url,server);
env.put(java.naming.factory.initial,com.evermind.server.ApplicationCl
ientInitialContextFactory);
env.put(java.naming.security.principal,login);
env.put(java.naming.security.credentials,password);
InitialContext initial;

try {
   initial = InitialContext(env);
catch(NamingException e) {
   try {
  login=admin;
  env = new java.util.Hashtable();
  env.put(java.naming.provider.url,server);

env.put(java.naming.factory.initial,com.evermind.server.ApplicationCl
ientInitialContextFactory);
  env.put(java.naming.security.principal,login);
  env.put(java.naming.security.credentials,password);
   } catch(NamingException ex) {
//ACK. chould not get here!!!
   }







Initial context problem.

2002-05-01 Thread Jesper Rasmussen

Hi all,
Im trying to make an application which askes for the login and password
to connect to the application deployed on 1.5.4 orion server.

It works fine if i specify the correct login(admin). However if I uses
some wrong cridentials(admin1) i get an exception which also is fine.

HOWEVER when i try to login again, without restarting the application)
using the correct info I still get the old exception
(javax.naming.AuthenticationException: Invalid username/password for
beansApp (admin1)).

If i close the app and login again with the correct it works fine.

to me it seems like the enviroment i pass to the constructor of
InitialContext is ignored the second time.

I have tried to use close() to no avail.

Does anyone have a clue?? Thanks!

cheers
JEsper

--more or less the code that cause the bug!
server=ormi://127.0.0.1/beansApp;
login=admin1;
password=123;
env = new java.util.Hashtable();
env.put(java.naming.provider.url,server);
env.put(java.naming.factory.initial,com.evermind.server.ApplicationCl
ientInitialContextFactory);
env.put(java.naming.security.principal,login);
env.put(java.naming.security.credentials,password);
InitialContext initial;

try {
   initial = InitialContext(env);
catch(NamingException e) {
   try {
  login=admin;
  env = new java.util.Hashtable();
  env.put(java.naming.provider.url,server);
 
env.put(java.naming.factory.initial,com.evermind.server.ApplicationCl
ientInitialContextFactory);
  env.put(java.naming.security.principal,login);
  env.put(java.naming.security.credentials,password);   
   } catch(NamingException ex) {
//ACK. chould not get here!!!
   }




RE: Initial context problem.

2002-05-01 Thread Alex Paransky

Not sure if the code you pasted is correct, however, you are missing a new
keyword in front of the InitialContext().  Also, in your second try/catch
block you are missing a call to new InitialContext().  I might be picky, but
the source code you posted is not at all the source code that you are using
(unless are you using a strange version of the Java Complier).

Can you isolate your problem into a small piece of code that works, and try
to post again?

Thanks.

-AP_
http://www.alexparansky.com
Java/J2EE Architect/Consultant
http://www.myprofiles.com/member/profile/apara_personal

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jesper
Rasmussen
Sent: Wednesday, May 01, 2002 3:10 AM
To: Orion-Interest
Subject: Initial context problem.


Hi all,
Im trying to make an application which askes for the login and password
to connect to the application deployed on 1.5.4 orion server.

It works fine if i specify the correct login(admin). However if I uses
some wrong cridentials(admin1) i get an exception which also is fine.

HOWEVER when i try to login again, without restarting the application)
using the correct info I still get the old exception
(javax.naming.AuthenticationException: Invalid username/password for
beansApp (admin1)).

If i close the app and login again with the correct it works fine.

to me it seems like the enviroment i pass to the constructor of
InitialContext is ignored the second time.

I have tried to use close() to no avail.

Does anyone have a clue?? Thanks!

cheers
JEsper

--more or less the code that cause the bug!
server=ormi://127.0.0.1/beansApp;
login=admin1;
password=123;
env = new java.util.Hashtable();
env.put(java.naming.provider.url,server);
env.put(java.naming.factory.initial,com.evermind.server.ApplicationCl
ientInitialContextFactory);
env.put(java.naming.security.principal,login);
env.put(java.naming.security.credentials,password);
InitialContext initial;

try {
   initial = InitialContext(env);
catch(NamingException e) {
   try {
  login=admin;
  env = new java.util.Hashtable();
  env.put(java.naming.provider.url,server);

env.put(java.naming.factory.initial,com.evermind.server.ApplicationCl
ientInitialContextFactory);
  env.put(java.naming.security.principal,login);
  env.put(java.naming.security.credentials,password);
   } catch(NamingException ex) {
//ACK. chould not get here!!!
   }






Sitemesh 1.4.2 and Orion 1.5.4: doFilter()-problem/bug

2002-04-27 Thread of


I have the problem that under some circumstances a 
request-object gets modified during a FilterChain.doFilter(request, response) 
call. For example request.getQueryString() returns the correct query string 
before doFilter() is called and after it returns null (it is the same request 
object)? If i understand the servlet specification 2.3 correctly, than the 
request and response Objects should be untouched. In the sitemesh-code the 
doFilter() is called in the method parsePage(...) of the class 
PageFilter.Regards, Oliver



JMS Connection Problem

2002-04-20 Thread Lomesh Contractor

Hi All,

My problem arises when I trying to communicate with JMS Server. I am
running my JMS server on Server A and am trying to connect to it from Server
B.

But, on doing this I am getting following exception . I have checked out
almost everything, but could not found the any clue.

Regards,
Lomesh

//

java.lang.SecurityException: Invalid username/password for bea (admin)
at com.evermind._cd._mu(Unknown Source)
at com.evermind._cd._mu(Unknown Source)
at com.evermind._cd._np(Unknown Source)
at com.evermind._ce._np(Unknown Source)
at com.evermind.server.rmi.RMIContext.lookup(Unknown Source)
at com.evermind._cf._np(Unknown Source)
at com.evermind._cf.lookup(Unknown Source)
at
com.evermind.server.administration.ApplicationResourceFinder.getLocation(Unk
nown Source)
at com.evermind._ck._ho(Unknown Source)
at com.evermind._ah.getEnvironmentContext(Unknown Source)
at com.evermind._cf._np(Unknown Source)
at com.evermind._cf.lookup(Unknown Source)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at elitecore.bea.web.HomePageController.init(Unknown Source)
at com.evermind._ah._axe(Unknown Source)
at com.evermind._ah._fpd(Unknown Source)
at com.evermind._ah._bae(Unknown Source)
at com.evermind._ah._bie(Unknown Source)
at com.evermind._ah.init(Unknown Source)
at com.evermind._ck._czc(Unknown Source)
at com.evermind._ae._czc(Unknown Source)
at com.evermind._ab._crc(Unknown Source)
at com.evermind._ab._at(Unknown Source)
at com.evermind._ae._an(Unknown Source)
at com.evermind._ae._at(Unknown Source)
at com.evermind.server.ApplicationServer._wh(Unknown Source)
at com.evermind.server.ApplicationServer._at(Unknown Source)
at com.evermind._in.run(Unknown Source)
at java.lang.Thread.run(Thread.java:484)
at com.evermind._if.run(Unknown Source)


//







https session-timeout problem

2002-04-11 Thread @Basebeans.com

Subject: https session-timeout problem
From: Emil Birgersson [EMAIL PROTECTED]
 ===
Hello!
I have a strange problem. I use a couple of session variables (shopping
cart, username) and I changed the session-timeout propertie to let's say 60
minutes. This worked fine until I made my site secure, the session is timing
out after ten minutes or less, it seems like the session-timeout propertie
has no effect at all after I added my SSL cert to the site. What can I do,
I really need to increase the session-timeout propertie. Thanks.

 /Emil






SV: https session-timeout problem

2002-04-11 Thread Magnus Rydin

Hi Emil,
This is an old issue with IE and SSL.
To get away from those issues, use HTTP sessions instead of SSL sessions
on your protected site.
This is enabled by having an entry like shared=true in the binding entry
in your web-site.xml.
See the xml descriptor at:
http://www.orionserver.com/docs/web-site.xml.html
Or The tip given in this section:
http://www.orionserver.com/docs/web-module-binding/web-module-binding.xm
l#manualBind



-Ursprungligt meddelande-
Från: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] För Orion Newsgroup
Skickat: den 11 april 2002 13:25
Till: Orion-Interest
Ämne: https session-timeout problem


Subject: https session-timeout problem
From: Emil Birgersson [EMAIL PROTECTED]
 ===
Hello!
I have a strange problem. I use a couple of session variables (shopping
cart, username) and I changed the session-timeout propertie to let's say
60 minutes. This worked fine until I made my site secure, the session is
timing out after ten minutes or less, it seems like the session-timeout
propertie has no effect at all after I added my SSL cert to the site.
What can I do, I really need to increase the session-timeout propertie.
Thanks.

 /Emil






Re: https session-timeout problem

2002-04-11 Thread Jose Mena

I had the same problem and I fixed it putting shared=true in the web-app
line of the secure-web-site.xml config file.
- Original Message -
From: Orion Newsgroup @[EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Thursday, April 11, 2002 1:25 PM
Subject: https session-timeout problem


 Subject: https session-timeout problem
 From: Emil Birgersson [EMAIL PROTECTED]
  ===
 Hello!
 I have a strange problem. I use a couple of session variables (shopping
 cart, username) and I changed the session-timeout propertie to let's say
60
 minutes. This worked fine until I made my site secure, the session is
timing
 out after ten minutes or less, it seems like the session-timeout propertie
 has no effect at all after I added my SSL cert to the site. What can I
do,
 I really need to increase the session-timeout propertie. Thanks.

  /Emil








Problem to deploy a application in a war file.

2002-04-08 Thread Javier.Fernandez

Hi everyone
I am new in Orion Server,
When i make a manual deploy of war,
i add to application.xml
  web-module id=atlassian path=../application-deployments/atlassian.war /
then
  web-app application=default name=atlassian root=/admin /

well, 
if i put
   frostis.cf.jcyl.es:7780/admin
application does not run.
if i put
   frostis.cf.jcyl.es:7780/admin/default.jsp
Orion server shows the next messages
java.io.FileNotFoundException: 
/opt/oracle/u02/app/oracle/product/ias9i/j2ee/home/default-web-app/admin/default.jsp 
(No such file or directory)
   at java.io.FileInputStream.open(Native Method)
   at java.io.FileInputStream.open(Compiled Code)
   at java.io.FileInputStream.(Compiled Code)
   at 
oracle.jsp.provider.JspFilesystemResource.fromStream(JspFilesystemResource.java:153)
   at 
oracle.jsp.provider.JspFilesystemResource.fromReader(JspFilesystemResource.java:169)
   at oracle.jsp.app.JspAppLoader.fromReader(JspAppLoader.java:1851)
   at oracle.jsp.app.JspAppLoader.reloadPage(JspAppLoader.java:1107)
   at oracle.jsp.app.JspAppLoader.loadPage(JspAppLoader.java:1005)
   at oracle.jsp.app.JspAppLoader.getPage(JspAppLoader.java:671)
   at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:337)
   at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259)
   at oracle.jsp.JspServlet.internalService(Compiled Code)
   at oracle.jsp.JspServlet.service(JspServlet.java:148)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
   at com.evermind.server.http.ServletRequestDispatcher.invoke(Compiled Code)
   at 
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:170)
   at com.evermind.server.http.HttpRequestHandler.processRequest(Compiled Code)
   at com.evermind.server.http.HttpRequestHandler.run(Compiled Code)
   at com.evermind.util.ThreadPoolThread.run(Compiled Code)

Any ideas?
Thanks.

P.D. do you know any comercial or free tools to admin Orion server?
---
Javier Fernández Pérez   
Servicio de Informática Corporativa
D.G. de Telecomunicaciones y Transportes

Consejería de Fomento - Junta de Castilla y León
Rigoberto Cortejoso, 14. 47014 Valladolid (Spain)
Telf. 983418958
e-mail: [EMAIL PROTECTED]
---





RE: Problem to deploy a application in a war file.

2002-04-08 Thread Linda Lott

try changing default.jsp to index.jsp, or change the config file where you
specify the initial page.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Monday, April 08, 2002 7:12 AM
To: Orion-Interest
Subject: Problem to deploy a application in a war file.


Hi everyone
I am new in Orion Server,
When i make a manual deploy of war,
i add to application.xml
  web-module id=atlassian path=../application-deployments/atlassian.war
/
then
  web-app application=default name=atlassian root=/admin /

well,
if i put
   frostis.cf.jcyl.es:7780/admin
application does not run.
if i put
   frostis.cf.jcyl.es:7780/admin/default.jsp
Orion server shows the next messages
java.io.FileNotFoundException:
/opt/oracle/u02/app/oracle/product/ias9i/j2ee/home/default-web-app/admin/def
ault.jsp (No such file or directory)
   at java.io.FileInputStream.open(Native Method)
   at java.io.FileInputStream.open(Compiled Code)
   at java.io.FileInputStream.(Compiled Code)
   at
oracle.jsp.provider.JspFilesystemResource.fromStream(JspFilesystemResource.j
ava:153)
   at
oracle.jsp.provider.JspFilesystemResource.fromReader(JspFilesystemResource.j
ava:169)
   at oracle.jsp.app.JspAppLoader.fromReader(JspAppLoader.java:1851)
   at oracle.jsp.app.JspAppLoader.reloadPage(JspAppLoader.java:1107)
   at oracle.jsp.app.JspAppLoader.loadPage(JspAppLoader.java:1005)
   at oracle.jsp.app.JspAppLoader.getPage(JspAppLoader.java:671)
   at oracle.jsp.app.JspApplication.dispatchRequest(JspApplication.java:337)
   at oracle.jsp.JspServlet.doDispatch(JspServlet.java:259)
   at oracle.jsp.JspServlet.internalService(Compiled Code)
   at oracle.jsp.JspServlet.service(JspServlet.java:148)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
   at com.evermind.server.http.ServletRequestDispatcher.invoke(Compiled
Code)
   at
com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletReq
uestDispatcher.java:170)
   at com.evermind.server.http.HttpRequestHandler.processRequest(Compiled
Code)
   at com.evermind.server.http.HttpRequestHandler.run(Compiled Code)
   at com.evermind.util.ThreadPoolThread.run(Compiled Code)

Any ideas?
Thanks.

P.D. do you know any comercial or free tools to admin Orion server?
---
Javier Fernández Pérez
Servicio de Informática Corporativa
D.G. de Telecomunicaciones y Transportes

Consejería de Fomento - Junta de Castilla y León
Rigoberto Cortejoso, 14. 47014 Valladolid (Spain)
Telf. 983418958
e-mail: [EMAIL PROTECTED]
---








Re: Problem to deploy a application in a war file.

2002-04-08 Thread Scott Farquhar



[EMAIL PROTECTED] wrote:

 P.D. do you know any comercial or free tools to admin Orion server?

Whilst not a full administration suite, we provide tools that make 
working with Orion easier.

   http://www.atlassian.com/software/tools/

Cheers,
Scott


-- 
Scott Farquhar :: [EMAIL PROTECTED]

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






Re: classpath problem with ear file

2002-04-05 Thread Scott Farquhar

This document is a good overview of classloaders in Orion.

http://kb.atlassian.com/content/atlassian/howto/classloaders.jsp

What Alex says is basically correct - for classes that need to be 
accessed by your EJBs - either package them in the same jar, or use 
manifest classloading.  You can optionally use a lib include, but that 
is not portable across application servers.

Cheers,
Scott

Alex Paransky wrote:
 Roxanne:
 
  
 
 I am not quite sure that this was the correct solution.  Ideally, you 
 should not have to configure ANY path's in your orion-application.xml 
 file.  The .ear is capable of configuring any dependency you wish. 
 
  
 
 In general, if you have classes which are used only by your EJB's you 
 have 2 options:
 
 1. Package them into the same .JAR file as your EJBs
 
 2. Package them into a separate file and use the classpath in the 
 manifest for your EJB.jar
 
  
 
 To understand why you are having a problem, you need to read a little 
 about how classloaders are used and what is their hierarchy.  (Honestly, 
 I don't remember where I found this information). 
 
  
 
 At the base of it all is the system classloader.  This is the one which 
 uses CLASSPATH environment to identify location of classes.  On top of 
 it is your EJB-ClassLoader for a particular application.  On top of the 
 EJB-class loader is a WEB-ClassLoader for every web application you deploy.
 
  
 
 Thus if you put something into WEB-INF/lib your EJB-ClassLoader will not 
 be able to find it.  This is why you are getting this error.
 
  
 
 Re-evaluate your packaging scheme to avoid ANY library path 
 configuration settings in orion-application.xml  I have developed an 
 application which uses .EAR with a number of .WAR's and a number of EJB 
 .JARs without having to configure any additional paths.  This really 
 makes deployment easy.
 
  
 
 -AP_
 http://www.alexparansky.com http://www.alexparansky.com/
 Java/J2EE Architect/Consultant
 http://www.myprofiles.com/member/view.do?profileId=127
 
 -Original Message-
 *From:* [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]*On Behalf Of *Roxanne
 Tapia
 *Sent:* Thursday, April 04, 2002 7:49 AM
 *To:* Orion-Interest
 *Subject:* Re: classpath problem with ear file
 
 Thanks!  That worked
 
 A further note - for anyone who has the same sort of problem, here's
 what I did;
 
 I changed the orion-application.xml file to say:
 library path=WebModule/WEB-INF/lib/ /
 
 the path is relative to the .ear file, it took me a while to figure
 that out.  I was trying to set the path from the j2ee/home
 directory.  I just didn't get it.  
 
 Thanks again!
 Roxanne
 
 
 
 Thomas Körner wrote:
 
Hi,

it is possible to set a library path in the orion-application.xml, which is
only valid in application. Use the following tag and place your jar-files
into the directory the path points towards.

library path=./lib/ /

Ciao TK
- Original Message -
From: Roxanne Tapia [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Wednesday, April 03, 2002 7:38 PM
Subject: classpath problem with ear file


I am deploying an ear file, which contains a war file.  The war file has
a jar in the WEB-INF/lib directory.

However, when I start the server, and it is deploying the ejb jars in
the same application - it says it can't find the classes in that jar file.

I saw this once before when some ancestor classes weren't found.  My
solution for that was to include those classes in each of the jar files.
  But in that case, there were only a couple of classes.

Is there some sort of initialization step that doesn't include the jars
in the web-inf/lib directory for the J2EE application?  Where do I put
these jars?  I can't put them in j2ee/home/lib, becasuse they could be
different between j2ee apps.

Thanks for your help,
Roxanne






 
 -- 
 
 ===
 Roxanne Tapia
 Bioscience Division (B-1)
 Los Alamos National Laboratory
 505-665-0206
 ===
 
 


-- 
Scott Farquhar :: [EMAIL PROTECTED]

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






Re: classpath problem with ear file

2002-04-04 Thread Roxanne Tapia



Thanks! That worked

A further note - for anyone who has the same sort of problem, here's what
I did;

I changed the orion-application.xml file to say:
 library path="WebModule/WEB-INF/lib/" /

the path is relative to the .ear file, it took me a while to figure that
out. I was trying to set the path from the j2ee/home directory. I just
didn't get it. 

Thanks again!
Roxanne



Thomas Krner wrote:
[EMAIL PROTECTED]">
  Hi,it is possible to set a library path in the orion-application.xml, which isonly valid in application. Use the following tag and place your jar-filesinto the directory the path points towards.library path="./lib/" /Ciao TK- Original Message -From: "Roxanne Tapia" [EMAIL PROTECTED]To: "Orion-Interest" [EMAIL PROTECTED]Sent: Wednesday, April 03, 2002 7:38 PMSubject: classpath problem with ear file
  
I am deploying an ear file, which contains a war file.  The war file hasa jar in the WEB-INF/lib directory.However, when I start the server, and it is deploying the ejb jars inthe same application - it says it can't find the classes in that jar file.I saw this once before when some ancestor classes weren't found.  Mysolution for that was to include those classes in each of the jar files.  But in that case, there were only a couple of classes.Is there some sort of initialization step that doesn't include the jarsin the web-inf/lib directory for the J2EE application?  Where do I putthese jars?  I can't put them in j2ee/home/lib, becasuse they could bedifferent between j2ee apps.Thanks for your help,Roxanne




-- 

===
Roxanne Tapia
Bioscience Division (B-1)
Los Alamos National Laboratory
505-665-0206
===






classpath problem with ear file

2002-04-03 Thread Roxanne Tapia

I am deploying an ear file, which contains a war file.  The war file has 
a jar in the WEB-INF/lib directory.

However, when I start the server, and it is deploying the ejb jars in 
the same application - it says it can't find the classes in that jar file.

I saw this once before when some ancestor classes weren't found.  My 
solution for that was to include those classes in each of the jar files. 
  But in that case, there were only a couple of classes.

Is there some sort of initialization step that doesn't include the jars 
in the web-inf/lib directory for the J2EE application?  Where do I put 
these jars?  I can't put them in j2ee/home/lib, becasuse they could be 
different between j2ee apps.

Thanks for your help,
Roxanne





Re: classpath problem with ear file

2002-04-03 Thread Thomas Körner

Hi,

it is possible to set a library path in the orion-application.xml, which is
only valid in application. Use the following tag and place your jar-files
into the directory the path points towards.

library path=./lib/ /

Ciao TK
- Original Message -
From: Roxanne Tapia [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Wednesday, April 03, 2002 7:38 PM
Subject: classpath problem with ear file


 I am deploying an ear file, which contains a war file.  The war file has
 a jar in the WEB-INF/lib directory.

 However, when I start the server, and it is deploying the ejb jars in
 the same application - it says it can't find the classes in that jar file.

 I saw this once before when some ancestor classes weren't found.  My
 solution for that was to include those classes in each of the jar files.
   But in that case, there were only a couple of classes.

 Is there some sort of initialization step that doesn't include the jars
 in the web-inf/lib directory for the J2EE application?  Where do I put
 these jars?  I can't put them in j2ee/home/lib, becasuse they could be
 different between j2ee apps.

 Thanks for your help,
 Roxanne








RE: Newbie Orion question - webapp problem

2002-04-02 Thread Ken Delong

I tried putting my shared.jar in the /lib, but to no avail.

Do you need to put a copy of the ejb-jar file in the /lib also?   

Also, Orion has never generated a default orion-web.xml for my app (it does
generate orion-ejb-jar.xml).  But there are no errors on deployment either.

Is there some way to turn on verbose error logging?


-Original Message-
From: Lachezar Dobrev [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 01, 2002 11:44 PM
To: Orion-Interest
Subject: Re: Newbie Orion question - webapp problem


  Like always the ClassPath is a server-specific setting. On orion you might
want to check orion-web.xml in the war file. For the template you might want
to use the one created by orion when the app is first deployed. Then you
should add
   classpath path=./path/to/classes/ /
  to the xml file.

  However due to many class-path issues emerging from the
deployment-redeployment/dynamic-proxy-generation and more, I would offer you
to put your library files in the lib directory of Orion. Thus you will have
no class-loading issues (unless you decide to use dedicated.connection).

  Have a nice try.
  Lachezar

 I'm trying to get Orion to run a web app that's part of an ear.

 I made the following changes:
 IN SERVER.XML
 application name=Majordomo path=C:\orion\autodeploy\Majordomo.ear
 auto-start=true /

 IN DEFAULT-WEB-SITE.XML
 web-app application=Majordomo name=MajordomoWeb.war
 root=/MajordomoWeb /

 IN THE EAR'S APPLICATION.XML
 module
 web
 web-uriMajordomoWeb.war/web-uri
 context-root/MajordomoWeb/context-root
 /web
 /module

 But when I hit http://localhost/MajordomoWeb/index, I get a 500: Internal
 Server Error and I can't find any output as to what the error is in any
of
 the log files.

 The EJB portion of the app, which I accessed with an Application Client,
 works fine.

 One other clue: I'm referencing other JAR files, and using the Manifest
 Class-Path attribute in the WAR file.  I tried putting the external JAR
into
 the /lib directory of the War, but that didn't work either.  Same error.

 Any help here?

 PS the EAR deploys into Sun's RI 1.3, and also into WebSphere 4.01.  It
 works fine there, so it must be an Orion configuration problem.
 ---
 Kenneth DeLong
 Senior Consultant
 Direct: 510-517-5839 (Cell)
 Fax: 972.789.1340

 Valtech Technologies, Inc.
 5080 Spectrum Drive
 Suite 1010 West
 Addison, Texas 75001
 www.valtech.com http://www.valtech.com

 transforming technology skills
 into sustainable business value







Newbie Orion question - webapp problem

2002-04-01 Thread Ken Delong

I'm trying to get Orion to run a web app that's part of an ear.

I made the following changes:
IN SERVER.XML
application name=Majordomo path=C:\orion\autodeploy\Majordomo.ear
auto-start=true /

IN DEFAULT-WEB-SITE.XML
web-app application=Majordomo name=MajordomoWeb.war
root=/MajordomoWeb /

IN THE EAR'S APPLICATION.XML
module
web
web-uriMajordomoWeb.war/web-uri
context-root/MajordomoWeb/context-root
/web
/module

But when I hit http://localhost/MajordomoWeb/index, I get a 500: Internal
Server Error and I can't find any output as to what the error is in any of
the log files.  

The EJB portion of the app, which I accessed with an Application Client,
works fine.

One other clue: I'm referencing other JAR files, and using the Manifest
Class-Path attribute in the WAR file.  I tried putting the external JAR into
the /lib directory of the War, but that didn't work either.  Same error.

Any help here?

PS the EAR deploys into Sun's RI 1.3, and also into WebSphere 4.01.  It
works fine there, so it must be an Orion configuration problem.
---
Kenneth DeLong
Senior Consultant
Direct: 510-517-5839 (Cell)
Fax: 972.789.1340 

Valtech Technologies, Inc.
5080 Spectrum Drive
Suite 1010 West
Addison, Texas 75001
www.valtech.com http://www.valtech.com

transforming technology skills
into sustainable business value 






Problem with datasource when orion under pressure??

2002-03-17 Thread Dillon, Ryan

Hi all,

I am having some problems stress testing an application that
i have ported to orion from jboss. We used Cocobase for CMP.
The app works fine, and if i run the test scripts (using webload) 
with a single user, everything is fine. As soon as i start pumping up the 
number of users i get some exceptions in the cocobase classes..

java.lang.NullPointerException
at thought.CocoBase.CocoPowder._$8578(CocoPowder.java:10081)
at thought.CocoBase.CocoPowder._$2004(CocoPowder.java:9839)
at thought.CocoBase.CocoPowder.select(CocoPowder.java:4894)
at
thought.CocoBase.CocoPowderPlugin20.select(CocoPowderPlugin20.java:12
43)
at thought.CocoBase.CocoPowder.selectAll(CocoPowder.java:4843)
at
thought.CocoBase.CocoPowderPlugin20.selectAll(CocoPowderPlugin20.java
:1189)


I think it may be something to do with the datasources and the way orion
handles
them. In Jboss it works fine.

I have 2 datasources that look like..

data-source
class=com.evermind.sql.DriverManagerDataSource
name=jdbc/BBDataSource
location=java:/BBWaOracleDS
xa-location=jdbc/xa/BBWaDataSource
ejb-location=jdbc/BBWaDataSource
connection-driver=oracle.jdbc.driver.OracleDriver
username=bb
password=bb
url=jdbc:oracle:thin:111.11.111.11:1521:CASIAPAC
inactivity-timeout=30
max-connections=10
wait-timeout=18
/

Anyone have any ideas??
Thanks


Ryan




Problem with Orion and classpaths

2002-03-15 Thread Tony K. Lawrence
Title: Message





Hi,
I have a WAR file 
that I can deploy in most web containers including Tomcat, jBoss, Resin, 
Weblogic to name a few. I tried to do the same in Orion1.5.2 but am having trouble with loading 
classes.
I have my jar's in 
th WEB-INF/lib directory which so far I've not had a problem. In Orion it 
doesn't seem to find the classes. I've even tried to compy the jars into 
the orion lib directory and that still desont work. I am very new to orion 
and not sure what else to try. This is how I configured the 
application.

Copied tools.jar 
into the orion directory
Copied my war file 
into the applications directory
Added web-module 
id="myapp" path="../applications/myapp.war" / to 
application.xml
Added 
web-app application="default" name="myapp" root="/myapp" / to 
default-web-site.xml

Now I can 
access the html and jsp pages but when I hit a servlet that requires the use of 
the external classes (in the WEB-INF/lib jars) I get a class not found 
exception. It's actually xerces.jar (which 
orion comes with)

Please, any 
suggestions welcome.
Thanks in 
advance,

Tony


StatefulSession Bean Deployment problem

2002-03-12 Thread Daniel Chandran

I am trying to deploy the cart application that comes with the
j2eetutorial  package from Sun (not the one
that comes with Orion) , and get the following error while deploying:

Auto-deploying cart (New server version detected)...
Auto-deploying cart-ejb.jar (No previous deployment found)...
CartHome_StatefulS
essionHomeWrapper1.java:29: class
com.evermind.server.ejb.StatefulSessionContext
 is an abstract class. It can't be instantiated.
StatefulSessionContext context = new StatefulSessionContext();
 ^
CartHome_StatefulSessionHomeWrapper1.java:92: class
com.evermind.server.ejb.Stat
efulSessionContext is an abstract class. It can't be instantiated.
StatefulSessionContext context = new StatefulSessionContext();
 ^

The same ear file deploys without any problem under the j2ee server.

Thanks,
Daniel G. Chandran
Reuters Online Solutions.





Re: StatefulSession Bean Deployment problem

2002-03-12 Thread Ray Harrison

Daniel -
Are you refering to the CartApp.ear from the j2ee tutorial for jdk1.3? If so, what is 
your Orion
version? It deploys (haven't tested the functionality) on 1.5.4. Keep in mind that ear 
file
deployment might be different across app servers if there are app-server specific 
components
contained in it. For instance if there are j2ee-ri specific requirements for this app 
(which I
believe there are), the app may deploy in Orion but you will have to then adjust the 
orion config
accordingly. Also keep in mind that Orion isn't yet j2ee1.3 certified and that 1.5.4 
was the first
release to add the up-to-date functionality of that spec and there are missing pieces 
and bugs
that they are working through at this point. (Just to keep in mind ;-)

Cheers
Ray
--- Daniel Chandran [EMAIL PROTECTED] wrote:
 I am trying to deploy the cart application that comes with the
 j2eetutorial  package from Sun (not the one
 that comes with Orion) , and get the following error while deploying:
 
 Auto-deploying cart (New server version detected)...
 Auto-deploying cart-ejb.jar (No previous deployment found)...
 CartHome_StatefulS
 essionHomeWrapper1.java:29: class
 com.evermind.server.ejb.StatefulSessionContext
  is an abstract class. It can't be instantiated.
 StatefulSessionContext context = new StatefulSessionContext();
  ^
 CartHome_StatefulSessionHomeWrapper1.java:92: class
 com.evermind.server.ejb.Stat
 efulSessionContext is an abstract class. It can't be instantiated.
 StatefulSessionContext context = new StatefulSessionContext();
  ^
 
 The same ear file deploys without any problem under the j2ee server.
 
 Thanks,
 Daniel G. Chandran
 Reuters Online Solutions.
 
 


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/




Re: StatefulSession Bean Deployment problem

2002-03-12 Thread Daniel Chandran


Ray,

Yes it is the CartApp.ear  from the j2ee tutorial.  And I am trying it
under Orion 1.5.4.   I rebuilt  the ear file without
the j2ee-ri specific files.   I set up a  tree similar to the hello-planet
tutorial, and modified the build.xml of
the tutorial to build the  ear.

Were you able to deploy under Orion 1.5.4, and if so what exactly are the
steps you followed.

Thanks,
Daniel



Daniel -
Are you refering to the CartApp.ear from the j2ee tutorial for jdk1.3? If
so, what is your Orion
version? It deploys (haven't tested the functionality) on 1.5.4. Keep in
mind that ear file
deployment might be different across app servers if there are app-server
specific components
contained in it. For instance if there are j2ee-ri specific requirements
for this app (which I
believe there are), the app may deploy in Orion but you will have to then
adjust the orion config
accordingly. Also keep in mind that Orion isn't yet j2ee1.3 certified and
that 1.5.4 was the first
release to add the up-to-date functionality of that spec and there are
missing pieces and bugs
that they are working through at this point. (Just to keep in mind ;-)

Cheers
Ray
--- Daniel Chandran [EMAIL PROTECTED] wrote:
 I am trying to deploy the cart application that comes with the
 j2eetutorial  package from Sun (not the one
 that comes with Orion) , and get the following error while deploying:

 Auto-deploying cart (New server version detected)...
 Auto-deploying cart-ejb.jar (No previous deployment found)...
 CartHome_StatefulS
 essionHomeWrapper1.java:29: class
 com.evermind.server.ejb.StatefulSessionContext
  is an abstract class. It can't be instantiated.
 StatefulSessionContext context = new StatefulSessionContext();
  ^
 CartHome_StatefulSessionHomeWrapper1.java:92: class
 com.evermind.server.ejb.Stat
 efulSessionContext is an abstract class. It can't be instantiated.
 StatefulSessionContext context = new StatefulSessionContext();
  ^

 The same ear file deploys without any problem under the j2ee server.

 Thanks,
 Daniel G. Chandran
 Reuters Online Solutions.




__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/







Re: StatefulSession Bean Deployment problem

2002-03-12 Thread Ray Harrison

Hi Daniel -
Like I said, I didn't look at it to see if it worked (doubt it does) I was just testing
functionality. I just added the ear file information to the server.xml file and tried 
deploying it
- I didn't rebuild it or anything like that (orion will ignore the j2ee-ri stuff) - 
just the basic
quick/dirty deployment.

Cheers
Ray
--- Daniel Chandran [EMAIL PROTECTED] wrote:
 
 Ray,
 
 Yes it is the CartApp.ear  from the j2ee tutorial.  And I am trying it
 under Orion 1.5.4.   I rebuilt  the ear file without
 the j2ee-ri specific files.   I set up a  tree similar to the hello-planet
 tutorial, and modified the build.xml of
 the tutorial to build the  ear.
 
 Were you able to deploy under Orion 1.5.4, and if so what exactly are the
 steps you followed.
 
 Thanks,
 Daniel
 
 
 
 Daniel -
 Are you refering to the CartApp.ear from the j2ee tutorial for jdk1.3? If
 so, what is your Orion
 version? It deploys (haven't tested the functionality) on 1.5.4. Keep in
 mind that ear file
 deployment might be different across app servers if there are app-server
 specific components
 contained in it. For instance if there are j2ee-ri specific requirements
 for this app (which I
 believe there are), the app may deploy in Orion but you will have to then
 adjust the orion config
 accordingly. Also keep in mind that Orion isn't yet j2ee1.3 certified and
 that 1.5.4 was the first
 release to add the up-to-date functionality of that spec and there are
 missing pieces and bugs
 that they are working through at this point. (Just to keep in mind ;-)
 
 Cheers
 Ray
 --- Daniel Chandran [EMAIL PROTECTED] wrote:
  I am trying to deploy the cart application that comes with the
  j2eetutorial  package from Sun (not the one
  that comes with Orion) , and get the following error while deploying:
 
  Auto-deploying cart (New server version detected)...
  Auto-deploying cart-ejb.jar (No previous deployment found)...
  CartHome_StatefulS
  essionHomeWrapper1.java:29: class
  com.evermind.server.ejb.StatefulSessionContext
   is an abstract class. It can't be instantiated.
  StatefulSessionContext context = new StatefulSessionContext();
   ^
  CartHome_StatefulSessionHomeWrapper1.java:92: class
  com.evermind.server.ejb.Stat
  efulSessionContext is an abstract class. It can't be instantiated.
  StatefulSessionContext context = new StatefulSessionContext();
   ^
 
  The same ear file deploys without any problem under the j2ee server.
 
  Thanks,
  Daniel G. Chandran
  Reuters Online Solutions.
 
 
 
 
 __
 Do You Yahoo!?
 Try FREE Yahoo! Mail - the world's greatest free email!
 http://mail.yahoo.com/
 
 
 


__
Do You Yahoo!?
Try FREE Yahoo! Mail - the world's greatest free email!
http://mail.yahoo.com/




Re: BigDecimal problem...

2002-03-04 Thread Daniele Arduini

Hi Nicolas,
seems like you caught a bug in the Postgresql's JDBC driver.
I had similar problem using the driver from Postgresql 7.1.3,
you can either upgrage your driver to version 7.2 or
apply the following patch and rebuild it:

===[ begin BigDecimal patch ]==
diff -urN jdbc.orig/org/postgresql/jdbc2/PreparedStatement.java 
jdbc/org/postgresql/jdbc2/PreparedStatement.java
--- jdbc.orig/org/postgresql/jdbc2/PreparedStatement.java   Fri Feb 16 17:45:00 
2001
+++ jdbc/org/postgresql/jdbc2/PreparedStatement.javaTue Nov 20 12:16:53 2001
@@ -259,7 +259,11 @@
  */
 public void setBigDecimal(int parameterIndex, BigDecimal x) throws 
SQLException
 {
+   if (x != null) {
 set(parameterIndex, x.toString());
+   } else {
+   set(parameterIndex, null);
+   }
 }

 /**
===[ end BigDecimal patch ]==




Nicolas Camut wrote:
 Thanks, but I have already mapped BigDecimal type in this database schema.
 As I'm using Postgres dbms for development I have mapped it as follows but
 without any success:
 
 type-mapping type=java.math.BigDecimal name=decimal /
 
 As far as the pk type is concerned it is not up to me, being an Orion user
 basically I've always used long types. Still my task is to port this
 application from Weblogic to Orion - J2EE protability ;).
 
 Anyways, thanks for helping me out.
 
 
 Nicolas
 
 -Original Message-
 From: The elephantwalker [mailto:[EMAIL PROTECTED]]
 Sent: 2. maaliskuuta 2002 22:23
 To: Orion-Interest
 Subject: RE: BigDecimal problem...
 
 
 This could be your database-scheme. I notice that most of the database
 schemas that come with Orion (look at the config/database-schemas) do not
 include a field for java.math.BigDecimal. However, the SapDB.xml schema
 does. Copy this bit into your database schema, and this will probably fix
 your problem:
 
 type-mapping type=java.math.BigDecimal name=fixed(15,15) /
 
 Why aren't you using Long as the pk? Many who use orion use Long's. This
 could be why you found this problem, because you were the first to use a
 BigDecimal as a pk.
 
 If you are new to Orion, come join us at www.elephantwalker.com. We have the
 largest and oldest Orion forum on the web.
 
 regards,
 
 the elephantwalker
 www.elephantwalker.com
 
 .ps There is an excellent document on database schemas in Orion at:
 
 http://www.orionserver.com/docs/database-schema-configuration/database-schem
 a-configuration.xml
 
 
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of Nicolas Camut
 Sent: Saturday, March 02, 2002 5:47 AM
 To: Orion-Interest
 Subject: BigDecimal problem...
 
 
 Hi,
 
 I'm having a really annoying problem with Orion. I'm importing an
 application from Weblogic to Orion. It consists of basic CMP EntityBeans so
 that I can test whether I can port a much bigger application. Anyways, those
 Beans use BigDecimal as Primary keys. 
 
 In the design of this application, some of those beans have a parenthood
 relationship as well as references to other beans. As the application should
 allow null parenthood for instance, the beans should store null value in the
 associated DB field.
 
 This being said, this test framework works fine with weblogic. As far as
 Orion is concerned, I get NullPointerExceptions when creating the beans,
 which by default have null references to other beans. As I found it weird I
 messed up with the automatically-generated classes -e.g.
 PersonBeanHome_EntityHomeWrapper14.java - and I found out that when a bean
 generates PreparedStatements and instanciates them, it checks whether String
 or Date fields are null and if so call the setNull(...) method, but does not
 for BigDecimal fields leading to the NullPointerException.
 
 Well, d'you have any idea how to walk round this?
 
 Thanks,
 
 Nicolas
  
  
 
 






RE: BigDecimal problem...

2002-03-03 Thread Nicolas Camut

Thanks, but I have already mapped BigDecimal type in this database schema.
As I'm using Postgres dbms for development I have mapped it as follows but
without any success:

type-mapping type=java.math.BigDecimal name=decimal /

As far as the pk type is concerned it is not up to me, being an Orion user
basically I've always used long types. Still my task is to port this
application from Weblogic to Orion - J2EE protability ;).

Anyways, thanks for helping me out.


Nicolas

-Original Message-
From: The elephantwalker [mailto:[EMAIL PROTECTED]]
Sent: 2. maaliskuuta 2002 22:23
To: Orion-Interest
Subject: RE: BigDecimal problem...


This could be your database-scheme. I notice that most of the database
schemas that come with Orion (look at the config/database-schemas) do not
include a field for java.math.BigDecimal. However, the SapDB.xml schema
does. Copy this bit into your database schema, and this will probably fix
your problem:

type-mapping type=java.math.BigDecimal name=fixed(15,15) /

Why aren't you using Long as the pk? Many who use orion use Long's. This
could be why you found this problem, because you were the first to use a
BigDecimal as a pk.

If you are new to Orion, come join us at www.elephantwalker.com. We have the
largest and oldest Orion forum on the web.

regards,

the elephantwalker
www.elephantwalker.com

.ps There is an excellent document on database schemas in Orion at:

http://www.orionserver.com/docs/database-schema-configuration/database-schem
a-configuration.xml



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Nicolas Camut
Sent: Saturday, March 02, 2002 5:47 AM
To: Orion-Interest
Subject: BigDecimal problem...


Hi,

I'm having a really annoying problem with Orion. I'm importing an
application from Weblogic to Orion. It consists of basic CMP EntityBeans so
that I can test whether I can port a much bigger application. Anyways, those
Beans use BigDecimal as Primary keys. 

In the design of this application, some of those beans have a parenthood
relationship as well as references to other beans. As the application should
allow null parenthood for instance, the beans should store null value in the
associated DB field.

This being said, this test framework works fine with weblogic. As far as
Orion is concerned, I get NullPointerExceptions when creating the beans,
which by default have null references to other beans. As I found it weird I
messed up with the automatically-generated classes -e.g.
PersonBeanHome_EntityHomeWrapper14.java - and I found out that when a bean
generates PreparedStatements and instanciates them, it checks whether String
or Date fields are null and if so call the setNull(...) method, but does not
for BigDecimal fields leading to the NullPointerException.

Well, d'you have any idea how to walk round this?

Thanks,

Nicolas
 
 





BigDecimal problem...

2002-03-02 Thread Nicolas Camut

Hi,

I'm having a really annoying problem with Orion I'm importing an
application from Weblogic to Orion It consists of basic CMP EntityBeans so
that I can test whether I can port a much bigger application Anyways, those
Beans use BigDecimal as Primary keys 

In the design of this application, some of those beans have a parenthood
relationship as well as references to other beans As the application should
allow null parenthood for instance, the beans should store null value in the
associated DB field

This being said, this test framework works fine with weblogic As far as
Orion is concerned, I get NullPointerExceptions when creating the beans,
which by default have null references to other beans As I found it weird I
messed up with the automatically-generated classes -eg
PersonBeanHome_EntityHomeWrapper14java - and I found out that when a bean
generates PreparedStatements and instanciates them, it checks whether String
or Date fields are null and if so call the setNull() method, but does not
for BigDecimal fields leading to the NullPointerException

Well, d'you have any idea how to walk round this?

Thanks,

Nicolas
 
 




RE: BigDecimal problem...

2002-03-02 Thread The elephantwalker

This could be your database-scheme. I notice that most of the database schemas that 
come with Orion (look at the config/database-schemas) do not include a field for 
java.math.BigDecimal. However, the SapDB.xml schema does. Copy this bit into your 
database schema, and this will probably fix your problem:

type-mapping type=java.math.BigDecimal name=fixed(15,15) /

Why aren't you using Long as the pk? Many who use orion use Long's. This could be why 
you found this problem, because you were the first to use a BigDecimal as a pk.

If you are new to Orion, come join us at www.elephantwalker.com. We have the largest 
and oldest Orion forum on the web.

regards,

the elephantwalker
www.elephantwalker.com

.ps There is an excellent document on database schemas in Orion at:

http://www.orionserver.com/docs/database-schema-configuration/database-schema-configuration.xml



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Nicolas Camut
Sent: Saturday, March 02, 2002 5:47 AM
To: Orion-Interest
Subject: BigDecimal problem...


Hi,

I'm having a really annoying problem with Orion. I'm importing an
application from Weblogic to Orion. It consists of basic CMP EntityBeans so
that I can test whether I can port a much bigger application. Anyways, those
Beans use BigDecimal as Primary keys. 

In the design of this application, some of those beans have a parenthood
relationship as well as references to other beans. As the application should
allow null parenthood for instance, the beans should store null value in the
associated DB field.

This being said, this test framework works fine with weblogic. As far as
Orion is concerned, I get NullPointerExceptions when creating the beans,
which by default have null references to other beans. As I found it weird I
messed up with the automatically-generated classes -e.g.
PersonBeanHome_EntityHomeWrapper14.java - and I found out that when a bean
generates PreparedStatements and instanciates them, it checks whether String
or Date fields are null and if so call the setNull(...) method, but does not
for BigDecimal fields leading to the NullPointerException.

Well, d'you have any idea how to walk round this?

Thanks,

Nicolas
 
 





shutdown problem

2002-02-27 Thread Jose Mena

Hi, i 'm having problems when shuting down my orion server. It's an orion
1.5.2 under debian linux(2.2.17 kernel version).
this is the command i launch to stop it:
$JAVARUN -jar admin.jar ormi://localhost/ admin OptiPlex -shutdown force
but sometimes it doesn't stop the server.
do you know another way to stop it?
thanks.





Re: shutdown problem

2002-02-27 Thread Scott Farquhar

Jose,

The script located in this article might be of help:
   http://kb.atlassian.com/content/orionsupport/articles/unixprocess.html

Look under the heading Starting and Stopping.

Cheers,
Scott

Jose Mena wrote:

 Hi, i 'm having problems when shuting down my orion server. It's an orion
 1.5.2 under debian linux(2.2.17 kernel version).
 this is the command i launch to stop it:
 $JAVARUN -jar admin.jar ormi://localhost/ admin OptiPlex -shutdown force
 but sometimes it doesn't stop the server.
 do you know another way to stop it?
 thanks.
 
 
 
 


-- 
Scott Farquhar :: [EMAIL PROTECTED]

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






Re: Orion 1.5.4 Local/LocalHome with BMP - deployment problem

2002-02-20 Thread Morten Wilken



im very impressed with ed romans enterprise 
javabeans 2.0... one of the best computerbooks ive ever read.

sincerely
morten wilken

  - Original Message - 
  From: 
  B.Adji 
  Maharyatno 
  To: Orion-Interest 
  Sent: Wednesday, February 20, 2002 7:04 
  AM
  Subject: RE: Orion 1.5.4 Local/LocalHome 
  with BMP - deployment problem
  
  Can 
  add:
  
  Special Edition Using EJB 2.0 [Que].
  
  Professional Java EE 1.3 is kind of everything-in-one, not so focus on 
  EJB development.
  I 
  like the Enterprise Javabeans 3ed, OReilly most, as it's easy to bring for 
  travel but covers EJB in neutral way (or at least to Sun J2EE RI 
  1.3).
  Others, I found rather specific to other EJB implementation. 
  
  The 
  author also provide workbook for implementation to EJB Containers (like WL, WS 
  and J2EE RI).
  
  Another book specific to Oracle implementation (which quite similiar to 
  Orion), is Oracle9i Web Development.
  
  Cheers.
  
  
-Original Message-From: Jorge De Flon 
[mailto:[EMAIL PROTECTED]]Sent: Wednesday, February 20, 2002 
9:53 AMTo: Orion-InterestSubject: Re: Orion 1.5.4 
Local/LocalHome with BMP - deployment problem
Mastering EJB 2ed (Ed Roman, etc.) [AW]
Enterprise Java Beans de Oreilly 3ed
Professional EJB wrox
Professional Java EE 1.3 [Wrox]

I am just reading them all and I like the first the most
regards




  - Original Message - 
  From: 
  Robert S. 
  Sfeir 
  To: Orion-Interest 
  Sent: Tuesday, February 19, 2002 
  11:41 AM
  Subject: Re: Orion 1.5.4 
  Local/LocalHome with BMP - deployment problem
  
  2) can u pls suggest some good 
  books/online material to EJB basics
  
  http://developer.java.sun.com/developer/onlineTraining/Beans/EJBTutorial/


Re: BMP Entity Bean Performance Problem

2002-02-20 Thread Scott Farquhar

Tim,

As I am not sure of the exact nature of your entity beans, I can't give 
you any detailed suggestions, but many people impement a 'dirty' flag in 
their code.

eg:

void setName(String name)
{
dirty=true;
this.name = name;
}

ejbStore()
{
   if (!dirty)
   return;
   else
   {
 doUpdate();
 dirty=false;
   }
}

This limits the number of updates that you are doing.

I assume that you have a very good reason for using BMP, but I would 
suggest that you use CMP where possible.  The performance benefits are 
quite large.

Cheers,
Scott

Tim Kang wrote:

 Hi
 
 I am using JSP (client) and BMP Entity beans (for mysql db) in my
 application. I am having a few problems in terms of performance.
 
 1. When I call homeObject.findAll() for the first time, ejbLoad() is invoked
 for every row in the database. I know this only happens once so I can
 tolerate this but I am open to suggestions.
 
 2. Once the entity beans are loaded, I call
 homeObject.findByPrimaryKey().getSomeAttribute(). This calls ejbStore() for
 every row in the database as well. This is not acceptable as the EJB is
 performing UPDATE * number of rows in DB.
 
 I tried to solve this by implementing a stateful session bean acts a middle
 layer between JSP and entity beans. However, the problem still exists
 
 My session bean code:
 
 public class PubcompanyManagerBean implements SessionBean{
 
   private SessionContext context;
 
   private PubCompany pubcompany;
   private PubCompanyHome pubcompanyhome;
 
   public void ejbCreate() throws NamingException, RemoteException {}
 
   public void ejbRemove() {}
   public void ejbActivate() {}
   public void ejbPassivate() {}
   public void setSessionContext(SessionContext sc) {
 context = sc;
   }
 
   // Business logic methods
   public Collection getAllPubCompanies() throws NamingException,
 RemoteException, FinderException {
 Context context = new InitialContext();
 pubcompanyhome = (PubCompanyHome)PortableRemoteObject.narrow(
   context.lookup(java:comp/env/crm/PubCompany), PubCompanyHome.class);
 Collection companyList = pubcompanyhome.findAll();
 return companyList;
   }
 
   public PubCompany getPubCompany(String companyid) throws NamingException,
 RemoteException, FinderException {
 Context context = new InitialContext();
 pubcompanyhome = (PubCompanyHome)PortableRemoteObject.narrow(
   context.lookup(java:comp/env/crm/PubCompany), PubCompanyHome.class);
 pubcompany = pubcompanyhome.findByPrimaryKey(companyid);
 return pubcompany;
   }
 }
 
 
 Thanks in advance,
 
 Tim
 
 
 
 


-- 
Scott Farquhar :: [EMAIL PROTECTED]

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





RE: Orion 1.5.4 Local/LocalHome with BMP - deployment problem

2002-02-19 Thread Kutzera, Dieter-Norbert



You 
can use findBy- and create-Methods but not additional ejbHome-Methods which are 
new in EJB2.0 spec.

Dieter

  -Original Message-From: David Tunkrans 
  [mailto:[EMAIL PROTECTED]]Sent: Montag, 18. Februar 2002 
  18:29To: Orion-InterestSubject: Re: Orion 1.5.4 
  Local/LocalHome with BMP - deployment problem
  Thanks for the reply. Does this mean that you 
  cantuse findBy-methods on the localhome inteface? 
  
  /David
  
  public interface ProductLocalHome extends 
  EJBLocalHome{ public static final String PRODUCT = 
  "ejb/ProductLocal"; public static final String JNDI_PRODUCT = 
  "java:comp/env/ejb/ProductLocal";
  
   /** * * 
  @param name  * @return  */ public 
  ProductLocal findByPrimaryKey(Integer id) throws 
  FinderException;}
  
  
  - Original Message - 
  
From: 
Kutzera, Dieter-Norbert 

To: Orion-Interest 
Sent: Monday, February 18, 2002 4:05 
PM
Subject: RE: Orion 1.5.4 
Local/LocalHome with BMP - deployment problem

... are you using ejbHome-methods? I think there is a bug in 
orion 1.5.4 . It it not possible to use ejbHome-methods in local 
home-interfaces. When you remove the declaration of this methods everythink 
should work.

I 
hopethe bug is fixes rapidly!

Dieter

  -Original Message-From: David Tunkrans 
  [mailto:[EMAIL PROTECTED]]Sent: Sonntag, 17. Februar 2002 
  14:17To: Orion-InterestSubject: Orion 1.5.4 
  Local/LocalHome with BMP - deployment problem
  EntityBean with BMP and Local/LocalHome etc. 
  Doesnt compile, some internal error...
  
  Does anyone have an ideaof what could 
  be the cause of the error?
  
  /David
  
  Auto-unpacking 
  E:\cygwin\usr\local\java\orion\applications\app.ear... 
  done.Auto-unpacking 
  E:\cygwin\usr\local\java\orion\applications\app\webApp.war... 
  done.Auto-deploying app (Assembly had been 
  updated)...Auto-deploying product.jar (No previous deployment 
  found)...Found 1 semantic error compiling 
  "E:/cygwin/usr/local/java/orion/ProductLocalHome_EntityHomeWrapper31.java":
  
   156. EvermindEntityContext 
  finderContext = 
  this.getContextInstance(thread); 
  -*** Error: The method 
  "com.evermind.server.ejb.EvermindEntityContext 
  getContextInstance(com.evermind.server.ThreadState $1);" can throw 
  thechecked exception "java/rmi/RemoteException", but its invocation is 
  neither enclosed in a try statement that can catch that exception nor 
  ithe body of a method or constructor that "throws" that 
  exception.Error compiling 
  E:\cygwin\usr\local\java\orion\applications\app/product.jar: Error in 
  source
  


Re: Orion 1.5.4 Local/LocalHome with BMP - deployment problem

2002-02-19 Thread Robert S. Sfeir



2) can u pls suggest some good books/online 
material to EJB basics

http://developer.java.sun.com/developer/onlineTraining/Beans/EJBTutorial/


RE: Orion 1.5.4 Local/LocalHome with BMP - deployment problem

2002-02-18 Thread Kutzera, Dieter-Norbert



... are you using ejbHome-methods? I think there is a bug in orion 
1.5.4 . It it not possible to use ejbHome-methods in local home-interfaces. When 
you remove the declaration of this methods everythink should 
work.

I 
hopethe bug is fixes rapidly!

Dieter

  -Original Message-From: David Tunkrans 
  [mailto:[EMAIL PROTECTED]]Sent: Sonntag, 17. Februar 2002 
  14:17To: Orion-InterestSubject: Orion 1.5.4 
  Local/LocalHome with BMP - deployment problem
  EntityBean with BMP and Local/LocalHome etc. 
  Doesnt compile, some internal error...
  
  Does anyone have an ideaof what could be 
  the cause of the error?
  
  /David
  
  Auto-unpacking 
  E:\cygwin\usr\local\java\orion\applications\app.ear... done.Auto-unpacking 
  E:\cygwin\usr\local\java\orion\applications\app\webApp.war... 
  done.Auto-deploying app (Assembly had been updated)...Auto-deploying 
  product.jar (No previous deployment found)...Found 1 semantic error 
  compiling 
  "E:/cygwin/usr/local/java/orion/ProductLocalHome_EntityHomeWrapper31.java":
  
   156. EvermindEntityContext 
  finderContext = 
  this.getContextInstance(thread); 
  -*** Error: The method 
  "com.evermind.server.ejb.EvermindEntityContext 
  getContextInstance(com.evermind.server.ThreadState $1);" can throw 
  thechecked exception "java/rmi/RemoteException", but its invocation is 
  neither enclosed in a try statement that can catch that exception nor 
  ithe body of a method or constructor that "throws" that 
  exception.Error compiling 
  E:\cygwin\usr\local\java\orion\applications\app/product.jar: Error in 
  source
  


Re: Orion 1.5.4 Local/LocalHome with BMP - deployment problem

2002-02-18 Thread David Tunkrans



Thanks for the reply. Does this mean that you 
cantuse findBy-methods on the localhome inteface? 

/David

public interface ProductLocalHome extends 
EJBLocalHome{ public static final String PRODUCT = 
"ejb/ProductLocal"; public static final String JNDI_PRODUCT = 
"java:comp/env/ejb/ProductLocal";

 /** * * 
@param name  * @return  */ public 
ProductLocal findByPrimaryKey(Integer id) throws 
FinderException;}


- Original Message - 

  From: 
  Kutzera, Dieter-Norbert 
  
  To: Orion-Interest 
  Sent: Monday, February 18, 2002 4:05 
  PM
  Subject: RE: Orion 1.5.4 Local/LocalHome 
  with BMP - deployment problem
  
  ... are you using ejbHome-methods? I think there is a bug in 
  orion 1.5.4 . It it not possible to use ejbHome-methods in local 
  home-interfaces. When you remove the declaration of this methods everythink 
  should work.
  
  I 
  hopethe bug is fixes rapidly!
  
  Dieter
  
-Original Message-From: David Tunkrans 
[mailto:[EMAIL PROTECTED]]Sent: Sonntag, 17. Februar 2002 
14:17To: Orion-InterestSubject: Orion 1.5.4 
Local/LocalHome with BMP - deployment problem
EntityBean with BMP and Local/LocalHome etc. 
Doesnt compile, some internal error...

Does anyone have an ideaof what could be 
the cause of the error?

/David

Auto-unpacking 
E:\cygwin\usr\local\java\orion\applications\app.ear... 
done.Auto-unpacking 
E:\cygwin\usr\local\java\orion\applications\app\webApp.war... 
done.Auto-deploying app (Assembly had been updated)...Auto-deploying 
product.jar (No previous deployment found)...Found 1 semantic error 
compiling 
"E:/cygwin/usr/local/java/orion/ProductLocalHome_EntityHomeWrapper31.java":

 156. EvermindEntityContext 
finderContext = 
this.getContextInstance(thread); 
-*** Error: The method 
"com.evermind.server.ejb.EvermindEntityContext 
getContextInstance(com.evermind.server.ThreadState $1);" can throw 
thechecked exception "java/rmi/RemoteException", but its invocation is 
neither enclosed in a try statement that can catch that exception nor 
ithe body of a method or constructor that "throws" that 
exception.Error compiling 
E:\cygwin\usr\local\java\orion\applications\app/product.jar: Error in 
source



RE: problem with ResultSet Object

2002-02-17 Thread Dvornikov Victor

CachedRowSet doesn't participate in transactions as it is teared-off
object and it stores stale (old) data. For high-volume concurrent updating
requests use it with care ( or better not to use if you are not sure ).
 I use it for read-only data infrequent access.
 
-Original Message-
From:   sachin mahajan [SMTP:[EMAIL PROTECTED]]
Sent:15  2002 6:32
To: Orion-Interest
Subject:Re: problem with ResultSet Object

Hello
Thanks. Can u explain me if i will use CachedRowSet object instead
of
ResultSet object.
How my application is affected and it is scalable or not.

sachin
- Original Message -
From: Dvornikov Victor [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Thursday, February 14, 2002 1:48 PM
Subject: RE: problem with ResultSet Object


 ResultSEt is not a serializable object. For RMI purpose use
CachedRowSet
 object  Take into account that this object is not for scalable
 applications!

 -Original Message-
 From: sachin mahajan [SMTP:[EMAIL PROTECTED]]
 Sent:  14  2002 6:51
 To: Orion-Interest
 Cc: sachin mahajan
 Subject: problem with ResultSet Object

 Dear Sir
 Currently i am working om the orion server.
 i have deployed my application properly.
 But i am facing some problem with transfering ResultSet object
from
 my
 EJB to jsp . It error i am facing is
 this


 inside basedl The statement is
 oracle.jdbc.driver.OracleStatement@9617f825
 inside basedl The resultset  is
 oracle.jdbc.driver.OracleResultSet@c72ff82a
 Resultset is before returning :***
 oracle.jdbc.driver.OracleResultSet@c72ff82a

 inside buildselect exception is

 com.evermind.server.rmi.OrionRemoteException: Error
(de-)serializing
 object: ora
 cle.jdbc.driver.OracleResultSet
 at com.evermind.server.ejb.EJBUtils.cloneObject(Unknown
 Source)
 at

ConnectionPool_StatelessSessionBeanWrapper0.read(ConnectionPool_State
 lessSessionBeanWrapper0.java, Compiled Code)


 can any body tell me how to solve this problem
 Waiting for your reply..
 regds
 sachin


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





RE: getClass().getClassLoader().getResource(fileName) problem

2002-02-15 Thread Owen Fellows

I Believe the Orion directory is the root for File access.
Or at least it was for me as I started the server up from there.

Hope this helps.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Min-Hua Luo
Sent: 15 February 2002 03:33
To: Orion-Interest
Subject: getClass().getClassLoader().getResource(fileName) problem


Hi,

  I tried to open a property file from within my
custom UserManager program, however, Orion was unable
to find my file. I just don't know where should I put
my property file so it can be located by the following
command:

props_ = new Properties();
try {
  URL aURL =
getClass().getClassLoader().getResource(fileName);
  InputStream in = (InputStream)aURL.openStream();
  props_.load(in);

Thanks a lot.

__
Do You Yahoo!?
Got something to say? Say it better with Yahoo! Video Mail 
http://mail.yahoo.com




Re: problem with ResultSet Object

2002-02-14 Thread Jorge Jimenez C



Sachin:

I think you have a design problem. 
Please,anyone correct me if you think i'm wrong.

From inside a JSP page you should not access a 
recordset returned by an EJB. EJB components represent mostly bussines objects 
that contains rules and data access services. From outside the EJB (from a JSP 
page or remote client) the data that this component encapsulates should be 
accesed using services that returns serializable data types (objects thart 
starts with an uppercase or even another EJBS throught it's remote 
interface).

In design terms, you are innecesarily coupling 
presentation layer with data layer if you return a ResultSet. Capture the 
resultset in private variables of your EJB and provide "getter"services if 
it is a stateful bean, or you can returna Hashtable with attributes if it 
is a stateless one.

Hope this can help you.

JJ

  - Original Message - 
  From: 
  sachin 
  mahajan 
  To: Orion-Interest 
  Cc: sachin 
  mahajan 
  Sent: Thursday, February 14, 2002 1:50 
  AM
  Subject: problem with ResultSet 
  Object
  
  Dear Sir
  Currently i am workingom the orion 
  server.
  i have deployed my application 
  properly.
  But i am facing some problem with transfering 
  ResultSet object from my
  EJB to jsp . It error i am facing is
  this
  
  
  inside basedl The statement is 
  oracle.jdbc.driver.OracleStatement@9617f825inside basedl The 
  resultset is 
  oracle.jdbc.driver.OracleResultSet@c72ff82aResultset is before returning 
  :*** oracle.jdbc.driver.OracleResultSet@c72ff82a
  inside buildselect exception is
  com.evermind.server.rmi.OrionRemoteException: 
  Error (de-)serializing object: 
  oracle.jdbc.driver.OracleResultSet 
  at com.evermind.server.ejb.EJBUtils.cloneObject(Unknown 
  Source) at 
  ConnectionPool_StatelessSessionBeanWrapper0.read(ConnectionPool_StatelessSessionBeanWrapper0.java, 
  Compiled Code)
  
  
  can any body tell me how to solve this 
  problem
  
  Waiting for your reply..
  regds
  sachin


Re: problem with ResultSet Object

2002-02-14 Thread Kesav Kumar



ResultSet is not a seralizable object. 
ResultSet is opened cursor to the database. If you want to pass ResultSet 
to client i.e jsp/servlet either conver the ResultSet data into you own custom 
objects or collection classes. The other alternate is to use 
CachedRowSet. CachedRowset is serializable object and contains all the 
information what ResultSet contains. You can get more information on 
RowSet at http://www.javaworld.com/javaworld/jw-02-2001/jw-0202-cachedrow.html

-kesav


  - Original Message - 
  From: 
  sachin 
  mahajan 
  To: Orion-Interest 
  Cc: sachin mahajan 
  Sent: Wednesday, February 13, 2002 8:50 
  PM
  Subject: problem with ResultSet 
  Object
  
  Dear Sir
  Currently i am workingom the orion 
  server.
  i have deployed my application 
  properly.
  But i am facing some problem with transfering 
  ResultSet object from my
  EJB to jsp . It error i am facing is
  this
  
  
  inside basedl The statement is oracle.jdbc.driver.OracleStatement@9617f825inside 
  basedl The resultset is oracle.jdbc.driver.OracleResultSet@c72ff82aResultset 
  is before returning :*** oracle.jdbc.driver.OracleResultSet@c72ff82a
  inside buildselect exception is
  com.evermind.server.rmi.OrionRemoteException: 
  Error (de-)serializing object: 
  oracle.jdbc.driver.OracleResultSet 
  at com.evermind.server.ejb.EJBUtils.cloneObject(Unknown 
  Source) at 
  ConnectionPool_StatelessSessionBeanWrapper0.read(ConnectionPool_StatelessSessionBeanWrapper0.java, 
  Compiled Code)
  
  
  can any body tell me how to solve this 
  problem
  
  Waiting for your reply..
  regds
  sachin


Problem on Netscape Browser - Document Contained No Data

2002-02-14 Thread Marc Rabil

I have an application that uses a custom user manager and form-based
authentication on Orion 1.3.8.  Things work great with Internet Explorer,
but with Netscape 4.7, the browser pops up a Document Contained No Data
error when attempting to login - as if its not getting anything back from
the server.  If I turn security off and request the same URL, I get right
in.

Anybody have any idea what is causing this?  Thanks in advance,

Marc





Re: Problem on Netscape Browser - Document Contained No Data

2002-02-14 Thread John Hogan

try an html meta tab spcifying noCache

-Original Message-
From: Marc Rabil [EMAIL PROTECTED]
Date: Thu, 14 Feb 2002 14:50:56 -0500
To: Orion-Interest [EMAIL PROTECTED]
Subject: Problem on Netscape Browser - Document Contained No Data 


 I have an application that uses a custom user manager and form-based
 authentication on Orion 1.3.8.  Things work great with Internet Explorer,
 but with Netscape 4.7, the browser pops up a Document Contained No Data
 error when attempting to login - as if its not getting anything back from
 the server.  If I turn security off and request the same URL, I get right
 in.
 
 Anybody have any idea what is causing this?  Thanks in advance,
 
 Marc
 
 
 

-- 

___
Get your premium email from http://www.ireland.com/email





getClass().getClassLoader().getResource(fileName) problem

2002-02-14 Thread Min-Hua Luo

Hi,

  I tried to open a property file from within my
custom UserManager program, however, Orion was unable
to find my file. I just don't know where should I put
my property file so it can be located by the following
command:

props_ = new Properties();
try {
  URL aURL =
getClass().getClassLoader().getResource(fileName);
  InputStream in = (InputStream)aURL.openStream();
  props_.load(in);

Thanks a lot.

__
Do You Yahoo!?
Got something to say? Say it better with Yahoo! Video Mail 
http://mail.yahoo.com




Re: problem with ResultSet Object

2002-02-14 Thread sachin mahajan

Hello
Thanks. Can u explain me if i will use CachedRowSet object instead of
ResultSet object.
How my application is affected and it is scalable or not.

sachin
- Original Message -
From: Dvornikov Victor [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Thursday, February 14, 2002 1:48 PM
Subject: RE: problem with ResultSet Object


 ResultSEt is not a serializable object. For RMI purpose use CachedRowSet
 object  Take into account that this object is not for scalable
 applications!

 -Original Message-
 From: sachin mahajan [SMTP:[EMAIL PROTECTED]]
 Sent:  14  2002 6:51
 To: Orion-Interest
 Cc: sachin mahajan
 Subject: problem with ResultSet Object

 Dear Sir
 Currently i am working om the orion server.
 i have deployed my application properly.
 But i am facing some problem with transfering ResultSet object from
 my
 EJB to jsp . It error i am facing is
 this


 inside basedl The statement is
 oracle.jdbc.driver.OracleStatement@9617f825
 inside basedl The resultset  is
 oracle.jdbc.driver.OracleResultSet@c72ff82a
 Resultset is before returning :***
 oracle.jdbc.driver.OracleResultSet@c72ff82a

 inside buildselect exception is

 com.evermind.server.rmi.OrionRemoteException: Error (de-)serializing
 object: ora
 cle.jdbc.driver.OracleResultSet
 at com.evermind.server.ejb.EJBUtils.cloneObject(Unknown
 Source)
 at
 ConnectionPool_StatelessSessionBeanWrapper0.read(ConnectionPool_State
 lessSessionBeanWrapper0.java, Compiled Code)


 can any body tell me how to solve this problem
 Waiting for your reply..
 regds
 sachin


_
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com





Re: getClass().getClassLoader().getResource(fileName) problem

2002-02-14 Thread Oleg Bivol

if your file.ini is in c:\orion try the following:

  String path = c:\orion\file.ini;
  Properties props = new Properties();
  props.load(new FileInputStream(path));

- Original Message - 
From: Min-Hua Luo [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Friday, February 15, 2002 5:32 AM
Subject: getClass().getClassLoader().getResource(fileName) problem


 Hi,
 
   I tried to open a property file from within my
 custom UserManager program, however, Orion was unable
 to find my file. I just don't know where should I put
 my property file so it can be located by the following
 command:
 
 props_ = new Properties();
 try {
   URL aURL =
 getClass().getClassLoader().getResource(fileName);
   InputStream in = (InputStream)aURL.openStream();
   props_.load(in);
 
 Thanks a lot.
 
 __
 Do You Yahoo!?
 Got something to say? Say it better with Yahoo! Video Mail 
 http://mail.yahoo.com





Problem with starting the server

2002-02-08 Thread sachin mahajan

When i start the server with this command

java -Dhttp.Cluster.debug=true -Dcluster.debug=true
-jar orion.jar

The server output is

A nonfatal internal JIT (3.10.107(x)) error
'Relocation error: NULL
relocation
target' has occurred in :
  'org/apache/crimson/parser/Parser2.maybeComment
(Z)Z': Interpreting
method.
  Please report this error in detail to
http://java.sun.com/cgi-bin/bugreport.cgi

Warning: Error reading transaction-log file
(/F:/orion/persistence/transaction.s
tate) for recovery: premature end of file
Forced or abrubt (crash etc) server shutdown detected,
starting recovery
process
...
Recovery completed, 0 connections committed and 0
rolled back...
Orion/1.5.2 initialized


i am not able to understand why this o/p is coming
can anybody give me the solution .

sachin



__
Do You Yahoo!?
Send FREE Valentine eCards with Yahoo! Greetings!
http://greetings.yahoo.com




ejb load problem

2002-02-04 Thread Manoj Sadangi

HI,
we are running orion app server with one mdb and couple of session 
bean and entity bean. Once there is message received by the reciever mdb 
it creates the beans and the message gets processed and published to the 
topic again.
This works fine as long as the traffic is not high. But If  the no of 
messages increases the MDB receives them all and starts creating the 
beans (which makes the server crash.)

I set the receiver mdb to a certain max number but that also did not work.

any suggestion would be a great help.

thanks,
manoj.





jsp:forward problem on Mac IE.

2002-02-01 Thread Fredrik Lundin

Hi all!

We're encountering a problem when using Mac and IE 4.5+ with our
application.

We have a jsp that uses jsp:forward to a servlet (tried the usual
RequestDispatcher aswell), the problem is that the servlet gets
requested twice, and request loses all parameters the second time, wich
causes problems for us. 

This only occur with IE on Mac, Netscape is doing well (for once..) 

we could do some ugly-code workaround, but that is not what we want.
.. or we could just tell all mac-users to use real computers :-)

Has anybody else had this problem, and/or does anybody have ideas for
fixing this?

Thanks !
/ Fredrik






Re: jsp:forward problem on Mac IE.

2002-02-01 Thread Rafael Alvarez

Hello Fredrik,
Congrats! You have encounter an error that is not your's nor orion's.
The problems is in the way IE4.5 for Mac parse the http header.

I posted and issue at www.elephantwalker.com. Check it out at
http://www.elephantwalker.com/searchresult?id=162
(Note: elephantwalker registration is free)

After searching lots of forums I found out that a lot of people had
problems with forward (not only with orion) on Mac and IE 4.5. So,
I suggest that you start coding the ugly-code workaround.

What I did was to wrap my forward call into a include/redirect
combination.

Sorry I can't be of more help, and good luck.

-- 
Best regards,
 Rafael Alvares
 mailto:[EMAIL PROTECTED]







Problem with user manager

2002-01-31 Thread JoseMa




 I've implemented a user manager 
class and it works well. I've configured this user manager class in 
orion-application.xml. This user manager works with the webs 
applications.

 I've implemented a client 
application and I want to connect remotetly. I've configured a context and I've 
put a user and password defined in principals.xml.

 My problem is that the remote 
connection doesn't work and the messager is :

  
 Invalid username/password for application 
login

 If I comment the user manager 
tag the client application cant connect but the autentication of web application 
doesn't work.

 What can I do?

 Could you help me?

 



problem with database connection

2002-01-31 Thread Jose Mena

Hi you all,
i have a question. I have an oracle data-source configured on a 1.5.2 orion
server. Here you are:
data-sources
data-source class=com.evermind.sql.DriverManagerDataSource
name=IMS
location=jdbc/IMSCoreDS
xa-location=jdbc/xa/IMSXADS
ejb-location=jdbc/IMSDS
schema=database-schemas/oracle.xml
connection-driver=oracle.jdbc.driver.OracleDriver
username=user
password=password
url=jdbc:oracle:thin:@10.3.1.6:port:SID
inactivity-timeout=30
/
/data-sources
It works fine. But the problem comes when i have a network problem to
connect to the data-base. Then orion isn't able to make a connection and
instead of giving up connecting after 3 attemps(as i read this is the
default value for the max-connect-attempts) it gets hanged up trying to
connect. is there any way to tell orion a connection timeout for oracle
connections?
Thank u.





Problem using basic authentication and WAP toolkit.

2002-01-30 Thread Stefan Klåvus

Hi.

I have been using Orion's basic authentication to secure parts of our
website without any problems.
(See
http://kb.atlassian.com/content/atlassian/howto/securingdirectory.html):

We are now going to build the same functionality for WAP but the basic
authentication doesn't work as expected.
I think that the problem is that the server (Orion) sets the HTTP header
Connection to 'Close' but I'm not sure.
When I use Apache and basic authentication everyhing works fine.

FYI:
If I connect manually to Orion and move the keep-alive header last (as
Explorer does) Orion doesn't close the connection...

Does anyone know what's going on (since I can't find a logical
explaination)?

Regards

Stefan Klåvus

Below are some spy traces of the HTTP communication:

::ORION  Explorer:::

CONNECT FROM: 127.0.0.1/127.0.0.1 --- localhost:8085
C 01   GET /wap/do.member.information.viewUserSubscriptions HTTP/1.1
C 01   Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, ap
C 01   plication/vnd.ms-excel, application/msword, application/vnd.ms-
C 01   powerpoint, */*
C 01   Accept-Language: sv
C 01   Accept-Encoding: gzip, deflate
C 01   User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
C 01
C 01   Host: localhost:8088
C 01   Connection: Keep-Alive
C 01
S 01   HTTP/1.1 401 Unauthorized
S 01   Date: Tue, 29 Jan 2002 09:57:21 GMT
S 01   Server: Orion/1.5.2
S 01   Content-Length: 95
S 01   Connection: Keep-Alive
S 01   Keep-Alive: timeout=15, max=100
S 01   Content-Type: text/html
S 01   WWW-Authenticate: Basic realm=publicwap
S 01
S 01   HTMLHEADTITLE401 Unauthorized/TITLE/HEADBODYH1401
S 01Unauthorized/H1/BODY/HTMLC 01 CONNECTION CLOSED
CONNECT FROM: 127.0.0.1/127.0.0.1 --- localhost:8085
C 02   GET /wap/do.member.information.viewUserSubscriptions HTTP/1.1
C 02   Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, ap
C 02   plication/vnd.ms-excel, application/msword, application/vnd.ms-
C 02   powerpoint, */*
C 02   Accept-Language: sv
C 02   Accept-Encoding: gzip, deflate
C 02   User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
C 02
C 02   Host: localhost:8088
C 02   Connection: Keep-Alive
C 02   Authorization: Basic NDY3MDIxMDk0MTE6
C 02
S 01   HTTP/1.1 200 OK

:: Orion  Toolkit :::

CONNECT FROM: 127.0.0.1/127.0.0.1 --- localhost:8085
C 06   GET /wap/do.member.information.viewUserSubscriptions HTTP/1.1
C 06   Connection: keep-alive
C 06   Date: Tue, 29 Jan 2002 11:14:54 GMT
C 06   Accept: text/vnd.wap.wml,text/vnd.wap.wmlscript,application/vnd
C 06   .wap.wmlc,application/vnd.wap.wmlscriptc,text/x-vCard,text/x-vc
C 06   ard,text/x-vcal,text/x-vCalendar,text/x-vcalendar,image/vnd.wap
C 06   .wbmp,application/vnd.wap.wbxml,application/vnd.wap.multipart.m
C 06   ixed,multipart/mixed,image/gif,application/vnd.wap.hashed-certi
C 06   ficate,application/vnd.wap.signed-certificate,application/vnd.w
C 06   ap.cert-response,image/jpeg
C 06   Accept-Charset: US-ASCII, ISO-8859-1, ISO-8859-2, ISO-8859-3, I
C 06   SO-8859-4, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-
C 06   8859-9, Shift_JIS, EUC-JP, ISO-2022-JP, GB2312, Big5, UTF-7, UT
C 06   F-8, UTF-16, ISO-10646-UCS-2
C 06   Accept-Language: en
C 06   Host: localhost:8086
C 06   User-Agent: Nokia-MIT-Browser/3.0
C 06
S 06   HTTP/1.1 401 Unauthorized
S 06   Date: Tue, 29 Jan 2002 11:14:53 GMT
S 06   Server: Orion/1.5.2
S 06   Content-Length: 95
S 06   Connection: Close
S 06   Content-Type: text/html
S 06   WWW-Authenticate: Basic realm=publicwap
S 06
S 06   HTMLHEADTITLE401 Unauthorized/TITLE/HEADBODYH1401
S 06Unauthorized/H1/BODY/HTML
C 06 CONNECTION CLOSED

::: Apache  Toolkit :

CONNECT FROM: 127.0.0.1/127.0.0.1 --- x.x.x.x:80
C 00   GET /web/admin/bb/wml/ HTTP/1.1
C 00   Connection: keep-alive
C 00   Date: Tue, 29 Jan 2002 09:36:12 GMT
C 00   Accept: text/vnd.wap.wml,text/vnd.wap.wmlscript,application/vnd
C 00   .wap.wmlc,application/vnd.wap.wmlscriptc,text/x-vCard,text/x-vc
C 00   ard,text/x-vcal,text/x-vCalendar,text/x-vcalendar,image/vnd.wap
C 00   .wbmp,application/vnd.wap.wbxml,application/vnd.wap.multipart.m
C 00   ixed,multipart/mixed,image/gif,application/vnd.wap.hashed-certi
C 00   ficate,application/vnd.wap.signed-certificate,application/vnd.w
C 00   ap.cert-response,image/jpeg
C 00   Accept-Charset: US-ASCII, ISO-8859-1, ISO-8859-2, ISO-8859-3, I
C 00   SO-8859-4, ISO-8859-5, ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-
C 00   8859-9, Shift_JIS, EUC-JP, ISO-2022-JP, GB2312, Big5, UTF-7, UT
C 00   F-8, UTF-16, ISO-10646-UCS-2
C 00   Accept-Language: en
C 00   Host: localhost:8087
C 00   User-Agent: Nokia-MIT-Browser/3.0
C 00
S 00   HTTP/1.1 401 Authorization Required
S 00   Date: Tue, 29 Jan 2002 09:37:16 GMT
S 00   Server: Apache/1.3.12 (Unix) ApacheJServ/1.1.2 PHP/4.0.1pl2
S 00   WWW-Authenticate: Basic realm=bf
S 00   Keep-Alive: timeout=15, max=100
S 00   Connection: Keep-Alive
S 00   Transfer-Encoding: chunked

Servlet reload problem

2002-01-29 Thread Tommi Penttilä


My servlet-classes won't reload. After I recompile changed servlet and http-GET
it via orion's (1.5.3) web-interface, orionconsole reports that Servlet was
initialized, but I get the same result on browser than before compiling. 

I did put orion-web-app/@development=true on the web-app-config, but that
doesn't help. How do I unload old servlet-classes from memory?

Is there anything like Tomcat's context/@reloadable -attribute in Orion? It's
extremely annoying to reboot orion every time a servlet class changes.

Or maybe I'm just missing something obvious? Any pointers greatly appreciated.








RE: Servlet reload problem

2002-01-29 Thread Paul van Beukering

restart orion

-Original Message-
From: Tommi Penttilä [mailto:[EMAIL PROTECTED]]
Sent: dinsdag 29 januari 2002 12:20
To: Orion-Interest
Subject: Servlet reload problem 



My servlet-classes won't reload. After I recompile changed servlet and
http-GET
it via orion's (1.5.3) web-interface, orionconsole reports that Servlet was
initialized, but I get the same result on browser than before compiling. 

I did put orion-web-app/@development=true on the web-app-config, but that
doesn't help. How do I unload old servlet-classes from memory?

Is there anything like Tomcat's context/@reloadable -attribute in Orion?
It's
extremely annoying to reboot orion every time a servlet class changes.

Or maybe I'm just missing something obvious? Any pointers greatly
appreciated.








Re: Servlet reload problem

2002-01-29 Thread Jeff Hubbach

touching web.xml works for me, the container reloads the new servlet classes.

Jeff.

On Tue, 29 Jan 2002 17:00:20 +0100
Paul van Beukering [EMAIL PROTECTED] wrote:

 restart orion
 
 -Original Message-
 From: Tommi Penttilä [mailto:[EMAIL PROTECTED]]
 Sent: dinsdag 29 januari 2002 12:20
 To: Orion-Interest
 Subject: Servlet reload problem 
 
 
 
 My servlet-classes won't reload. After I recompile changed servlet and
 http-GET
 it via orion's (1.5.3) web-interface, orionconsole reports that Servlet was
 initialized, but I get the same result on browser than before compiling. 
 
 I did put orion-web-app/@development=true on the web-app-config, but that
 doesn't help. How do I unload old servlet-classes from memory?
 
 Is there anything like Tomcat's context/@reloadable -attribute in Orion?
 It's
 extremely annoying to reboot orion every time a servlet class changes.
 
 Or maybe I'm just missing something obvious? Any pointers greatly
 appreciated.
 
 
 
 
 


-- 
Jeff Hubbach
Internet Developer
Sun Certified Web Component Developer
New Media Division
ITQ Lata, L.L.C.
303-745-4763 x3114




RE: Servlet reload problem

2002-01-29 Thread Nusairat, Joseph F.
Title: RE: Servlet reload problem





Are u using code that is calling another servlet? Or is this servlet being called from another one.
Cause if the servlet is being called by another one you'd have to move both over both


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



-Original Message-
From: Jeff Hubbach [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, January 29, 2002 1:14 PM
To: Orion-Interest
Subject: Re: Servlet reload problem



touching web.xml works for me, the container reloads the new servlet classes.


Jeff.


On Tue, 29 Jan 2002 17:00:20 +0100
Paul van Beukering [EMAIL PROTECTED] wrote:


 restart orion
 
 -Original Message-
 From: Tommi Penttilä [mailto:[EMAIL PROTECTED]]
 Sent: dinsdag 29 januari 2002 12:20
 To: Orion-Interest
 Subject: Servlet reload problem 
 
 
 
 My servlet-classes won't reload. After I recompile changed servlet and
 http-GET
 it via orion's (1.5.3) web-interface, orionconsole reports that Servlet was
 initialized, but I get the same result on browser than before compiling. 
 
 I did put orion-web-app/@development=true on the web-app-config, but that
 doesn't help. How do I unload old servlet-classes from memory?
 
 Is there anything like Tomcat's context/@reloadable -attribute in Orion?
 It's
 extremely annoying to reboot orion every time a servlet class changes.
 
 Or maybe I'm just missing something obvious? Any pointers greatly
 appreciated.
 
 
 
 
 



-- 
Jeff Hubbach
Internet Developer
Sun Certified Web Component Developer
New Media Division
ITQ Lata, L.L.C.
303-745-4763 x3114






Re: SOAP problem with Orion

2002-01-21 Thread BRICKER_JONATHAN_E

This seems to be the line that is causing problems.
ServiceManager serviceManager =
  org.apache.soap.server.http.ServerHTTPUtils.getServiceManagerFromContext(application);

Apparently the implicit 'application' call is causing the NoClassDefException.

Anyone see this before?

Jonathan Bricker
Lilly Research Labs
Java ATG






[EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
01/18/02 08:10 AM
Please respond to Orion-Interest


To:Orion-Interest [EMAIL PROTECTED]
cc:
Subject:SOAP problem with Orion




I was installing SOAP on my Orion 1.5.2 server but get a ClassNotFoundException javax.servlet.http.HttpServlet when I try to run anything from the SOAP admin tool. 

I've followed the HOWTO from Atlassian for installing and as far as I can tell Orion can find soap.jar. 

My other applications run fine so I'm guessing that it is something with SOAP's jsp's or a class that or tag that I'm missing. 

Thanks for the help. 

Jonathan Bricker
Lilly Research Labs
Java ATG 



SOAP problem with Orion

2002-01-18 Thread BRICKER_JONATHAN_E

I was installing SOAP on my Orion 1.5.2 server but get a ClassNotFoundException javax.servlet.http.HttpServlet when I try to run anything from the SOAP admin tool.

I've followed the HOWTO from Atlassian for installing and as far as I can tell Orion can find soap.jar.

My other applications run fine so I'm guessing that it is something with SOAP's jsp's or a class that or tag that I'm missing.

Thanks for the help.

Jonathan Bricker
Lilly Research Labs
Java ATG

HTTP session replication problem

2002-01-15 Thread Franck valetas

 Hi,

 I have 2 0rion 1.5.2 servers in the same cluster island.
 A session created on server 1 is correctly replicated on server 2,
but a session created on server 2 is not replicated on server 1 !
 When I restart server 1, the management console displays that all sessions
from server 2 are replicated in server 1 for a few seconds ; then they all
disappear.

 Does anyone had the same problem ? Thanks for your help.

 Franck





RE: HTTP session replication problem

2002-01-15 Thread Mike Moulton

When all sessions disappear check to see if there was an orion exception
at the same time. I am experiencing the same problem but there is an
internal orion exception the moment everything stops working. Bug #687
on bugzilla covers my problem, but I haven't had any luck getting
IronFlare to take is seriously; even being a paying customer.

If this is your problem please vote for the bug in bugzilla, maybe
together we can get something done.

-Mike

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Franck
valetas
Sent: Tuesday, January 15, 2002 4:18 AM
To: Orion-Interest
Subject: HTTP session replication problem


 Hi,

 I have 2 0rion 1.5.2 servers in the same cluster island.
 A session created on server 1 is correctly replicated on server 2, but
a session created on server 2 is not replicated on server 1 !  When I
restart server 1, the management console displays that all sessions from
server 2 are replicated in server 1 for a few seconds ; then they all
disappear.

 Does anyone had the same problem ? Thanks for your help.

 Franck







Re: HTTP session replication problem

2002-01-15 Thread Scott Farquhar

Mike,

Try running your program with the cluster debug flag  add that 
information to the bug report:

java -Dhttp.cluster.debug=true -jar orion.jar

This will give you much more information about what is happening under 
the hood, and will allow IronFlare to fix much quicker.

Cheers,
Scott

-- 
Scott Farquhar :: [EMAIL PROTECTED]

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


Mike Moulton wrote:

 When all sessions disappear check to see if there was an orion exception
 at the same time. I am experiencing the same problem but there is an
 internal orion exception the moment everything stops working. Bug #687
 on bugzilla covers my problem, but I haven't had any luck getting
 IronFlare to take is seriously; even being a paying customer.
 
 If this is your problem please vote for the bug in bugzilla, maybe
 together we can get something done.
 
 -Mike
 
 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]] On Behalf Of Franck
 valetas
 Sent: Tuesday, January 15, 2002 4:18 AM
 To: Orion-Interest
 Subject: HTTP session replication problem
 
 
  Hi,
 
  I have 2 0rion 1.5.2 servers in the same cluster island.
  A session created on server 1 is correctly replicated on server 2, but
 a session created on server 2 is not replicated on server 1 !  When I
 restart server 1, the management console displays that all sessions from
 server 2 are replicated in server 1 for a few seconds ; then they all
 disappear.
 
  Does anyone had the same problem ? Thanks for your help.
 
  Franck
 
 
 
 
 
 






Trivial classpath problem ?

2002-01-13 Thread Yuval_Goldstein


Hi,
Although this is an oc4j question ( oracles wrapper for orion ), im sure
some of you would be able to help me ( the engines are the same down there
:).
Ive tried adding a new jar to oc4js classpath. Our application depends on
this jar.
I couldnt.
Ive tried adding the jar as a 'library-path' tag within the server.xml.
Then added it to the command line running oc4j ( -cp =  ). It didnt do
the trick.
Ive only made some progress when putting it straight into oc4js lib
directory.
Im confused.
1. What does the 'library-path' tab enable?
2. Whats the difference between using it and supplying jars to the oc4js
runtime classpath ( -cp ).
3. What is the recommended way, to simply add a jar upon my application
depends of?

Any help would be apreceated,
Yuval.







RE: Trivial classpath problem ?

2002-01-13 Thread The elephantwalker

Yuval,

In your orion-application.xml of your ear application, you can put this tag:

library path=lib /

This is after the persistance tag and before the principals tag.

In your ear layout, include a directory lib, so now the layout should look
like this:

META-INF
META-INF/application.xml
META-INF/orion-application.xml
mywarfiles.war
myejbfiles.jar
lib
lib/mylibraryfiles.jar


The reason orion was picking up your jar files from the lib directory in
orion is that the config/application.xml (which is the orion-application.xml
of the global-application, or default app as it is sometimes called) has a
tag in it

libarary path=../lib /

regards,

the elephantwalker
www.elephantwalker.com





-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of
[EMAIL PROTECTED]
Sent: Saturday, January 12, 2002 11:36 PM
To: Orion-Interest
Cc: [EMAIL PROTECTED]
Subject: Trivial classpath problem ?



Hi,
Although this is an oc4j question ( oracles wrapper for orion ), im sure
some of you would be able to help me ( the engines are the same down there
:).
Ive tried adding a new jar to oc4js classpath. Our application depends on
this jar.
I couldnt.
Ive tried adding the jar as a 'library-path' tag within the server.xml.
Then added it to the command line running oc4j ( -cp =  ). It didnt do
the trick.
Ive only made some progress when putting it straight into oc4js lib
directory.
Im confused.
1. What does the 'library-path' tab enable?
2. Whats the difference between using it and supplying jars to the oc4js
runtime classpath ( -cp ).
3. What is the recommended way, to simply add a jar upon my application
depends of?

Any help would be apreceated,
Yuval.








Re: Trivial classpath problem ?

2002-01-13 Thread Scott Farquhar

Yuval,

The following new tutorial on our knowledge base may help you:

   http://kb.atlassian.com/content/atlassian/howto/classloaders.jsp

It details all the different levels of classloaders available in Orion. 
  Please feel free to annotate the page with any comments:

 
http://kb.atlassian.com/content/atlassian/howto/classloaders.jsp#annotations 



Cheers,
Scott

-- 
Scott Farquhar :: [EMAIL PROTECTED]

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




[EMAIL PROTECTED] wrote:

 Hi,
 Although this is an oc4j question ( oracles wrapper for orion ), im sure
 some of you would be able to help me ( the engines are the same down there
 :).
 Ive tried adding a new jar to oc4js classpath. Our application depends on
 this jar.
 I couldnt.
 Ive tried adding the jar as a 'library-path' tag within the server.xml.
 Then added it to the command line running oc4j ( -cp =  ). It didnt do
 the trick.
 Ive only made some progress when putting it straight into oc4js lib
 directory.
 Im confused.
 1. What does the 'library-path' tab enable?
 2. Whats the difference between using it and supplying jars to the oc4js
 runtime classpath ( -cp ).
 3. What is the recommended way, to simply add a jar upon my application
 depends of?
 
 Any help would be apreceated,
 Yuval.
 
 
 
 
 
 






jms problem

2002-01-08 Thread Markus Rinderer

hi !
i am trying to subscribe to topics from my java standalone client
application. everything works fine if i use OpenJMS with Orion Application
server. when using orion's JMS server i run into the following problem:

the client successfully subscribes to the first topic, but hangs when
subscribung to the second topic while calling createSubscriber in
TopicSession.
here is a code snippet:

public OrionJMSSubscriberWrapper(Context context,
   TopicConnection connection,
   String topicName) throws JMSException,
NamingException {

  subscriberSession = connection.createTopicSession(false,
Session.AUTO_ACKNOWLEDGE);
  topic = (Topic)context.lookup(topicName);
   Trace.mar(create subscriber);
  subscriber = subscriberSession.createSubscriber(topic, null, true);
  Trace.mar(created subscriber);
   }

as i said, the first topic works fine, the second hangs at the
createSubscriber line. i changed the order of the topics, it is always just
one that is subscribed successfully.
anyone ever had this problem?
thanks for your help!
markus





Problem using java web start

2001-12-30 Thread A. KANDASAMY

I had my EJB's running in Orion server. I am accessing the server thru
Swing Clients. when running stand alone, i am able to access the server.
When i am using java web start i am facing problems..
In java forums they asked to put the following lines of code before
lookup...
ClassLoader loader = theApp.getClass().getClassLoader();
Thead.currentThread().setContextClassLoader(loader);

but it didn't work for me...my initial context lookup fails...

In an another instance,i was told to use RMIInitialContextfactory instead
of ApplicationClientContextfactory..When i tried that it is hanging when
tried to lookup...

can anyone help me in this?

kanda





How do you shut down orion - Problem SOLVED!

2001-12-19 Thread James Beeson

Thanks to everyone for the information. I did not realize that the admin.jar
was trying to shut down orion through the RMI port. I was trying to shut it
down throught the port I manually specified in my default-web-site.xml file.

I took of the port number in the admin command call and it worked like a
charm. Thanks!

_
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com





Problem replicating session

2001-12-07 Thread JoseMa



Hi,

  I have 
configured two orion servers in cluster with the same application installed. 
These orion servers have SSL configured and individualy I can access without 
problems. 

 Both 
secure-web-site.xml and default-web-site.xml I have configured the cluster with 
a different island for each web-site. When I use the http connection the cluster 
work without problems and the session It's update correctly but when I use the 
https the orion show me the next error:

  Receiving 
HTTP-cluster session value update...  
java.lang.NullPointerException at 
com.evermind._cqb._scc(Unknown 
Source) at 
com.evermind._cqb._os(Unknown 
Source) at 
com.evermind._hr.run(Unknown 
Source) at 
com.evermind._if.run(Unknown Source)

 This error appear a once after 
the clusterdoesn't work correctly.

 Why appear this error? 
What is it? Could you help me?

 Thank,




Java Security Problem

2001-12-06 Thread Thomas Dandelot



Hi all,

I'm using entity beans with Orion and got some 
strange messages whilecalling a Remote method on one of them 
:
Exception occurred during event 
dispatching:java.security.AccessControlException: access denied 
(java.io.SerializablePermission 
enableSubstitution) at 
com.evermind._dn.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(.:1446) 
at 
com.evermind._dn.invokeMethod(.:1369) 
at com.evermind._yd.invoke(.:53) 
at com.evermind._jdb.invoke(.:22)

On server side, I also have an exception, almost at 
the same time :

java.security.AccessControlException: access denied 
(java.io.FilePermission ./database/defaultdb.script.new 
delete) at 
java.security.AccessControlContext.checkPermission(AccessControlContext.java:272) 
at 
java.security.AccessController.checkPermission(AccessController.java:399) 
at 
java.lang.SecurityManager.checkPermission(SecurityManager.java:545) 
at 
java.lang.SecurityManager.checkDelete(SecurityManager.java:1005) 
at 
java.io.File.delete(File.java:709) 
at 
org.hsql.Log.writeScript(Log.java:432) 
at 
org.hsql.Log.close(Log.java:147) 
at 
org.hsql.Database.close(Database.java:586) 
at 
org.hsql.Database.processShutdown(Database.java:603) 
at 
org.hsql.Database.execute(Database.java:127) 
at 
org.hsql.jdbcConnection.executeStandalone(jdbcConnection.java:686) 
at 
org.hsql.jdbcConnection.execute(jdbcConnection.java:541) 
at 
org.hsql.jdbcConnection.closeStandalone(jdbcConnection.java:677) 
at 
org.hsql.jdbcConnection.close(jdbcConnection.java:277) 
at com.evermind._hi.close(.:92) at 
com.evermind.sql.OrionPooledDataSource._ape(.:424) 
at 
com.evermind.sql.OrionPooledDataSource.run(.:380) 
at 
com.evermind.sql.DriverManagerXADataSource.run(.:173) 
at com.evermind._bq.run(.:133) at 
com.evermind._bs.run(.:64)

I thought it was a security problem so I changed my 
java.policy to all permissions like this (both in server and client side) 
:
grant {permission 
java.security.AllPermission;};

But the same problems occur all the 
time.
Does anybody know from where this error comes from 
? Did anybody already have this problem ?
How could I solve it ?
Any help would be really much appreciated, this is 
urgent.

Thanx,

 
Thomas Dandelot


problem creating ejb from one orion in a other orion

2001-12-04 Thread juan

hello
my problem is the following: i want to perform some little loadbalancing 
without the loadbalancing tool from orion. the scenario is the following:
the client creates a ejb in the first orion server, and this bean makes a 
lookup to another orion server and creates a second bean on the other server. 
for now it was impossible to me to create a bean from one orion server into a 
other orion server. everytime i make a lookup from a ejb to a bean into a other 
orion server it searches the bean in the same orion server instead of searching 
the bean into a other orion server.

now the codefragment which creates the initialcontext ( this is part of a 
method into the first ejb )   
   
java.util.Hashtable env = new java.util.Hashtable();
env.put
(com.evermind.server.rmi.RMIContext.INITIAL_CONTEXT_FACTORY,com.evermind.server
.rmi.RMIInitialContextFactory);
  env.put
(com.evermind.server.rmi.RMIContext.PROVIDER_URL,ormi://10.2.0.17/Third);
  env.put(com.evermind.server.rmi.RMIContext.SECURITY_PRINCIPAL,admin);
  env.put(com.evermind.server.rmi.RMIContext.SECURITY_CREDENTIALS,123);

Context ic = new InitialContext(env);

Object Obj = ic.lookup(Third);

now by calling this method i get the following error meassages:

java.lang.NullPointerException: domain was null
at com.evermind._ce._fcc(Unknown Source)
at com.evermind._ce._mr(Unknown Source)
at com.evermind.server.rmi.RMIInitialContextFactory.getInitialContext(Un
known Source)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
68)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246
)
at javax.naming.InitialContext.init(InitialContext.java:222)
at javax.naming.InitialContext.init(InitialContext.java:198)
at loadbalancing.FirstBean.createSecondBean(FirstBean.java:36)
at First_StatefulSessionBeanWrapper37.createSecondBean(First_StatefulSes
sionBeanWrapper37.java:88)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind._dh._gc(Unknown Source)
at com.evermind._if.run(Unknown Source)

i suppose the error domain was null has it's origin in the fact, that the Third 
bean i am looking for is not installed in the first orion server, but only in 
the second one.

now, what can i do to create a ejb from a ejb which is lokated into a other 
orion server like the first one?


thanks, johannes rainer




AW: problem creating ejb from one orion in a other orion

2001-12-04 Thread t . hegyi

Hi, 

You must enable server-to-server communication via RMI and specify the Third
EJB as a remote one in orion-application.xml. See doc: ejb-module
path=myEjbs.jar remote=true|false /

Check out www.orionsupport.com for further details on server-server
communication.

HTH,

Tibor

 -Ursprüngliche Nachricht-
 Von: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]Im Auftrag von
 [EMAIL PROTECTED]
 Gesendet: Dienstag, 4. Dezember 2001 08:39
 An: Orion-Interest
 Betreff: problem creating ejb from one orion in a other orion
 
 
 hello
 my problem is the following: i want to perform some little 
 loadbalancing 
 without the loadbalancing tool from orion. the scenario is 
 the following:
 the client creates a ejb in the first orion server, and this 
 bean makes a 
 lookup to another orion server and creates a second bean on 
 the other server. 
 for now it was impossible to me to create a bean from one 
 orion server into a 
 other orion server. everytime i make a lookup from a ejb to a 
 bean into a other 
 orion server it searches the bean in the same orion server 
 instead of searching 
 the bean into a other orion server.
 
 now the codefragment which creates the initialcontext ( this 
 is part of a 
 method into the first ejb )   

 java.util.Hashtable env = new java.util.Hashtable();
 env.put
 (com.evermind.server.rmi.RMIContext.INITIAL_CONTEXT_FACTORY,c
 om.evermind.server
 .rmi.RMIInitialContextFactory);
   env.put
 (com.evermind.server.rmi.RMIContext.PROVIDER_URL,ormi://10.2.
 0.17/Third);
   
 env.put(com.evermind.server.rmi.RMIContext.SECURITY_PRINCIPAL,
 admin);
   
 env.put(com.evermind.server.rmi.RMIContext.SECURITY_CREDENTIAL
 S,123);
 
 Context ic = new InitialContext(env);
 
 Object Obj = ic.lookup(Third);
 
 now by calling this method i get the following error meassages:
 
 java.lang.NullPointerException: domain was null
 at com.evermind._ce._fcc(Unknown Source)
 at com.evermind._ce._mr(Unknown Source)
 at 
 com.evermind.server.rmi.RMIInitialContextFactory.getInitialContext(Un
 known Source)
 at 
 javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:6
 68)
 at 
 javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:246
 )
 at javax.naming.InitialContext.init(InitialContext.java:222)
 at javax.naming.InitialContext.init(InitialContext.java:198)
 at loadbalancing.FirstBean.createSecondBean(FirstBean.java:36)
 at 
 First_StatefulSessionBeanWrapper37.createSecondBean(First_StatefulSes
 sionBeanWrapper37.java:88)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.evermind._dh._gc(Unknown Source)
 at com.evermind._if.run(Unknown Source)
 
 i suppose the error domain was null has it's origin in the 
 fact, that the Third 
 bean i am looking for is not installed in the first orion 
 server, but only in 
 the second one.
 
 now, what can i do to create a ejb from a ejb which is 
 lokated into a other 
 orion server like the first one?
 
 
 thanks, johannes rainer




JNDI RMI clustering problem

2001-11-28 Thread Akshat Bhargava

Hello,

I am trying to accomplish RMI clustering and seem to be having JNDI problems
in the process.
I have performed the following changes to my deployment settings.

1) orion-application.xml
Changed all bean remote=false to remote=true

2) rmi.xml

Added rmi-server host=localhost port=9091
and cluster username=cluster password=cluster


3) jndi.properties at the top level in my ear file looks like this

java.naming.factory.initial=com.evermind.server.ApplicationClientInitialCont
extFactory
java.naming.provider.url=ormi://localhost:9091

My application is located at the following url https://localhost:9090/webApp

4) In my code I am creating an initial context and looking up a bean but get
a NameNotFoundException. The code in my JSP looks like :

Context ctx = getInitialContext();
Object home = ctx.lookup(LoginSL);
loginHome = (LoginSLHome)PortableRemoteObject.narrow(home,
LoginSLHome.class);

The above code is giving me the following exception :
Does someone know what I am doing wrong in either the code or deployment
settings ??

500 Internal Server Error
javax.naming.NameNotFoundException: LoginSL not found
at com.evermind[Orion/1.5.2 (build
10460)].server.rmi.RMIContext.lookup(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._cf._np(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._cf.lookup(Unknown Source)
at javax.naming.InitialContext.lookup(Unknown Source)
at /processLogin.jsp._jspService(/processLogin.jsp.java:67) (JSP page line
55)
at com.orionserver[Orion/1.5.2 (build
10460)].http.OrionHttpJspPage.service(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._ah._rad(Unknown Source)
at com.evermind[Orion/1.5.2 (build
10460)].server.http.JSPServlet.service(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._cxb._abe(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._cxb._uec(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._io._twc(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._io._gc(Unknown Source)
at com.evermind[Orion/1.5.2 (build 10460)]._if.run(Unknown Source)


Thanks,

Akshat





Weird Transaction Problem

2001-11-27 Thread Herman Rashid

I have this EJB transaction related problem
(Orion 1.5.2, DB2 V7.1) :

I have 2 EJBs:

1) UserSession (Stateless session bean)
 trans-attribute: Required
 transaction-type : Container

2) User (BMP entity bean)
 trans-attribute: Mandatory

My client makes a call to a method in UserSession
which
in turns call User.

In User EJB, the method will get a connection:

  Connection cn =  ds.getConnection(..);
  cn.setAutoCommit(false);

After performing database operation, connection is
closed:
  cn.close();

At this point an exception is raised:
=== exception ==
javax.transaction.TransactionRolledbackException:
java.rmi.RemoteException: SQLException.; nested
exception is: 
COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver]
CLI0116E  Invalid transaction state. SQLSTATE=25000

CLI0116E Invalid transaction state.  
 :
exception==

I looked up DB2 documentation and the following was
the explanation:


Explanation: There was a transaction in progress when
SQLDisconnect was called. 

User Response: Call SQLTransact before calling
SQLDisconnect. 

Has anyone encountered similar problems before?

Thanks.


ps. I attached my data-sources.xml just in case there
was a misconfig of datasource.


data-source
class=com.evermind.sql.DriverManagerDataSource
name=DB2
location=jdbc/DB2CoreDS
xa-location=jdbc/DB2XADS
ejb-location=jdbc/DB2DS
connection-driver=COM.ibm.db2.jdbc.app.DB2Driver
username=db2inst1
password=db2inst1
url=jdbc:db2:sbn
schema=database-schemas/db2.xml
inactivity-timeout=30
/



__
Do You Yahoo!?
Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
http://geocities.yahoo.com/ps/info1




Re: Weird Transaction Problem

2001-11-27 Thread Stephen Davidson

Herman Rashid wrote:

 I have this EJB transaction related problem
 (Orion 1.5.2, DB2 V7.1) :
 
 I have 2 EJBs:
 
 1) UserSession (Stateless session bean)
  trans-attribute: Required
  transaction-type : Container
 
 2) User (BMP entity bean)
  trans-attribute: Mandatory
 
 My client makes a call to a method in UserSession
 which
 in turns call User.
 
 In User EJB, the method will get a connection:
 
   Connection cn =  ds.getConnection(..);
   cn.setAutoCommit(false);
 
 After performing database operation, connection is
 closed:
   cn.close();
 
 At this point an exception is raised:
 === exception ==
 javax.transaction.TransactionRolledbackException:
 java.rmi.RemoteException: SQLException.; nested
 exception is: 
   COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver]
 CLI0116E  Invalid transaction state. SQLSTATE=25000
 
 CLI0116E Invalid transaction state.  
  :
[snip]

Hi Herman.

The first (obvious) question is, before you did cn.close(), did you do cn.commit()?

-Steve

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





Re: Weird Transaction Problem

2001-11-27 Thread Fredrik Lindgren



Herman Rashid wrote:

 I have this EJB transaction related problem
 (Orion 1.5.2, DB2 V7.1) :
 
 I have 2 EJBs:
 
 1) UserSession (Stateless session bean)
  trans-attribute: Required
  transaction-type : Container
 
 2) User (BMP entity bean)
  trans-attribute: Mandatory
 
 My client makes a call to a method in UserSession
 which
 in turns call User.
 
 In User EJB, the method will get a connection:
 
   Connection cn =  ds.getConnection(..);



   cn.setAutoCommit(false);


You should not mess with the transaction when you are using CMT.
Test what happens if you remove the line above.

/Fredrik





Problem using Oracle SDO Java API in an EJB

2001-11-22 Thread Montebove Luciano

Hi,

I' m trying to use the Oracle SDO Java API in an EJB with container managed
transactions without success.
The problem raise with the following code:

InitialContext ctx=new InitialContext();
DataSource ds=(DataSource)ctx.lookup(jdbc/sitdemo);
Conn=ds.getConnection();
sdo = OraSpatialManager.getGeometryAdapter(SDO, 8.1.6, 
STRUCT.class, STRUCT.class, null,Conn);

This last call give me a null pointer when I use the DataSource at the 
ejb-location jdbc/sitdemo (I need it for CMT) while using the location
jdbc/sitdemoCoreDS I get the Oracle GeometryAdapter.
The problem seems to be that the DataSource received in this last case is of
type oracle.jdbc.driver.OracleConnection so it works. The Oracle SDO API
doesn't give a requirement for a specific kind of Connection, but the jdbc
connection returned from the DataSource at the ejb-location doesn't work.

This is my datasource:

data-source
class=com.evermind.sql.DriverManagerDataSource
name=sitdemo
location=jdbc/sitdemoCoreDS
xa-location=jdbc/xa/sitdemoXADS
ejb-location=jdbc/sitdemo
connection-driver=oracle.jdbc.OracleDriver
username=sitdemo
password=demosit
url=jdbc:oracle:thin:@127.0.0.1:1521:ORASITDB
inactivity-timeout=30
/

Thanks,

Luciano Montebove






Urgent : Hypersonic SQL Problem ?

2001-11-20 Thread dovle

Hi all ,
I have an application (EJBs) deployed properly. All works fine using the 
Postgres databases but this is a little problem using a Hypersonic Database. 

This issue is not Orion related but rather Hypersonic. Is Hypersonic able to 
do a query inside a query ? Using the DAtabaseManager I can say that it can't 
but I need to know if someone had similar problems . 

My query looks like this :

select * from journalEntry where testEntryID = 1 AND questionID IN ( SELECT 
id FROM question WHERE question.moduleID = 0 )

I can ashure you that this query works just fine in Postgres but does not 
give any result in Hypersonic!!! 

Thanks for your answers ,
dovle




Re: Urgent : Hypersonic SQL Problem ?

2001-11-20 Thread KirkYarina

Subselects are broken in the version of Hypersonic that ships with Orion.

Hypersonic SQL has changed hands.  Try the version at 
http://www.hsqldb.org/ - and please report your results back to the list.

Kirk Yarina

At 01:02 PM 11/20/01 +0200, you wrote:
Hi all ,
I have an application (EJBs) deployed properly. All works fine using the
Postgres databases but this is a little problem using a Hypersonic Database.

This issue is not Orion related but rather Hypersonic. Is Hypersonic able to
do a query inside a query ? Using the DAtabaseManager I can say that it can't
but I need to know if someone had similar problems .

My query looks like this :

select * from journalEntry where testEntryID = 1 AND questionID IN ( SELECT
id FROM question WHERE question.moduleID = 0 )

I can ashure you that this query works just fine in Postgres but does not
give any result in Hypersonic!!!

Thanks for your answers ,
dovle





SOS!!! Transaction Problem...

2001-11-18 Thread George M Chacko

Hi all,
 I am new to Orion.  I am facing a major problem with transaction in orion. I 
wrote a simple session bean to insert record into a MYSQL database. I have given the 
transaction attribute as REQUIRED in the deployment descriptor. 
In the single insert() method, I am doing two sql inserts(to check transaction). So 
when I call the insert once, It will insert two records with consecutive IDs(Primary 
key). So if a record exits with the second ID, the whole transaction is supposed to 
roll back... But unfortunately it is not getting rolled back. The first record is 
getting committed. 
Could anyone please help me out on this.

Thanks
George




Remote RMI access problem!

2001-11-14 Thread sun




500 Internal Server ErrorServlet error: Unable to get home interface: java.lang.ClassCastException: areacodeHome_StatelessSessionHomeWrapper1 was not an instance of interface com.areacode.areacodeHome, the interfaces it implements is [Ljava.lang.Class;@a396d28c


Problem using Orions JMS ExceptionListener

2001-10-24 Thread Yuval_Goldstein

Hi All,

I wonder if anyone could tell me whether the Orions implementation of JMS
consider 'losing connection to jms server' as an exception that is reported
to an assigned ExceptionListener (Sun says not any provider does so).
Ive tried to write such code, and noticed that nothing happens when i drop
the server down while my consumer is still up.

Please help,
Thanks in advanced,


Yuval Goldstein
VocalTec Communications Ltd
Tel: 972-9-9707771, TGID: yuvalg





RE: JavaMail problem

2001-10-19 Thread Justin Crosbie

Hi,

Thanks for the replies. Still no joy, this is strange behaviour. We don't
want to enable relaying totally, because of the security risks. Yet its
still a problem if we enable it for specific IP addresses, it doesn't work.
We can enable routing to specific external domains, and this works.

Anyway, it appears to be either a JavaMail or Exchange Server problem, so
I'll keep looking there.

Thanks again,
Justin

-Original Message-
From: Christoph Sturm [mailto:[EMAIL PROTECTED]]
Sent: 16 October 2001 16:43
To: Orion-Interest
Cc: Orion-Interest
Subject: Re: JavaMail problem


Hello Justin,

Tuesday, October 16, 2001, 10:48:20 AM, you wrote:


JC I have set Exchange to disable relaying except for the IP address of the
JC machine the appserver is on. The problem is I'm still getting the
JC javax.mail.SendFailedException: 550 Relaying is prohibited error.
You need to restart the internet mail service (in control
panel/services) for the change to take effect.




-- 
Best regards,
 Christophmailto:[EMAIL PROTECTED]






JavaMail problem

2001-10-16 Thread Justin Crosbie



Hi 
all,

I'm having trouble 
enabling relaying on my mailserver. I'm using Orion 1.5.2 with the J2EE 1.2.1 
JavaMail, trying to relay toa 5.5 Exchange Server(NT).I've set the 
application.xml to point to my Exchange server as such:

mail-session location="mail/TheMailSession" 
smtp-host="my.mailserver.ie"
 property 
name="mail.transport.protocol" value="smtp"/
 property 
name="mail.smtp.from" value="user@company.com"/
 property name="mail.from" 
value="user@company.com"/
/mail-session
I have set Exchange to 
disable relaying except for the IP address of the machine the appserver is on. 
The problem is I'm still getting the 
"javax.mail.SendFailedException: 550 
Relaying is prohibited" error.
Can anyone shed any light on this? Is there something in Orion 
I need to do as well?
Thanks for any 
help.
Justin 
Crosbie




Re: JavaMail problem

2001-10-16 Thread Lachezar Dobrev



 Hello Justin.

 As I see it, this is not JavaMail 
problem.
 The message "550 Relaying denied" is 
standard SMTP message sent from the SMTP server.
 Depending on the type of your SMTP 
server this is solved differently.
 Consult you SMTP administrator or, 
if it is you, check the documentation, to see how to permit in/out-going SMTP 
traffic. Normally it will be permitted/denied according to your IP 
address.

 That's it. "Happy hunting Sebastian" 
(*grin*: quote from "Cruel Intentions").

 Lachezar


  Hi 
  all,
  
  I'm having trouble 
  enabling relaying on my mailserver. I'm using Orion 1.5.2 with the J2EE 1.2.1 
  JavaMail, trying to relay toa 5.5 Exchange Server(NT).I've set the 
  application.xml to point to my Exchange server as such:
  
  mail-session location="mail/TheMailSession" 
  smtp-host="my.mailserver.ie"
   property 
  name="mail.transport.protocol" value="smtp"/
   property 
  name="mail.smtp.from" value="user@company.com"/
   property 
  name="mail.from" value="user@company.com"/
  /mail-session
  I have set Exchange 
  to disable relaying except for the IP address of the machine the appserver is 
  on. The problem is I'm still getting the 
  "javax.mail.SendFailedException: 550 
  Relaying is prohibited" error.
  Can anyone shed any light on this? Is there something in 
  Orion I need to do as well?
  Thanks for any 
  help.
  Justin 
  Crosbie


Re: JavaMail problem

2001-10-16 Thread Christoph Sturm

Hello Justin,

Tuesday, October 16, 2001, 10:48:20 AM, you wrote:


JC I have set Exchange to disable relaying except for the IP address of the
JC machine the appserver is on. The problem is I'm still getting the
JC javax.mail.SendFailedException: 550 Relaying is prohibited error.
You need to restart the internet mail service (in control
panel/services) for the change to take effect.




-- 
Best regards,
 Christophmailto:[EMAIL PROTECTED]






Servlet JDBC character conversion problem

2001-10-15 Thread Gustavo Comba



Hi, I'm having a strange problem. I'm developing a J2EE Web 
Application, with Entity Beans, Servlets, JSPs and so on. I've started 
to get character conversion problems, and I've isolated the piece of code 
giving me problems. The code is: 
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); 
Connection con = DriverManager.getConnection 
("jdbc:oracle:thin:@oraclehost:1521:orcl", "user", "password"); 
dumpTable(con, out); String updateStatement = "UPDATE IDIOMAS SET IDIOMA 
= ? WHERE IDIDIOMA = ? "; PreparedStatement prepStmt = 
con.prepareStatement (updateStatement); prepStmt.setString(1, m_Idioma); 
prepStmt.setLong(2, m_Id); prepStmt.executeUpdate(); 
prepStmt.close(); con.close(); Where "m_Idioma", which is a 
standard java.lang.String, which eventually is "Español", and m_Id is a long 
with the primary key of the record I want to update. If I paste this 
code into a JSP, then I get the desired result, BUT, if I paste and run the 
code from a Servlet (exactly the same code), then my "Español" becomes 
"Espaýol"... I've tried almost everything, I've runned the Servlet on the 
J2EE server and locally whit the debugger, and the same result. My 
DataBase server is a Oracle 8.1.7 Database, and I'm using Oracle 9i 
Application Server OC4J(the Orion AS). The problem is the same 
with "á", "é", "í" and so on. I'll apreciate any kind of help you can 
give me. Thanks in advance, and please forgive my English. 
Gustavo Comba 


RE: Servlet JDBC character conversion problem

2001-10-15 Thread J.D. Bertron



Others 
may have a better answer. You should try a System.out.println() of your m_Idioma 
in the code to see what it looks like when it gets to your servlet. 

I 
suspect you submit this value from an HTML Form and somehow the string is being 
encoded in one way by the browserand decoded in another by the servlet. 
There are numerous problems already documented with the class URLEncoder because 
of locale mismatches between the client and the server.
Make 
sure the language settings on each machine (and browsers) match and this problem 
should go away.
I had 
a similar problem and finally abandoned using URLEncoder. I now expand every 
unicode value to HEX and back in URLs/Forms to avoid this 
nightmare.
J.D

  -Original Message-From: Gustavo Comba 
  [mailto:[EMAIL PROTECTED]]Sent: Monday, October 15, 2001 
  7:29 AMTo: Orion-InterestSubject: Servlet JDBC character 
  conversion problem
  Hi, I'm having a strange problem. I'm developing a J2EE Web 
  Application, with Entity Beans, Servlets, JSPs and so on. I've started 
  to get character conversion problems, and I've isolated the piece of code 
  giving me problems. The code is: 
  DriverManager.registerDriver(new 
  oracle.jdbc.driver.OracleDriver()); Connection con = 
  DriverManager.getConnection ("jdbc:oracle:thin:@oraclehost:1521:orcl", 
  "user", "password"); dumpTable(con, out); String updateStatement = 
  "UPDATE IDIOMAS SET IDIOMA = ? WHERE IDIDIOMA = ? "; PreparedStatement 
  prepStmt = con.prepareStatement (updateStatement); 
  prepStmt.setString(1, m_Idioma); prepStmt.setLong(2, m_Id); 
  prepStmt.executeUpdate(); prepStmt.close(); con.close(); 
  Where "m_Idioma", which is a standard java.lang.String, which 
  eventually is "Español", and m_Id is a long with the primary key of 
  the record I want to update. If I paste this code into a JSP, then I 
  get the desired result, BUT, if I paste and run the code from a Servlet 
  (exactly the same code), then my "Español" becomes "Espaýol"... I've 
  tried almost everything, I've runned the Servlet on the J2EE server 
  and locally whit the debugger, and the same result. My DataBase server 
  is a Oracle 8.1.7 Database, and I'm using Oracle 9i Application Server 
  OC4J(the Orion AS). The problem is the same with "á", "é", "í" 
  and so on. I'll apreciate any kind of help you can give me. 
  Thanks in advance, and please forgive my English. Gustavo 
  Comba 


Re: Servlet JDBC character conversion problem

2001-10-15 Thread Eduardo San Martin B.

Gustavo:

I had a similar problem using PostgreSQL. I solved it changing my 
database encoding to UNICODE, which is what Java uses for String 
representation.

Hope it solves your problem. Regards,

Eduardo San Martín.
Concepción - Chile.


Gustavo Comba wrote:

 Hi,

 I'm having a strange problem. I'm developing a J2EE Web
 Application, with Entity Beans, Servlets, JSPs and so on. I've
 started to get character conversion problems, and I've isolated
 the piece of code giving me problems.

 The code is:

 DriverManager.registerDriver(new
 oracle.jdbc.driver.OracleDriver());
 Connection con = DriverManager.getConnection
 (jdbc:oracle:thin:@oraclehost:1521:orcl, user, password);
 dumpTable(con, out);
 String updateStatement = UPDATE IDIOMAS SET IDIOMA = ? WHERE
 IDIDIOMA = ? ;
 PreparedStatement prepStmt = con.prepareStatement
 (updateStatement);
 prepStmt.setString(1, m_Idioma);
 prepStmt.setLong(2, m_Id);
 prepStmt.executeUpdate();
 prepStmt.close();
 con.close();

 Where m_Idioma, which is a standard java.lang.String, which
 eventually is Español, and m_Id is a long with the primary key
 of the record I want to update.

 If I paste this code into a JSP, then I get the desired
 result, BUT, if I paste and run the code from a Servlet (exactly
 the same code), then my Español becomes Espaýol... I've
 tried almost everything, I've runned the Servlet on the J2EE
 server and locally whit the debugger, and the same result.

 My DataBase server is a Oracle 8.1.7 Database, and I'm using
 Oracle 9i Application Server OC4J (the Orion AS).

 The problem is the same with á, é, í and so on.

 I'll apreciate any kind of help you can give me.

 Thanks in advance, and please forgive my English.

 Gustavo Comba








Re: Servlet JDBC character conversion problem

2001-10-15 Thread Jacky Cheung

In Oracle, you can use UTF-8 to store data to avoid conversion problem.

Jacky
- Original Message -
From: Eduardo San Martin B. [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Tuesday, October 16, 2001 8:36 AM
Subject: Re: Servlet JDBC character conversion problem


 Gustavo:

 I had a similar problem using PostgreSQL. I solved it changing my
 database encoding to UNICODE, which is what Java uses for String
 representation.

 Hope it solves your problem. Regards,

 Eduardo San Martín.
 Concepción - Chile.


 Gustavo Comba wrote:

  Hi,
 
  I'm having a strange problem. I'm developing a J2EE Web
  Application, with Entity Beans, Servlets, JSPs and so on. I've
  started to get character conversion problems, and I've isolated
  the piece of code giving me problems.
 
  The code is:
 
  DriverManager.registerDriver(new
  oracle.jdbc.driver.OracleDriver());
  Connection con = DriverManager.getConnection
  (jdbc:oracle:thin:@oraclehost:1521:orcl, user, password);
  dumpTable(con, out);
  String updateStatement = UPDATE IDIOMAS SET IDIOMA = ? WHERE
  IDIDIOMA = ? ;
  PreparedStatement prepStmt = con.prepareStatement
  (updateStatement);
  prepStmt.setString(1, m_Idioma);
  prepStmt.setLong(2, m_Id);
  prepStmt.executeUpdate();
  prepStmt.close();
  con.close();
 
  Where m_Idioma, which is a standard java.lang.String, which
  eventually is Español, and m_Id is a long with the primary key
  of the record I want to update.
 
  If I paste this code into a JSP, then I get the desired
  result, BUT, if I paste and run the code from a Servlet (exactly
  the same code), then my Español becomes Espaýol... I've
  tried almost everything, I've runned the Servlet on the J2EE
  server and locally whit the debugger, and the same result.
 
  My DataBase server is a Oracle 8.1.7 Database, and I'm using
  Oracle 9i Application Server OC4J (the Orion AS).
 
  The problem is the same with á, é, í and so on.
 
  I'll apreciate any kind of help you can give me.
 
  Thanks in advance, and please forgive my English.
 
  Gustavo Comba
 










Re: problem using primary key class with orion

2001-10-12 Thread Jeff Hubbach

Jack,

If you're using a user-defined primary key class, as opposed to a Java
class like String or Integer, then you don't define the primkey-field in
the ejb-jar.xml.

From p.370 of O'reilly's Enterprise JavaBeans, 2nd Edition, describing the
primkey-field entry in the ejb-jar.xml: It is not used if the bean has a
custom primary key or if the entity bean manages its own persistence.

Jeff.

On Thu, 11 Oct 2001 16:31:58 -0500 (CDT)
Jack C. Miller [EMAIL PROTECTED] wrote:

 
 I am having some difficulty getting orion to use my primary key class
 during deployment.  I have an EJB AnyPerson with which I use a primary
key
 class AnyPersonKey that has a public java.lang.String primaryKey field.
 During deployment, I get a compilation error that looks like the CMP
isn't
 being generated properly.
 
 The orion-ejb-jar.xml file looks fine, as does the ejb-jar file.  I get
 this error on deploy:
 
 Auto-deploying kwu-ejb.jar (Classes were updated)... Error compiling
 C:\orion\applications\kwu-phase-2\kwu-ejb.jar: Incompatible type for
 prim-key-class and type of the specified primkey-field: Cannot convert
 from class com.kw.kwu.model.AnyPerson.AnyPersonKey to class
 java.lang.String
 
 It doesn't seem to recognize that I'm using a primary key class at all,
 even though it is mapped in the orion-ejb-jar.xml file.
 
 Has anyone got a working example of this?  I'm tired of tweaking the
 orion-ejb-jar to try and get it working.
 
  Here's a snippet from my orion-ejb-jar.xml:
 
   enterprise-beans
   entity-deployment name=AnyPerson location=AnyPerson
 wrapper=AnyPersonHome_EntityHomeWrapper45 max-tx-retries=3
 table=AnyPerson data-source=jdbc/SQLServerDSCore
   primkey-mapping
   cmp-field-mapping
   fields
   cmp-field-mapping
 name=primaryKey persistence-name=primaryKey /
   /fields
   /cmp-field-mapping
   /primkey-mapping
   cmp-field-mapping name=FirstName
 persistence-name=FirstName /
   cmp-field-mapping name=LastName
 persistence-name=LastName /
   cmp-field-mapping name=Salutation
 persistence-name=Salutation /
   cmp-field-mapping name=Username
 persistence-name=Username /
   cmp-field-mapping name=Password
 persistence-name=Password /
   cmp-field-mapping name=Address1
 persistence-name=Address1 /
   cmp-field-mapping name=Address2
 persistence-name=Address2 /
   cmp-field-mapping name=City
 persistence-name=City /
   cmp-field-mapping name=StateProvId
 persistence-name=StateProvId /
   cmp-field-mapping name=PostalCd
 persistence-name=PostalCd /
   cmp-field-mapping name=Country
 persistence-name=Country /
   cmp-field-mapping name=HomePhone
 persistence-name=HomePhone /
   cmp-field-mapping name=Fax
 persistence-name=Fax /
   cmp-field-mapping name=Email
 persistence-name=Email /
   cmp-field-mapping name=LastModTime
 persistence-name=LastModTime /
   cmp-field-mapping name=ModifiedBy
 persistence-name=ModifiedBy /
 
 
 and the matching ejb-jar.xml file:
 
 ejb-jar
descriptionGenerated deployment descriptors/description
 enterprise-beans
   entity
   ejb-nameAnyPerson/ejb-name
 
 homecom.kw.kwu.model.AnyPerson.AnyPersonHome/home
 
 remotecom.kw.kwu.model.AnyPerson.AnyPerson/remote
 
 ejb-classcom.kw.kwu.model.AnyPerson.AnyPersonBean/ejb-class
   persistence-typeContainer/persistence-type
 
 prim-key-classcom.kw.kwu.model.AnyPerson.AnyPersonKey/prim-key-class
   reentrantfalse/reentrant
   cmp-fieldfield-nameprimaryKey/field-name
 
 cmp-fieldfield-nameFirstName/field-name/cmp-field
 
 cmp-fieldfield-nameLastName/field-name/cmp-field
 
 cmp-fieldfield-nameSalutation/field-name/cmp-field
 
 cmp-fieldfield-nameUsername/field-name/cmp-field
 
 cmp-fieldfield-namePassword/field-name/cmp-field
 
 cmp-fieldfield-nameAddress1/field-name/cmp-field
 
 cmp-fieldfield-nameAddress2/field-name/cmp-field
 
 cmp-fieldfield-nameCity/field-name/cmp-field
 
 cmp-fieldfield-nameStateProvId/field-name/cmp-field
 
 cmp-fieldfield-namePostalCd/field-name/cmp-field
 
 cmp-fieldfield-nameCountry/field-name/cmp-field
 
 cmp-fieldfield-nameHomePhone/field-name/cmp-field
 
 cmp-fieldfield-nameFax/field-name/cmp-field
 
 cmp-fieldfield-nameEmail/field-name/cmp-field
 
 cmp-fieldfield-nameLastModTime/field-name/cmp-field
 
 cmp-fieldfield-nameModifiedBy/field-name/cmp-field
   primkey-fieldprimaryKey/primkey-field
   /entity
 
 Thanks!
 
 Jack Miller
 
 
 
 




Re: problem using primary key class with orion

2001-10-12 Thread Jack C. Miller


I'm using EJBMaker 2.0, and it inserts the primkey-field in there.
I figured this out this morning, everything seems to be working smoothly
now.

Thanks

Jack

 Jack,

 If you're using a user-defined primary key class, as opposed to a Java
 class like String or Integer, then you don't define the primkey-field in
 the ejb-jar.xml.

 From p.370 of O'reilly's Enterprise JavaBeans, 2nd Edition, describing the
 primkey-field entry in the ejb-jar.xml: It is not used if the bean has a
 custom primary key or if the entity bean manages its own persistence.

 Jeff.

 On Thu, 11 Oct 2001 16:31:58 -0500 (CDT)
 Jack C. Miller [EMAIL PROTECTED] wrote:

 
  I am having some difficulty getting orion to use my primary key class
  during deployment.  I have an EJB AnyPerson with which I use a primary
 key
  class AnyPersonKey that has a public java.lang.String primaryKey field.
  During deployment, I get a compilation error that looks like the CMP
 isn't
  being generated properly.
 
  The orion-ejb-jar.xml file looks fine, as does the ejb-jar file.  I get
  this error on deploy:
 
  Auto-deploying kwu-ejb.jar (Classes were updated)... Error compiling
  C:\orion\applications\kwu-phase-2\kwu-ejb.jar: Incompatible type for
  prim-key-class and type of the specified primkey-field: Cannot convert
  from class com.kw.kwu.model.AnyPerson.AnyPersonKey to class
  java.lang.String
 
  It doesn't seem to recognize that I'm using a primary key class at all,
  even though it is mapped in the orion-ejb-jar.xml file.
 
  Has anyone got a working example of this?  I'm tired of tweaking the
  orion-ejb-jar to try and get it working.
 
   Here's a snippet from my orion-ejb-jar.xml:
 
  enterprise-beans
  entity-deployment name=AnyPerson location=AnyPerson
  wrapper=AnyPersonHome_EntityHomeWrapper45 max-tx-retries=3
  table=AnyPerson data-source=jdbc/SQLServerDSCore
  primkey-mapping
  cmp-field-mapping
  fields
  cmp-field-mapping
  name=primaryKey persistence-name=primaryKey /
  /fields
  /cmp-field-mapping
  /primkey-mapping
  cmp-field-mapping name=FirstName
  persistence-name=FirstName /
  cmp-field-mapping name=LastName
  persistence-name=LastName /
  cmp-field-mapping name=Salutation
  persistence-name=Salutation /
  cmp-field-mapping name=Username
  persistence-name=Username /
  cmp-field-mapping name=Password
  persistence-name=Password /
  cmp-field-mapping name=Address1
  persistence-name=Address1 /
  cmp-field-mapping name=Address2
  persistence-name=Address2 /
  cmp-field-mapping name=City
  persistence-name=City /
  cmp-field-mapping name=StateProvId
  persistence-name=StateProvId /
  cmp-field-mapping name=PostalCd
  persistence-name=PostalCd /
  cmp-field-mapping name=Country
  persistence-name=Country /
  cmp-field-mapping name=HomePhone
  persistence-name=HomePhone /
  cmp-field-mapping name=Fax
  persistence-name=Fax /
  cmp-field-mapping name=Email
  persistence-name=Email /
  cmp-field-mapping name=LastModTime
  persistence-name=LastModTime /
  cmp-field-mapping name=ModifiedBy
  persistence-name=ModifiedBy /
 
 
  and the matching ejb-jar.xml file:
 
  ejb-jar
 descriptionGenerated deployment descriptors/description
enterprise-beans
  entity
  ejb-nameAnyPerson/ejb-name
 
  homecom.kw.kwu.model.AnyPerson.AnyPersonHome/home
 
  remotecom.kw.kwu.model.AnyPerson.AnyPerson/remote
 
  ejb-classcom.kw.kwu.model.AnyPerson.AnyPersonBean/ejb-class
  persistence-typeContainer/persistence-type
 
  prim-key-classcom.kw.kwu.model.AnyPerson.AnyPersonKey/prim-key-class
  reentrantfalse/reentrant
  cmp-fieldfield-nameprimaryKey/field-name
 
  cmp-fieldfield-nameFirstName/field-name/cmp-field
 
  cmp-fieldfield-nameLastName/field-name/cmp-field
 
  cmp-fieldfield-nameSalutation/field-name/cmp-field
 
  cmp-fieldfield-nameUsername/field-name/cmp-field
 
  cmp-fieldfield-namePassword/field-name/cmp-field
 
  cmp-fieldfield-nameAddress1/field-name/cmp-field
 
  cmp-fieldfield-nameAddress2/field-name/cmp-field
 
  cmp-fieldfield-nameCity/field-name/cmp-field
 
  cmp-fieldfield-nameStateProvId/field-name/cmp-field
 
  cmp-fieldfield-namePostalCd/field-name/cmp-field
 
  cmp-fieldfield-nameCountry/field-name/cmp-field
 
  cmp-fieldfield-nameHomePhone/field-name/cmp-field
 
  cmp-fieldfield-nameFax/field-name/cmp-field
 
  cmp-fieldfield-nameEmail/field-name/cmp-field
 
  

problem using primary key class with orion

2001-10-11 Thread Jack C. Miller


I am having some difficulty getting orion to use my primary key class
during deployment.  I have an EJB AnyPerson with which I use a primary key
class AnyPersonKey that has a public java.lang.String primaryKey field.
During deployment, I get a compilation error that looks like the CMP isn't
being generated properly.

The orion-ejb-jar.xml file looks fine, as does the ejb-jar file.  I get
this error on deploy:

Auto-deploying kwu-ejb.jar (Classes were updated)... Error compiling
C:\orion\applications\kwu-phase-2\kwu-ejb.jar: Incompatible type for
prim-key-class and type of the specified primkey-field: Cannot convert
from class com.kw.kwu.model.AnyPerson.AnyPersonKey to class
java.lang.String

It doesn't seem to recognize that I'm using a primary key class at all,
even though it is mapped in the orion-ejb-jar.xml file.

Has anyone got a working example of this?  I'm tired of tweaking the
orion-ejb-jar to try and get it working.

 Here's a snippet from my orion-ejb-jar.xml:

enterprise-beans
entity-deployment name=AnyPerson location=AnyPerson
wrapper=AnyPersonHome_EntityHomeWrapper45 max-tx-retries=3
table=AnyPerson data-source=jdbc/SQLServerDSCore
primkey-mapping
cmp-field-mapping
fields
cmp-field-mapping
name=primaryKey persistence-name=primaryKey /
/fields
/cmp-field-mapping
/primkey-mapping
cmp-field-mapping name=FirstName
persistence-name=FirstName /
cmp-field-mapping name=LastName
persistence-name=LastName /
cmp-field-mapping name=Salutation
persistence-name=Salutation /
cmp-field-mapping name=Username
persistence-name=Username /
cmp-field-mapping name=Password
persistence-name=Password /
cmp-field-mapping name=Address1
persistence-name=Address1 /
cmp-field-mapping name=Address2
persistence-name=Address2 /
cmp-field-mapping name=City
persistence-name=City /
cmp-field-mapping name=StateProvId
persistence-name=StateProvId /
cmp-field-mapping name=PostalCd
persistence-name=PostalCd /
cmp-field-mapping name=Country
persistence-name=Country /
cmp-field-mapping name=HomePhone
persistence-name=HomePhone /
cmp-field-mapping name=Fax
persistence-name=Fax /
cmp-field-mapping name=Email
persistence-name=Email /
cmp-field-mapping name=LastModTime
persistence-name=LastModTime /
cmp-field-mapping name=ModifiedBy
persistence-name=ModifiedBy /


and the matching ejb-jar.xml file:

ejb-jar
   descriptionGenerated deployment descriptors/description
  enterprise-beans
entity
ejb-nameAnyPerson/ejb-name

homecom.kw.kwu.model.AnyPerson.AnyPersonHome/home

remotecom.kw.kwu.model.AnyPerson.AnyPerson/remote

ejb-classcom.kw.kwu.model.AnyPerson.AnyPersonBean/ejb-class
persistence-typeContainer/persistence-type

prim-key-classcom.kw.kwu.model.AnyPerson.AnyPersonKey/prim-key-class
reentrantfalse/reentrant
cmp-fieldfield-nameprimaryKey/field-name

cmp-fieldfield-nameFirstName/field-name/cmp-field

cmp-fieldfield-nameLastName/field-name/cmp-field

cmp-fieldfield-nameSalutation/field-name/cmp-field

cmp-fieldfield-nameUsername/field-name/cmp-field

cmp-fieldfield-namePassword/field-name/cmp-field

cmp-fieldfield-nameAddress1/field-name/cmp-field

cmp-fieldfield-nameAddress2/field-name/cmp-field

cmp-fieldfield-nameCity/field-name/cmp-field

cmp-fieldfield-nameStateProvId/field-name/cmp-field

cmp-fieldfield-namePostalCd/field-name/cmp-field

cmp-fieldfield-nameCountry/field-name/cmp-field

cmp-fieldfield-nameHomePhone/field-name/cmp-field

cmp-fieldfield-nameFax/field-name/cmp-field

cmp-fieldfield-nameEmail/field-name/cmp-field

cmp-fieldfield-nameLastModTime/field-name/cmp-field

cmp-fieldfield-nameModifiedBy/field-name/cmp-field
primkey-fieldprimaryKey/primkey-field
/entity

Thanks!

Jack Miller







RE: problem using primary key class with orion

2001-10-11 Thread Alex Paransky

And if you are using EJB 2.0 style CMP, hopefully, the primaryKey is defined
as:

public abstract String getPrimaryKey();
public abstract void setPrimaryKey(String key);

or as a

public String primaryKey;

in a 1.0 style CMP.

Methods.

Right?

-AP_



-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Jack C. Miller
Sent: Thursday, October 11, 2001 2:32 PM
To: Orion-Interest
Subject: problem using primary key class with orion



I am having some difficulty getting orion to use my primary key class
during deployment.  I have an EJB AnyPerson with which I use a primary key
class AnyPersonKey that has a public java.lang.String primaryKey field.
During deployment, I get a compilation error that looks like the CMP isn't
being generated properly.

The orion-ejb-jar.xml file looks fine, as does the ejb-jar file.  I get
this error on deploy:

Auto-deploying kwu-ejb.jar (Classes were updated)... Error compiling
C:\orion\applications\kwu-phase-2\kwu-ejb.jar: Incompatible type for
prim-key-class and type of the specified primkey-field: Cannot convert
from class com.kw.kwu.model.AnyPerson.AnyPersonKey to class
java.lang.String

It doesn't seem to recognize that I'm using a primary key class at all,
even though it is mapped in the orion-ejb-jar.xml file.

Has anyone got a working example of this?  I'm tired of tweaking the
orion-ejb-jar to try and get it working.

 Here's a snippet from my orion-ejb-jar.xml:

enterprise-beans
entity-deployment name=AnyPerson location=AnyPerson
wrapper=AnyPersonHome_EntityHomeWrapper45 max-tx-retries=3
table=AnyPerson data-source=jdbc/SQLServerDSCore
primkey-mapping
cmp-field-mapping
fields
cmp-field-mapping
name=primaryKey persistence-name=primaryKey /
/fields
/cmp-field-mapping
/primkey-mapping
cmp-field-mapping name=FirstName
persistence-name=FirstName /
cmp-field-mapping name=LastName
persistence-name=LastName /
cmp-field-mapping name=Salutation
persistence-name=Salutation /
cmp-field-mapping name=Username
persistence-name=Username /
cmp-field-mapping name=Password
persistence-name=Password /
cmp-field-mapping name=Address1
persistence-name=Address1 /
cmp-field-mapping name=Address2
persistence-name=Address2 /
cmp-field-mapping name=City
persistence-name=City /
cmp-field-mapping name=StateProvId
persistence-name=StateProvId /
cmp-field-mapping name=PostalCd
persistence-name=PostalCd /
cmp-field-mapping name=Country
persistence-name=Country /
cmp-field-mapping name=HomePhone
persistence-name=HomePhone /
cmp-field-mapping name=Fax
persistence-name=Fax /
cmp-field-mapping name=Email
persistence-name=Email /
cmp-field-mapping name=LastModTime
persistence-name=LastModTime /
cmp-field-mapping name=ModifiedBy
persistence-name=ModifiedBy /


and the matching ejb-jar.xml file:

ejb-jar
   descriptionGenerated deployment descriptors/description
  enterprise-beans
entity
ejb-nameAnyPerson/ejb-name

homecom.kw.kwu.model.AnyPerson.AnyPersonHome/home

remotecom.kw.kwu.model.AnyPerson.AnyPerson/remote

ejb-classcom.kw.kwu.model.AnyPerson.AnyPersonBean/ejb-class
persistence-typeContainer/persistence-type

prim-key-classcom.kw.kwu.model.AnyPerson.AnyPersonKey/prim-key-class
reentrantfalse/reentrant
cmp-fieldfield-nameprimaryKey/field-name

cmp-fieldfield-nameFirstName/field-name/cmp-field

cmp-fieldfield-nameLastName/field-name/cmp-field

cmp-fieldfield-nameSalutation/field-name/cmp-field

cmp-fieldfield-nameUsername/field-name/cmp-field

cmp-fieldfield-namePassword/field-name/cmp-field

cmp-fieldfield-nameAddress1/field-name/cmp-field

cmp-fieldfield-nameAddress2/field-name/cmp-field

cmp-fieldfield-nameCity/field-name/cmp-field

cmp-fieldfield-nameStateProvId/field-name/cmp-field

cmp-fieldfield-namePostalCd/field-name/cmp-field

cmp-fieldfield-nameCountry/field-name/cmp-field

cmp-fieldfield-nameHomePhone/field-name/cmp-field

cmp-fieldfield-nameFax/field-name/cmp-field

cmp-fieldfield-nameEmail/field-name/cmp-field

cmp-fieldfield-nameLastModTime/field-name/cmp-field

cmp-fieldfield-nameModifiedBy/field-name/cmp-field
primkey-fieldprimaryKey/primkey-field
/entity

Thanks!

Jack Miller







Re: Problem starting Orion on linux...

2001-10-10 Thread Joel B. Kinney

It looks like you are using a kaffe vm, 
maybe try using a jdk1.2 or higher?

Joel

On Tue, 9 Oct 2001, Jimbo Jones wrote:

 I have gotten Orion to start on linux with no problems before, but now out 
 of the blue I cannot do it.  At first, it gave me a NoClassDefFoundError for 
 org/xml/something.  I thought that was odd, but I put J2EE_HOME/lib/j2ee.jar 
 in my classpath and that fixed that.  But now I am getting the following 
 error:
 
 [orion@localhost orion]$ java -jar orion.jar
 Internal error: caught an unexpected exception.
 Please check your CLASSPATH and your installation.
 java/lang/NoClassDefFoundError: com/evermind/gui/server/ServiceConsole
 at java.lang.reflect.Method.invoke(Method.java:native)
 at kaffe.jar.ExecJarName.main(ExecJarName.java:70)
 at kaffe.jar.ExecJar.main(ExecJar.java:59)
 Aborted
 
 I can't, for the life of me, figure out where that class is or why I am even 
 getting this error in the first place.  I've never seen it before.
 
 Thanks,
 James
 
 _
 Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
 
 
 





RE: Problem implementing Custom User Management using SimpleUserM anager

2001-10-10 Thread Justin Wood

It sounds like some of you may be forgetting to create an initial account in
the database ...

You can't have a user in principals.xml and expect orion to know where to
fetch the authentication information.

I have an EJB user manager and to make things easy for my self.  I protected
a minimal administration site with the xml user manager.  This site allows
the server administrator to log on and define root user/s who can then
access the fully functional user administration and other applications.

Justin

-Original Message-
From: SAURUGGER,PETER (A-PaloAlto,ex2)
[mailto:[EMAIL PROTECTED]]
Sent: 09 October 2001 06:43
To: Orion-Interest
Subject: RE: Problem implementing Custom User Management using
SimpleUserM anager


I have not tried this yet, but it just occurred to me that the
naming.principal is just establishing the jndi security context - it does
not do a login.

If you want to login, you have to first establish the context with an
account in principals.xml, and then use RoleManager.login(...) to login your
user. The role manager gets information about the usermanager you
registered, the InitialContext has nothing to do with your usermanager.
(This is just a Gedankenexperiment - if you try it, let me know whether it
actually works)

--peter

-Original Message-
From: Jeff Schnitzer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 02, 2001 5:15 PM
To: Orion-Interest
Subject: RE: Problem implementing Custom User Management using
SimpleUserManager


I am also experiencing this - no matter what I try (and I'm pretty sure
I've tried everything), I cannot get an application client user to log
in using a custom user manager (either SimpleUserManager-derived or
DataSourceUserManager).

Note that the application client logs in just fine using admin or any
of the principals.xml users.  But I get the Invalid username/password
exception when trying users produced by the custom user manager.

This is with Orion 1.5.2.  Does anyone have application clients working
with a custom user manager?

Jeff

 -Original Message-
 From: Adam Maliborski [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, September 29, 2001 7:09 AM
 To: Orion-Interest
 Subject: Problem implementing Custom User Management using
 SimpleUserManager
 
 Hi,
 
 I am trying to validate users of my ejb server via a database using
the
 SimpleUserManager.
 
 I have extended SimpleUserManager and overridden the three methods and
 confirmed that they are being called and returning true.
 
 I have made the following changes to the descriptors.
 
 ORION-APPLICATION.XML
 orion-application deployment-version=1.5.2
 
ejb-module remote=false path=ejb.jar /
web-module id=web path=web.war /
 
security-role-mapping name=administration
   group name=administration /
/security-role-mapping
security-role-mapping name=productbuilder
   group name=productbuilder /
/security-role-mapping
security-role-mapping name=enduser
   group name=enduser /
/security-role-mapping
persistence path=persistence /
library path=c:\test\ejb.jar /
principals path=principals.xml /
user-manager class=com.test.rms.user.orion.UCIServerUserManager
/
log
   file path=application.log /
/log
 
namespace-access
   read-access
  namespace-resource root=
 security-role-mapping name=lt;jndi-user-rolegt;
  group name=administration /
  group name=productbuilder /
  group name=enduser /
 /security-role-mapping
  /namespace-resource
   /read-access
   write-access
  namespace-resource root=
 security-role-mapping name=lt;jndi-user-rolegt;
  group name=administration /
  group name=productbuilder /
  group name=enduser /
 /security-role-mapping
  /namespace-resource
   /write-access
/namespace-access
 /orion-application
 
 PRINCIPALS.XML
 principals
groups
   group name=administration
  permission name=administration /
permission name=rmi:login /
  permission name=com.evermind.server.rmi.RMIPermission /
   /group
   group name=productbuilder
  permission name=rmi:login /
  permission name=com.evermind.server.rmi.RMIPermission /
   /group
   group name=enduser
permission name=rmi:login /
  permission name=com.evermind.server.rmi.RMIPermission /
   /group
/groups
users
/users
 /principals
 
 ORION-EJB-JAR.XML
 orion-ejb-jar deployment-version=1.5.2
deployment-time=e93e1950d0
enterprise-beans
   ..
   .. (EJB DECLARATION)
   ..
   assembly-descriptor
  security-role-mapping name=administration
  /security-role-mapping
  security-role-mapping name=productbuilder
  /security-role-mapping
  security-role-mapping name=enduser
  /security-role-mapping
  default-method-access

Re: Date conversion problem ??

2001-10-10 Thread Nick Newman

Hi Eddie,

The code that Fredrick Lindgren sent to this list looks like the right way 
of obtaining a java.util.Date from a java.sql.Timestamp.

As for your question of why, part of the answer may be that three java 
classes are somewhat confusing:

  - java.util.Date (not used by JDBC) contains a date and time down to 
millisecond precision

  - java.sql.Date (used by JDBC) contains a date, and inherits from 
java.util.Date

  - java.sql.Timestamp (used by JDBC) contains a date and time down to 
nanosecond precision, and inherits from java.util.Date

The javadoc for java.sql.Timestamp explains exactly where it stores the 
milliseconds (actually nanoseconds).

Another question is why Sun decided to write such strange code. I'm afraid 
I don't have an answer for that!

Nick


At 10:04 AM 10/8/01 +0200, you wrote:
Thanks Frederik,

But what I don't understand is why Date only contains the second part and
not the millisecond part and when it does ? That is, when I create a Date
object and print the millisecond part with the getTime() method, I do see
the millisecond part but when I receive something from the database, the
millisecond part is zero. Does this mean that is only zero when the date
field is handled by the JDBC part ??

Eddie
snip





RE: Problem using custom tags.

2001-10-09 Thread Johan Fredriksson

inline

-Original Message-
From: E Stones [mailto:[EMAIL PROTECTED]]
Sent: den 8 oktober 2001 14:01
To: Orion-Interest
Subject: Problem using custom tags.


The following example is taken from Chapter 2 of Advanced Java Server 
Pages
by David M. Geary

I'm getting this error when I try to implement to code sample below:

--
500 Internal Server Error:
Error parsing JSP page /test1.jsp line 13
Bean 'item' already defined
--


Has anyone any ideas what might be the problem?


***
test.jsp code:
***

htmlheadtitleAn Iterator/title/head
%@ taglib uri='/WEB-INF/tlds/iterator.tld' prefix='it' %
body

% java.util.Vector vector = new java.util.Vector();
vector.addElement(one);   vector.addElement(two);
vector.addElement(three); vector.addElement(four);
%

Iterating over %= vector % ...p

--- declaration of item
it:iterate id='item' collection='%= vector %'
--- declaration 2 of item
   !--jsp:useBean id='item' scope='page' class='java.lang.String'/--

//above should not be necessary.
   
   Item: %= item %br
/it:iterate

/p
/body
/html



Iterator.tld

?xml version=1.0 encoding=ISO-8859-1 ?
!DOCTYPE taglib PUBLIC -//Sun Microsystems, Inc.//DTD JSP Tag Library 
1.1//EN web-jsptaglib_1_1.dtd
taglib
tlibversion1.0/tlibversion
jspversion1.1/jspversion
shortnamesmp/shortname
infoSun Microsystems Press Tag Library/info
tag
nameiterate/name
tagclasstags.IteratorTag/tagclass
teiclasstags.IteratorTagInfo/teiclass
bodycontentJSP/bodycontent
attribute
nameid/name
requiredtrue/required
rtexprvaluetrue/rtexprvalue
/attribute
attribute
namecollection/name
requiredtrue/required
rtexprvaluetrue/rtexprvalue
/attribute
infoIterates over a collection/info
/tag
/taglib

***
IteratorTag.java
***

import java.util.Collection;
import java.util.Iterator;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.BodyTagSupport;

public class IteratorTag extends BodyTagSupport {
   private Collection collection;
   private Iterator iterator;

   public void setCollection(Collection collection) {
  this.collection = collection;
   }
   public int doStartTag() throws JspException {
  return collection.size()  0 ? EVAL_BODY_TAG : SKIP_BODY;
   }
   public void doInitBody() throws JspException {
  iterator = collection.iterator();
  pageContext.setAttribute(getId(), iterator.next());
   }
   public int doAfterBody() throws JspException {
  if(iterator.hasNext()) {
 pageContext.setAttribute(getId(), iterator.next());
 return EVAL_BODY_TAG;
  }
  else {
 try {
getBodyContent().writeOut(getPreviousOut());
 }
 catch(java.io.IOException e) {
throw new JspException(e.getMessage());
 }
 return SKIP_BODY;
  }
   }
}



*
IteratorTagInfo.java
*

package tags;

import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;

public class IteratorTagInfo extends TagExtraInfo {
   public VariableInfo[] getVariableInfo(TagData data) {
  return new VariableInfo[] {
 new VariableInfo(data.getId(), // scripting var's name
   java.lang.Object, // variable's type
   true, // whether variable is created
   VariableInfo.NESTED) // scope
  };
   }
}








_
Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp






RE: Problem implementing Custom User Management using SimpleUserManager

2001-10-09 Thread SAURUGGER,PETER (A-PaloAlto,ex2)

I have not tried this yet, but it just occurred to me that the
naming.principal is just establishing the jndi security context - it does
not do a login.

If you want to login, you have to first establish the context with an
account in principals.xml, and then use RoleManager.login(...) to login your
user. The role manager gets information about the usermanager you
registered, the InitialContext has nothing to do with your usermanager.
(This is just a Gedankenexperiment - if you try it, let me know whether it
actually works)

--peter

-Original Message-
From: Jeff Schnitzer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, October 02, 2001 5:15 PM
To: Orion-Interest
Subject: RE: Problem implementing Custom User Management using
SimpleUserManager


I am also experiencing this - no matter what I try (and I'm pretty sure
I've tried everything), I cannot get an application client user to log
in using a custom user manager (either SimpleUserManager-derived or
DataSourceUserManager).

Note that the application client logs in just fine using admin or any
of the principals.xml users.  But I get the Invalid username/password
exception when trying users produced by the custom user manager.

This is with Orion 1.5.2.  Does anyone have application clients working
with a custom user manager?

Jeff

 -Original Message-
 From: Adam Maliborski [mailto:[EMAIL PROTECTED]]
 Sent: Saturday, September 29, 2001 7:09 AM
 To: Orion-Interest
 Subject: Problem implementing Custom User Management using
 SimpleUserManager
 
 Hi,
 
 I am trying to validate users of my ejb server via a database using
the
 SimpleUserManager.
 
 I have extended SimpleUserManager and overridden the three methods and
 confirmed that they are being called and returning true.
 
 I have made the following changes to the descriptors.
 
 ORION-APPLICATION.XML
 orion-application deployment-version=1.5.2
 
ejb-module remote=false path=ejb.jar /
web-module id=web path=web.war /
 
security-role-mapping name=administration
   group name=administration /
/security-role-mapping
security-role-mapping name=productbuilder
   group name=productbuilder /
/security-role-mapping
security-role-mapping name=enduser
   group name=enduser /
/security-role-mapping
persistence path=persistence /
library path=c:\test\ejb.jar /
principals path=principals.xml /
user-manager class=com.test.rms.user.orion.UCIServerUserManager
/
log
   file path=application.log /
/log
 
namespace-access
   read-access
  namespace-resource root=
 security-role-mapping name=lt;jndi-user-rolegt;
  group name=administration /
  group name=productbuilder /
  group name=enduser /
 /security-role-mapping
  /namespace-resource
   /read-access
   write-access
  namespace-resource root=
 security-role-mapping name=lt;jndi-user-rolegt;
  group name=administration /
  group name=productbuilder /
  group name=enduser /
 /security-role-mapping
  /namespace-resource
   /write-access
/namespace-access
 /orion-application
 
 PRINCIPALS.XML
 principals
groups
   group name=administration
  permission name=administration /
permission name=rmi:login /
  permission name=com.evermind.server.rmi.RMIPermission /
   /group
   group name=productbuilder
  permission name=rmi:login /
  permission name=com.evermind.server.rmi.RMIPermission /
   /group
   group name=enduser
permission name=rmi:login /
  permission name=com.evermind.server.rmi.RMIPermission /
   /group
/groups
users
/users
 /principals
 
 ORION-EJB-JAR.XML
 orion-ejb-jar deployment-version=1.5.2
deployment-time=e93e1950d0
enterprise-beans
   ..
   .. (EJB DECLARATION)
   ..
   assembly-descriptor
  security-role-mapping name=administration
  /security-role-mapping
  security-role-mapping name=productbuilder
  /security-role-mapping
  security-role-mapping name=enduser
  /security-role-mapping
  default-method-access
 security-role-mapping name=lt;default-ejb-caller-
 rolegt; impliesAll=true /
  /default-method-access
   /assembly-descriptor
 /orion-ejb-jar
 
 When I try to access the ejb server through an external java client
 using the following code :
 
 Properties prop = new Properties();
 prop.put
 (java.naming.factory.initial,
com.evermind.server.ApplicationClientIn
 itialContextFactory);
 
 prop.put(java.naming.provider.url, ormi://localhost/UCIServer);
 prop.put(java.naming.security.principal, adammal);
 prop.put(java.naming.security.credentials, adammal);
 
 Context initial = new InitialContext(prop);
 
 I get the following error :
 
 java.lang.SecurityException: Invalid username/password for UCIServer

RE: Problem implementing Custom User Management using SimpleUserManager

2001-10-09 Thread Reason

I will be interested to hear from anyone with experience in this; I'm
developing an application at the moment that will be relying on a cusomter
user manager. Indeed, the apparent simplicity of implementation is why I
picked up on Orion. So any bumps in the road would be nice to note in
advance.

So let us know :)

Reason
http://www.exratio.com/

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED]]On Behalf Of
 SAURUGGER,PETER (A-PaloAlto,ex2)
 Sent: Tuesday, October 09, 2001 9:43 AM
 To: Orion-Interest
 Subject: RE: Problem implementing Custom User Management using
 SimpleUserManager


 I have not tried this yet, but it just occurred to me that the
 naming.principal is just establishing the jndi security context - it does
 not do a login.

 If you want to login, you have to first establish the context with an
 account in principals.xml, and then use RoleManager.login(...) to
 login your
 user. The role manager gets information about the usermanager you
 registered, the InitialContext has nothing to do with your usermanager.
 (This is just a Gedankenexperiment - if you try it, let me know whether it
 actually works)

   --peter

 -Original Message-
 From: Jeff Schnitzer [mailto:[EMAIL PROTECTED]]
 Sent: Tuesday, October 02, 2001 5:15 PM
 To: Orion-Interest
 Subject: RE: Problem implementing Custom User Management using
 SimpleUserManager


 I am also experiencing this - no matter what I try (and I'm pretty sure
 I've tried everything), I cannot get an application client user to log
 in using a custom user manager (either SimpleUserManager-derived or
 DataSourceUserManager).

 Note that the application client logs in just fine using admin or any
 of the principals.xml users.  But I get the Invalid username/password
 exception when trying users produced by the custom user manager.

 This is with Orion 1.5.2.  Does anyone have application clients working
 with a custom user manager?

 Jeff

  -Original Message-
  From: Adam Maliborski [mailto:[EMAIL PROTECTED]]
  Sent: Saturday, September 29, 2001 7:09 AM
  To: Orion-Interest
  Subject: Problem implementing Custom User Management using
  SimpleUserManager
 
  Hi,
 
  I am trying to validate users of my ejb server via a database using
 the
  SimpleUserManager.
 
  I have extended SimpleUserManager and overridden the three methods and
  confirmed that they are being called and returning true.
 
  I have made the following changes to the descriptors.
 
  ORION-APPLICATION.XML
  orion-application deployment-version=1.5.2
 
 ejb-module remote=false path=ejb.jar /
 web-module id=web path=web.war /
 
 security-role-mapping name=administration
group name=administration /
 /security-role-mapping
 security-role-mapping name=productbuilder
group name=productbuilder /
 /security-role-mapping
 security-role-mapping name=enduser
group name=enduser /
 /security-role-mapping
 persistence path=persistence /
 library path=c:\test\ejb.jar /
 principals path=principals.xml /
 user-manager class=com.test.rms.user.orion.UCIServerUserManager
 /
 log
file path=application.log /
 /log
 
 namespace-access
read-access
   namespace-resource root=
  security-role-mapping name=lt;jndi-user-rolegt;
 group name=administration /
 group name=productbuilder /
 group name=enduser /
  /security-role-mapping
   /namespace-resource
/read-access
write-access
   namespace-resource root=
  security-role-mapping name=lt;jndi-user-rolegt;
 group name=administration /
 group name=productbuilder /
 group name=enduser /
  /security-role-mapping
   /namespace-resource
/write-access
 /namespace-access
  /orion-application
 
  PRINCIPALS.XML
  principals
 groups
group name=administration
   permission name=administration /
   permission name=rmi:login /
   permission name=com.evermind.server.rmi.RMIPermission /
/group
group name=productbuilder
   permission name=rmi:login /
   permission name=com.evermind.server.rmi.RMIPermission /
/group
group name=enduser
   permission name=rmi:login /
   permission name=com.evermind.server.rmi.RMIPermission /
/group
 /groups
 users
 /users
  /principals
 
  ORION-EJB-JAR.XML
  orion-ejb-jar deployment-version=1.5.2
 deployment-time=e93e1950d0
 enterprise-beans
..
.. (EJB DECLARATION)
..
  assembly-descriptor
 security-role-mapping name=administration
 /security-role-mapping
 security-role-mapping name=productbuilder
 /security-role-mapping
 security-role-mapping name=enduser
 /security-role-mapping
 default-method-access
security-role

RE: Problem using custom tags.

2001-10-09 Thread Shields James

Could someone managing this list stop these messages?
I've had about 200 of them, and I'm getting a bit pied of.

-Original Message-
From: Johan Fredriksson [mailto:[EMAIL PROTECTED]]
Sent: 09 October 2001 09:59
To: Orion-Interest
Subject: RE: Problem using custom tags.


inline

-Original Message-
From: E Stones [mailto:[EMAIL PROTECTED]]
Sent: den 8 oktober 2001 14:01
To: Orion-Interest
Subject: Problem using custom tags.


The following example is taken from Chapter 2 of Advanced Java Server 
Pages
by David M. Geary

I'm getting this error when I try to implement to code sample below:

--
500 Internal Server Error:
Error parsing JSP page /test1.jsp line 13
Bean 'item' already defined
--


Has anyone any ideas what might be the problem?


***
test.jsp code:
***

htmlheadtitleAn Iterator/title/head
%@ taglib uri='/WEB-INF/tlds/iterator.tld' prefix='it' %
body

% java.util.Vector vector = new java.util.Vector();
vector.addElement(one);   vector.addElement(two);
vector.addElement(three); vector.addElement(four);
%

Iterating over %= vector % ...p

--- declaration of item
it:iterate id='item' collection='%= vector %'
--- declaration 2 of item
   !--jsp:useBean id='item' scope='page' class='java.lang.String'/--

//above should not be necessary.
   
   Item: %= item %br
/it:iterate

/p
/body
/html



Iterator.tld

?xml version=1.0 encoding=ISO-8859-1 ?
!DOCTYPE taglib PUBLIC -//Sun Microsystems, Inc.//DTD JSP Tag Library 
1.1//EN web-jsptaglib_1_1.dtd
taglib
tlibversion1.0/tlibversion
jspversion1.1/jspversion
shortnamesmp/shortname
infoSun Microsystems Press Tag Library/info
tag
nameiterate/name
tagclasstags.IteratorTag/tagclass
teiclasstags.IteratorTagInfo/teiclass
bodycontentJSP/bodycontent
attribute
nameid/name
requiredtrue/required
rtexprvaluetrue/rtexprvalue
/attribute
attribute
namecollection/name
requiredtrue/required
rtexprvaluetrue/rtexprvalue
/attribute
infoIterates over a collection/info
/tag
/taglib

***
IteratorTag.java
***

import java.util.Collection;
import java.util.Iterator;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.BodyTagSupport;

public class IteratorTag extends BodyTagSupport {
   private Collection collection;
   private Iterator iterator;

   public void setCollection(Collection collection) {
  this.collection = collection;
   }
   public int doStartTag() throws JspException {
  return collection.size()  0 ? EVAL_BODY_TAG : SKIP_BODY;
   }
   public void doInitBody() throws JspException {
  iterator = collection.iterator();
  pageContext.setAttribute(getId(), iterator.next());
   }
   public int doAfterBody() throws JspException {
  if(iterator.hasNext()) {
 pageContext.setAttribute(getId(), iterator.next());
 return EVAL_BODY_TAG;
  }
  else {
 try {
getBodyContent().writeOut(getPreviousOut());
 }
 catch(java.io.IOException e) {
throw new JspException(e.getMessage());
 }
 return SKIP_BODY;
  }
   }
}



*
IteratorTagInfo.java
*

package tags;

import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;

public class IteratorTagInfo extends TagExtraInfo {
   public VariableInfo[] getVariableInfo(TagData data) {
  return new VariableInfo[] {
 new VariableInfo(data.getId(), // scripting var's name
   java.lang.Object, // variable's type
   true, // whether variable is created
   VariableInfo.NESTED) // scope
  };
   }
}








_
Get your FREE download of MSN Explorer at
http://explorer.msn.com/intl.asp






Re: Date conversion problem ??

2001-10-08 Thread Eddie

Thanks Frederik,

But what I don't understand is why Date only contains the second part and
not the millisecond part and when it does ? That is, when I create a Date
object and print the millisecond part with the getTime() method, I do see
the millisecond part but when I receive something from the database, the
millisecond part is zero. Does this mean that is only zero when the date
field is handled by the JDBC part ??

Eddie

- Original Message -
From: Fredrik Lindgren [EMAIL PROTECTED]
To: Orion-Interest [EMAIL PROTECTED]
Sent: Friday, October 05, 2001 6:50 PM
Subject: Re: Date conversion problem ??


 You are right that is not the JDBC driver that makes this happen. It is
 JDBC itself. java.sql.Timestamp is a subclass of java.util.Date but it
 returns the integral seconds when calling getTime(). It supports nano
 second precision with the getNanos() method.

 The javadoc includes this note:
 Note: This type is a composite of a java.util.Date and a separate
 nanoseconds value. Only integral seconds are stored in the
 java.util.Date component. The fractional seconds - the nanos - are
 separate. The getTime method will return only integral seconds. If a
 time value that includes the fractional seconds is desired, you must
 convert nanos to milliseconds (nanos/100) and add this to the
 getTime value.  The Timestamp.equals(Object) method never returns  true
 when passed a value of type java.util.Date because the nanos component
 of a date is unknown. As a result, the Timestamp.equals(Object) method
 is not symmetric with respect to the java.util.Date.equals(Object)
 method.  Also, the hashcode method uses the underlying  java.util.Date
 implementation and therefore does not include nanos in its computation.

   Due to the differences between the Timestamp class and the
 java.util.Date class mentioned above, it is recommended that code not
 view Timestamp values generically as an instance of java.util.Date.  The
 inheritance relationship between Timestamp and java.util.Date really
 denotes implementation inheritance, and not type inheritance.

 I hope this helped

 /Fredrik Lindgren

 Ed Bras wrote:

  Hellu,
 
  I retrieve a datetime  field from the Ms SQL server. With a win sql
client I
  see:
  2001-10-03 19:33:10.257
 
  When I print the field in an EJB (I use CMP) the millisecond part is
zero
  !!!:
  Wed Oct 03 19:33:10 GMT+02:00 2001
  In milliseconds: 100213039
 
  I had the same problem with the Postgres driver so I don't think it is
the
  JDBC driver (Opta driver of i-net)
 
  Has anyone any idea what is happening and how I can solve this ??
  Hope to get an answer, otherwise I have to convert the datetime fields
in
  the database to a long to store it in milliseconds, which isn't very
elegant
  I think !?
 
  Eddie
 
 
 
 
 
 
 








  1   2   3   4   5   6   7   >