Hi,

We tried to deploy on Orion1.4.7/Linux 6 an application that has been
developed and tested on Orion1.3.8/NT4. It works on the original kit fine
but crashes on Linux and we narrowed the problem down to the point where an
env entry in web.xml file (defined as below) is not being read at all by the
code shown underneath. As a result the FileName variable is null and the
java.lang.NullPointerException is thrown as soon the last line of the code
below is reached.
Could this be down to differences in setting up JNDI on Orion 1.3.8 and
1.4.7 or possibly between NT and Linux? Or is it our code. 
We've been going through anything we could thing of but could not find the
answer.

Many thanks for your help.

Jarek

web.xml:

  <env-entry>
        <description>File name</description>
        <env-entry-name>filename</env-entry-name>
        <env-entry-value>file.xml</env-entry-value>
        <env-entry-type>java.lang.String</env-entry-type>
  </env-entry>

java:

  InitialContext ctx;     // Context for JNDI entries 
  String FileName;
  //
  // Public constructor  
  //
  public MyClass( ) throws IOException {

    try {
       ctx = new InitialContext();
       Object objref1 = ctx.lookup("java:comp/env/filename");
       String FileName = (String)objref1;
    } 
    catch (Exception NamingException) {
       NamingException.printStackTrace();
    }

    int p = FileName.lastIndexOf( File.separatorChar );




Best regards,
Jarek Skreta
Senior eBusiness Consultant
Nesscomp Limited
<mailto:[EMAIL PROTECTED]>
=========================================================== 
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
Nesscomp Ltd do not accept legal responsibility for the contents of
this message. Any views or opinions presented are solely those of the
author and do not necessarily represent those of Nesscomp Ltd.
This message can not be classed as SPAM, the recipient has not
been added to any mailing lists.



winmail.dat

Reply via email to