wood burning stoves 2.0*
The moose likes Struts and the fly likes Error creating form bean ... NPE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Error creating form bean ... NPE" Watch "Error creating form bean ... NPE" New topic
Author

Error creating form bean ... NPE

Matt Tyson
Greenhorn

Joined: Jun 29, 2006
Posts: 5
I'm getting this error from struts:

18:37:52,281 ERROR [RequestUtils] Error creating form bean of class webview.struts.form.QueueViewForm
java.lang.NullPointerException

I've tried recreating the project with a different package structure.

Here's the struts-config.xml (relavant parts, rest is empty):

<form-beans>
<form-bean name="QueueViewForm" type="webview.struts.form.QueueViewForm" />
</form-beans>

...

<action-mappings>

<action path="/QueueViewSetup"
name="QueueViewForm"
type="webview.struts.action.QueueViewSetup"
scope="request" validate="true" input="/webpages/queueView/queueView.jsp" />

</action-mappings>

...And here's the very ambitious jsp:

<html:form action="/QueueViewSetup.do">

</html:form>

...And here's the form bean:

package webview.struts.form;

import org.apache.struts.action.ActionForm;

public class QueueViewForm extends ActionForm {

}

... And the action:

package webview.struts.action;
import org.apache.struts.action.Action;

public class QueueViewSetup extends Action {

}

Any suggestions? I've deployed a number of struts apps and never seen this. I'm in a new environment, and can't seem to get rid of it.

Thanks guys.
Matt Tyson
Greenhorn

Joined: Jun 29, 2006
Posts: 5
Ok... got it. Didn't have my classes under WEB-INF/classes
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Error creating form bean ... NPE
 
Similar Threads
DynaActionForm - Exception creating bean
Error creating form bean of class
"Cannot retrieve definition for form bean" error
Exception creating bean of class sample.LookSymbol
FileUploading in struts