Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4504
  • Last Modified:

java.lang.nullpointer exception in weblogic...


Hi,

 We are using weblogic as our application server and we have deployed the struts application in the development env of weblogic. The application is working fine. But when we move the same application in the production env we are getting the following error
java.lang.NullPointerException
      at org.apache.struts.tiles.definition.ComponentDefinitionsFactoryWrapper.getDefinition(ComponentDefinitionsFactoryWrapper.java:84)
      at org.apache.struts.tiles.TilesRequestProcessor.processTilesDefinition(TilesRequestProcessor.java:152)
      at org.apache.struts.tiles.TilesRequestProcessor.processForwardConfig(TilesRequestProcessor.java:302)
      at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:229)
      at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
      at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072)
      at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
      at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6981)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892)
      at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766)
      at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
      at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)




So i dont have any clue y it is working in the development env and not in the production env....

Please help me out and it is quite urgent


Thanks
0
gocoool
Asked:
gocoool
3 Solutions
 
TheVeeeCommented:
Your missing the jar file for struts it sounds like.  Is this the first time you have used them?  If not, then this application is not referencing it in the web.xml.
0
 
gocooolAuthor Commented:

The same code i am using in my development evn and it is working fine and when we move it to the production env we are getting this error
0
 
gocooolAuthor Commented:
this is my web.xml file


<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE web-app PUBLIC
          "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
          "http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
      
    <display-name>arm</display-name>
    <description>The Carrier Access Request Management application</description>


      <filter>
            <filter-name>filterAction</filter-name>
            <display-name>filterAction</display-name>
            <filter-class> com.carrier.arm.client.web.actions.common.filterAction</filter-class>
      </filter>
      <filter-mapping>
        <filter-name>filterAction</filter-name>
        <url-pattern>/*</url-pattern>
      </filter-mapping>
      
      
      <servlet>
            <servlet-name>controller</servlet-name>
            <servlet-class>com.carrier.arm.client.web.actions.ARMStartupActionServlet</servlet-class>
            <init-param>
                  <param-name>config</param-name>
                  <param-value>/WEB-INF/struts-config.xml</param-value>
            </init-param>
            <init-param>
                  <param-name>validating</param-name>
                  <param-value>true</param-value>
            </init-param>
            <init-param>
                  <param-name>debug</param-name>
                  <param-value>3</param-value>
            </init-param>
            <init-param>
                  <param-name>ARMLogConfigFile</param-name>
                  <param-value>/WEB-INF/log4j.xml</param-value>
            </init-param>             
            <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet>
            <servlet-name>file</servlet-name>
            <servlet-class>com.carrier.arm.client.web.actions.common.FileAction</servlet-class>
      </servlet>
      <servlet>
            <servlet-name>reportFile</servlet-name>
            <servlet-class>com.carrier.arm.client.web.actions.common.ExportReportAction</servlet-class>
      </servlet>
      <servlet>
            <servlet-name>exportAdminReportAction</servlet-name>
            <servlet-class>com.carrier.arm.client.web.actions.common.ARMAdminReportExportAction</servlet-class>
      </servlet>  
      <servlet>
             <servlet-name>exportUserReportAction</servlet-name>
             <servlet-class>com.carrier.arm.client.web.actions.common.ARMUserReportExportAction</servlet-class>
      </servlet>      
      <servlet>
            <servlet-name>exportRequestToRTF</servlet-name>
            <servlet-class>com.carrier.arm.client.web.actions.common.ExportRequest</servlet-class>
      </servlet>              
      <servlet-mapping>
            <servlet-name>controller</servlet-name>
            <url-pattern>*.do</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
            <servlet-name>file</servlet-name>
            <url-pattern>/fileAction.do</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
            <servlet-name>reportFile</servlet-name>
            <url-pattern>/reportFileAction.do</url-pattern>
      </servlet-mapping>      
      <servlet-mapping>
            <servlet-name>exportAdminReportAction</servlet-name>
            <url-pattern>/exportAdminReportAction.do</url-pattern>
      </servlet-mapping>      
      <servlet-mapping>
            <servlet-name>exportUserReportAction</servlet-name>
            <url-pattern>/exportUserReportAction.do</url-pattern>
      </servlet-mapping>
      <servlet-mapping>
            <servlet-name>exportRequestToRTF</servlet-name>
            <url-pattern>/exportRequestToRTFAction.do</url-pattern>
      </servlet-mapping>               
         

    <session-config>
        <session-timeout>30</session-timeout>
    </session-config>

    <welcome-file-list>
        <welcome-file>/jsp/login/Login.jsp</welcome-file>
    </welcome-file-list>
   
              
    <taglib>
        <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
        <taglib-location>/WEB-INF/tlds/struts-bean.tld</taglib-location>
    </taglib>

    <taglib>
        <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
        <taglib-location>/WEB-INF/tlds/struts-html.tld</taglib-location>
    </taglib>

    <taglib>
        <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
        <taglib-location>/WEB-INF/tlds/struts-logic.tld</taglib-location>
    </taglib>

    <taglib>
        <taglib-uri>/WEB-INF/struts-nested.tld</taglib-uri>
        <taglib-location>/WEB-INF/tlds/struts-nested.tld</taglib-location>
    </taglib>

    <taglib>
        <taglib-uri>/WEB-INF/struts-template.tld</taglib-uri>
        <taglib-location>/WEB-INF/tlds/struts-template.tld</taglib-location>
    </taglib>

    <taglib>
        <taglib-uri>/WEB-INF/struts-tiles.tld</taglib-uri>
        <taglib-location>/WEB-INF/tlds/struts-tiles.tld</taglib-location>
    </taglib>
   
</web-app>
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
suprapto45Commented:
Check if the tld files are present or not in PROD. However, if you deploy the EAR file, it should be included already.

Another thing is that check your startWebLogic.cmd. Check whether you are referencing the same jar files or not (just in case).
0
 
sompol_kiatkamolchaiCommented:
Hi,

If you are deploying the same .ear file to two environment, and only one of them is working fine. It might be something different in the server configuration. Please check.

For my guess,
1.Check whether the following jar file is in the lib of application or not ( in APP-INF/lib or WEB-INF/lib )
    - commons-beanutils.jar
    - commons-digester.jar
    - commons-collections.jar
    - commons-logging.jar
2.If no.1 doesn't help, take a look on the following link
    http://www.oracle.com/technology/oramag/oracle/04-may/o34dev_struts.html

Hope this help.
Sompol
0
 
gocooolAuthor Commented:


Hi guys,

  Thanks for your replies. It has been fixed. I dont know wht is the change but when we redeployed the code it worked fine.. Hope the same problem will not arise


Thanks a log guys
0
 
gocooolAuthor Commented:
Hi guys,


    Today morning we moved the same application to the cluster env and it started giving the same error. The browser error is
Error 500--Internal Server Error
From RFC 2068 Hypertext Transfer Protocol -- HTTP/1.1:
10.5.1 500 Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.

I have given the error log above. Please help me out it is quite urgent for me

Thanks
 
0
 
AjarCommented:
Looks like there is soem difference between the Server classpath of dev and production servers
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now