8 Replies Latest reply on Apr 23, 2013 2:25 AM by Koen Aers

    Windows 7 Eclipse/Forge configuration issues. Help appreciated.

    Nikhil Gajwani Newbie

      So, I have just started using Eclipse, JBoss AS 7.1.1, Forge, Git and Maven and I'm running in to a number of issues. Because of my newness with all this technology and terminology, pardon any silly statements I might make henceforth.

       

      I've been trying to run a basic example (Ticket-Monster, which is documented here) and it recommends using Forge for some scaffolding. I've installed JBoss Tools in Eclipse and I'm trying to get Forge to recognize the Model called Member.java that gets created with a default JBoss EE project when created in Eclipse. (I'm using Windows 7 64 bit, with Eclipse Juno.)

       

      When I start Forge, I get this error:

       

      log4j:ERROR setFile(null,true) call failed.

      java.io.FileNotFoundException: C:\Users\Administrator\.forge\runtime.log (Access is denied)

       

      and

       

      Error during Startup event

      could not create config directory: C:\/Users/Administrator/.forge

       

      Later, I also get:

       

      Exception encountered: 14 problems were encountered while building the effective model for org.jboss.jdf.example.ticketmonster:ticket-monster:0.0.1-SNAPSHOT

      [ERROR] Non-resolvable import POM: Could not find artifact org.jboss.bom:jboss-javaee-6.0-with-tools:pom:1.0.4.Final @ line 85, column 25

      [ERROR] Non-resolvable import POM: Could not find artifact org.jboss.bom:jboss-javaee-6.0-with-hibernate:pom:1.0.4.Final @ line 92, column 25

      [ERROR] 'dependencies.dependency.version' for javax.enterprise:cdi-api:jar is missing. @ line 109, column 21

      [ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.annotation:jboss-annotations-api_1.1_spec:jar is missing. @ line 117, column 21

      [ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.ws.rs:jboss-jaxrs-api_1.1_spec:jar is missing. @ line 125, column 21

      [ERROR] 'dependencies.dependency.version' for org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar is missing. @ line 133, column 21

      [ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.ejb:jboss-ejb-api_3.1_spec:jar is missing. @ line 141, column 21

      [ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-validator:jar is missing. @ line 150, column 21

      [ERROR] 'dependencies.dependency.version' for org.jboss.spec.javax.faces:jboss-jsf-api_2.1_spec:jar is missing. @ line 164, column 21

      [ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-jpamodelgen:jar is missing. @ line 174, column 21

      [ERROR] 'dependencies.dependency.version' for org.hibernate:hibernate-validator-annotation-processor:jar is missing. @ line 182, column 21

      [ERROR] 'dependencies.dependency.version' for junit:junit:jar is missing. @ line 189, column 21

      [ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.junit:arquillian-junit-container:jar is missing. @ line 198, column 21

      [ERROR] 'dependencies.dependency.version' for org.jboss.arquillian.protocol:arquillian-protocol-servlet:jar is missing. @ line 204, column 21

       

      My guess is that the first two are simply a result of misconfiguration, in that Forge is trying to access a folder to which it does not have access (I'm not Administrator, I have my own user folder). I have tried in vain to find some configuration options or XML file to point Forge at another location. I've added variables like HOME and FORGE_HOME to both my windows environment and the Linked Resources in Eclipse and none of them seem to help.

       

      The latter issues seem to be related to the POM. The version numbers are indeed not mentioned in the POM for the packages, but they are in the "Effective POM" that Eclipse generates, so do I need to override them? Also, what are the non-resolvable import issues?

       

      Any help resolving these would be greatly appreciated.

       

      Thanks.

        • 1. Re: Windows 7 Eclipse/Forge configuration issues. Help appreciated.
          Koen Aers Master

          Hi Nikhil,

           

          Can you please detail the exact configuration of the software you are using?

          - JDK version

          - JBoss Tools version

           

          Do you use the Forge instance that comes with JBoss Tools or did you install a separate one? If you installed a separate one, what version is it?

           

          It seems indeed you are trying to run Forge as an administrator. Could it be that you installed Eclipse (and later on JBoss Tools) as administrator?

           

          Cheers,

          Koen

          • 2. Re: Windows 7 Eclipse/Forge configuration issues. Help appreciated.
            Nikhil Gajwani Newbie

            Hi Koen,

             

            I'm using JBoss Tools 4.0.1 with Eclipse Juno for EE developers (Service Release 2) on Windows 7. The JDK version is 7 (u10, I believe, which comes with the Glassfish3/JDK bundle on the Oracle website).

             

            I am using the Forge version that is provided with JBoss Tools.

             

            Finally, I'm not running Eclipse as Administrator, I am sure about that. I do not know what is happening behind the scenes when I ask Eclipse to start Forge for me, but shouldn't that be configurable? Maven allowed me to change the repository location to my personal folder (as opposed to C:\Users\Administrator\.m2\repository\) which it picked up be default. I changed it by providing a custom settings.xml file. Does the Forge tool as provided with JBoss tools let you do this? If not, how do I get it to change - do I have to edit a file inside a jar file somewhere?

             

            Installing Eclipse is simply an unpack operation and installing JBoss tools didn't require Administrator priveleges, so I don't know how these tools pick the Administrator folder as their default location.

             

            Thanks for the help!

             

            Nikhil

            • 3. Re: Windows 7 Eclipse/Forge configuration issues. Help appreciated.
              Koen Aers Master

              Hi Nikhil,

               

              Forge would normally use the ${USER_HOME}/.forge folder to store config and other info. It's not clear to me why it uses the Administrator user in your case. Unfortunately I am on OSX so I cannot immediately see what's going on. Also, I don't know of any similar issues in the past with Windows 7. Is there anything particular with your Windows 7 installation (like e.g. a corporate installation)?

               

              I will try to get hold of a Windows 7 machine to try and reproduce your issues (unless somebody else in this forum steps up of course).

               

              Cheers,

              Koen

              • 4. Re: Windows 7 Eclipse/Forge configuration issues. Help appreciated.
                Koen Aers Master

                In the meantime, could you just download a Forge distribution (take the latest from http://forge.jboss.org) and try and start it from a command line? Just unzip the distribution in ${FORGE_HOME}, open a command line, navigate to ${FORGE_HOME}/bin and issue forge.bat. If that works it's an issue with the JBoss Tools integration.

                 

                Cheers,

                Koen

                • 5. Re: Windows 7 Eclipse/Forge configuration issues. Help appreciated.
                  Nikhil Gajwani Newbie

                  Hi Koen,

                   

                  I just tried starting up Forge from the  command line and it seems to give me the same issues. For one, it still  seems to be trying to use C:\Users\Administrator\.forge as the root  folder for logging and saving files. I can't figure out why. I've  checked all the environment variables that the forge.bat file relies on  (FORGE_HOME, USERHOME, HOMEDRIVE, HOMEPATH, etc.) and they all point to the correct places.

                   

                  When the failures are  done printing, I get access to the Forge command prompt and I typed "set" (I  incorrectly assumed it had bounced me back to the command prompt) and  it gave me a list of options, but this one stuck out: FORGE_CONFIG_DIR=C:\Users\Administrator/.forge/. I do not know how this is acquired at startup - is there some way I can pass it as a command line parameter? I can't find any documentation about the parameters that can be passed in when starting it up at the command line.

                   

                  Lastly, I am using this in a corporate environment, and my PC is adminstered by the company, so that is certainly playing a part here. I still want to figure out a way around it.

                   

                  Thanks again.

                   

                  Nikhil

                  • 6. Re: Windows 7 Eclipse/Forge configuration issues. Help appreciated.
                    Lincoln Baxter III Master

                    Strange... you could try downloading the Forge sources from https://github.com/forge/core, importing the project, and running forge --debug (see http://forge.jboss.org/docs/using/debugging-forge.html), then simply attach the debugger in Maven, put a breakpoint in the Bootstrap class, and see where things start going wrong.

                     

                    Is that something you have time to do? It might help us figure out what is going wrong here.

                     

                    Thanks!

                    • 7. Re: Windows 7 Eclipse/Forge configuration issues. Help appreciated.
                      Koen Aers Master

                      Hey Nikhil,

                       

                      From what I can see it appears as if your Java programs run as Administrator. Maybe you can verify that by creating a simple Java program that outputs the System.getProperty("user.home") property.

                       

                      But it would indeed be a good idea to make the Forge config folder configurable. I have created an issue (https://issues.jboss.org/browse/FORGE-857) and submitted a pull request (https://github.com/forge/core/pull/307) that would make this happen.

                       

                      Cheers,

                      Koen

                      • 8. Re: Windows 7 Eclipse/Forge configuration issues. Help appreciated.
                        Koen Aers Master

                        Hi Nikhil,

                         

                        My fix was merged so if you build Forge from the sources you should be able to use it already. Otherwise, wait for the 1.2.4 release.

                         

                        Cheers,

                        Koen