Url of spring sample petclinic can't be accessed successfully 
--------------------------------------------------------------

                 Key: GERONIMO-6121
                 URL: https://issues.apache.org/jira/browse/GERONIMO-6121
             Project: Geronimo
          Issue Type: Bug
      Security Level: public (Regular issues)
          Components: osgi
    Affects Versions: 3.0
         Environment:  JRE 1.6.0 IBM J9 2.4 Windows XP x86-32 
jvmwi3260sr9-20110203_74623 (JIT enabled, AOT enabled)
            Reporter: Tina Li
            Priority: Minor


1.Use Aug 23 build of Geronimo server
2.Start the server if it's not started
3.Download spring sample from svn: 
https://src.springframework.org/svn/spring-samples
4.According to sample named "petclinic", modify the pom.xml file which under 
trunk folder: Change the element of spring vesion from 
<spring.version>3.0.0.RELEASE</spring.version> to  
<spring.version>3.0.6.RELEASE</spring.version>
5.Build this sample successfully using cmd : mvn clean package, then can find 
web application:petclinic.war under /trunk/target folder
6.In order to deploy this web application successfully, Modify geronimo-web.xml 
and web.xml:
For geronimo-web.xml:
Change the element
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-1.0";
                 configId="org/springframework/samples/petclinic">
to 
<web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1";
                 configId="org/springframework/samples/petclinic">
For web.xml:
Change:
        <servlet-mapping>
                <servlet-name>default</servlet-name>
                <url-pattern>/static/*</url-pattern>
        </servlet-mapping>
to
<!--<servlet-mapping>
                <servlet-name>default</servlet-name>
                <url-pattern>/static/*</url-pattern>
        </servlet-mapping>-->
7. Deploy and start the petclinic web application  successfully.
8. Access the depolyed application using firefox 3.6.20 and found error :
HTTP Status 404 -

type Status report

message

description The requested resource () is not available.
9. Check geronimo.log file and found:
2011-08-24 14:24:16,593 WARN  [PathMatchingResourcePatternResolver] Cannot 
search for matching files underneath URL 
[bundleresource://372.fwk134809609/org/springframework/samples/petclinic/web/] 
because it does not correspond to a directory in the file system
java.io.FileNotFoundException: URL 
[bundleresource://372.fwk134809609/org/springframework/samples/petclinic/web/] 
cannot be resolved to absolute file path because it does not reside in the file 
system: 
bundleresource://372.fwk134809609/org/springframework/samples/petclinic/web/
        at 
org.springframework.util.ResourceUtils.getFile(ResourceUtils.java:204)
        at 
org.springframework.core.io.AbstractFileResolvingResource.getFile(AbstractFileResolvingResource.java:52)
        at org.springframework.core.io.UrlResource.getFile(UrlResource.java:168)
        at 
org.springframework.core.io.support.PathMatchingResourcePatternResolver.doFindPathMatchingFileResources(PathMatchingResourcePatternResolver.java:528)
        at 
org.springframework.web.context.support.ServletContextResourcePatternResolver.doFindPathMatchingFileResources(ServletContextResourcePatternResolver.java:92)
        at 
org.springframework.core.io.support.PathMatchingResourcePatternResolver.findPathMatchingResources(PathMatchingResourcePatternResolver.java:349)
        at 
org.springframework.core.io.support.PathMatchingResourcePatternResolver.getResources(PathMatchingResourcePatternResolver.java:267)
        at 
org.springframework.context.support.AbstractApplicationContext.getResources(AbstractApplicationContext.java:1227)
        at 
org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:204)
        at 
org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:204)
        at 
org.springframework.context.annotation.ComponentScanBeanDefinitionParser.parse(ComponentScanBeanDefinitionParser.java:84)
        at 
org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:73)
        at 
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1338)
        at 
org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1328)
        at 
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
        at 
org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
        at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:493)
        at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
        at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334)
        at 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:302)
        at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143)
        at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178)
        at 
org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149)
        at 
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:124)
        at 
org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:93)
        at 
org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:130)
        at 
org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:467)
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:397)
        at 
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:467)
        at 
org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:483)
        at 
org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:358)
        at 
org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:325)
        at 
org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:127)
        at javax.servlet.GenericServlet.init(GenericServlet.java:161)
        at 
org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1216)
        at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1135)
        at 
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1031)
        at 
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4957)
        at 
org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5284)
        at 
org.apache.catalina.core.StandardContext$3.call(StandardContext.java:5279)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:314)
        at java.util.concurrent.FutureTask.run(FutureTask.java:149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:897)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:919)
        at java.lang.Thread.run(Thread.java:736)
2011-08-24 14:24:16,625 INFO  [AutowiredAnnotationBeanPostProcessor] JSR-330 
'javax.inject.Inject' annotation found and supported for autowiring
2011-08-24 14:24:16,640 INFO  [DefaultListableBeanFactory] Pre-instantiating 
singletons in 
org.springframework.beans.factory.support.DefaultListableBeanFactory@494a494a: 
defining beans 
[org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0,org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#0,org.springframework.web.servlet.view.ContentNegotiatingViewResolver#0,org.springframework.web.servlet.view.BeanNameViewResolver#0,org.springframework.web.servlet.view.InternalResourceViewResolver#0,visits,vets,marshaller,messageSource];
 parent: 
org.springframework.beans.factory.support.DefaultListableBeanFactory@3cde3cde
2011-08-24 14:24:16,734 INFO  [Jaxb2Marshaller] Creating JAXBContext with 
classes to be bound [class org.springframework.samples.petclinic.Vets]
2011-08-24 14:24:16,828 INFO  [DispatcherServlet] FrameworkServlet 'petclinic': 
initialization completed in 313 ms
2011-08-24 14:24:17,750 INFO  [SupportedModesServiceImpl] Portlet mode 'edit' 
not found for portletId: 'console-base.WARModules!-717254442|0'
2011-08-24 14:24:17,750 INFO  [SupportedModesServiceImpl] Portlet mode 'help' 
not found for portletId: 'console-base.WARModules!-717254442|0'
2011-08-24 14:24:20,187 WARN  [PageNotFound] No mapping found for HTTP request 
with URI [/petclinic/] in DispatcherServlet with name 'petclinic'
10.But for tomcat apache-tomcat-7.0.20, this sample can be accessed 
successfully.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to