users@jersey.java.net

1.1.1-ea breaks contextConfigLocation syntax

From: tarjei <tarjei_at_nu.no>
Date: Tue, 18 Aug 2009 15:41:16 +0200

Hi, I got a class that extends JerseyTest that had the following
configuration:

public LocalResourceTest() throws Exception {
                  super();
                  System.setProperty("container.type", GRIZZLY_WEB_CONTAINER);
               Map<String, String> contextParams = new HashMap<String, String>();
               contextParams.put("contextConfigLocation",
"classpath:/applicationContext-HSQLdb.xml" +
                               " classpath:/applicationContext-service.xml" +
                               " classpath:/applicationContext-tx.xml");
               ApplicationDescriptor appDescriptor = new ApplicationDescriptor()
                       .setContextPath("/")
                       .setRootResourcePackageName("com.mydomain")
         
.setServletClass(com.sun.jersey.spi.spring.container.servlet.SpringServlet.class)
         
.setContextListenerClassName("org.springframework.web.context.ContextLoaderListener")
        
                       .setContextParams(contextParams);
               super.setupTestEnvironment(appDescriptor);
        }

This works with 1.1.0-ea , but does not work with 1.1.1-ea. There I get:

Caused by: java.io.FileNotFoundException: class path resource
[applicationContext-HSQLdb.xml classpath:/applicationContext-service.xml
classpath:/applicationContext-tx.xml] cannot be opened because it does
not exist
        at
org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:143)
        at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)

I guess this is something minor, but I thought I'd note it.

Regards,
Tarjei


-- 
Tarjei Huse
Mobil: 920 63 413