3 Replies Latest reply on Apr 8, 2010 8:45 AM by Peter Johnson

    Migrate from Jboss 4.2.3 to Jboss 5.1.0 ==> lookup("java:comp/env") threw exception

    James Norton Newbie


      Hi,

       

      We are trying to migrade from jboss4.2.3 to 5.1.0 but We have not been successful.

       

      Our application is a WAR file created with an external tool called AllfusionGen.

       

      In Jboss4.2.3 We are doing the following:

       

      1) rename jboss-4.2.3.GA\server\default folder to unittest76

      2) copy WAR file (unittest76.war) to jboss-4.2.3.GA\server\unittest76\deploy

      3) copy D2D1.sar folder to jboss-4.2.3.GA\server\unittest76\deploy

       

      Now We are doing the same with Jboss5.1.0. It seems to work fine (the war is deployed) but once we load the main jsp We get the following error:

       

       

      12:31:59,524 INFO  [STDOUT] 02/03/10-12:31:59:524[http-127.0.0.1-8080-1]: ServletRequest.setLoader(): lookup("java:comp/env") threw: "javax.naming.NameNotFoundException: env not bound"
      12:31:59,618 INFO  [STDOUT] 02/03/10-12:31:59:618[http-127.0.0.1-8080-1]: LoadModule.getInstance(): Load Module get instance of sirius.TSEC0004.LoadModule.class  Failed: java.lang.NullPointerException. Please contact your web server administrator.
      12:31:59,618 INFO  [STDOUT] 02/03/10-12:31:59:618[http-127.0.0.1-8080-1]: java.lang.NullPointerException
              at java.util.StringTokenizer.<init>(Unknown Source)
              at java.util.StringTokenizer.<init>(Unknown Source)
              at com.ca.gen76.fmrt.LoadModule.load(Unknown Source)
              at com.ca.gen76.fmrt.LoadModule.getInstance(Unknown Source)


      ...

       

       

      Why is this happening?, the application is the same.

       

       

      Here is our D2D1.sar\db2-ds.xml:

       

      <datasources>

       

        <local-tx-datasource>
          <jndi-name>SIRIUSDB</jndi-name>
          <connection-url>jdbc:odbc:D2D1</connection-url>
          <driver-class>sun.jdbc.odbc.JdbcOdbcDriver</driver-class>
          <min-pool-size>1</min-pool-size>
        </local-tx-datasource>
         <local-tx-datasource>
          <jndi-name>SIRHPLDB</jndi-name>
          <connection-url>jdbc:odbc:D2D1</connection-url>
          <driver-class>sun.jdbc.odbc.JdbcOdbcDriver</driver-class>
          <min-pool-size>1</min-pool-size>
        </local-tx-datasource>

       

      </datasources>

       

      and our unittest76.war\WEB-INF\web.xml file: (part of it)

       

      <?xml version="1.0" encoding="UTF-8"?>
      <web-app version="2.4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee  http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" xmlns="http://java.sun.com/xml/ns/j2ee">
      <display-name>SIRIUS76</display-name>
      <description>Web Application Generated by AllFusion(R) Gen. Copyright 2003-2006, Computer Associates International, Inc.</description>
      <context-param>
      <param-name>deploystyle</param-name>
      <param-value>classic</param-value>
      </context-param>
      <context-param>
      <param-name>traceurl</param-name>
      <param-value>localhost:4567</param-value>
      </context-param>
      <context-param>
      <param-name>threads</param-name>
      <param-value>disabled</param-value>
      </context-param>
      <context-param>
      <param-name>localName</param-name>
      <param-value>sirius</param-value>
      </context-param>
      <context-param>
      <param-name>browserControlledHistory</param-name>
      <param-value>NO</param-value>
      </context-param>
      <context-param>
      <param-name>usedso</param-name>
      <param-value>enabled</param-value>
      </context-param>
      <context-param>
      <param-name>useResourceRefs</param-name>
      <param-value>enabled</param-value>
      </context-param>
      <!-- Servlet Definition for LoadModule BOOKCREA -->
      <servlet>
      <servlet-name>BOOKCREAServletManager</servlet-name>
      <servlet-class>sirius.BOOKCREA.ServletManager</servlet-class>
      </servlet>
      <servlet>
      <servlet-name>bookcrea</servlet-name>
      <jsp-file>/bookcrea.jsp</jsp-file>
      </servlet>
      <servlet>
      <servlet-name>bookcr</servlet-name>
      <jsp-file>/bookcr.jsp</jsp-file>
      </servlet>
      <!-- Servlet Definition for LoadModule DACC1WIN -->

      ...

       

      <!-- Servlet Mapping for LoadModule TCTR3003 -->
      <servlet-mapping>
      <servlet-name>TCTR3003ServletManager</servlet-name>
      <url-pattern>/TCTR3003ServletManager</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
      <servlet-name>tctr3003</servlet-name>
      <url-pattern>/tctr3003</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
      <servlet-name>tctr3003</servlet-name>
      <url-pattern>/tctr3003.jsp/*</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
      <servlet-name>sctr3003</servlet-name>
      <url-pattern>/sctr3003</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
      <servlet-name>sctr3003</servlet-name>
      <url-pattern>/sctr3003.jsp/*</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
      <servlet-name>tstylst1</servlet-name>
      <url-pattern>/tstylst1</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
      <servlet-name>tstylst1</servlet-name>
      <url-pattern>/tstylst1.jsp/*</url-pattern>
      </servlet-mapping>
      <!-- Servlet Mapping for LoadModule TCTR4000 -->

      ...

       

      <session-config>
      <session-timeout>30</session-timeout>
      </session-config>
      <env-entry>
      <env-entry-name>LoadModuleList</env-entry-name>
      <env-entry-type>java.lang.String</env-entry-type>
      <env-entry-value>sirius.tlogon</env-entry-value>
      </env-entry>
      </web-app>

       

      Any help is appreciated.

       

      Thank you.