10 Replies Latest reply on Apr 17, 2012 1:32 AM by Khobaib Chowdhury

    can not run JBoss AS in eclipse

    Khobaib Chowdhury Newbie


      I am trying to run the JBoss-AS-7.1.1.final in eclipse. I created a server as described in here -> https://docs.jboss.org/author/display/AS71/Getting+Started+Developing+Applications+Guide.

      Now when I try to start the server, I get error in the console ->

      "Error occurred during initialization of VM

      Unable to load native library: The specified procedure could not be found"

      I am stuck here for a long time. So please help me out.

      Thank You.

        • 1. Re: can not run JBoss AS in eclipse
          jaikiran pai Master

          Khobaib, welcome to the forums!


          I've moved this thread to the JBoss Tools forum where you might get some help.

          1 of 1 people found this helpful
          • 3. Re: can not run JBoss AS in eclipse
            Max Rydahl Andersen Master

            And you don't get *any* other error / stacktrace ?


            Which Java JRE/JDK are you using ?


            What OS ?


            Could you go to the debug perspective, find the java process that should be there, right click and choose Properties and copy the full command line ?



            1 of 1 people found this helpful
            • 4. Re: can not run JBoss AS in eclipse
              Rob Stryker Master

              strangely enough I'm not able to reproduce this... the 7.1.1.final version seems to start fine for me :|              

              • 5. Re: can not run JBoss AS in eclipse
                Khobaib Chowdhury Newbie

                Hi Max,


                Here is the error log/stack trace ->



                session data:




                java.vendor=Sun Microsystems Inc.

                BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US

                Framework arguments:  -product org.eclipse.epp.package.jee.product

                Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product



                Mon Apr 16 23:22:12 GMT+06:00 2012

                Cannot connect to VM


                Exception stack trace:


                java.net.SocketException: socket closed

                    at java.net.PlainSocketImpl.socketAccept(Native Method)

                    at java.net.PlainSocketImpl.accept(Unknown Source)

                    at java.net.ServerSocket.implAccept(Unknown Source)

                    at java.net.ServerSocket.accept(Unknown Source)

                    at org.eclipse.jdi.internal.connect.SocketTransportService.accept(SocketTransportService.java:95)

                    at org.eclipse.jdi.internal.connect.SocketTransportImpl.accept(SocketTransportImpl.java:56)

                    at org.eclipse.jdi.internal.connect.SocketListeningConnectorImpl.accept(SocketListeningConnectorImpl.java:135)

                    at org.eclipse.jdt.internal.launching.StandardVMDebugger$ConnectRunnable.run(StandardVMDebugger.java:107)

                    at java.lang.Thread.run(Unknown Source)



                I am using JRE 6 in Windows XP sp2. BTW, I didn't have server folder in my jre/bin path, so I copied the folder from my jdk/jre/bin folder. the standalone.bat file runs the server well in the windows OS. The problem is with eclipse.

                Wish some help.

                • 6. Re: can not run JBoss AS in eclipse
                  Khobaib Chowdhury Newbie

                  Also here is the JAVA process ->

                  C:\Program Files\Java\jre6\bin\javaw.exe


                  command line ->


                  "C:\Program Files\Java\jre6\bin\javaw.exe" -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:21212 -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file= C:/Program Files/jboss-7.1.1.Final/standalone/log/boot.log Files/jboss-7.1.1.Final/standalone/log/boot.log -Dlogging.configuration= file:/C:/Program Files/jboss-7.1.1.Final/standalone/configuration/logging.properties Files/jboss-7.1.1.Final/standalone/configuration/logging.properties -Djboss.home.dir= C:/Program Files/jboss-7.1.1.Final Files/jboss-7.1.1.Final -Dfile.encoding=Cp1252 -classpath "C:\Program Files\jboss-7.1.1.Final\jboss-modules.jar" org.jboss.modules.Main -mp \"\" C:/Program Files/jboss-7.1.1.Final/modules Files/jboss-7.1.1.Final/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -b localhost --server-config=standalone.xml

                  • 7. Re: can not run JBoss AS in eclipse
                    Denis Golovin Master

                    I would ry to move JVM and JBoss to location without spaces in path

                    • 8. Re: can not run JBoss AS in eclipse
                      Max Rydahl Andersen Master

                      Rob - looks like you need to test java launch code on Windows soon.


                      The launch has a mix of quoted, non quoted (-Djboss.home.dir= C:/Program Files/jboss-7.1.1.Final Files/jboss-7.1.1.Final) and even double qouted strings with no termination (-mp \"\" C:/Program Files/jboss-7.1.1.Final/modules Files/jboss-7.1.1.Final/modules -jaxpmodule)


                      And Khohabib - yes, please try with a JBoss intall into a directory without space in the file/dir names. It should of course work with spaces but looks like there is a bug here.

                      • 9. Re: can not run JBoss AS in eclipse
                        Khobaib Chowdhury Newbie


                        I tried with replacing JBoss AS into a directory without space but still it fails. Here is the command line for process info ->


                        "C:\Program Files\Java\jre6\bin\javaw.exe" -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:3593 -server -Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=C:/jboss-7.1.1.Final/standalone/log/boot.log -Dlogging.configuration=file:/C:/jboss-7.1.1.Final/standalone/configuration/logging.properties -Djboss.home.dir=C:/jboss-7.1.1.Final -Dfile.encoding=Cp1252 -classpath C:\jboss-7.1.1.Final\jboss-modules.jar org.jboss.modules.Main -mp C:/jboss-7.1.1.Final/modules -jaxpmodule javax.xml.jaxp-provider org.jboss.as.standalone -b localhost --server-config=standalone.xml


                        However, if I try to change JVM's directory, it occurs some java virtual machine launcher error while running eclipse like this ->

                             error: couldn't open "C:\\Program Files\Java\jre6\lib\i386\jvm.cfg"

                        & if I press Ok button another page comes ->

                             java was started but returned exit code = 1





                        So how can I change the directory of JVM? & if it also not works, what should I do next?

                        • 10. Re: can not run JBoss AS in eclipse
                          Khobaib Chowdhury Newbie

                          Ok I have found where was the problem. I don't know why but my JRE doesn't have bin/javaw.exe file. I changed the installed JRE location of eclipse to the JDK's location & it finds the javaw.exe. The problem was -> when the server tried to run, javaw.exe file wasn't found.

                          Thanks everyone for the help. I really appreciate this.