1 Reply Latest reply on Dec 19, 2006 8:46 PM by 89434

    Struts 1.2.9 on OC4J 10.1.2 Not working

    511053
      Hi All,

      I have been trying all sort of different things to deploy my .ear file on OC4J that has struts used in .war file. The same .ear file deploys correctly and works fine on runtime for my Standalone OC4J10.1.2 on windows but when I try to deploy it on UNIX box for Standalone OC4J10.1.2 it does deploy right but it breaks runtime on access to login.jsp as soon as it finds the first struts tag.

      Pl help me asap. I have no idea, if this version of struts is not supported by this version of OC4J or what?

      Here is the config for web.xml
      ------------------------------------------

           <servlet>
                <servlet-name>action</servlet-name>
                <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
                <init-param>
                     <param-name>application</param-name>
                     <param-value>ApplicationResources</param-value>
                </init-param>
                <init-param>
                     <param-name>config</param-name>
                     <param-value>/WEB-INF/struts-config.xml</param-value>
                </init-param>
                <init-param>
                     <param-name>debug</param-name>
                     <param-value>2</param-value>
                </init-param>
                <init-param>
                     <param-name>detail</param-name>
                     <param-value>2</param-value>
                </init-param>
                <load-on-startup>2</load-on-startup>
           </servlet>

      <servlet-mapping>
      <servlet-name>action</servlet-name>
      <url-pattern>*.do</url-pattern>
      </servlet-mapping>
      ---------------------------------------------------------------------------
      My all struts related jars are located at WEB-INF/lib

      commons-fileupload.jar
      commons-logging.jar
      commons-digester.jar
      commons-beanutils.jar
      commons-validator.jar
      jakarta-oro.jar
      antlr.jar
      struts.jar

      I am not specifying any classpath as the server should pick up libraries from WEB-INF/lib.

      Here is my login.jsp
      ----------------------------

      <%@ page contentType="text/html;charset=windows-1252"%>

      <%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
      <%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>

      <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

      <style type="text/css" media="screen">
      @import url(<html:rewrite page="/COES/css/coes.css" />);
      </style>

      <script type="text/javascript" language="Javascript"
      src="/COES/javascript/coes.js">
      </script>

      <script type="text/javascript" language="Javascript"
      src="/COES/javascript/datefunctions.js">
      </script>


      <title><bean:message key="coes.title"/></title>

      <!-- Begin Validator Javascript Function-->
      <html:javascript formName="LoginForm"/>
      <!-- End of Validator Javascript Function-->

      </head>
      <body>
      <table>
      <tr><td class="errors"><html:errors/></td></tr>
      <tr>
      <td>
      <table width="100%" class="headertable" border="0">
      <tr>
      <td width="1%"><html:image page="/img/nexcomlogo.gif" styleClass="css/headerLogoImage" altKey="coes.build"/></td>
      <td align="center"><bean:message key="coes.title"/> - <bean:message key="coes.version"/><br><br>
      </td>
      <td> </td>
      </tr>
      </table>
      </td>
      </tr>
      <tr>
      <td>
      <html:form action="Login" onsubmit="return validateLoginForm(this);">
      <b>Enter your location passcode:</b> 
      <html:password property="passcode"/>
      <html:submit property="login"
      styleClass="smallblackbutton"
      value="Log In"
      onmouseover="javascript:goLite(this)"
      onmouseout="javascript:goDim(this)"
      />

      </html:form>
      </td>
      </tr>
      </table>
      </body>
      </html>
      -------------------------------

      It breaks at line
      @import url(<html:rewrite page="/COES/css/coes.css" />);
      and on browser I see err

      java.lang.NullPointerException     at org.apache.struts.taglib.TagUtils.pageURL(TagUtils.java:1070)     at org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:449)     at org.apache.struts.taglib.html.RewriteTag.doStartTag(RewriteTag.java:55)     at jsp.login._jspService(_login.java:51)     [SRC:/jsp/login.jsp:12]     at com.orionserver[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)     at oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown Source)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126)     at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)     at java.lang.Thread.run(Thread.java:568)

      -------------------------------------------------------

      The log file always shows below err, no matter what change I make:

      [17 Nov 2006 10:22:24] ERROR [Digester] Digester.getParser:
      org.xml.sax.SAXNotRecognizedException: http://apache.org/xml/features/validation/dynamic
           at oracle.xml.jaxp.JXSAXParserFactory.setFeature(JXSAXParserFactory.java:128)
           at org.apache.commons.digester.parser.XercesParser.configureXerces(XercesParser.java:185)
           at org.apache.commons.digester.parser.XercesParser.newSAXParser(XercesParser.java:138)
           at org.apache.commons.digester.ParserFeatureSetterFactory.newSAXParser(ParserFeatureSetterFactory.java:73)
           at org.apache.commons.digester.Digester.getParser(Digester.java:682)
           at org.apache.commons.digester.Digester.getXMLReader(Digester.java:891)
           at org.apache.commons.digester.Digester.parse(Digester.java:1572)
           at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:738)
           at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:687)
           at org.apache.struts.action.ActionServlet.init(ActionServlet.java:333)
           at javax.servlet.GenericServlet.init(GenericServlet.java:258)
           at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2354)
           at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4795)
           at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4889)
           at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1015)
           at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:549)
           at com.evermind.server.Application.getHttpApplication(Application.java:890)
           at com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:707)
           at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:625)
           at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:278)
           at com.evermind.server.http.HttpServer.setSites(HttpServer.java:278)
           at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:179)
           at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServer.java:2394)
           at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1551)
           at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:92)
           at java.lang.Thread.run(Thread.java:568)
      [17 Nov 2006 10:22:24] ERROR [ActionServlet] Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown, so marking the servlet as unavailable. Most likely, this is due to an incorrect or missing library dependency.
      java.lang.NullPointerException
           at org.apache.commons.digester.Digester.getXMLReader(Digester.java:891)
           at org.apache.commons.digester.Digester.parse(Digester.java:1572)
           at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:738)
           at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:687)
           at org.apache.struts.action.ActionServlet.init(ActionServlet.java:333)
           at javax.servlet.GenericServlet.init(GenericServlet.java:258)
           at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2354)
           at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4795)
           at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4889)
           at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1015)
           at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:549)
           at com.evermind.server.Application.getHttpApplication(Application.java:890)
           at com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:707)
           at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:625)
           at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:278)
           at com.evermind.server.http.HttpServer.setSites(HttpServer.java:278)
           at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:179)
           at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServer.java:2394)
           at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1551)
           at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:92)
           at java.lang.Thread.run(Thread.java:568)

      Thanks