Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Struts-config.xml not being parsed properly

843838Aug 11 2005 — edited Jan 30 2006
Hi,

I'm new to struts and am having a weird problem. I've researched a lot and talked to a lot of developers and I still have a problem. The problem is as follows.

I am getting the following error when deploying my ear file on weblogic8.1:

<BEA-101216> <Servlet: "action" failed to preload on startup in Web application: "bpa".
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(WebAppServletContext.java:3252)
at weblogic.servlet.internal.WebAppServletContext.preloadServlets(WebAppServletContext.java:3197)
at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:3174)
at weblogic.servlet.internal.WebAppServletContext.setStarted(WebAppServletContext.java:5647)
at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:869)
at weblogic.j2ee.J2EEApplicationContainer.start(J2EEApplicationContainer.java:2022)
at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:2063)
at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.activateContainer(SlaveDeployer.java:2592)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(SlaveDeployer.java:2515)
at weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer.java:2317)
at weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(SlaveDeployer.java:2399)
at weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDeployer.java:2311)
at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2479)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:798)
at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:507)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:465)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170).

Now, when looking at the struts-config file, everything seems fine. However, when i remove the <form-bean> declarations, i don't get this error. Of course, without the form-bean declarations, the application comes to a halt when it needs them. I've tried almost everything under the sun and nothing has worked so far, i'm sure it's probably something simple and i'll feel like a complete idiot when it's figured out, but until then, can anyone help???

The config file looks as follows:
<?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>

<!-- Register User form bean -->
<form-bean name="registerCustomerForm" type="au.com.bpa.web.RegisterCustomerForm" />

<!-- List Applications - customer - form bean -->
<form-bean name="listApplicationsForm" type="au.com.bpa.web.ListApplicationsForm" />

<!-- List Applications - cts - form bean -->
<form-bean name="listApplicationsCTSForm" type="au.com.bpa.web.ListApplicationsCTSForm" />

<!-- List Applications - call centre - form bean -->
<form-bean name="listApplicationsCallCentreForm" type="au.com.bpa.web.ListApplicationsCallCentreForm" />

<!-- Single Residence Application form bean -->
<form-bean name="singleResidenceApplicationForm" type="au.com.bpa.web.SingleResidenceApplicationForm" />

<!-- Single Residence Application Processing form bean -->
<form-bean name="singleResidenceApplicationProcessingForm" type="au.com.bpa.web.SingleResidenceApplicationProcessingForm" />

<!-- Upload Floor Plan Attachment form bean -->
<form-bean name="uploadArchitecturalFloorPlanAttachmentForm" type="au.com.bpa.web.UploadAttachmentForm" />

<!-- Upload Site Plan Attachment form bean -->
<form-bean name="uploadSitePlanAttachmentForm" type="au.com.bpa.web.UploadAttachmentForm" />

<!-- Upload Other Attachment form bean -->
<form-bean name="uploadAttachmentForm" type="au.com.bpa.web.UploadAttachmentForm" />

<!-- Remove Attachment(s) form bean -->
<form-bean name="removeAttachmentsForm" type="au.com.bpa.web.RemoveAttachmentsForm" />

<!-- Reject Application form bean -->
<form-bean name="rejectApplicationForm" type="org.apache.struts.action.DynaActionForm">
<form-property name="applicationPK" type="java.lang.Integer" />
<form-property name="comments" type="java.lang.String" />
</form-bean>

<!-- Edit restricted names form bean -->
<form-bean name="editRestrictedNamesForm" type="org.apache.struts.validator.DynaValidatorForm">
<form-property name="category" type="java.lang.String" />
<form-property name="name" type="java.lang.String" />
</form-bean>

<!-- Find by Id form bean -->
<form-bean name="findApplicationByIdForm" type="org.apache.struts.action.DynaActionForm">
<form-property name="idType" type="java.lang.String" initial="applicationId" />
<form-property name="idValue" type="java.lang.String" />
</form-bean>

<!-- Business Reports form bean -->
<form-bean name="businessReportsForm" type="org.apache.struts.action.DynaActionForm">
<form-property name="reportType" type="java.lang.String" />
<form-property name="from" type="java.lang.String" />
<form-property name="to" type="java.lang.String" />
</form-bean>

</form-beans>

<!-- ========== Global Exception Definitions ============================== -->
<global-exceptions>
<exception type="java.lang.Exception" key="errors.java.lang.Exception" path="/errors/applicationException.jsp" />
</global-exceptions>

<!-- ========== Global Forward Definitions ============================== -->
<global-forwards>
<forward name="invalidSession" path="/errors/invalidSession.jsp" />
<forward name="applicationException" path="/errors/applicationException.jsp" />
<forward name="notFound" path="/errors/notFound.jsp" />
<forward name="logoff" path="/common/logoff" />
<forward name="goSingleResidenceApplication" path="/common/goSingleResidenceApplication.do" />
<forward name="viewApplication" path="/common/viewApplication.do" />
<!-- customer -->
<forward name="customer/viewApplicationList" path="/customer/viewApplicationList.do" />
<!-- cts -->
<forward name="cts/viewApplicationList" path="/cts/viewApplicationList.do" />
<forward name="cts/unlockAndExit" path="/cts/unlockAndExit.do" />
<!-- call centre -->
<forward name="call-centre/viewApplicationList" path="/call-centre/viewApplicationList.do" />
</global-forwards>

<!-- ========== Action Mapping Definitions ============================== -->
<action-mappings>

<!-- Common Actions - All Roles -->

<!-- saves a request token -->
<action path="/goRegisterCustomer" type="au.com.bpa.web.SaveTokenAction">
<forward name="success" path="/registerCustomer.jsp" />
</action>

<!-- Register a User -->
<action path="/registerCustomer" type="au.com.bpa.web.RegisterCustomerAction" name="registerCustomerForm" input="/registerCustomer.jsp" scope="request" validate="true">
<forward name="success" path="/registerCustomer-success.jsp" />
<forward name="invalidToken" path="/errors/invalidToken.jsp" />
</action>

<!-- Process a logon -->
<action path="/common/logon" type="au.com.bpa.web.LogonAction" scope="request" validate="true">
<forward name="guest" path="/common/disclaimer.jsp" />
<forward name="customer" path="/common/disclaimer.jsp" />
<forward name="cts" path="/cts/index.jsp" />
<forward name="admin" path="/admin/index.jsp" />
<forward name="browserError" path="/errors/browserError.jsp" />
</action>

<!-- Single Residence Application Form -->
<action path="/common/singleResidenceApplication" type="au.com.bpa.web.SingleResidenceApplicationAction" name="singleResidenceApplicationForm" scope="request" input="/common/singleResidenceApplication.jsp" validate="true">
<forward name="submitted" path="/common/singleResidenceApplication-submitted.jsp" />
<forward name="manual" path="/common/singleResidenceApplication-manualValidationRequired.jsp" />
<forward name="invalidToken" path="/errors/invalidToken.jsp" />
</action>

<!-- submit a single residence app - saves a request token -->
<action path="/common/goSingleResidenceApplication" type="au.com.bpa.web.SaveTokenAction">
<forward name="success" path="/common/singleResidenceApplication.jsp" />
</action>

<!-- Upload Architectural Floor Plan Attachment Form -->
<action path="/common/uploadArchitecturalFloorPlanAttachment" type="au.com.bpa.web.UploadAttachmentAction" name="uploadArchitecturalFloorPlanAttachmentForm" scope="request">
<exception type="java.lang.Exception" key="errors.singleResidenceApplication.file" path="/common/addAttachment-error.jsp" />
<forward name="success" path="/common/addAttachment-success.jsp" />
<forward name="fileTypeError" path="/common/addAttachment-fileTypeError.jsp" />
<forward name="applicationException" path="/common/addAttachment-error.jsp" />
</action>

<!-- Upload Site Plan Attachment Form -->
<action path="/common/uploadSitePlanAttachment" type="au.com.bpa.web.UploadAttachmentAction" name="uploadSitePlanAttachmentForm" scope="request">
<exception type="java.lang.Exception" key="errors.singleResidenceApplication.file" path="/common/addAttachment-error.jsp" />
<forward name="success" path="/common/addAttachment-success.jsp" />
<forward name="fileTypeError" path="/common/addAttachment-fileTypeError.jsp" />
<forward name="applicationException" path="/common/addAttachment-error.jsp" />
</action>

<!-- Upload Attachment Form -->
<action path="/common/uploadAttachment" type="au.com.bpa.web.UploadAttachmentAction" name="uploadAttachmentForm" scope="request">
<exception type="java.lang.Exception" key="errors.singleResidenceApplication.file" path="/common/addAttachment-error.jsp" />
<forward name="success" path="/common/addAttachment-success.jsp" />
<forward name="fileTypeError" path="/common/addAttachment-fileTypeError.jsp" />
<forward name="applicationException" path="/common/addAttachment-error.jsp" />
</action>

<!-- Remove Attachment Form -->
<action path="/common/removeAttachments" type="au.com.bpa.web.RemoveAttachmentsAction" name="removeAttachmentsForm" scope="request" validate="true">
<forward name="success" path="/common/removeAttachments-success.jsp" />
</action>

<!-- view / edit an application -->
<action path="/common/viewApplication" type="au.com.bpa.web.ViewApplicationAction">
<forward name="editSingleResidenceApplication" path="/common/singleResidenceApplication.jsp" />
<forward name="viewSingleResidenceApplication" path="/common/singleResidenceApplicationView.jsp" />
</action>

<!-- Customer Actions - Customer Role -->
<!-- view list of submitted applications - customer -->
<action path="/customer/viewApplicationList" type="au.com.bpa.web.ListApplicationsAction" name="listApplicationsForm" scope="request" validate="false">
<forward name="success" path="/customer/listApplications.jsp" />
</action>

<action path="/customer/findApplicationById" type="au.com.bpa.web.ListApplicationsAction" name="findApplicationByIdForm" scope="request" validate="false">
<forward name="success" path="/customer/listApplications.jsp" />
</action>

<!-- CTS Staff Actions - CTS Role -->
<!-- view list of applications - cts -->
<action path="/cts/viewApplicationList" type="au.com.bpa.web.ListApplicationsCTSAction" name="listApplicationsCTSForm" scope="request" validate="false">
<forward name="success" path="/cts/listApplications.jsp" />
</action>

<action path="/cts/findApplicationById" type="au.com.bpa.web.ListApplicationsCTSAction" name="findApplicationByIdForm" scope="request" validate="false">
<forward name="success" path="/cts/listApplications.jsp" />
</action>

<!-- save user preferences -->
<action path="/cts/saveUserPreferences" type="au.com.bpa.web.SaveUserPreferencesAction">
<forward name="success" path="/cts/listApplications.jsp" />
</action>

<!-- process an application -->
<action path="/cts/processApplication" type="au.com.bpa.web.ProcessApplicationAction">
<forward name="success" path="/cts/processApplication.jsp" />
<forward name="noApplicationsAvailable" path="/cts/processApplication-noApplicationsAvailable.jsp" />
<forward name="sewerInGroupApplication" path="/cts/sewerInGroupApplication.jsp" />
<forward name="insufficientFunds" path="/cts/insufficientFunds" />
</action>

<!-- process an application -->
<!-- Single Residence Application Processing Form -->
<action path="/cts/singleResidenceProcessingApplication" type="au.com.bpa.web.SingleResidenceApplicationProcessingAction" name="singleResidenceApplicationProcessingForm" scope="request" input="/cts/processApplication.jsp" validate="true">
<forward name="invalidToken" path="/errors/invalidToken.jsp" />
<forward name="success" path="/cts/processApplication-success.jsp" />
<forward name="notValidated" path="/cts/processApplication.do" />
</action>

<!-- update a validation run -->
<action path="/cts/updateValidationRun" type="au.com.bpa.web.UpdateValidationRunAction">
<forward name="success" path="/cts/processApplication-success.jsp" />
<forward name="notValidated" path="/cts/processApplication.do" />
</action>

<!-- unlock application and return to list -->
<action path="/cts/unlockAndExit" type="au.com.bpa.web.UnlockApplicationAction" scope="request">
<!-- forwards to global forward cts/viewApplicationList -->
</action>

<!-- export application and return to list -->
<action path="/cts/exportApplication" type="au.com.bpa.web.ExportApplicationAction" scope="request">
<!-- forwards to global forward cts/viewApplicationList -->
</action>

<!-- approve application and return to list -->
<action path="/cts/forceApplicationApproval" type="au.com.bpa.web.ForceApplicationApprovalAction" scope="request">
<!-- forwards to global forward cts/viewApplicationList -->
</action>

<!-- reject application and return to list -->
<action path="/cts/rejectApplication" type="au.com.bpa.web.RejectApplicationAction" name="rejectApplicationForm" scope="request">
<!-- forwards to global forward cts/viewApplicationList -->
</action>

<!-- resolve insufficient funds -->
<action path="/cts/resolveInsufficientFunds" type="au.com.bpa.web.ResolveInsufficientFundsAction">
<forward name="success" path="/cts/insufficientFundsResolved.jsp" />
<forward name="failure" path="/cts/insufficientFundsNotResolved.jsp" />
</action>

<!-- Call Centre Staff Actions - Call Centre Role -->
<!-- view list of applications - cts -->
<action path="/call-centre/viewApplicationList" type="au.com.bpa.web.ListApplicationsCallCentreAction" name="listApplicationsCallCentreForm" scope="request" validate="false">
<forward name="success" path="/call-centre/listApplications.jsp" />
</action>

<action path="/call-centre/findApplicationById" type="au.com.bpa.web.ListApplicationsCallCentreAction" name="findApplicationByIdForm" scope="request" validate="false">
<forward name="success" path="/call-centre/listApplications.jsp" />
</action>

<!-- save user preferences -->
<action path="/call-centre/saveUserPreferences" type="au.com.bpa.web.SaveUserPreferencesAction">
<forward name="success" path="/call-centre/listApplications.jsp" />
</action>

<!-- view / edit an application -->
<action path="/call-centre/viewApplication" type="au.com.bpa.web.ViewApplicationCallCentreAction">
<forward name="viewSingleResidenceApplication" path="/call-centre/viewApplication.jsp" />
</action>

<!-- Admin Actions - Admin Role -->
<!-- show edit restricted names -->
<action path="/admin/editRestrictedNames" type="au.com.bpa.web.EditRestrictedNamesAction" name="editRestrictedNamesForm" scope="request" input="/admin/restrictedNames.jsp" validate="false">
<forward name="success" path="/admin/restrictedNames.jsp" />
</action>

<!-- add edit restricted and return to list -->
<action path="/admin/addRestrictedName" type="au.com.bpa.web.AddRestrictedNameAction" name="editRestrictedNamesForm" scope="request" input="/admin/restrictedNames.jsp" validate="true">
<forward name="success" path="/admin/editRestrictedNames.do" />
<forward name="invalidToken" path="/errors/invalidToken.jsp" />
</action>

<!-- delete edit restricted and return to list -->
<action path="/admin/deleteRestrictedName" type="au.com.bpa.web.DeleteRestrictedNameAction" name="editRestrictedNamesForm" scope="request" input="/admin/restrictedNames.jsp" validate="false">
<forward name="success" path="/admin/editRestrictedNames.do" />
</action>

<!-- show a business report -->
<action path="/admin/showBusinessReport" type="au.com.bpa.web.BusinessReportsAction" name="businessReportsForm" scope="request" validate="false">
<forward name="detailedProcessingStatistics" path="/admin/reportProcessingStatistics.jsp" />
<forward name="detailedPerformanceStatistics" path="/admin/reportPerformanceStatistics.jsp" />
<forward name="reasonsForRejection" path="/admin/reportReasonsForRejection.jsp" />
<forward name="reasonsForManualProcessing" path="/admin/reportReasonsForManualProcessing.jsp" />
<forward name="keyPerformanceIndicators" path="/admin/reportKeyPerformanceIndicators.jsp" />
<forward name="applsWithoutWaterService" path="/admin/reportApplsWithoutWaterService.jsp" />
</action>

</action-mappings>

<!-- ========== Controller Configuration ================================ -->
<controller>
<set-property property="maxFileSize" value="2M" />
<set-property property="debug" value="4" />
</controller>

<!-- ========== Message Resources Definitions =========================== -->
<message-resources parameter="au.com.bpa.web.ApplicationResources"/>


<!-- ========== Plug Ins Configuration ================================== -->
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
<set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
</plug-in>

</struts-config>

This application was originally designed using JBuilder, but now i'm migrating it to Eclipse.

Also, i tried to change the path to one of the form-beans to something that didn't exist, just to see what error i got, and it didn't do anything.

Any help would be much appreciated.

Osireion.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 27 2006
Added on Aug 11 2005
14 comments
3,753 views