Announcement Announcement Module
Collapse
No announcement yet.
Sample project swf-booking-mvc Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Sample project swf-booking-mvc

    Hi,

    im a complete beginner to spring web flow.. and just tried out the swf-booking-mvc sample but can not get it to work.

    My tomcat is throwing an error like:

    Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/config/data-access-config.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: error trying to scan <jar-file>: ...

    What I did was just to download the example and deploy it in tomcat. What else is it that I need to do? I could not see any comment on how to configure the in memory db so I assume it should just work?

    Thanks for any help
    Bjorn
    Last edited by binardi; Aug 27th, 2008, 03:25 PM. Reason: Changing title

  • #2
    It should just work. You might want to paste in that whole stack trace. Looks like some environment error to me though... error scanning a jar file?

    Keith

    Comment


    • #3
      Hi Keith,

      here is the complete stack trace... was too long to paste it all but hope this tells you something.

      2008-aug-27 21:54:14 org.apache.catalina.core.StandardContext listenerStart
      ALLVARLIG: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListe ner
      org.springframework.beans.factory.UnsatisfiedDepen dencyException: Error creating bean with name 'hotelsController' defined in file [C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\swf-booking-mvc\WEB-INF\classes\org\springframework\webflow\samples\bo oking\HotelsController.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.springframework.webflow.samples.booking.Bookin gService]: : Error creating bean with name 'bookingService': Injection of persistence methods failed; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/config/data-access-config.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: error trying to scan <jar-file>: file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/swf-booking-mvc/WEB-INF/classes/; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'bookingService': Injection of persistence methods failed; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/config/data-access-config.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: error trying to scan <jar-file>: file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/swf-booking-mvc/WEB-INF/classes/
      at org.springframework.beans.factory.support.Construc torResolver.createArgumentArray(ConstructorResolve r.java:591)
      at org.springframework.beans.factory.support.Construc torResolver.autowireConstructor(ConstructorResolve r.java:193)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.autowireConstructor(Abs tractAutowireCapableBeanFactory.java:925)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBeanInstance(Abst ractAutowireCapableBeanFactory.java:835)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:440)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:409)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:380)
      at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 64)
      at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:221)
      at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:261 )
      at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:185)
      at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
      at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:429)
      at org.springframework.context.support.AbstractApplic ationContext.finishBeanFactoryInitialization(Abstr actApplicationContext.java:729)
      at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:381)
      at org.springframework.web.context.ContextLoader.crea teWebApplicationContext(ContextLoader.java:255)
      at org.springframework.web.context.ContextLoader.init WebApplicationContext(ContextLoader.java:199)
      at org.springframework.web.context.ContextLoaderListe ner.contextInitialized(ContextLoaderListener.java: 45)
      at org.apache.catalina.core.StandardContext.listenerS tart(StandardContext.java:3843)
      at org.apache.catalina.core.StandardContext.start(Sta ndardContext.java:4342)
      at org.apache.catalina.core.ContainerBase.addChildInt ernal(ContainerBase.java:791)
      at org.apache.catalina.core.ContainerBase.addChild(Co ntainerBase.java:771)
      at org.apache.catalina.core.StandardHost.addChild(Sta ndardHost.java:525)
      at org.apache.catalina.startup.HostConfig.deployWAR(H ostConfig.java:830)
      at org.apache.catalina.startup.HostConfig.deployWARs( HostConfig.java:719)
      at org.apache.catalina.startup.HostConfig.deployApps( HostConfig.java:490)
      at org.apache.catalina.startup.HostConfig.start(HostC onfig.java:1149)
      at org.apache.catalina.startup.HostConfig.lifecycleEv ent(HostConfig.java:311)
      at org.apache.catalina.util.LifecycleSupport.fireLife cycleEvent(LifecycleSupport.java:117)
      at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1053)
      at org.apache.catalina.core.StandardHost.start(Standa rdHost.java:719)
      at org.apache.catalina.core.ContainerBase.start(Conta inerBase.java:1045)
      at org.apache.catalina.core.StandardEngine.start(Stan dardEngine.java:443)
      at org.apache.catalina.core.StandardService.start(Sta ndardService.java:516)
      at org.apache.catalina.core.StandardServer.start(Stan dardServer.java:710)
      at org.apache.catalina.startup.Catalina.start(Catalin a.java:578)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.catalina.startup.Bootstrap.start(Bootst rap.java:288)
      at org.apache.catalina.startup.Bootstrap.main(Bootstr ap.java:413)
      Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'bookingService': Injection of persistence methods failed; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/config/data-access-config.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: error trying to scan <jar-file>: file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/swf-booking-mvc/WEB-INF/classes/
      at org.springframework.orm.jpa.support.PersistenceAnn otationBeanPostProcessor.postProcessPropertyValues (PersistenceAnnotationBeanPostProcessor.java:324)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:998)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:472)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory$1.run(AbstractAutowireC apableBeanFactory.java:409)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:380)
      at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 64)
      at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:221)
      at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:261 )
      at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:185)
      at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:164)
      at org.springframework.beans.factory.support.DefaultL istableBeanFactory.findAutowireCandidates(DefaultL istableBeanFactory.java:671)
      at org.springframework.beans.factory.support.DefaultL istableBeanFactory.resolveDependency(DefaultListab leBeanFactory.java:610)
      at org.springframework.beans.factory.support.Construc torResolver.resolveAutowiredArgument(ConstructorRe solver.java:622)
      at org.springframework.beans.factory.support.Construc torResolver.createArgumentArray(ConstructorResolve r.java:584)
      ... 42 more
      Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/config/data-access-config.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: error trying to scan <jar-file>: file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/webapps/swf-booking-mvc/WEB-

      Comment


      • #4
        I'm having the same problem. Have you gotten any further?

        Mark McDowell

        Comment


        • #5
          This error is caused by bug in Hibernate's EntityManager. It assumes that paths with spaces (%20) are files instead of directories.

          Simple workaround is to install tomcat on path without spaces e.g. c:\tomcat6

          Comment


          • #6
            Thanks for the help - that fixed it for me!

            Mark

            Comment

            Working...
            X