Hi,

I have the latest version of Cactus that I'm running on a WebLogic 9.2.2
server with Java 1.5.  I have a method to load properties ...

        private void loadJUnitTestProperties()
        {
                try 
                {
                        ClassLoader cl = ClassLoader.getSystemClassLoader();    
        
                        InputStream is = 
cl.getResourceAsStream("junit.test.properties");
                        test_props.load(is);
                }
                catch ( Exception e )
                {
                        e.printStackTrace();
                        fail("loadJUnitTestProperties");
                }
        }

However when I attempt to load the properties from one of my Cactus test
methods ...

    public void testAccountNotFound() throws ServletException, IOException
    {
        loadJUnitTestProperties(); 
        System.out.println("TestpcAccountLookupJSP: testAccountNotFound");
        
        RequestDispatcher rd =
this.config.getServletContext().getRequestDispatcher("/pcFlow.do?accountid=8493100033263799");
        rd.forward(this.request, this.response);
    }
    
I get NullPointerExceptions thrown because the class loader is not finding
the properties file.  Although I have put the properties file's parent
directory in my Ant target's classpath, that doesn't seem to be the right
place.  What classpath does the file need to be in?

Thanks, - Dave

-- 
View this message in context: 
http://www.nabble.com/Trouble-figuring-out-classpath-tp24707993p24707993.html
Sent from the Cactus - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to