Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error creating form bean ... NPE

 
Matt Tyson
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok... got it. Didn't have my classes under WEB-INF/classes
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic