Announcement Announcement Module
Collapse
No announcement yet.
Getting Started Woes Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Getting Started Woes

    I have STS 2.5.2 with ROO 1.1.1 on Win 7, Java 1.6

    I was following http://blog.springsource.com/2009/05/27/roo-part-2/

    The ROO log


    // Spring Roo 1.1.1.RELEASE [rev 156ccd6] log opened at 2011-02-22 04:59:30
    project --topLevelPackage com.corent.chugaroo --projectName ChugaRoo --java 6
    // Spring Roo 1.1.1.RELEASE [rev 156ccd6] log closed at 2011-02-22 04:59:35
    // Spring Roo 1.1.1.RELEASE [rev 156ccd6] log opened at 2011-02-22 04:59:36
    persistence setup --provider HIBERNATE --database HYPERSONIC_PERSISTENT
    entity --class ~.domain.Rsvp
    field string code --notNull --sizeMin 1 --sizeMax 30
    field string email --sizeMax 30
    // [failed] field string email --sizeMax 30
    field number attending --type java.lang.Integer
    field date confirmed --type java.util.Date
    test integration
    controller scaffold ~.web.RsvpController
    selenium test --controller ~.web.RsvpController
    perform test


    -------------------------------------------------------
    T E S T S
    -------------------------------------------------------
    Running com.corent.chugaroo.domain.RsvpIntegrationTest
    Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.976 sec

    Results :

    Tests run: 9, Failures: 0, Errors: 0, Skipped: 0

    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESSFUL
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 17 seconds
    [INFO] Finished at: Tue Feb 22 05:29:56 CST 2011
    [INFO] Final Memory: 25M/247M
    [INFO] ------------------------------------------------------------------------

    When I tried to Run As -> Run on Server with the embedded tc

    I get...the following on the console. What did I do wrong?


    INFO: Starting Servlet Engine: SpringSource tc Runtime 2.1.1.RELEASE/6.0.29.C.RELEASE
    Feb 22, 2011 5:40:07 AM org.apache.catalina.startup.HostConfig deployDescriptor
    INFO: Deploying configuration descriptor ChugaRoo.xml
    [TomcatWeavingInsightClassLoader@1128f5a] warning ignoring duplicate definition: jar:file:/C:/springsource/tc-server-developer-2.1.1.RELEASE/spring-insight-instance/insight/collection-plugins/insight-plugin-jdbc-1.0.0.RELEASE.jar!/META-INF/aop.xml
    [TomcatWeavingInsightClassLoader@1128f5a] warning ignoring duplicate definition: jar:file:/C:/springsource/tc-server-developer-2.1.1.RELEASE/spring-insight-instance/insight/collection-plugins/insight-collection-1.0.0.RELEASE.jar!/META-INF/aop.xml
    [TomcatWeavingInsightClassLoader@1128f5a] warning ignoring duplicate definition: jar:file:/C:/springsource/tc-server-developer-2.1.1.RELEASE/spring-insight-instance/insight/collection-plugins/insight-plugin-jdbc-1.0.0.RELEASE.jar!/META-INF/aop-ajc.xml
    [TomcatWeavingInsightClassLoader@1128f5a] warning ignoring duplicate definition: jar:file:/C:/springsource/tc-server-developer-2.1.1.RELEASE/spring-insight-instance/insight/collection-plugins/insight-plugin-tomcat-1.0.0.RELEASE.jar!/META-INF/aop-ajc.xml
    [TomcatWeavingInsightClassLoader@1128f5a] warning ignoring duplicate definition: jar:file:/C:/springsource/tc-server-developer-2.1.1.RELEASE/spring-insight-instance/insight/collection-plugins/insight-collection-1.0.0.RELEASE.jar!/META-INF/aop-ajc.xml
    ASPECTJ: aspectj.overweaving=true: overweaving switched ON
    Feb 22, 2011 5:40:08 AM org.apache.catalina.core.ApplicationContext log
    INFO: Initializing Spring root WebApplicationContext
    [TomcatWeavingInsightClassLoader@1128f5a] warning javax.* types are not being woven because the weaver option '-Xset:weaveJavaxPackages=true' has not been specified
    2011-02-22 05:40:10,395 [main] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'transactionManager' defined in file [C:\springsource\tc-server-developer-2.1.1.RELEASE\spring-insight-instance\wtpwebapps\ChugaRoo\WEB-INF\classes\META-INF\spring\applicationContext.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'entityManagerFactory' defined in file [C:\springsource\tc-server-developer-2.1.1.RELEASE\spring-insight-instance\wtpwebapps\ChugaRoo\WEB-INF\classes\META-INF\spring\applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/MappingException
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:328)
    at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveValueIfNecessary(BeanDe finitionValueResolver.java:106)
    ...

    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'entityManagerFactory' defined in file [C:\springsource\tc-server-developer-2.1.1.RELEASE\spring-insight-instance\wtpwebapps\ChugaRoo\WEB-INF\classes\META-INF\spring\applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/hibernate/MappingException
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.initializeBean(Abstract AutowireCapableBeanFactory.java:1420)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:519)
    ... 51 more

    Caused by: java.lang.NoClassDefFoundError: org/hibernate/MappingException
    at org.hibernate.ejb.HibernatePersistence.createConta inerEntityManagerFactory(HibernatePersistence.java :72)
    at org.springframework.orm.jpa.LocalContainerEntityMa nagerFactoryBean.createNativeEntityManagerFactory( LocalContainerEntityManagerFactoryBean.java:225)

  • #2
    Doesn't look like there is anything with your Roo stuff, it seems to be something wrong with the Run As -> Run on Server with the embedded tc.

    I was able to successfully run your script and application using mvn clean tomcat:run from the command line.

    Hopefully someone can help out with the embedded tc setup.

    Comment


    • #3
      Since STS 2.5.2 was new on my machine, I decided to try to start over and installed on a clean empty folder with a new clean empty workspace. This time it worked!

      So lesson learned don't install on an existing /springsource or workspace folder or you might get strange results.

      Comment

      Working...
      X