thanks for your answer first ...

I did not understand the java-doc for setConfigFile() like this.
o.k. - the File has to be on the classpath anyway ...

I put the struts-config.xml in the classes directory (which is in the
classpath) because I can not
set nested directories in the classpath in my ide (websphere app.
developer).

Now I print my environment from the setup() method looking for the
classpath ... it is

      java.class.path =

C:\Programme\IBM\Application
Developer\workspace\MANTemplateWebApp\webApplication\WEB-INF\classes
C:\Programme\IBM\Application
Developer\workspace\MANTemplateWebApp\webApplication\WEB-INF\lib\ApacheXerces_r1-4-4.jar;
C:\Programme\IBM\Application
Developer\plugins\com.ibm.etools.websphere.runtime\lib\j2ee.jar;
C:\Programme\IBM\Application
Developer\plugins\com.ibm.etools.websphere.runtime\lib\webcontainer.jar;
C:\Programme\IBM\Application
Developer\plugins\com.ibm.etools.websphere.runtime\lib\ivjejb35.jar;
C:\Programme\IBM\Application
Developer\plugins\com.ibm.etools.websphere.runtime\lib\websphere.jar;
C:\Programme\IBM\Application
Developer\workspace\MANTemplateWebApp\webApplication\WEB-INF\lib\JakartaCactus_r1-2_v1-0.jar;
C:\Programme\IBM\Application
Developer\workspace\MANTemplateWebApp\webApplication\WEB-INF\lib\JakartaStruts_r1-0-1_v1-1.jar;
C:\Programme\IBM\Application
Developer\workspace\MANTemplateWebApp\webApplication\WEB-INF\lib\SourceForgeJUnit_r3-7_v1-0.jar;
C:\Programme\IBM\Application
Developer\workspace\MANTemplateWebApp\webApplication\WEB-INF\lib\JakartaLog4J_r1-1-3.jar;
C:\Programme\IBM\Application
Developer\workspace\MANTemplateWebApp\webApplication\WEB-INF\lib\JavaMail_r1-1-3.jar;
C:\Programme\IBM\Application
Developer\workspace\MANTemplateWebApp\webApplication\WEB-INF\lib\JavaActivation_r1-0-1.jar;
C:\Programme\IBM\Application
Developer\workspace\MANTemplateWebApp\webApplication\WEB-INF\lib\JDom_r1-0beta8.jar;

should be fine

As described by Oren Gros in
      http://marc.theaimsgroup.com/?l=struts-user&m=102570855720187&w=2
I get an LinkageError now
and my JUnit Swing App is crashing.

###

      public void setUp() throws Exception
      {
            cat.debug("setUp() ... start");

            // never forget this!
            super.setUp();

            java.util.Iterator it = System.getProperties().keySet
().iterator();

            while(it.hasNext()) {
                  String key = (String) it.next();
                  System.out.println( key + " : " + (String)
System.getProperties().get(key));
            }
            // Missing configuration resource for path ...
            // this.setConfigFile("/Programme/IBM/Application
Developer/workspace/MANTemplateWebApp/webApplication/WEB-INF/struts-config.xml");

            // java.lang.NullPointerException
            this.setConfigFile("/struts-config.xml");

            cat.debug("setUp() ... finished");
      }

###

Any further ideas? Thanks for your time

A. Grimm

****************************************************
MAN Nutzfahrzeuge AG
Anton Grimm
Abt. IDP (SoftwareProduktionsumgebungen)
Dachauerstr.667
80995 München

Tel.:      089/1580-1054
Fax:      089/1580-911054
E-Mail: [EMAIL PROTECTED]
****************************************************


                                                                                       
                                            
                      "Kevin Henrikson"                                                
                                            
                      <kevin.henrikson@op        An:       "Struts Users Mailing List" 
<[EMAIL PROTECTED]>            
                      enwave.com>                Kopie:                                
                                            
                                                 Thema:    RE: Antwort: StrutsTestCase 
- setConfigFile()                           
                      04.07.2002 09:25                                                 
                                            
                      Bitte antworten an                                               
                                            
                      "Struts Users                                                    
                                            
                      Mailing List"                                                    
                                            
                                                                                       
                                            
                                                                                       
                                            




StrutsTestCase requires your WEB-INF/struts-config.xml to be in the
classpath.
So make sure the directory above WEB-INF is in your classpath.  Then by
default
it will find your file.  If you specify a file or path in the setConfigFile
()
method that too must be in the classpath.

-kevin

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 04, 2002 12:16 AM
> To: Struts Users Mailing List
> Subject: Antwort: StrutsTestCase - setConfigFile()
>
>
>
> forgot about this: I am using Struts 1.0.1 and StrutsTestCase 1.6
>
> ###
>
> I did read the faq and searched the archive, but I still get the
following
> error ...
>
> I played around with the method
>
>       setConfigFile(pathname);
>
> in my MockStrutsTestCase
> and always get a
>       Missing Resource ... /WEB-INF/struts-config.xml
> or a
>       NullPointerException
>
> ###
>       public void setUp() throws Exception
>       {
>             cat.debug("setUp() ... start");
>
>             // never forget this!
>             super.setUp();
>
>             // Missing configuration resource for path ...
>             this.setConfigFile("/Programme/IBM/Application
> Developer/workspace/MANTemplateWebApp/webApplication/WEB-INF/struts-co
> nfig.xml"
>
> );
>
>             // java.lang.NullPointerException
> //          this.setConfigFile("./struts-config.xml");
>
>             cat.debug("setUp() ... finished");
>       }
> ###
>
> Any idea - help is very much appreciated!
>
> Toni
>
> ****************************************************
> MAN Nutzfahrzeuge AG
> Anton Grimm
> Abt. IDP (SoftwareProduktionsumgebungen)
> Dachauerstr.667
> 80995 München
>
> Tel.:      089/1580-1054
> Fax:      089/1580-911054
> E-Mail: [EMAIL PROTECTED]
> ****************************************************
>
>
> --
> To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>
>
>
>




--
To unsubscribe, e-mail:   <
mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>






--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to