# Probleme mit Struts



## jean20 (18. Nov 2006)

Hallo,

ich habe im meiner struts-config.xml eine Action erstellt:

<action path="/WelcomeAction" type="action.WelcomeAction"
            name="welcomeForm" input="/pages/Welcome.jsp">

</action>


eine Form:

<form-bean name="welcomeForm" type="form.WelcomeForm" />


Die Klassen habe ich programmiert und es gab keine Fehlermeldungen. Wenn ich das aber im Tomcat deploe dann bekomme ich diese Fehlermeldung.

kann mir jemand mit der Fehlermeldung helfen? Woran kann es liegen dass eine Form nicht erstellt werden kann?



```
22:38:33,687 ERROR [RequestUtils] Error creating form bean of class form.WelcomeForm
java.lang.NullPointerException
	at org.apache.struts.config.FormBeanConfig.createActionForm(FormBeanConfig.java:212)
	at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:292)
	at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:191)
	at org.apache.struts.action.RequestProcessor.processActionForm(RequestProcessor.java:331)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:202)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
	at java.lang.Thread.run(Thread.java:595)
22:38:33,718 ERROR [RequestProcessor] No action instance for path /WelcomeAction could be created
java.lang.ClassNotFoundException: action.WelcomeAction
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
	at org.apache.struts.util.RequestUtils.applicationClass(RequestUtils.java:117)
	at org.apache.struts.util.RequestUtils.applicationInstance(RequestUtils.java:143)
	at org.apache.struts.action.RequestProcessor.processActionCreate(RequestProcessor.java:292)
	at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:230)
	at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
	at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
	at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
	at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
	at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
	at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
	at java.lang.Thread.run(Thread.java:595)
```


meine Form Klasse:



```
package form;

import org.apache.struts.action.ActionForm;

public class WelcomeForm extends ActionForm {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	String userId, passWord;

	
	public void setUserId(String userId) {
		this.userId = userId;
	}

	public void setPassWord(String passWord) {
		this.passWord = passWord;
	}

	public String getUserId() {
		return userId;
	}

	public String getPassWord() {
		return passWord;
	}


}
```


----------



## clemson (19. Nov 2006)

in der fehlermeldung steht, dass er die klasse action.WelcomeAction nicht finden kann...


----------



## jean20 (19. Nov 2006)

Und woran kann es liegen? Ich habe ja die Action definiert und programmiert.


----------



## HLX (20. Nov 2006)

Beide Klassen scheinen nicht vorhanden zu sein.

Die kompilierten Klassen müssen im Ordner WEB-INF\classes und dort in ihren jeweiligen Paketen liegen. Ist das der Fall?


----------

