Announcement Announcement Module
Collapse
No announcement yet.
Try Roo Example Error Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Try Roo Example Error

    I cannot seem to get the "Try Roo" example to build. I'm not new to Maven, so perhaps one of my global repositories or my own profile is screwing things up, but as I follow the example I finally receive the error as a result of the very last step "perform tests".

    Code:
    [Thread-9] [INFO] Scanning for projects...
    [Thread-9] [INFO]                                                                         
    [Thread-9] [INFO] ------------------------------------------------------------------------
    [Thread-9] [INFO] Building foo 0.1.0.BUILD-SNAPSHOT
    [Thread-9] [INFO] ------------------------------------------------------------------------
    [Thread-9] Downloading: https://repository.jboss.org/nexus/content/repositories/releases/org/hibernate/hibernate-core/3.6.0.Final/hibernate-core-3.6.0.Final.pom
    [Thread-9] 
    [Thread-9] Downloading: https://repository.jboss.org/nexus/content/repositories/releases/org/hibernate/hibernate-entitymanager/3.6.0.Final/hibernate-entitymanager-3.6.0.Final.pom
    [Thread-9] 
    [Thread-9] Downloading: https://repository.jboss.org/nexus/content/repositories/releases/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.0.Final/hibernate-jpa-2.0-api-1.0.0.Final.pom
    [Thread-9] 
    [Thread-9] Downloading: https://repository.jboss.org/nexus/content/repositories/releases/org/hibernate/hibernate-validator/4.1.0.Final/hibernate-validator-4.1.0.Final.pom
    [Thread-9] 
    [Thread-9] [INFO] ------------------------------------------------------------------------
    [Thread-9] [INFO] BUILD FAILURE
    [Thread-9] [INFO] ------------------------------------------------------------------------
    [Thread-9] [INFO] Total time: 2.008s
    [Thread-9] [INFO] Finished at: Mon Jan 31 12:37:09 CST 2011
    [Thread-9] [INFO] Final Memory: 5M/81M
    [Thread-9] [INFO] ------------------------------------------------------------------------
    [Thread-9] [ERROR] Failed to execute goal on project foo: Could not resolve dependencies for project com.foo:foo:war:0.1.0.BUILD-SNAPSHOT: Failed to collect dependencies for [junit:junit:jar:4.8.1 (test), log4j:log4j:jar:1.2.16 (compile), org.slf4j:slf4j-api:jar:1.6.1 (compile), org.slf4j:jcl-over-slf4j:jar:1.6.1 (compile), org.slf4j:slf4j-log4j12:jar:1.6.1 (compile), org.aspectj:aspectjrt:jar:1.6.11.M1 (compile), org.aspectj:aspectjweaver:jar:1.6.11.M1 (compile), javax.servlet:servlet-api:jar:2.5 (provided), net.sf.flexjson:flexjson:jar:2.0 (compile), org.springframework.roo:org.springframework.roo.annotations:jar:1.1.1.RELEASE (provided), org.springframework:spring-core:jar:3.0.5.RELEASE (compile), org.springframework:spring-test:jar:3.0.5.RELEASE (test), org.springframework:spring-context:jar:3.0.5.RELEASE (compile), org.springframework:spring-aop:jar:3.0.5.RELEASE (compile), org.springframework:spring-aspects:jar:3.0.5.RELEASE (compile), org.springframework:spring-tx:jar:3.0.5.RELEASE (compile), org.hsqldb:hsqldb:jar:1.8.0.10 (compile), org.hibernate:hibernate-core:jar:3.6.0.Final (compile), org.hibernate:hibernate-entitymanager:jar:3.6.0.Final (compile), org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final (compile), org.hibernate:hibernate-validator:jar:4.1.0.Final (compile), javax.validation:validation-api:jar:1.0.0.GA (compile), cglib:cglib-nodep:jar:2.2 (compile), javax.transaction:jta:jar:1.1 (compile), org.springframework:spring-jdbc:jar:3.0.5.RELEASE (compile), org.springframework:spring-orm:jar:3.0.5.RELEASE (compile), commons-pool:commons-pool:jar:1.5.4 (compile), commons-dbcp:commons-dbcp:jar:1.3 (compile), org.apache.tiles:tiles-core:jar:2.2.1 (compile), org.apache.tiles:tiles-jsp:jar:2.2.1 (compile), org.springframework:spring-web:jar:3.0.5.RELEASE (compile), org.springframework:spring-webmvc:jar:3.0.5.RELEASE (compile), org.springframework.webflow:spring-js-resources:jar:2.2.1.RELEASE (compile), commons-digester:commons-digester:jar:2.0 (compile), commons-fileupload:commons-fileupload:jar:1.2.1 (compile), javax.servlet:jstl:jar:1.2 (compile), javax.el:el-api:jar:1.0 (provided), joda-time:joda-time:jar:1.6 (compile), javax.servlet.jsp:jsp-api:jar:2.1 (provided), com.google.gwt:gwt-servlet:jar:2.1.1 (compile), com.google.gwt:gwt-user:jar:2.1.1 (provided), org.json:json:jar:20090211 (compile), com.googlecode.gwt.inject:gin:jar:1.0 (compile), xalan:xalan:jar:2.7.1 (compile)]: Failed to read artifact descriptor for org.hibernate:hibernate-core:jar:3.6.0.Final: Could not transfer artifact org.hibernate:hibernate-core:pom:3.6.0.Final from JBoss Repo (https://repository.jboss.org/nexus/content/repositories/releases): Error transferring file: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty -> [Help 1]
    [Thread-9] [ERROR] 
    [Thread-9] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [Thread-9] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [Thread-9] [ERROR] 
    [Thread-9] [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [Thread-9] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
    I'm running Maven 3.0 on OS X 10.6.6 using the latest Apple-provided version of Java.

    Code:
    Apache Maven 3.0 (r1004208; 2010-10-04 06:50:56-0500)
    Java version: 1.6.0_22
    Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
    Default locale: en_US, platform encoding: MacRoman
    OS name: "mac os x" version: "10.6.6" arch: "x86_64" Family: "mac"
    Should I switch back to Maven 2.2.1 perhaps? I know Eclipse has been using an embedded version of Maven for a long time (or rather the M2 project has), so I can't imagine that Roo lacks Maven 3 support.

    Thank you for your help!

  • #2
    Tried with Maven 2.2.1

    Here is the result of "perform tests":

    Code:
    ~.web roo> perform tests
    
    ... A LOT OF UNABLE TO RESOLVE ISSUES ...
    
    [Thread-9] 409K downloaded  (spring-webmvc-3.0.5.RELEASE.jar)
    [Thread-9] [INFO] ------------------------------------------------------------------------
    [Thread-9] [ERROR] BUILD ERROR
    [Thread-9] [INFO] ------------------------------------------------------------------------
    [Thread-9] [INFO] Failed to resolve artifact.
    [Thread-9] 
    [Thread-9] Missing:
    [Thread-9] ----------
    [Thread-9] 1) org.hibernate:hibernate-core:jar:3.6.0.Final
    [Thread-9] 
    [Thread-9]   Try downloading the file manually from the project website.
    [Thread-9] 
    [Thread-9]   Then, install it using the command: 
    [Thread-9]       mvn install:install-file -DgroupId=org.hibernate -DartifactId=hibernate-core -Dversion=3.6.0.Final -Dpackaging=jar -Dfile=/path/to/file
    [Thread-9] 
    [Thread-9]   Alternatively, if you host your own repository you can deploy the file there: 
    [Thread-9]       mvn deploy:deploy-file -DgroupId=org.hibernate -DartifactId=hibernate-core -Dversion=3.6.0.Final -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
    [Thread-9] 
    [Thread-9]   Path to dependency: 
    [Thread-9]       1) com.foo:foo:war:0.1.0.BUILD-SNAPSHOT
    [Thread-9]       2) org.hibernate:hibernate-core:jar:3.6.0.Final
    [Thread-9] 
    [Thread-9] 2) org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final
    [Thread-9] 
    [Thread-9]   Try downloading the file manually from the project website.
    [Thread-9] 
    [Thread-9]   Then, install it using the command: 
    [Thread-9]       mvn install:install-file -DgroupId=org.hibernate.javax.persistence -DartifactId=hibernate-jpa-2.0-api -Dversion=1.0.0.Final -Dpackaging=jar -Dfile=/path/to/file
    [Thread-9] 
    [Thread-9]   Alternatively, if you host your own repository you can deploy the file there: 
    [Thread-9]       mvn deploy:deploy-file -DgroupId=org.hibernate.javax.persistence -DartifactId=hibernate-jpa-2.0-api -Dversion=1.0.0.Final -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
    [Thread-9] 
    [Thread-9]   Path to dependency: 
    [Thread-9]       1) com.foo:foo:war:0.1.0.BUILD-SNAPSHOT
    [Thread-9]       2) org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.0.Final
    [Thread-9] 
    [Thread-9] 3) org.hibernate:hibernate-entitymanager:jar:3.6.0.Final
    [Thread-9] 
    [Thread-9]   Try downloading the file manually from the project website.
    [Thread-9] 
    [Thread-9]   Then, install it using the command: 
    [Thread-9]       mvn install:install-file -DgroupId=org.hibernate -DartifactId=hibernate-entitymanager -Dversion=3.6.0.Final -Dpackaging=jar -Dfile=/path/to/file
    [Thread-9] 
    [Thread-9]   Alternatively, if you host your own repository you can deploy the file there: 
    [Thread-9]       mvn deploy:deploy-file -DgroupId=org.hibernate -DartifactId=hibernate-entitymanager -Dversion=3.6.0.Final -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
    [Thread-9] 
    [Thread-9]   Path to dependency: 
    [Thread-9]       1) com.foo:foo:war:0.1.0.BUILD-SNAPSHOT
    [Thread-9]       2) org.hibernate:hibernate-entitymanager:jar:3.6.0.Final
    [Thread-9] 
    [Thread-9] 4) org.hibernate:hibernate-validator:jar:4.1.0.Final
    [Thread-9] 
    [Thread-9]   Try downloading the file manually from the project website.
    [Thread-9] 
    [Thread-9]   Then, install it using the command: 
    [Thread-9]       mvn install:install-file -DgroupId=org.hibernate -DartifactId=hibernate-validator -Dversion=4.1.0.Final -Dpackaging=jar -Dfile=/path/to/file
    [Thread-9] 
    [Thread-9]   Alternatively, if you host your own repository you can deploy the file there: 
    [Thread-9]       mvn deploy:deploy-file -DgroupId=org.hibernate -DartifactId=hibernate-validator -Dversion=4.1.0.Final -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
    [Thread-9] 
    [Thread-9]   Path to dependency: 
    [Thread-9]       1) com.foo:foo:war:0.1.0.BUILD-SNAPSHOT
    [Thread-9]       2) org.hibernate:hibernate-validator:jar:4.1.0.Final
    [Thread-9] 
    [Thread-9] ----------
    [Thread-9] 4 required artifacts are missing.
    [Thread-9] 
    [Thread-9] for artifact: 
    [Thread-9]   com.foo:foo:war:0.1.0.BUILD-SNAPSHOT
    [Thread-9] 
    [Thread-9] from the specified remote repositories:
    [Thread-9]   maven.lostcreations.com-releases-private (http://maven.lostcreations.com/releases-private/),
    [Thread-9]   spring-maven-milestone (http://maven.springframework.org/milestone),
    [Thread-9]   central (http://repo1.maven.org/maven2),
    [Thread-9]   spring-roo-repository (http://spring-roo-repository.springsource.org/release),
    [Thread-9]   maven.lostcreations.com-snapshots (http://maven.lostcreations.com/snapshots/),
    [Thread-9]   maven.lostcreations.com-releases (http://maven.lostcreations.com/releases/),
    [Thread-9]   spring-maven-release (http://maven.springframework.org/release),
    [Thread-9]   JBoss Repo (https://repository.jboss.org/nexus/content/repositories/releases)
    [Thread-9] 
    [Thread-9] [INFO] ------------------------------------------------------------------------
    [Thread-9] [INFO] For more information, run Maven with the -e switch
    [Thread-9] [INFO] ------------------------------------------------------------------------
    [Thread-9] [INFO] Total time: 55 seconds
    [Thread-9] [INFO] Finished at: Mon Jan 31 13:40:23 CST 2011
    [Thread-9] [INFO] Final Memory: 30M/81M
    [Thread-9] [INFO] ------------------------------------------------------------------------
    ~.web roo> ~.web roo>

    Comment


    • #3
      Got further by disabling SSL

      I had to disable "https" on the JBOSS repository. Using Maven 3 it still fails with the following errors:

      http://paste.ideaslabs.com/show/QuPsx6kN60

      Please tell me I'm doing something wrong. I can't believe that such a simple example is so plagued with bugs. If all Roo beginners experience these issues at the outset it's unimaginable that there would be any users left.

      Comment


      • #4
        SSL must be used

        So, I created the second problem by disabling JBOSS's SSL connection. If you tell the POM to access the JBOSS repo via http you'll actually get these files in place of the POMs:

        Code:
        <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
        <html><head>
        <title>302 Found</title>
        </head><body>
        <h1>Found</h1>
        <p>The document has moved <a href="https://repository.jboss.org/nexus/content/repositories/releases/org/hibernate/hibernate-core/3.6.0.Final/hibernate-core-3.6.0.Final.pom">here</a>.</p>
        <hr>
        <address>Apache Server at repository.jboss.org Port 80</address>
        </body></html>
        Clearly this is not correct.

        So I need to:

        1. Remove the invalid, cached artifacts from my repo.
        2. Still figure out how to get Maven to talk to the JBOSS repo over SSL.

        Please help!

        Comment


        • #5
          JBOSS cert in my keystore

          I can write a quick Java app:

          Code:
          import java.io.*;
          import java.net.*;
          
          public class Foo
          {
          
              /**
               * @param args
               */
              public static void main(String[] args) throws Exception
              {
                  String s;
                  BufferedReader r =
                      new BufferedReader(new InputStreamReader(
                          new URL("https://repository.jboss.org/nexus/content/repositories/releases/org/hibernate/hibernate-core/3.6.0.Final/hibernate-core-3.6.0.Final.pom").openStream()));
                  while ((s = r.readLine()) != null)
                  {
                      System.out.println(s);
                  }
              }
          
          }
          And it prints the fetched pom file, so it's not that the JVM can't access the server because of SSL. It's something to do with the way Maven is accessing the JBOSS repo.

          Come on, is no one else having this issue?

          Comment


          • #6
            It has to be your network environment some how...

            Is there a way you can hook to different internet service provider?

            Just to nail down issue.

            Never experience what you are going through ever


            Thx
            jD

            Comment


            • #7
              Nope

              Originally posted by delgad9 View Post
              It has to be your network environment some how...

              Is there a way you can hook to different internet service provider?

              Just to nail down issue.

              Never experience what you are going through ever


              Thx
              jD
              I'm sorry, but that's not it. I can access the URL just fine in a browser. It's a maven-ism. I have it working on a Linux box beside me. It has something to do with my OS X box + Maven. I'm working it out in a Maven IRC channel. Any further suggestions here are welcome too, but it's not a network provider issue.

              Comment


              • #8
                Try the maven forum...

                I found this for you http://blog.carlossanchez.eu/2011/01...aven-and-os-x/

                Hope helps
                jD

                Comment


                • #9
                  Onto GWT not working

                  Originally posted by delgad9 View Post
                  Try the maven forum...

                  I found this for you http://blog.carlossanchez.eu/2011/01...aven-and-os-x/

                  Hope helps
                  jD
                  I appreciate the help, but it's not a GPG error. And I'm already consulting with the Maven mavens (I'm typically considered a Maven guru, but even I get floored).

                  I can bypass the JBOSS repo issue on a Windows host, but on that host I get a different set of errors.

                  Code:
                  [Thread-8] [ERROR] The import com.google.appengine cannot be resolved
                  [Thread-8] [ERROR] User cannot be resolved to a type
                  [Thread-8] [ERROR] The import com.google.appengine cannot be resolved
                  [Thread-8] [ERROR] UserService cannot be resolved to a type
                  [Thread-8] [ERROR] UserServiceFactory cannot be resolved
                  [Thread-8] [ERROR] User cannot be resolved to a type
                  [Thread-8] [ERROR] The import com.google.appengine cannot be resolved
                  [Thread-8] [ERROR] UserService cannot be resolved to a type
                  [Thread-8] [ERROR] UserServiceFactory cannot be resolved
                  [Thread-8] [WARNING] advice defined in org.springframework.scheduling.aspectj.AbstractAsyncExecution
                  Aspect has not been applied [Xlint:adviceDidNotMatch]
                  [Thread-8] [WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEnt
                  ityMockingControl has not been applied [Xlint:adviceDidNotMatch]
                  [Thread-8] [WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingCont
                  rol has not been applied [Xlint:adviceDidNotMatch]
                  [Thread-8] [INFO] ------------------------------------------------------------------------
                  [Thread-8] [INFO] BUILD FAILURE
                  [Thread-8] [INFO] ------------------------------------------------------------------------
                  [Thread-8] [INFO] Total time: 6:56.012s
                  [Thread-8] [INFO] Finished at: Mon Jan 31 18:01:20 CST 2011
                  [Thread-8] [INFO] Final Memory: 5M/26M
                  [Thread-8] [INFO] ------------------------------------------------------------------------
                  [Thread-8] [ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.0:compile (defaul
                  t) on project foo: Compiler errors :
                  [Thread-8] [ERROR] error at import com.google.appengine.api.users.User;
                  [Thread-8] [ERROR] ^^^^^^^^^^^^^^^^^^^
                  [Thread-8] [ERROR] C:\hello\src\main\java\com\foo\server\gae\UserServiceWrapper.java:3:0::0 The impo
                  rt com.google.appengine cannot be resolved
                  It appears the GWT libs aren't in the classpath. This is Roo?

                  Comment


                  • #10
                    Fixed issue on OS X; GWT on Windows still fubar

                    It was my own stupid fault. Look at the line I commented out from my .profile file:

                    Code:
                    # Java
                    # export JAVA_OPTS="-Xmx1024m -XX:MaxPermSize=1024m -Dsun.nio.ch.disableSystemWideOverlappingFileLockCheck=1 -Djavax.net.ssl.trustStore=$HOME/.keystore -Djavax.net.ssl.trustStorePassword=password"
                    export JAVA_OPTS="-Xmx1024m -XX:MaxPermSize=1024m -Dsun.nio.ch.disableSystemWideOverlappingFileLockCheck=1"
                    export MAVEN_OPTS="-DskipTests -Dbaselinetest.skip=true $JAVA_OPTS"
                    export ROO_HOME=$HOME/Servers/spring-roo/spring-roo-1.1.1.RELEASE
                    Everything now works on my OS X box. However, GWT compilation on my Windows system is still broken. Thoughts?

                    Comment


                    • #11
                      It is funny, 10+ posts to find that was a mistaken commented line...

                      Thank you for the laugh. I believe I can happen to anybody

                      jD

                      Note: I'll try on my wintel tonight

                      Comment


                      • #12
                        Missing dependency for GWT

                        Everything now works on my OS X box. However, GWT compilation on my Windows system is still broken. Thoughts?
                        I needed to add the following dependency to the POM.xml to get it working.

                        Code:
                        		<dependency>
                        			<groupId>com.google.appengine</groupId>
                        			<artifactId>appengine-api-1.0-sdk</artifactId>
                        			<version>1.2.1</version>
                        		</dependency>
                        Last edited by sweetfa; Feb 28th, 2011, 09:40 PM. Reason: Add code tags

                        Comment


                        • #13
                          I get the following error when running "perform test"
                          Code:
                          [Thread-7] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-eclipse
                          -plugin:2.7:clean (default-cli) on project tenminutes: Execution default-cli of
                          goal org.apache.maven.plugins:maven-eclipse-plugin:2.7:clean failed: Plugin org.
                          apache.maven.plugins:maven-eclipse-plugin:2.7 or one of its dependencies could n
                          ot be resolved: Failed to collect dependencies for org.apache.maven.plugins:mave
                          n-eclipse-plugin:jar:2.7 (): Failed to read artifact descriptor for org.codehaus
                          .plexus:plexus-resources:jar:1.0-alpha-4: Could not transfer artifact org.codeha
                          us.plexus:plexus-resources:pom:1.0-alpha-4 from/to spring-maven-release (http://
                          maven.springframework.org/release): Access denied to: http://maven.springframewo
                          rk.org/release/org/codehaus/plexus/plexus-resources/1.0-alpha-4/plexus-resources
                          -1.0-alpha-4.pom -> [Help 1]
                          [Thread-7] [ERROR]
                          [Thread-7] [ERROR] To see the full stack trace of the errors, re-run Maven with
                          the -e switch.
                          [Thread-7] [ERROR] Re-run Maven using the -X switch to enable full debug logging
                          .
                          [Thread-7] [ERROR]
                          [Thread-7] [ERROR] For more information about the errors and possible solutions,
                           please read the following articles:
                          [Thread-7] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/Plu
                          ginResolutionException
                          The command 'mvn.bat eclipse:clean eclipse:eclipse' did not complete successfull
                          y
                          roo>
                          Following the first link in the error log i.e. http://cwiki.apache.org/confluence/d...utionException, what I find on this page corresponds to the access-denied error that I'm getting see below:

                          Code:
                          The plugin repository you have configured requires authentication and Maven failed to provide the correct credentials to the server. In this case, make sure your ${user.home}/.m2/settings.xml contains a <server> declaration whose <id> matches the <id> of the plugin repository to use.
                          Why would this repository require authentication and if that was the case why this information is not included in the pom.xml generated by roo?

                          Comment


                          • #14
                            I've also verified that my proxy configuration are specified as they should be! But, still error remains the same
                            Code:
                            [Thread-16] [ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.4.1 or
                            one of its dependencies could not be resolved: Failed to read artifact descripto
                            r for org.apache.maven.plugins:maven-clean-plugin:jar:2.4.1: Could not transfer
                            artifact org.apache.maven.plugins:maven-clean-plugin:pom:2.4.1 from/to spring-ma
                            ven-release (http://maven.springframework.org/release): Access denied to: http:/
                            /maven.springframework.org/release/org/apache/maven/plugins/maven-clean-plugin/2
                            .4.1/maven-clean-plugin-2.4.1.pom -> [Help 1]

                            Comment


                            • #15
                              Never mind. It has nothing to do with spring repo or anything like that.

                              I was able to download dependencies but not to mention getting dependencies from Spring repositories is very slow as compared with other maven repo's.

                              Comment

                              Working...
                              X