Announcement Announcement Module
Collapse
No announcement yet.
Simplest Roo Project fails miserably Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Simplest Roo Project fails miserably

    Just downloaded STS 3.2.0 with spring-roo-1.2.3 and none of my older projects import and run so I tried to start a new one from scratch, here is the roo log.

    Code:
    // Spring Roo 1.2.3.RELEASE [rev 7fd62b6] log opened at 2013-04-06 16:46:17
    project --topLevelPackage com.o4bo.care --projectName CARE2 --java 6 --packaging JAR
    // Spring Roo 1.2.3.RELEASE [rev 7fd62b6] log closed at 2013-04-06 16:46:19
    // Spring Roo 1.2.3.RELEASE [rev 7fd62b6] log opened at 2013-04-06 16:47:28
    jpa setup --database HYPERSONIC_IN_MEMORY --provider HIBERNATE 
    entity jpa --class ~.model.Config
    field string configSection
    field string configName
    field string configValue
    web jsf setup 
    web jsf all --package ~.web
    run as run on server tc-server-developer-2.8.2 on win7 pro 64bit and jdk 1.6

    Code:
    Apr 6, 2013 4:50:17 PM org.apache.catalina.startup.ContextConfig processAnnotationsJar
    SEVERE: Unable to process Jar entry [org/hsqldb/util/DatabaseManagerSwing$PopupListener.class] from Jar [jar:file:/K:/Downloads/springsource320a/vfabric-tc-server-developer-2.8.2.RELEASE/base-instance/wtpwebapps/CARE2/WEB-INF/lib/hsqldb-2.2.9.jar!/] for annotations
    java.util.zip.ZipException: invalid LOC header (bad signature)
    	at java.util.zip.ZipFile.read(Native Method)
    followed by pages and pages of similar exceptions.

    Ending with

    Code:
    Apr 6, 2013 4:50:18 PM org.apache.catalina.core.StandardContext addApplicationListener
    INFO: The listener "com.sun.faces.config.ConfigureListener" is already configured for this context. The duplicate definition has been ignored.
    Apr 6, 2013 4:50:18 PM org.apache.catalina.core.ApplicationContext log
    INFO: No Spring WebApplicationInitializer types detected on classpath
    Apr 6, 2013 4:50:18 PM org.apache.catalina.core.ApplicationContext log
    INFO: Initializing Spring root WebApplicationContext
    2013-04-06 16:50:18,947 [localhost-startStop-1] ERROR org.springframework.web.context.ContextLoader - Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in file [K:\Downloads\springsource320a\vfabric-tc-server-developer-2.8.2.RELEASE\base-instance\wtpwebapps\CARE2\WEB-INF\classes\META-INF\spring\applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Cannot find class [org.hibernate.ejb.HibernatePersistence]
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1486)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461)
    Any clues?

  • #2
    Mike, I know this doesn't really answer your question but have you tried building the project outside of STS?

    I haven't had much trouble with the simple/simple applications. I usually just launch roo from the command line, run a sample script, and then navigate to the directory where the resulting pom.xml file is located and get maven to create the eclipse project for you. Do 'mvn eclipse:eclipse', to generate the eclipse project and then import the project into eclipse. Once you're done you can also get maven to package the project for you and deploy to tomcat. After maven has been run you should be able to see all of the libraries in your project and see if there were any errors in resolving those dependencies.

    I don't know exactly what's going on but looking at your log files maybe the maven integration with STS isn't working and it's not pulling down all of the necessary dependencies into your project. Is your internet connectivity ok? It could be that maven isn't able to pull down the dependencies from the online repositories.

    I would just see what happens outside of STS. I could be that somehow the maven integration into STS isn't resolving all of your dependencies.

    Comment


    • #3
      FreeCoffee yes I did and should have mentioned that. Same result class not found. Which does lead me to believe maven was unable to download the required dependencies. I don't know what it is but I know it's not java version, Env variables or the Roo commands.

      Comment


      • #4
        Do you see any errors when you issue 'mvn package'? Could you send the output to a file and then post the results? If you're on windows you can just do mvn package > c:\pathtomyfile.txt.

        This might tell you if mvn is unable to connect to the repository to download the dependencies.

        Comment


        • #5
          Will try that

          I am traveling but I will have one of my staff try and report back here.

          Ollie

          Comment


          • #6
            I did a new clean install of STS 3.2.0 when I got to my client's office. I used mvn package and I see it takes a long time to fetch everything. So I am concluding that it was my impatience, not code or environment.

            Suggestion, the Roo Shell, should be expanded to show the mvn package tracking, so the dumb user (like me) can see its active and not dump it and open a new roo shell for that instant gratification. After waiting for Maven to synch up, all worked as expected.

            Ollie

            Comment


            • #7
              Great, glad that worked out. Yeah, I've found that using the command line really helps you see what's going on with the build progress. Good luck in the future.

              Comment

              Working...
              X