Struts 2
  1. Struts 2
  2. WW-3373

Weblogic 11g throwing java.lang.NullPointerException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.8
    • Fix Version/s: 2.3.7
    • Component/s: Dispatch Filter
    • Labels:
      None
    • Environment:

      Weblogic 11g, running on RHEL 5.3 x86. JVM = jrockit_160_14_R27.6.5-32

      Description

      WAR file works with TOMCAT 6. When I deploy to WEBLOGIC 11g the following NPE is given. Been searching Google and struts issues, but have not been able to find a solution. My knowledge of Java is next to none.

      Can Someone point me into the right direction?

      'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1263248899938> <BEA-101020> <[ServletContext@25367851[app:www module:XXX.war path:/XXX spec-version:2.5]] Servlet failed with Exception
      java.lang.NullPointerException
      at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:645)
      at org.apache.struts2.dispatcher.Dispatcher.sendError(Dispatcher.java:725)
      at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:488)
      at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:467)
      at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:57)
      at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3592)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
      at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
      at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

        Activity

        Hide
        Lukasz Lenart added a comment -

        Do you have spaces in path to war file like below?

        /opt/weblogic /server/webapp

        Regards

        Lukasz

        Show
        Lukasz Lenart added a comment - Do you have spaces in path to war file like below? /opt/weblogic /server/webapp Regards – Lukasz
        Hide
        Daniel added a comment -

        Yes, it looks like I do..

        / opt/ Oracle/ Middleware/ wl_domains/ managed_domain/ servers/ WEBLOGIC1/ upload/ XXX. war

        what I got when I copied and paste to notepad from weblogic console;;

        Any idea where I can go to fix this up? looking through the docs and config files now...

        Show
        Daniel added a comment - Yes, it looks like I do.. / opt/ Oracle/ Middleware/ wl_domains/ managed_domain/ servers/ WEBLOGIC1/ upload/ XXX. war what I got when I copied and paste to notepad from weblogic console;; Any idea where I can go to fix this up? looking through the docs and config files now...
        Hide
        Daniel added a comment -

        However, there are no spaces in config/config.xml

        <source-path>servers/WEBLOGIC1/upload/XXX.war</source-path>

        Show
        Daniel added a comment - However, there are no spaces in config/config.xml <source-path>servers/WEBLOGIC1/upload/XXX.war</source-path>
        Hide
        Daniel added a comment -

        Also, I deployed the struts 2 blank sample application to weblogic 11g and I get the same behavior; 404 when re-directing to the .action page.

        So not sure if this is a incompatibility issue between struts 2 and weblogic 11g or if there is some permissions configuration issue with weblogic and struts 2..

        Show
        Daniel added a comment - Also, I deployed the struts 2 blank sample application to weblogic 11g and I get the same behavior; 404 when re-directing to the .action page. So not sure if this is a incompatibility issue between struts 2 and weblogic 11g or if there is some permissions configuration issue with weblogic and struts 2..
        Hide
        Lukasz Lenart added a comment -

        Did the same and it works like charm - just deployed struts2-blank.war. Could you check with the latest snapshot ?

        Show
        Lukasz Lenart added a comment - Did the same and it works like charm - just deployed struts2-blank.war. Could you check with the latest snapshot ?
        Hide
        Lukasz Lenart added a comment -

        I think the problem is related to "Archived Real Path", check this [1] out

        [1] https://cwiki.apache.org/confluence/display/WW/WebLogic

        Show
        Lukasz Lenart added a comment - I think the problem is related to "Archived Real Path", check this [1] out [1] https://cwiki.apache.org/confluence/display/WW/WebLogic
        Hide
        Lukasz Lenart added a comment -

        Check the docs

        Show
        Lukasz Lenart added a comment - Check the docs
        Hide
        bhuwan tiwari added a comment -

        hello, i have the exact same issue with weblogic 10.3.5, and im usins struts2-core-2.3.16.1.jar, how can i ressolve this issue? i cant find the fix anywhere.

        Show
        bhuwan tiwari added a comment - hello, i have the exact same issue with weblogic 10.3.5, and im usins struts2-core-2.3.16.1.jar, how can i ressolve this issue? i cant find the fix anywhere.
        Hide
        Paul Benedict added a comment -

        Check the comment above about the docs. However, since the NPE occurs in a WebLogic class, I think you guys should contact Oracle and let them know they have a bug.

        Show
        Paul Benedict added a comment - Check the comment above about the docs. However, since the NPE occurs in a WebLogic class, I think you guys should contact Oracle and let them know they have a bug.
        Hide
        bhuwan tiwari added a comment -

        Im sorry, i'm new to this site, i still cant figure out where the docs are.

        Show
        bhuwan tiwari added a comment - Im sorry, i'm new to this site, i still cant figure out where the docs are.
        Show
        Lukasz Lenart added a comment - I think Paul meant this https://cwiki.apache.org/confluence/display/WW/WebLogic#WebLogic-NPEwhenusingStruts2JasperReportsplugin
        Hide
        bhuwan tiwari added a comment -

        thank you Lukasz lenart, but i'm not using the JasperReportsplugin or velocity tags either. Its been almost a week, cant find a solution anywhere.

        Show
        bhuwan tiwari added a comment - thank you Lukasz lenart, but i'm not using the JasperReportsplugin or velocity tags either. Its been almost a week, cant find a solution anywhere.
        Hide
        Paul Benedict added a comment -

        Since WebLogic isn't free, I assume you have an Oracle support contract. The exception clearly shows the NPE resides within a WebLogic class. I recommend you open up a support ticket with Oracle and ask for a resolution.

        Show
        Paul Benedict added a comment - Since WebLogic isn't free, I assume you have an Oracle support contract. The exception clearly shows the NPE resides within a WebLogic class. I recommend you open up a support ticket with Oracle and ask for a resolution.
        Hide
        Lukasz Lenart added a comment -

        Have you tried this?
        To solve the problem you must enable the "Archived Real Path" global property in Weblogic admin console > configuration > Web Applications

        Show
        Lukasz Lenart added a comment - Have you tried this? To solve the problem you must enable the "Archived Real Path" global property in Weblogic admin console > configuration > Web Applications
        Hide
        bhuwan tiwari added a comment -

        thank you again paul and lukasz, the way i enabled the archived real path in weblogic.xml is as follows:

        <wls:container-descriptor>
        <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes>
        <wls:show-archived-real-path-enabled>true</wls:show-archived-real-path-enabled>
        </wls:container-descriptor>

        it still seem to have not effect on the NPE that i'm getting.

        Show
        bhuwan tiwari added a comment - thank you again paul and lukasz, the way i enabled the archived real path in weblogic.xml is as follows: <wls:container-descriptor> <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes> <wls:show-archived-real-path-enabled>true</wls:show-archived-real-path-enabled> </wls:container-descriptor> it still seem to have not effect on the NPE that i'm getting.
        Hide
        Lukasz Lenart added a comment -

        So you can only fill a request ticket at Oracle

        Show
        Lukasz Lenart added a comment - So you can only fill a request ticket at Oracle

          People

          • Assignee:
            Lukasz Lenart
            Reporter:
            Daniel
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development