Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Parsing problem with struts-config.xml

Status
Not open for further replies.

Osireion

Programmer
Aug 11, 2005
1
AU
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" "
<struts-config>


<form-beans>


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


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


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


<form-bean name="listApplicationsCallCentreForm" type="au.com.bpa.web.ListApplicationsCallCentreForm" />


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


<form-bean name="singleResidenceApplicationProcessingForm" type="au.com.bpa.web.SingleResidenceApplicationProcessingForm" />


<form-bean name="uploadArchitecturalFloorPlanAttachmentForm" type="au.com.bpa.web.UploadAttachmentForm" />


<form-bean name="uploadSitePlanAttachmentForm" type="au.com.bpa.web.UploadAttachmentForm" />


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


<form-bean name="removeAttachmentsForm" type="au.com.bpa.web.RemoveAttachmentsForm" />


<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>


<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>


<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>


<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-exceptions>
<exception type="java.lang.Exception" key="errors.java.lang.Exception" path="/errors/applicationException.jsp" />
</global-exceptions>


<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" />

<forward name="customer/viewApplicationList" path="/customer/viewApplicationList.do" />

<forward name="cts/viewApplicationList" path="/cts/viewApplicationList.do" />
<forward name="cts/unlockAndExit" path="/cts/unlockAndExit.do" />

<forward name="call-centre/viewApplicationList" path="/call-centre/viewApplicationList.do" />
</global-forwards>


<action-mappings>




<action path="/goRegisterCustomer" type="au.com.bpa.web.SaveTokenAction">
<forward name="success" path="/registerCustomer.jsp" />
</action>


<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>


<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>


<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>


<action path="/common/goSingleResidenceApplication" type="au.com.bpa.web.SaveTokenAction">
<forward name="success" path="/common/singleResidenceApplication.jsp" />
</action>


<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>


<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>


<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>


<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>


<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>



<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>



<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>


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


<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>



<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>


<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>


<action path="/cts/unlockAndExit" type="au.com.bpa.web.UnlockApplicationAction" scope="request">

</action>


<action path="/cts/exportApplication" type="au.com.bpa.web.ExportApplicationAction" scope="request">

</action>


<action path="/cts/forceApplicationApproval" type="au.com.bpa.web.ForceApplicationApprovalAction" scope="request">

</action>


<action path="/cts/rejectApplication" type="au.com.bpa.web.RejectApplicationAction" name="rejectApplicationForm" scope="request">

</action>


<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>



<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>


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


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



<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>


<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>


<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>


<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>
<set-property property="maxFileSize" value="2M" />
<set-property property="debug" value="4" />
</controller>


<message-resources parameter="au.com.bpa.web.ApplicationResources"/>



<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.

I've also tried commenting out the message-resources tag and i still get the error (which tells me that it's not message-resources that's causing the problem).

I have also tried running the application with only one form-bean declaration (trying each one individually) to see if it's one in particular that's causing the problem, but the error occurs with each form-bean declaration.

Any help would be much appreciated. Could this be an issue with the parser itself??

Osireion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top