Title: Message
You haven't defined the result type here... I'm checking in a change which will throw a nicer more descriptive error.
 
You need to either specify the result types or include a file which does (such as webwork-default.xml).
 
See:
 
 
and
 
-----Original Message-----
From: Peter White [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 2:52 PM
To: [EMAIL PROTECTED]
Subject: RE: [OS-webwork] Struggling with WebWork2/XWork configuration...

You're right about it seeing the xwork.xml file since I changed one of the attributes and redeployed and had it complain about it being an invalid attribute. I've validated my current xwork.xml file against the DTD with xmlspy and it says the document is valid but the root cause of my problem seems to be the following exception: 
java.lang.NullPointerException
	at com.opensymphony.xwork.config.providers.XmlConfigurationProvider.buildResults(XmlConfigurationProvider.java:291)
	at com.opensymphony.xwork.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:165)
	at com.opensymphony.xwork.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:196)
	at com.opensymphony.xwork.config.providers.XmlConfigurationProvider.loadConfigurationFile(XmlConfigurationProvider.java:453)
	at com.opensymphony.xwork.config.providers.XmlConfigurationProvider.init(XmlConfigurationProvider.java:115)
	at com.opensymphony.xwork.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:130)
	at com.opensymphony.xwork.config.impl.DefaultConfiguration.(DefaultConfiguration.java:48)
	at com.opensymphony.xwork.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:53)
	at com.opensymphony.xwork.DefaultActionProxy.(DefaultActionProxy.java:60)
	at com.opensymphony.xwork.DefaultActionProxyFactory.createActionProxy(DefaultActionProxyFactory.java:40)
	at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:163)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
The line that's causing the NPE is the config.getClazz() line in XmlConfigurationProvider.java as listed below:
ResultTypeConfig config = (ResultTypeConfig) packageContext.getAllResultTypeConfigs().get(resultType);
Class resultClass = config.getClazz();
For reference, I've simplified my xwork.xml as much as possible:
<!DOCTYPE xwork PUBLIC "-//OpenSymphony Group//XWork 1.0//EN"
    "http://localhost/fullcircle/xwork-1.0.dtd">
<xwork>
 <package name="default">
  <action name="formTest" class="net.sf.fullcircle.businesstier.FormAction" method="processForm">
   <result name="success" type="dispatcher">
    <param name="location">WEB-INF/success.jsp</param>
   </result>
   <result name="error" type="dispatcher">
    <param name="location">WEB-INF/error.jsp</param>
   </result>
  </action>
 </package>
</xwork>
I guess it's time to get to know the source if this doesn't ring any bells with anyone... ;-)

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Pat Lightbody
Sent: Wednesday, September 17, 2003 8:27 AM
To: [EMAIL PROTECTED]
Subject: Re: [OS-webwork] Struggling with WebWork2/XWork configuration...

It may also be that it DOES see your xwork.xml file but there is another problem happening (maybe a class is mistyped?) I'd recommend stepping through the code in xwork to find the problem. In the meantime, I think it sounds like we should be doing better error reporting.
----- Original Message -----
Sent: Tuesday, September 16, 2003 10:12 PM
Subject: RE: [OS-webwork] Struggling with WebWork2/XWork configuration...

It's all lowercase and the literal path is "/tomcat/webapps/fullcircle/WEB-INF/classes". I'm actually developing with the Tomcat ant tasks and deploying from an exploded WAR directory so my "build" directory is acting as /tomcat/webapps/fullcircle.
 
I don't believe this should have anything to do with the problem since my components.xml file is recognized (at least it's not complaining about not being able to find it anymore) but I plan on testing this with a real WAR file tomorrow to rule this out as a possible problem.


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Carreira
Sent: Tuesday, September 16, 2003 9:55 PM
To: [EMAIL PROTECTED]
Subject: RE: [OS-webwork] Struggling with WebWork2/XWork configuration...

What's the path to your Tomcat? Does it have a space in it?
 
Is your xwork.xml all lowercase, or is it Xwork.xml?
 
grasping at straws....
-----Original Message-----
From: Peter White [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 17, 2003 12:18 AM
To: [EMAIL PROTECTED]
Subject: RE: [OS-webwork] Struggling with WebWork2/XWork configuration...

It's located in /tomcat/webapps/myapp/WEB-INF/classes. Regarding Patrick's suggestion, the jar files are only located in my application's WEB-INF/lib and not in Tomcat's common/lib directory.


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Carreira
Sent: Tuesday, September 16, 2003 8:40 PM
To: [EMAIL PROTECTED]
Subject: RE: [OS-webwork] Struggling with WebWork2/XWork configuration...

When you say it's in Tomcat's WEB-INF/classes, is this for your webapp, or some Tomcat directory outside your webapp?
-----Original Message-----
From: Peter White [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 16, 2003 6:18 PM
To: [EMAIL PROTECTED]
Subject: [OS-webwork] Struggling with WebWork2/XWork configuration...

I've been struggling with getting WebWork2 running for the last 2 days and am currently stuck with the xwork.xml file not being recognized as evidenced by the following logfile segment:

SEVERE: Could not load XWork configuration file, failing
Sep 16, 2003 3:02:00 PM com.opensymphony.xwork.config.impl.DefaultConfiguration
<init>
SEVERE: Caught ConfigurationException while initializing ConfigurationProvider.
Sep 16, 2003 3:02:00 PM com.opensymphony.webwork.dispatcher.ServletDispatcher se
rvice
SEVERE: Could not execute action
com.opensymphony.xwork.config.ConfigurationException: Error loading configuratio
n file xwork.xml with nested exception java.lang.NullPointerException
        at com.opensymphony.xwork.config.providers.XmlConfigurationProvider.init
(XmlConfigurationProvider.java:118)
        at com.opensymphony.xwork.config.impl.DefaultConfiguration.reload(Defaul
tConfiguration.java:130)
        at com.opensymphony.xwork.config.impl.DefaultConfiguration.<init>(Defaul
tConfiguration.java:48)
        at com.opensymphony.xwork.config.ConfigurationManager.getConfiguration(C
onfigurationManager.java:53)
.
.
.

My xwork.xml is listed as follows:

<!DOCTYPE xwork PUBLIC
    "-//OpenSymphony Group//XWork 1.0//EN"
    "http://localhost/fullcircle/xwork-1.0.dtd"
>
<xwork>
        <include file="xwork-default.xml"/>
        <package name="default" extends="xwork-default">
                <action name="formTest" class="net.sf.fullcircle.businesstier.FormAction" method="processForm" >
                        <result name="success" type="dispatcher">
                                <param name="location">WEB-INF/success.jsp</param>
                        </result>
                       
                        <interceptor-ref name="defaultStack"/>
                        <interceptor-ref name="token-session"/>
                </action>
        </package>
</xwork>

My xwork.xml and xwork-default.xml both exist in tomcat's WEB-INF/classes directory so I'm assuming they'd be located since they're in the classpath. I'm really starting to get frustrated by this because I know it has to be a simple configuration issue - otherwise, everyone else would be having this problem. Does anyone have any idea what I'm doing wrong?

Thanks in advance!
Peter

Reply via email to