4 Replies Latest reply on Dec 3, 2003 1:16 PM by rashid11

    getResourceAsStream problem:EAR with nested EJB JAR and WAR

    rashid11

      I have an EAR called insightApp.ear. Here is application.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN" "http://java.sun.com/dtd/application_1_3.dtd">

      <display-name>insightApp</display-name>

      insightEjb.jar



      <web-uri>insight.war</web-uri>
      <context-root>insight</context-root>




      From an EJB Session bean that is packaged inside of
      insightEjb.jar I call:

      properties.load( (InputStream) getClass().getResourceAsStream(
      "/insightApp/insight/insight.properties"));


      The properties file itself: insight.properties, is contained inside of insight.war (at the same level as WEB-INF (top level). In other words the file is NOT nested inside of any directories within the WAR.

      For some reason I can not read the properties via the
      getResourceAsStream().

      I understand that I have a proper path to the properties file: includes Name of the Application, followed by name of WebModule and then the properties file itself.

      What could be the problem ?