You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Brian Buckley <br...@attbi.com> on 2002/06/21 17:26:24 UTC
MockStrutsTestCase
Hello,
I have been trying to run the example testcase in StrutsTestCase 1.7.1 (strutstest-1.1_2.3.zip) but I am getting an error "Parsing error processing resource path /WEB-INF/struts-config.xml" from an underlying MalformedURLException/NullPointerException.
I have tried to follow the instructions in the readme file exactly - here is the ant task I wrote based on the readme instructions, which gives me this error.
<java fork="yes" classname="examples.TestLoginAction" >
<classpath>
<pathelement location="${xmlParserAPIs}">
<pathelement location="${xercesImpl}">
<pathelement location="${junit.jar}"/>
<pathelement location="${servlet.jar}"/>
<pathelement location="${struts.libs}/struts.jar"/>
<pathelement location="${commons-digester.jar}"/>
<pathelement location="${commons-collections.jar}"/>
<pathelement location="${commons-logging.jar}"/>
<pathelement location="${commons-beanutils.jar}"/>
<pathelement location="${strutstest.jar}"/>
<pathelement path="c:\lib\strutstest"/>
</classpath>
</java>
The only adjustment I made to the instructions in the readme was to add the xerces' xmlParserAPIs/xercesImpl jars to the classpath to get by an original class not found exception.
Has anyone had a problem trying to run the TestLoginAction example, or have any suggestions for me to get this running?
Thank you.
-Brian
RE: MockStrutsTestCase
Posted by Kevin Henrikson <ke...@openwave.com>.
You need to have the directory that contains WEB-INF/struts-config.xml in your
class path. Not normally the way Struts runs but the TestCase uses the
classpath to find the config file.
I struggled with this for awhile as well.
-kevin
> -----Original Message-----
> From: Brian Buckley [mailto:briankbuckley@attbi.com]
> Sent: Friday, June 21, 2002 8:26 AM
> To: struts-user@jakarta.apache.org
> Subject: MockStrutsTestCase
>
>
> Hello,
>
> I have been trying to run the example testcase in StrutsTestCase
> 1.7.1 (strutstest-1.1_2.3.zip) but I am getting an error "Parsing
> error processing resource path /WEB-INF/struts-config.xml" from an
> underlying MalformedURLException/NullPointerException.
>
> I have tried to follow the instructions in the readme file exactly -
> here is the ant task I wrote based on the readme instructions, which
> gives me this error.
>
> <java fork="yes" classname="examples.TestLoginAction" >
> <classpath>
> <pathelement location="${xmlParserAPIs}">
> <pathelement location="${xercesImpl}">
> <pathelement location="${junit.jar}"/>
> <pathelement location="${servlet.jar}"/>
> <pathelement location="${struts.libs}/struts.jar"/>
> <pathelement location="${commons-digester.jar}"/>
> <pathelement location="${commons-collections.jar}"/>
> <pathelement location="${commons-logging.jar}"/>
> <pathelement location="${commons-beanutils.jar}"/>
> <pathelement location="${strutstest.jar}"/>
> <pathelement path="c:\lib\strutstest"/>
> </classpath>
> </java>
>
>
> The only adjustment I made to the instructions in the readme was to
> add the xerces' xmlParserAPIs/xercesImpl jars to the classpath to get
> by an original class not found exception.
>
> Has anyone had a problem trying to run the TestLoginAction example,
> or have any suggestions for me to get this running?
>
> Thank you.
>
> -Brian
>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>