facebook

Struts Action Servlet Not Loading…

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #235587 Reply

    imm102
    Member

    Hey guys,

    Im having a nightmare of a problem thats close to losing me a week of work, please help!!

    My struts action servlet is failing to initialise at startup due to a parse error in the struts-config.xml. Heres whats I’ve tried so far:

    — Validated the XML against the DTD
    — Removed XML elements until I managed to track the problem down to the form beans (specifically when ANY form bean is added it fails to parse)
    — Checked the class defs/locations of the form beans concerned
    — Checked the EAR/WAR, unzipped and ensured classes are getting added
    — Suspected a build/compile error so ensured correct versions of classes are being added with the static final string trick.

    I am totally out of ideas. Not a clue where to go from here. The error and my current struts- config.xml (slimmed down but still giving errors) are shown below.

    I don’t want to sound desperate but I am so here goes, PLEASE HELP ME!!!!

    Woo that felt better….

    <?xml version="1.0" encoding="UTF-8"?>
    
    <!DOCTYPE struts-config PUBLIC
              "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
              "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
    
    <struts-config>
    
      <!-- ================== Form Bean Definitions =========================== -->
    
      <form-beans>
        <form-bean name="NavigateForm" type="bla.bla.bla.ui.form.NavigateForm" /> 
      </form-beans>
    
      <!-- ========== Global Forward Definitions ============================== -->
    
      <global-forwards>
        <forward name="blank" path="/secured/index.jsp" redirect="true" />
      </global-forwards>
    
    </struts-config>

    ERROR#######################

    <Servlet: "action" failed to preload on startup in Web application: "blabla".
    javax.servlet.UnavailableException: Parsing error processing resource path
            at org.apache.struts.action.ActionServlet.handleConfigException(ActionServlet.java:1035)
            at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1014)
            at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955)
            at org.apache.struts.action.ActionServlet.init(ActionServlet.java:470)
            at javax.servlet.GenericServlet.init(GenericServlet.java:258)
            at weblogic.servlet.internal.ServletStubImpl$ServletInitAction.run(ServletStubImpl.java:993)
            at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
            at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
            at weblogic.servlet.internal.ServletStubImpl.createServlet(ServletStubImpl.java:869)
            at weblogic.servlet.internal.ServletStubImpl.createInstances(ServletStubImpl.java:848)
            at weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubImpl.java:787)
            at weblogic.servlet.internal.WebAppServletContext.preloadServlet(WebAppS
    ervletContext.java:3260)
    #235618 Reply

    Riyad Kalla
    Member

    Moving to OT > Soft Dev.

    First I would say ANY time you have a problem this hellish for this simply of a problem, the solution is always something totally random and unexpected. I’m going to guess here that there is some issue with the version of Struts you are using OR some funky lib you have in your Tomcat install somewhere.

    Let’s go back to ground zero real quick and make sure things are kosher. Shut down your app server, remove your deployment and go download the newest Tomcat 5.5.x release in ZIP format. Now unzip it. Now navigate to Window > Prefs > MyEclipse > App Servers > Tomcat 5, change the location to your new Tomcat dir you just unzipped, hit OK.

    Create a new deployment and start it up, now try and access your app. Is it still happening? If so, enumerate ALLLLLL of the JARs you have in your WEB-INF/lib directory here for me to look at.

    If they are kosher, the next step I’m going to ask you to do is to go grab the latest Struts 1.2.x download from the Struts site, and unzip it and drop the struts.jar file into your WEB-INF/lib dir to make sure you aren’t using some funky nightly build that might be causing the issue.

    #239507 Reply

    spivee
    Member

    Researching a problem I’m having and, WOW, somebody else is having the same problem…. but… no solution.

    I’m having nearly the same problem. I had my application working nicely within tomcat, but when I tried to move it over to run under a Sun One Web Server 6.0, I started getting this same error.

    Just wondering if this fixed your problem or not? Did you find a solution?

    I’m thinking (after reading the one reply) that maybe my errors are related to compatibility issues. SOWS doesn’t seem to support the same resources as Tomcat does. In particular, tomcat supports java 1.5.0 whereas SOWS only lists support up to 1.4.1_04 (strange since SUN makes both). Also, SOWS 6 doesn’t seem to support the servlet 2.4 specs.

    And then again, that may all be unrelated.

    I may just install tomcat and be done with it.

    #239533 Reply

    Riyad Kalla
    Member

    spivee,
    Keep in mind Sun ONE is currently at version 8.1, so you are using a version of the app server that is many years old. You might try and upgrade and find that it “just works” out of the box.

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Struts Action Servlet Not Loading…

You must be logged in to post in the forum log in