Invalid Action class configuration references an unknown class solution

Source: Internet
Author: User
Tags commit

Sturts2 after the integration, there are strange anomalies:

The Java.lang.RuntimeException:Invalid action class configuration that references a unknown class named .....

Solution:

1. Check that the Struts.xml configuration file is correct

General note the Namespaces property of the method property and the Name property of the action node

<package name= "authority" extends= "default" namespace= "/authority" >

<action name = "Save" class= "authorityaction" method = "Save" >

Not only is the address correct, sometimes a single space can cause problems with the XML file read.

It is recommended to find a running action to copy the configuration, it is really not, that is the problem of the page,

Rogue.. I have encountered problems with this type of page: Hope everyone notice the JSP page as far as possible clean point, do not have more hidden hidden domain

Page all the irrelevant HTML is deleted, only one commit to the action button or connection, the result was successfully submitted, no above bug, and then I have to restore the original page back to the original page has a

<s:iterator value= "Result" status= "list" >

<input type= "hidden" name= "Tiggerid" value= "${id}"/>

<input type= "hidden" name= "codename" Value= "${codename}"/>

</s:iterator> finally found the error here,

2. The preferred ID to identify the hidden domain is unique, this ID cannot be duplicated. Delete some hidden fields that were not found, and the results were successfully submitted to the action

3. Recommend adding properties to each individual hidden field in action private String hides the value of the Name property of the field (Get Set method do not forget)

For example: <input type= "hidden" name= "Tiggerid" value= "1"/> Then add a private String tiggerid in the background; Get set: Method

4. Check your action handler class to see if the call Return view is configured in the configuration file

Java.lang.RuntimeException:Invalid Action class configuration references an unknown class named

The reason is that there is no proper result name, for example: There is a method return SUCCESS in the action class, and in the configuration file there is no

<result name= "Success" >***.jsp</result>

This kind of error is too annoying, and today we meet another:

There is a long property in 5.Action, form get submitted a Chinese character, the result is not reported numberfomrate exception results reported java.lang.RuntimeException:Invalid Action class Configuration that references an unknown class named, Tangle

6. Tangled, weird, and today another one on a page submitted by the following code:

var userform=document.forms["UserForm"];
Userform.action= ". /show.action?selectids=${selectids} ";
Userform.submit ();

And my JSP page just has this name=selectids hidden field result error appeared, strange, encountered annoying error. I got around it and I used it.
Window.location.href= ". /show.action?selectids=${selectids} "; Solved,

Look back, the last commit of the discovery, parameters submitted several times, selectids in the JSP page post submitted when there is value, there is a submission, careless caused by the error.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.