RE: RE: JNDI naming exception when running app on orion from JBuilder

2002-03-19 Thread [EMAIL PROTECTED]


try:

env.put(Context.PROVIDER_URL, ormi://localhost/flexisale2);

instead of:

env.put(Context.PROVIDER_URL, http://localhost/flexisale2;);

That should give you the correct provider. I still don't understand why you are 
needing to specify JNDI properties.  If you are running both your Servlet and your 
EJB's in the same instance of Orion specifying the Provider and Context factory should 
not be required.

I debug EJB's, JSP's (using development mode), and Servlets inside of JBuilder 5 
Enterprise without a problem.  I have never needed to create an application-client.xml 
file. You do need, however, to specify the ejb-ref in the web.xml file.

ejb-ref
ejb-ref-nameejb/SPControllerHome/ejb-ref-name
ejb-ref-typeSession/ejb-ref-type
homeuk.co.britannic.flexisale.server.spcontroller.SPControllerHome/home
remoteuk.co.britannic.flexisale.server.spcontroller.SPController/remote
/ejb-ref






Original Message:
-
From: DORAN, GRANT [EMAIL PROTECTED]
Date: Tue, 19 Mar 2002 10:39:13 -
To: [EMAIL PROTECTED]
Subject: RE: JNDI naming exception when running app on orion from JBuilder
  


Thanks,

I am using JBuilder 6 Enterprise (trial) and debugging using the Non-jpda
method described in the article that you mention.
I have managed to move on slightly from that problem, by changing the code
in the servlet to:

Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
com.evermind.server.ApplicationClientInitialContextFactory);
env.put(Context.PROVIDER_URL, http://localhost/flexisale2;);

// Get the initial JNDI context using our settings
Context context;
try
{
  context = new InitialContext(env);
}
catch (Throwable e)
{
  e.printStackTrace();
  throw new ServletException(
Unable to get initial JNDI context:  + e.toString());
}

and by creating an application-client.xml file and puttnig it in the .war
file in the META-INF directory.
The xml file looks like this.

?xml version=1.0 encoding=UTF-8?
!DOCTYPE application-client PUBLIC -//Sun Microsystems, Inc.//DTD J2EE
Application Client 1.2//EN
http://java.sun.com/j2ee/dtds/application-client_1_2.dtd;
application-client
display-nameSPcontroller/display-name
ejb-ref
ejb-ref-nameejb/SPControllerHome/res-ref-name
ejb-ref-typeSession/res-type
 
homeuk.co.britannic.flexisale.server.spcontroller.SPControllerHome/home
 
remoteuk.co.britannic.flexisale.server.spcontroller.SPController/remote
/ejb-ref
/application-client

But when the line creating the new context is run;

  context = new InitialContext(env);

I get the following exception:

javax.naming.NamingException: META-INF/application-client.xml resource not
found (see J2EE spec, application-client chapter for requirements and format
of the file)
at
com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext
(Unknown Source)
at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:665)
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
uk.co.britannic.flexisale.server.test.TestServlet.init(TestServlet.java:46)
at com.evermind._ah._axe(Unknown Source)
at com.evermind._ah._fpd(Unknown Source)
at com.evermind._ah._cwc(Unknown Source)
at com.evermind._io._twc(Unknown Source)
at com.evermind._io._gc(Unknown Source)
at com.evermind._if.run(Unknown Source)

This error occurs even when I'm running orion by itself.
I've looked high and low and cant find any info that indicates why the file
can't be found.
Every example that I can find defines the provider_url as the root of the
web application, like this;

   env.put(Context.PROVIDER_URL, http://localhost/flexisale2;);

If the application-client.xml file is in the META-INF directory of the web
application, why do I get this error?
Has anyone done this before?

Thanks,


Grant Doran
Contract Java Developer/Architect
Britannic Assurance



 -Original Message-
 From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]]
 Sent: 18 March 2002 15:05
 To:   Orion-Interest
 Subject:  RE: JNDI naming exception when running app on orion from
 JBuilder  
 
 Are you running the servlet in orion or tomcat ?
 
 Does the console in JBuilder say:
 
 Orion/1.5.4 initialized (or whichever version you have)
 
 You should be able to make it work by replacing the code:
 
 java:comp/env/ejb/SPControllerHome
 
 with:
 
 SPControllerHome
 
 It sounds to me like you are running tomcat which is external to your
 session bean (not in the container) and requires the external context
 lookup.  If this is the case, a better solution would be to debug the
 servlet in Orion which would mean starting Orion

RE: Re: Using NT security

2002-03-16 Thread [EMAIL PROTECTED]

I had to build a custom security class for authenticating against an NT (Win2K Active 
Directory) domain.  Although this does require entry of credentials it is better than 
a properties file.  This class uses AD for authentication and SQLServer for group 
information (we wanted a single place to store group/role information).

The connection attributes are passed in from orion-application.xml as per this article:

http://kb.atlassian.com/content/orionsupport/articles/usermanager.html

I have attached the Java source.

KJ

Original Message:
-
From: Brian Smith [EMAIL PROTECTED]
Date: Fri, 15 Mar 2002 20:03:58 -0600
To: [EMAIL PROTECTED]
Subject: Re: Using NT security


If you use the JAAS module, or if you use the Windows SSPI to
authenticate, you will never need to user's password. The SSPI API
provides a LogonUser function that can be used to say is 'password'
the correct password domain\user. If you search for LogonUser and JNI
on the internet there is a short article explaining how to do this very
simply. I assume the JAAS has a similar feature.

What is not easy with the Windows API is asking is domain\user in group
'group-name'?.

It would be cool if somebody could share a UserManager implementation
that used the above technique and/or the JAAS equivalent.

- Brian

Justin Crosbie wrote:
 Yuk, that is messy. Accessing the NT API? Using the JNI, I presume?
 Thanks though, I'll give those a try, much appreciated :)



 So what does everyone else do, put the passwords into principals.xml and
 set the file to not readable?



 Thanks,

 Justin


  -Original Message-
 *From:* Andre Vanha [mailto:[EMAIL PROTECTED]]
 *Sent:* 13 March 2002 19:19
 *To:* Orion-Interest
 *Subject:* RE: Using NT security

 Take a look at the sample JAAS modules that you can download from
 Sun in conjunction with JAAS.  Specifically, they include an NT
 module which can be used to retrieve username and group information
 for a running process.



 Note however, there is no way to retrieve a password for a logged on
 user, at least not included with the JAAS module.  The NT API does
 provide functions for retrieving a user's password, but in that case
 the domain/NTServer must be configured to store plain-text
 passwords, which is something most people don't do anyway.



 Exchange definitely offers an alternative authentication mechanism,
 but that falls outside of the standard javamail SMTP interface.



 Andre






 -Original Message-
 *From:* Justin Crosbie [mailto:[EMAIL PROTECTED]]
 *Sent:* Wednesday, March 13, 2002 10:16 AM
 *To:* Orion-Interest
 *Subject:* Using NT security

 Hi all,



 I checked the archives and support pages for this, didn't seem
 to find it.



 Is there any way to get Orion to use the NT username+password of
 whoever is logged in, for running client apps? Currently I'm
 reading them from a config file, which obviously is not ideal.



 Also, I am using the mail-session  properties to configure a JavaMail 
session. Thus I have the
 userame+password of this hardcoded into application.xml. Anyone
 know of a way I could use the NT logged on credentials to
 specify the mail.smtp.user and mail.smtp.password properties of
 the session? It is an Exchange server. (Probably OT, apologies
 if it is).



 Thanks,

 Justin







mail2web - Check your email from the web at
http://mail2web.com/ .



3D"AD_SQLSecurityManager.java"
Description: AD_SQLSecurityManager.java


HAPPY VALENTINES !!!!! BUY AND GET 50% OFF

2002-02-13 Thread [EMAIL PROTECTED]

HAPPY  VALENTINES, 
You are formally invited to our BIG GRAND OPENING SALE at  BARGAINWORLD. COME AND 
GET 50% OFF EVERYTHING ...AT www.bargainworld.bizhhosting.com 

Thank You

P.S. There is a bargain just waiting for  you.





deployment tool

2001-11-19 Thread [EMAIL PROTECTED]

Hi,

Is there a deployment tool that is easier than j2sdkee1.3?
What is it?

Thanks


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





Non Web Application accessing data source

2001-10-10 Thread [EMAIL PROTECTED]

Hi All,
How do I lookup datasource from non web application 
(Class File not Servlet and JSP). I know that we can do it using 
JNDI. Can I get a sample to do this. 


Naveen





RE: Where to put application parameters?

2001-04-06 Thread Toth [EMAIL PROTECTED], Adam \(E-mail\)

Hi,

Petr: Thanks, but you misunderstood the problem (may be my fault).

The problem is that the component - which doesn't have the .java source -
uses this parameter. Yes, I think they use
ins = getClass().getClassLoader().getResourceAsStream(path);
It's OK but the problem is that I can't change the component's code.
[freesrc vs "component based off-the-self" etc etc]

The reason I'm asking for help is to put this parameter somehow to somewhere
in the app's config files, so the customer doesn't have to care about
orion's starting parameters after [s]he deployed the app.
Of course it's working with java -Doption=value -jar orion.jar

BR,
Adam

 -Original Message-
 From: Petr Podsednik
 To: Orion-Interest
 Subject: Re: Where to put application parameters?


 Try this:

   String path = "your-relative-path.xml"
   InputStream  ins= null;
   try {
ins = getClass().getClassLoader().getResourceAsStream(path);
   }
   catch (Throwable ex) {
com.amaio.util.sys.prn("Error getting XML resource"+ex);
   }

 - Original Message -
 From: Toth [@FREEMAIL], Adam (E-mail) [EMAIL PROTECTED]
 To: Orion-Interest [EMAIL PROTECTED]
 Sent: Thursday, April 05, 2001 5:12 PM
 Subject: Where to put application parameters?


  Hi,
 
  We're using a component in our sw, and that needs a config XML file.
  The following method is used currently:
 
  java -Dsomeparam=path-to.xml -jar orion.jar
 
  We don't have to source, and it's working ok
 
  I''ve tried to put this into web-inf/web.xml (into EAR in
 WAR of course)
  like this:
  [..]
  web-app
 
context-param
  param-namesomeparam/param-name
  param-valuepath-to.xml/param-value
/context-param
  [..]
 
  But it's not working. We're using absolute pathnames on WinNT
  (like C:\dir\dir2\this.xml). so it's not a problem of "where is this
  relative filename starts"
 
  Does anybody know how to solve this? It's not very elegant
 to deploy an
 app
  an use -D options, I think, is it.
 
  It would be nice to take a look at a working solution or hear some
 comments
  on this.
 
  Thank you in advance,
  Adam
 








Where to put application parameters?

2001-04-05 Thread Toth [EMAIL PROTECTED], Adam \(E-mail\)

Hi,

We're using a component in our sw, and that needs a config XML file.
The following method is used currently:

java -Dsomeparam=path-to.xml -jar orion.jar

We don't have to source, and it's working ok

I''ve tried to put this into web-inf/web.xml (into EAR in WAR of course)
like this:
[..]
web-app

  context-param
param-namesomeparam/param-name
param-valuepath-to.xml/param-value
  /context-param
[..]

But it's not working. We're using absolute pathnames on WinNT
(like C:\dir\dir2\this.xml). so it's not a problem of "where is this
relative filename starts"

Does anybody know how to solve this? It's not very elegant to deploy an app
an use -D options, I think, is it.

It would be nice to take a look at a working solution or hear some comments
on this.

Thank you in advance,
Adam





Internal Server Error

2001-04-03 Thread Toth [EMAIL PROTECTED], Adam \(E-mail\)

Hi,

We're testing our web project (JSPs, Servlets and MS SQL 2000 DB).
Orion app server version is v1.4.0.

The test tool is MSWeb Application Stress v1.1.
It's cool and free anyway, take a look:
http://webtool.rte.microsoft.com/

The problem is minor, but it would be nice to clarify.

During a 10 hour reliability test, some error appears, but only for POST
methods.
(The testing is replaying a recorded "browsing" by sending the POST and GET
requests to the server, so it's like an average user, just no delay between
the requests. FYI: Number of hits: 10798682 Requests per Second: 299.88, so
it's quite busy).


We have two problematic POSTs:

Problem#1:

URI:  POST /login?action=dologout
Hit Count:42018

Result Codes
Code  Description   Count
--
200   OK42001
500   Internal Server Error 17

Problem#2:

URI:  POST /login?action=login-frommain
Hit Count:42018

Result Codes
Code  Description   Count
--
200   OK42010
500   Internal Server Error 8

What is interesting that there are no other POSTs in the test, just GETs, so
it's somehow seems to be related to the type of the request.
We're doing heavy logs during the test using log4j, so we have the complete
log in a file. There is no detected problem in the log.
The possible System.outs from Orion are lost, since the window it's running
has only 999 line buffer.

As you probably noticed, these POST methods are going to a servlet, mapped
to /login.
Other mappings are used of course, so the problem is not related to servlet
mapping.

Unfortunately I don't know when those logs coming (at once or in random
intervals)

My questions:
- how to store orion logs?
- any ideas what is this problem?
- is there any way to catch these kind of errors?

Any help would be very nice.

Thank you in advance,
Adam





RE: Internal Server Error

2001-04-03 Thread Toth [EMAIL PROTECTED], Adam \(E-mail\)

Thank you for the replies!

 From: Mike Cannon-Brookes
 Sent: Tuesday, April 03, 2001 13:56

 - check in your application.log file for that application,
 the errors will be there
Thanks, it's there, and ehh, I've found an interesting problem. So it was
me.. :|
In the application log
(oriondir\application-deployments\appname\application.log ) I've found a
full stacktrace

 From: Johan Fredriksson
 Sent: Tuesday, April 03, 2001 14:34

 I use this command line for starting orion on a windows machine

 java -jar -Djdbc.connection.debug=true orion.jar 1
 \orionlog\systemout.txt
 2 \orionlog\systemerr.txt
Thank you also for the reply, but our orion running as a service, so I'm in
doubt if it can work. But I'll try it of course.

BR,
Adam





RE: Orion as a Win2000 service ?

2001-02-28 Thread Toth [EMAIL PROTECTED], Adam \(E-mail\)

In the archive I've found the following:

From:Larry Velez [EMAIL PROTECTED]
Subject: Orion as a Win2000 service

I am running Orion as a service using the following RunSvcExe script:

Note that jvmi.exe (http://www.kcmultimedia.com/jvmi/) is necessary because
of a bug (or feature) in Win32 Java that does not allow you to log out of
the machine while Orion is running.  This defeats the whole purpose of
running Orion as a service.

###
# This script runs OrionServer as a service
#

JAVA_HOME=d:\jre\1.3
ORION_HOME=d:\orion

# set up java run-time stuff
exe=$JAVA_HOME$\bin\hotspot\jvmi.exe

# RunExeSvc variables

debug=false# if true, RunExeSvc will show internal status
home=$ORION_HOME$ # the starting dir of the service

# Running as an http server.
cmdline=$exe$ (YOUR ORION COMMAND LINE HERE)
##


My question is that how can it work? It seems that JVMI does not support
.JAR files(?).
I've created a .Cmd file (not sure about those scripts, but should do the
same):

REM ###
REM # This script runs OrionServer as a service
REM #

SET JAVA_HOME=c:\jdk1.3
SET ORION_HOME=c:\orion

REM # set up java run-time stuff
SET exe=%JAVA_HOME%\jre\bin\hotspot\jvmi.exe

REM # RunExeSvc variables

SET debug=true# if true, RunExeSvc will show internal status
SET home=%ORION_HOME% # the starting dir of the service

REM # Running as an http server.
REM cmdline=$exe$ (YOUR ORION COMMAND LINE HERE)
%exe% -jar orion.jar

But it does not work:

C:\orionREM ###
C:\orionREM # This script runs OrionServer as a service
C:\orionREM #
C:\orionSET JAVA_HOME=c:\jdk1.3
C:\orionSET ORION_HOME=c:\orion
C:\orionREM # set up java run-time stuff
C:\orionSET exe=c:\jdk1.3\jre\bin\hotspot\jvmi.exe
C:\orionREM # RunExeSvc variables
C:\orionSET debug=true# if true, RunExeSvc will show internal
status
C:\orionSET home=c:\orion # the starting dir of the service
C:\orionREM # Running as an http server.
C:\orionREM cmdline=$exe$ (YOUR ORION COMMAND LINE HERE)
C:\orionc:\jdk1.3\jre\bin\hotspot\jvmi.exe -jar orion.jar

jvmi.exe 1.1 - (C)2000 by Bill Giel/KCMDG
Java 1.3 VM Invoker (which traps LOGOFF events)


**
* Evaluation Version - for licensing information *
* contact [EMAIL PROTECTED] *
**


Cannot find main class.


Any ideas?
(Maybe the problem is trivial...)

Thank you in advance,
Adam





RE: Orion as a Win2000 service ?

2001-02-28 Thread Toth [EMAIL PROTECTED], Adam \(E-mail\)

I have to reply to my own question, since I got a quick response from the
author of JVMI.

The solution is to put orion.jar to classpath and invoke the main class:

c:\jdk1.3\jre\bin\hotspot\jvmi.exe -cp orion.jar
com.evermind.server.ApplicationServer

It's seems to be working.

Sorry if it was obvious,
Adam





admin.jar -bindWebApp

2000-10-08 Thread [EMAIL PROTECTED]

I am trying to use admin.jar to bind a web app, I do something like
this:

java -jar admin.jar ormi://localhost admin pass -bindWebApp appName
web default-web-site /Web

And I get the following message:

Error: java.lang.NullPointerException

Any Ideas ?

TIA

Damian




Re: RE: CMP deployment problem

2000-09-08 Thread [EMAIL PROTECTED]

Thanks for the reply!

You were on the right track, the problem was that i hadn't updated
the ejb-jar.xml file to use the CMP version of my beans.

Cheers,

Damian Guy.
At Fri, 8 Sep 2000 16:14:22 +0200 , you wrote:
Hi !

I used to get such exceptions too... I had just read about BMPs and
CMPs,
and tried to implement/specify too many methods in CMP beans. Your
problem
is probably similar.

Your home interface should only have finders in it, findByPrimaryKey
and
others (and create if appropriate)
Your interface should only have business methods
Your bean should implement only business methods, setEntityContext
and
unsetEntityContext, and ejbActivate, ejbPassivate, ejbRemove,
ejbStore,
ejbLoad which most of the time are empty. No ejbFind !

Remove ejbFind, ... and the exceptions disapear

Good luck, and I hope I didn't say anything wrong...
Christophe

PS: I now use only CMP... no BMP beans.

-Original Message-
From: Damian Guy [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 08, 2000 2:42 PM
To: Orion-Interest
Subject: CMP deployment problem


Hi,

I have successfully deployed BMP beans and I am now trying to deploy
CMP
beans. I keep running into the follwing error during the deployment
process:

Auto-deploying supplier.jar...
java.lang.ArrayIndexOutOfBoundsException:
0
at com.evermind.server.ejb.compilation.ey.aam(JAX)
at com.evermind.server.ejb.compilation.ew.o6(JAX)
at com.evermind.server.ejb.compilation.e_.zq(JAX)
at com.evermind.server.ejb.compilation.e7.aby(JAX)
at com.evermind.server.ejb.compilation.e_.o6(JAX)
at com.evermind.server.ejb.compilation.e1.o6(JAX)
at com.evermind.server.ejb.compilation.e6.o6(JAX)
at com.evermind.server.ejb.EJBContainer.lj(JAX)
at com.evermind.server.Application.lj(JAX)
at com.evermind.server.Application.e7(JAX)
at com.evermind.server.ApplicationServer.od(JAX)
at com.evermind.server.ApplicationServer.ai5(JAX)
at com.evermind.server.ApplicationServer.e7(JAX)
at com.evermind.server.gc.run(JAX)
at java.lang.Thread.run(Thread.java:479)
at com.evermind.util.e.run(JAX)

It doesn't mean much to me! Any ideas??

TIA,

Damian.





RE: CLUSTERING ¨?

2000-06-08 Thread Mao, Dean [EMAIL PROTECTED]

I too would like to know about this...  do reply back to orion-interest.

Dean Mao
(catch23)


-Original Message-
From: David Sierra Fernandez [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 07, 2000 1:23 PM
To: Orion-Interest
Subject: CLUSTERING ¨?




 I want to know ASAP if orion supports replication and failover for: 

* home interfaces
* stateless beans

and what about:

* servlets
* JNDI
* HTTP request
* JSPs

(I think it is useless to have the beans replicated if the server that
fails is the only one which contains the JNDI)


THANK YOU VERY MUCH.

-
David Sierra Fern ndez
E.T.S.I. Telecomunicaci¢n
Universidad de ValladolidAULA CEDETEL
Campus Miguel Delibes   E-Mail: [EMAIL PROTECTED]
47011 Valladolid (SPAIN)
--

 -- Sierr@ --







Please HELP!!!

2000-02-28 Thread [EMAIL PROTECTED]

I've tried a number of times to get myself off this list, via web, etc.,
with obviously no success.

Can someone on the admin side help me out?

Thanks,
+ Matt Walter
+ Mayo Clinic