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

  • Roo configuration problem.

    Hi,

    I'm using ubuntu 11.04 and tried to use roo but I had various configuration problems.

    Currently I have jdk1.6.0_33 installed, apache-maven-3.0.4, spring-roo-1.2.2.RELEASE, sts-3.0.0.RELEASE

    The JAVA_HOME folder, it's lib and it's bin have been set in the PATH environment variable. MAVEN_HOME as well and ROO_HOME as well. I tried both .profile and .bashrc files for setting these variables.

    I'm trying to run perform tests with no success.

    I'm getting "Could not find artifact com.sun:tools:jar:1.4.2 at specified path JAVA_HOME/../lib/tools.jar -> [Help 1]" message from both console and STS (the tools.jar file exists in the JAVA_HOME/lib and I copied it as well in JVA_HOME/jre/lib)

    Any idea would be appreciated.

    Thanks.

  • #2
    Perhaps setting:

    JRE_HOME=$JAVA_HOME/jre

    It's searching lib/tools.jar into JAVA_HOME/.. and here not exists, but it exists into JRE_HOME

    Comment


    • #3
      No luck...

      Code:
      [ERROR] Failed to execute goal org.codehaus.mojo:aspectj-maven-plugin:1.2:compile (default) on project tenminutes: Execution default of goal org.codehaus.mojo:aspectj-maven-plugin:1.2:compile failed: Plugin org.codehaus.mojo:aspectj-maven-plugin:1.2 or one of its dependencies could not be resolved: Could not find artifact com.sun:tools:jar:1.4.2 at specified path /home/user/jdk1.6.0_33/../lib/tools.jar -> [Help 1]
      Actually I copied the tools jar inside the jre/lib as well, but it didn't work. I don't know if it is version 1.4.2 or any other; there is not any pom or other file inside the tools.jar indicating the version.

      I'm trying firstly to make it work using the console in order to avoid any configuration problems I could have with STS

      Comment


      • #4
        Just a thought, doesn't /etc/alternatives/java get involved here?

        I agree with the others - it could be that you are seeing the JRE's java command and that path first somehow.

        Check your path, make sure JAVA_HOME/bin is first, rather than the /usr/bin and /bin directories - as the /etc/alternatives/java stuff will be in /bin or /usr/bin - to make sure, do a which on java:

        which java

        You might get /usr/bin/java, which if you ls -l on it might be /etc/alternatives/java, which might be an openjdk jre directory.

        Not sure this is your problem, but something that confused the hell out of me on Ubuntu many times.

        Also, remember, STS has its own JRE settings, so look in STS.ini to set the proper directories there. And you'd want to install your JDK 1.6 as the preferred JDK in the Settings -> Java -> Java Runtimes (or whatever the name is). You may find that it is easier to get STS to work than the command line, until you get the Ubuntu java switcheroo system out of the way.
        Ken

        Comment


        • #5
          See this thread too:

          http://askubuntu.com/questions/21131...y-and-only-sun

          Comment


          • #6
            Thanks Ken,

            The problem is related to the configuration of the mojo aspectj-maven-plugin 1.2 used by roo in the project I was trying to test.
            If the JAVA_HOME is set to jdk root, ${java.home}/../lib/tools.jar (which is how the tools jar dependency is configured in the pom of the aspectj-maven-plugin), cannot be found.

            There is already mentioned in their jira

            Comment


            • #7
              Ok, gotcha. Have you tried a different version of AspectJ? I know they were using 1.1.x until 1.2.2 of Roo if I recall correctly. Maybe the upgrade isn't needed and you can downgrade to a lower version.

              Ken

              Comment


              • #8
                Well I tried with roo versions 1.1.1, 1.1.5, 1.2.2.
                In my repository there are two aspectj plugin versions: 1.0, 1.2.
                Both have the same configuration in their pom: ${java.home}/../lib/tools.jar
                I already had the JRE set and copied the tools jar from the jdk/lib to jdk/jre/lib (it exists only in the jdk/lib)
                For other known reasons, it's not good policy to set the JAVA_HOME to jdk/jre, so currently I changed the pom of the plugins in my repository, and if they will be updated, possibly I'll copy the tools jar in the same directory the java exists :P

                Until they solve this issue...

                Comment

                Working...
                X