RE: error-page tag in web-xml question

2002-04-10 Thread DORAN, GRANT

Jose,

You should be able to. We use jsp pages for surface level exceptions like
this.

error-page

exception-typeuk.co.britannic.flexisale.common.exception.FlexisaleExceptio
n/exception-type
location/error/FlexisaleException.jsp/location
/error-page

And you may have to declare the page an error page, although that depends on
how you use it.
We use:

%@ page isErrorPage=true %

because this gives us access to the implicit exception object.

I'm not sure whether this is relevant to what your doing, as you are using
error codes.
But I can definitely say that the error-page syntax above works and that
JSPs can be used for certain.

Grant Doran


 -Original Message-
 From: Jose Mena [SMTP:[EMAIL PROTECTED]]
 Sent: 10 April 2002 12:20
 To:   Orion-Interest
 Subject:  error-page tag in web-xml question
 
 Hi,
 I'm trying to set an error page in one of my web applications. To do this
 i
 have put this tag in the web.xml file:
 error-page
 error-code500/error-code
 location/error.html/location
 /error-page
 to catch all the 500 errors and redirect the user to an error page. It
 works
 when i put a plain html page but it doesn't when i put a jsp.
 is it possible to get a jsp instead of an html file?
 thanks.
 
 


This email and any accompanying documents are intended only for the named recipient, 
are confidential and may be privileged. If you are not the intended recipient please 
notify us immediately by mailto:[EMAIL PROTECTED] and you must not copy, disclose 
or otherwise use this message. Unauthorised use is strictly prohibited and may be 
unlawful. The content of this email represents the view of the individual and not the 
company. The company reserves the right to monitor the content of all emails in 
accordance with lawful business practice.

Whilst attachments are virus checked before transmission, Britannic Assurance plc does 
not accept any liability in respect of any virus which is not detected.

Britannic Assurance plc, No.3002 is registered in England and maintains its registered 
office at 1 Wythall Green Way, Wythall, Birmingham B47 6WG.
Telephone: 0870 887 0001
Fax: 0870 887 0002
Website: www.britannicassurance.com

Britannic Assurance plc, Britannic Unit Linked Assurance Limited, Britannic ISA 
Managers Limited and Britannic Unit Trust Managers Limited are regulated by the 
Financial Services Authority. Each of these companies is a member of the Britannic 
marketing group which only advises on and sells its own life assurance, pension, unit 
trust and ISA products.





How can I configuring a non-war web app without putting it under Orion dir?

2002-03-29 Thread DORAN, GRANT

Hi,

I have been trying to find documentation on how to configure orion
to run a web application from a directory that isn't under
orion\applications. The examples that I find in the documentation are either
war files or under orion.
I can't zip the application up as some of the files are referenced
by dlls.
I'm not having much luck getting the xml config file right.
Is there any documentation on how to set this up?
Is there an example anywhere?

Thanks

Grant Doran


This email and any accompanying documents are intended only for the named recipient, 
are confidential and may be privileged. If you are not the intended recipient please 
notify us immediately by mailto:[EMAIL PROTECTED] and you must not copy, disclose 
or otherwise use this message. Unauthorised use is strictly prohibited and may be 
unlawful. The content of this email represents the view of the individual and not the 
company. The company reserves the right to monitor the content of all emails in 
accordance with lawful business practice.

Whilst attachments are virus checked before transmission, Britannic Assurance plc does 
not accept any liability in respect of any virus which is not detected.

Britannic Assurance plc, No.3002 is registered in England and maintains its registered 
office at 1 Wythall Green Way, Wythall, Birmingham B47 6WG.
Telephone: 0870 887 0001
Fax: 0870 887 0002
Website: www.britannicassurance.com

Britannic Assurance plc, Britannic Unit Linked Assurance Limited, Britannic ISA 
Managers Limited and Britannic Unit Trust Managers Limited are regulated by the 
Financial Services Authority. Each of these companies is a member of the Britannic 
marketing group which only advises on and sells its own life assurance, pension, unit 
trust and ISA products.





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

2002-03-20 Thread DORAN, GRANT

I have done both of the things mentioned and it still doesn't work.
The JNDI properties only need to be set explicitly for jbuilder debugging.
I am informed by Borland that this is probably because jbuilder is using
it's own JNDI settings.
When I run the application in orion normally, it works fine without
specifying the JNDI settings,because I have put the ejb-ref tags in the
web.xml.
The problem is that, as shown below, the jndi.properties file in the
META-INF directory of the war file is not being found.
I'm pretty sure that if it was found, debugging would work.
I just don't understand why it isnt being found.

grant

 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.getInitialConte
 xt
 (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

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

2002-03-19 Thread DORAN, GRANT

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 in JBuilder instead of
 tomcat.
 
 Here is an article on how to set up JBuilder to debug Orion, I recommend
 the non-JPDA method.
 
 http://kb.atlassian.com/content/orionsupport/articles/jbuilder-debugging.h
 tml
 
 Tips:
 
 1. Make sure that your project does not include both the BAS4.5 library
 and the new Orion one you create.
 2. Include all jar files in the Orion home directory (including
 orion.jar)and the Orion lib directory excluding the tool jars
 (ejb-assembler.jar, admin.jar, etc.) in your Orion library.
 
 I use JBuilder 5 to debug orion and it works great, JBuilder 6 should be
 the same.
 
 
 Original Message:
 -
 From: DORAN, GRANT [EMAIL PROTECTED]
 Date: Mon, 18 Mar 2002 13:27:06 -
 To: [EMAIL PROTECTED]
 Subject: JNDI naming exception when running app on orion from JBuilder  
 
 
 Hello,
 
 I'm having a terrible time trying to get my application to debug from
 JBuilder 6 Enterprise.
 When I build the application using ANT and deploy it to orion, the servlet
 can lookup the EJBs ok.
 But when I run Orion in debug mode from JBuilder, it starts up ok, but
 fails
 when the servlet tries to lookup the first

JNDI naming exception when running app on orion from JBuilder

2002-03-18 Thread DORAN, GRANT

Hello,

I'm having a terrible time trying to get my application to debug from
JBuilder 6 Enterprise.
When I build the application using ANT and deploy it to orion, the servlet
can lookup the EJBs ok.
But when I run Orion in debug mode from JBuilder, it starts up ok, but fails
when the servlet tries to lookup the first EJB.
The line of code is:

  Object boundObject =
context.lookup(java:comp/env/ejb/SPControllerHome);

The output to the log as a result is:

javax.naming.NamingException: java:comp/env namespace is only available from
within a J2EE component
at
com.sun.enterprise.naming.java.javaURLContext.getComponentContext(javaURLCon
text.java:395)
at
com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:51)
at javax.naming.InitialContext.lookup(InitialContext.java:350) 

Has anyone else had this problem?
Has anyone successfully configured JBuilder5 or 6 to debug orion with a full
J2EE app?

If  can't get this working, I'll have to change to Borland Appserver, which
will slow my development down even more.

Any help would be greatly appreciated.

Grant Doran
Contract Java Developer/Architect
Britannic Assurance


This email and any accompanying documents are intended only for the named recipient, 
are confidential and may be privileged. If you are not the intended recipient please 
notify us immediately by mailto:[EMAIL PROTECTED] and you must not copy, disclose 
or otherwise use this message. Unauthorised use is strictly prohibited and may be 
unlawful. The content of this email represents the view of the individual and not the 
company. The company reserves the right to monitor the content of all emails in 
accordance with lawful business practice.

Whilst attachments are virus checked before transmission, Britannic Assurance plc does 
not accept any liability in respect of any virus which is not detected.

Britannic Assurance plc, No.3002 is registered in England and maintains its registered 
office at 1 Wythall Green Way, Wythall, Birmingham B47 6WG.
Telephone: 0870 887 0001
Fax: 0870 887 0002
Website: www.britannicassurance.com

Britannic Assurance plc, Britannic Unit Linked Assurance Limited, Britannic ISA 
Managers Limited and Britannic Unit Trust Managers Limited are regulated by the 
Financial Services Authority. Each of these companies is a member of the Britannic 
marketing group which only advises on and sells its own life assurance, pension, unit 
trust and ISA products.